/* ---------- Reset ---------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ---------- Base ---------- */
body {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: #111111;
  background-color: #ffffff;
}

a {
  color: inherit;
  text-decoration: none;
}

/* NEW: visible outline when a link is reached with the keyboard (Tab key) */
a:focus-visible {
  outline: 2px solid #111111;
  outline-offset: 2px;
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
}

.site-logo {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 16px;
}

.site-nav a {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* NEW: underline the link for the page you are currently on */
.site-nav a.is-current {
  border-bottom: 1px solid #111111;
  padding-bottom: 2px;
}

/* ---------- Page title area ---------- */
.page-title {
  font-size: 18px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 24px 24px 4px 24px;
}

.product-count {
  color: #777777;
  padding: 0 24px 24px 24px;
}

.category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 12px 24px 20px;
}

.category-nav a {
  padding: 8px 0;
  color: #777777;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.category-nav a:hover,
.category-nav a[aria-current="page"] {
  color: #111111;
  border-bottom-color: currentColor;
}

.category-nav a:focus-visible {
  outline: 2px solid #111111;
  outline-offset: 4px;
}

/* ---------- Product grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 12px;
  row-gap: 40px;
  padding: 0 24px 60px 24px;
}

.product-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  background-color: #f2f2f2;
}

.product-card .product-image {
  aspect-ratio: 4 / 5;
}

/* Keep every garment visible inside the shop's image frames. */
.product-card .product-image {
  object-fit: contain;
  background-color: #ffffff;
}

.product-name {
  font-size: 13px;
  font-weight: 400;
  margin-top: 10px;
}

.product-price {
  color: #555555;
  margin-top: 4px;
}

/* ---------- NEW: About and Contact content ---------- */

/* Larger type and a wider column give the brand pages more room. */
.page-content {
  max-width: 720px;
  padding: 28px 24px 96px 24px;
}

.page-content p {
  font-size: 18px;
  line-height: 1.7;
  margin-bottom: 24px;
}

/* Links inside paragraphs need an underline so they look clickable */
.page-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Contact details: one row per item, label on the left, value on the right */
.contact-list {
  margin-top: 32px;
}

.contact-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  padding: 20px 0;
  border-top: 1px solid #eeeeee;
}

.contact-row:last-child {
  border-bottom: 1px solid #eeeeee;
}

.contact-row dt {
  font-size: 16px;
  color: #777777;
}

.contact-row dd {
  min-width: 0;
  font-size: 18px;
  overflow-wrap: anywhere;
}

/* ---------- NEW: Product page ---------- */

.back-link {
  display: inline-block;
  padding: 8px 24px 0 24px;
  color: #777777;
  font-size: 18px
}

.back-link:hover {
  color: #111111;
}

/* Two columns: photos on the left (flexible), info on the right (fixed 320px) */
.product-page {
  display: grid;
  grid-template-columns: 1fr 320px;
  column-gap: 48px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 24px 80px 24px;
}

/* Photos stack in one column with a small gap between them.
   Each photo also uses the .product-image class from the shop grid. */
.product-gallery {
  display: grid;
  row-gap: 12px;
  align-content: start;
  min-width: 0;
}

.product-gallery-section {
  min-width: 0;
}

.product-gallery-controls {
  display: none;
}

/* Each cropped photograph keeps its proportions, including wide detail views. */
.product-page .product-gallery .product-image {
  height: auto;
  max-height: 760px;
  object-fit: contain;
  background-color: #ffffff;
}

/* The info column stays in view while you scroll past the photos.
   align-self: start is required, otherwise the column stretches to the
   full height of the gallery and sticky has no room to move. */
.product-info {
  position: sticky;
  top: 24px;
  align-self: start;
}

.product-title {
  font-size: 16px;
  font-weight: 400;
}

.product-info .product-price {
  font-size: 14px;
  margin-top: 8px;
}

/* ---------- Image zoom ---------- */
.image-zoom-frame {
  position: relative;
  overflow: hidden;
  min-width: 0;
  background: #ffffff;
}

.image-zoom-frame .product-image {
  transition: transform 180ms ease-out;
}

@media (hover: hover) and (pointer: fine) {
  .image-zoom-frame.is-hovering .product-image {
    transform: scale(2);
  }
}

.photo-zoom-button {
  display: block;
  position: relative;
  width: 100%;
  padding: 0;
  border: 0;
  background: #ffffff;
  color: #111111;
  font: inherit;
  cursor: zoom-in;
}

.photo-zoom-label {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 9px 12px;
  border: 1px solid #dddddd;
  background: rgba(255, 255, 255, 0.94);
  pointer-events: none;
}

button:focus-visible,
.photo-viewer-stage:focus-visible {
  outline: 2px solid #111111;
  outline-offset: 2px;
}

.photo-zoom-button:focus-visible {
  outline-offset: -3px;
}

body.photo-viewer-open {
  overflow: hidden;
}

.photo-viewer {
  width: min(1100px, 94vw);
  height: 94vh;
  height: 94dvh;
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 16px;
  border: 0;
  color: #111111;
  background: #ffffff;
}

.photo-viewer[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 12px;
}

.photo-viewer::backdrop {
  background: rgba(0, 0, 0, 0.65);
}

.photo-viewer-toolbar,
.photo-viewer-zoom,
.photo-viewer-navigation {
  display: flex;
  align-items: center;
  gap: 8px;
}

.photo-viewer-toolbar {
  justify-content: space-between;
}

.photo-viewer button {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #dddddd;
  background: #ffffff;
  color: #111111;
  font: inherit;
  cursor: pointer;
}

.photo-viewer button:hover:not(:disabled) {
  background: #f2f2f2;
}

.photo-viewer button:disabled {
  color: #aaaaaa;
  cursor: default;
}

.photo-viewer-level {
  min-width: 44px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.photo-viewer-stage {
  min-height: 0;
  min-width: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background: #fafafa;
}

.photo-viewer-stage.is-zoomed {
  cursor: grab;
}

.photo-viewer-stage.is-dragging {
  cursor: grabbing;
}

.photo-viewer-canvas {
  display: grid;
  place-items: center;
  width: max-content;
  min-width: 100%;
  min-height: 100%;
}

.photo-viewer-image {
  display: block;
  max-width: none;
  user-select: none;
}

.photo-viewer-navigation {
  justify-content: space-between;
}

.photo-viewer-caption {
  text-align: center;
  line-height: 1.5;
}

.photo-viewer-thumbnails {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 3px;
}

.photo-viewer-thumbnails button {
  flex: 0 0 56px;
  height: 60px;
  padding: 3px;
}

.photo-viewer-thumbnails button[aria-pressed="true"] {
  border: 2px solid #111111;
}

.photo-viewer-thumbnails img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 700px) {
  .photo-viewer {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    padding: 12px;
  }

  .photo-viewer-toolbar,
  .photo-viewer-zoom {
    gap: 4px;
  }

  .photo-viewer button {
    padding: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .image-zoom-frame .product-image {
    transition: none;
  }
}

.product-description {
  font-size: 14px;
  line-height: 1.6;
  margin-top: 24px;
}

.product-details {
  list-style: none;
  margin-top: 24px;
}

.product-details li {
  padding: 10px 0;
  border-top: 1px solid #eeeeee;
}

.product-details li:last-child {
  border-bottom: 1px solid #eeeeee;
}

/* A link styled to look like a button */
.order-link {
  display: block;
  margin-top: 32px;
  padding: 14px 0;
  border: 1px solid #111111;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.order-link:hover {
  background-color: #111111;
  color: #ffffff;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 40px 24px;
  color: #777777;
  border-top: 1px solid #eeeeee;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 700px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* NEW: smaller label column so contact rows fit on a phone */
  .contact-row {
    grid-template-columns: 90px 1fr;
  }

  /* One compact, swipeable photo gallery puts the details within reach. */
  .product-page {
    grid-template-columns: 1fr;
    row-gap: 20px;
  }

  .product-gallery {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }

  .product-gallery::-webkit-scrollbar {
    display: none;
  }

  .product-gallery > .image-zoom-frame,
  .product-gallery > .product-image {
    flex: 0 0 100%;
    height: clamp(200px, 38svh, 340px);
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .product-gallery .photo-zoom-button {
    height: 100%;
  }

  .product-page .product-gallery .product-image {
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
    object-fit: contain;
  }

  .product-gallery-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    text-align: center;
  }

  .product-gallery-controls button {
    width: 44px;
    height: 44px;
    border: 1px solid #dddddd;
    background: #ffffff;
    color: #111111;
    font: inherit;
    cursor: pointer;
  }

  .product-gallery-controls button:disabled {
    color: #aaaaaa;
    cursor: default;
  }

  .product-gallery-count,
  .product-gallery-hint {
    display: block;
    line-height: 1.5;
  }

  .product-gallery-hint {
    font-size: 11px;
    color: #777777;
  }

  .product-info {
    position: static;
  }
}
