/* Shop and product details. The homepage stylesheet stays independent. */
[hidden] { display: none !important; }
nav a[aria-current="page"] { border-bottom: 1px solid var(--accent); color: var(--accent); }
.shop-main { padding: 28px 5% 80px; min-height: 65vh; }
.breadcrumbs { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 12px; font-size: 11px; color: var(--muted); margin-bottom: 36px; }
.breadcrumbs a { padding: 0; text-decoration: underline; text-underline-offset: 4px; }
.js-ready nav.breadcrumbs { display: flex; }
.shop-intro { max-width: 750px; margin-bottom: 24px; }
.shop-intro h1 { font-size: clamp(32px, 4vw, 50px); margin-bottom: 14px; }
.shop-intro > p:last-child { color: var(--muted); font-size: 14px; }
.catalog-notice { border: 1px solid var(--line); padding: 14px 18px; font-size: 12px; color: var(--muted); background: #fff7f7; margin-bottom: 28px; }
.filter-panel { padding: 24px; background: #f5f2f2; margin-bottom: 24px; }
.search-row, .filter-row, .variant-row { display: grid; gap: 16px; }
.search-row { grid-template-columns: 2fr 1fr; margin-bottom: 18px; }
.filter-row { grid-template-columns: repeat(4, minmax(0, 1fr)) auto; align-items: end; }
label { display: flex; flex-direction: column; gap: 7px; color: var(--ink); font-size: 12px; }
input, select { min-width: 0; width: 100%; border: 1px solid #cbc4c5; border-radius: 0; background: #ffffff; padding: 12px; color: var(--ink); font: 14px "Segoe UI", "Nirmala UI", sans-serif; min-height: 46px; }
input:disabled, select:disabled { background: #f0eded; color: #777777; }
.reset-button { border: 1px solid var(--ink); min-height: 46px; padding: 10px 15px; background: transparent; color: var(--ink); cursor: pointer; font-size: 12px; }
.reset-button:hover { background: var(--ink); color: white; }
.result-count { font-size: 12px; margin: 20px 0; color: var(--muted); }
.shop-grid { row-gap: 40px; }
.catalog-image { display: block; }
.card-action { position: absolute; bottom: 0; left: 0; right: 0; background: #191919ee; color: white; padding: 11px 16px; font-size: 11px; }
.empty-state { border: 1px solid var(--line); padding: 55px 24px; text-align: center; }
.empty-state h1, .empty-state h2 { font-size: 28px; margin-bottom: 15px; }
.empty-state p { color: var(--muted); font-size: 14px; }
.empty-state button { border: 0; cursor: pointer; }
.product-layout { display: grid; grid-template-columns: 1.05fr 1fr; gap: 7%; align-items: start; }
.main-product-image { position: relative; aspect-ratio: 4/5; overflow: hidden; background: #e8e5e5; }
.main-product-image img { object-fit: contain; transition: transform .3s; }
.main-product-image .detail-crop { object-fit: cover; transform: scale(1.85); object-position: center 65%; }
.main-product-image .product-tag { z-index: 1; }
.gallery-controls { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.gallery-button { border: 1px solid var(--line); background: transparent; color: var(--ink); min-height: 44px; padding: 10px 17px; cursor: pointer; font-size: 12px; }
.gallery-button[aria-pressed="true"] { background: var(--ink); color: white; border-color: var(--ink); }
.product-info h1 { font-size: clamp(29px, 3vw, 44px); margin-bottom: 10px; }
.detail-price { font: 27px Georgia, serif; color: var(--accent); margin-bottom: 22px; }
.description { color: var(--muted); font-size: 14px; line-height: 2; }
.variant-form { border-top: 1px solid var(--line); padding-top: 24px; margin-top: 24px; }
.variant-row { grid-template-columns: 1fr 1fr; }
.quantity-label { max-width: 120px; margin-top: 18px; }
#variant-status { margin: 16px 0 8px; font-size: 12px; color: var(--muted); }
.selection-summary { font-size: 13px; min-height: 26px; }
.cart-coming { width: 100%; justify-content: center; border: 0; opacity: .65; cursor: not-allowed; }
.product-info details { border-top: 1px solid var(--line); padding: 17px 0; }
.product-info details:last-child { border-bottom: 1px solid var(--line); }
.product-info summary { cursor: pointer; font-size: 14px; }
.product-info details p { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.related-products { padding-top: 80px; }
.related-products .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1000px) {
  .filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reset-button { grid-column: 1 / -1; }
  .product-layout { gap: 4%; }
}
@media (max-width: 700px) {
  .shop-main { padding: 22px 6% 50px; }
  .breadcrumbs { flex-basis: auto; padding-top: 0; gap: 10px; margin-bottom: 25px; }
  .breadcrumbs a { flex-basis: auto; padding: 0; }
  .filter-panel { padding: 18px; }
  .search-row { grid-template-columns: 1fr; }
  .filter-row { gap: 14px; }
  .product-layout { grid-template-columns: 1fr; gap: 30px; }
  .product-info h1 { font-size: 33px; }
  .related-products { padding-top: 50px; }
  .related-products .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .related-products .product-card:last-child { grid-column: auto; max-width: none; }
}

.shop-category-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; margin-bottom: 12px; }
.shop-category-strip button {
  flex: 0 0 auto;
  min-height: 44px;
  border: 1px solid #d9cacc;
  background: white;
  color: #562b30;
  padding: .4rem .85rem;
  font: inherit;
  cursor: pointer;
}
.shop-category-strip button[aria-pressed="true"] { background: #762d35; border-color: #762d35; color: white; }
.shop-category-strip button:focus-visible, .shop-filter-toggle:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.shop-filter-toggle { display: none; }
#filter-form .filter-row { grid-template-columns: repeat(auto-fit, minmax(min(135px, 100%), 1fr)); }
.shop-grid .product-image img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 700px) {
  .shop-filter-toggle { display: inline-block; }
  .shop-filter-toggle[aria-expanded="false"] + .filter-row { display: none; }
  .shop-filter-toggle[aria-expanded="true"] + .filter-row { margin-top: 12px; }
  .shop-grid .product-card:last-child { grid-column: auto; max-width: none; }
}

.shop-more { margin: 24px 0 0; text-align: center; }
.shop-more[hidden] { display: none; }

#shop-occasion-filter[hidden], #shop-occasion-strip[hidden] { display: none; }

/* Keep catalogue controls compact so the first product row appears sooner. */
.shop-catalogue { padding: 20px 3% 64px; }
.shop-catalogue .breadcrumbs { margin-bottom: 12px; }
.shop-catalogue .shop-intro { margin-bottom: 12px; }
.shop-catalogue .shop-intro h1 { font-size: clamp(28px, 3vw, 42px); margin: 0; }
.shop-catalogue .catalog-notice { margin: 0 0 12px; padding: 7px 12px; }
.shop-catalogue .shop-category-strip { padding-block: 2px 5px; margin-bottom: 6px; }
.shop-catalogue #filter-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 10px 12px;
  margin-bottom: 0;
}
.shop-catalogue .search-row { grid-template-columns: minmax(0, 1fr) minmax(110px, 24%); gap: 8px; margin: 0; }
.shop-catalogue .shop-filter-toggle { display: inline-block; }
.shop-catalogue .filter-row { grid-column: 1 / -1; }
.shop-catalogue .shop-filter-toggle[aria-expanded="false"] + .filter-row { display: none; }
.shop-catalogue .result-count { margin: 9px 0; }
.shop-catalogue .shop-grid { gap: 24px 16px; }
@media (min-width: 1100px) {
  .shop-catalogue .shop-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .shop-catalogue { padding-inline: 4%; }
  .shop-catalogue .shop-grid { gap: 16px 10px; }
  .shop-catalogue #filter-form { grid-template-columns: 1fr; }
  .shop-catalogue .shop-filter-toggle { justify-self: start; }
  .shop-catalogue .shop-filter-toggle[aria-expanded="true"] + .filter-row { margin-top: 0; }
}

.product-zoom-trigger {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.product-zoom-trigger:focus-visible { outline: 3px solid var(--accent); outline-offset: -4px; }
.product-zoom-icon {
  position: absolute;
  inset: 12px 12px auto auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  color: #191919;
  font: 26px/1 system-ui, sans-serif;
  box-shadow: 0 2px 8px #0003;
}
.product-photo-dialog {
  width: min(94vw, 1200px);
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}
.product-photo-dialog::backdrop { background: #191919c9; }
html:has(.product-photo-dialog[open]) { overflow: hidden; }
.product-zoom-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 12px;
}
.product-zoom-toolbar button {
  min-height: 44px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.product-zoom-viewport {
  display: grid;
  place-items: center;
  height: min(76vh, 850px);
  height: min(76dvh, 850px);
  overflow: auto;
  overscroll-behavior: contain;
  background: #f5f2f2;
}
.product-zoom-viewport.is-zoomed { place-items: start; }
.product-zoom-viewport img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-width: none;
  object-fit: contain;
}

/* Extend the selected photo's colours into the space around it. */
.product-zoom-trigger { position: relative; overflow: hidden; isolation: isolate; }
.product-zoom-trigger .product-photo-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: blur(32px) saturate(1.2);
  transform: scale(1.65);
  pointer-events: none;
}
.product-zoom-trigger #main-product-photo { position: relative; z-index: 1; background: transparent; }
.product-zoom-trigger .product-zoom-icon { z-index: 2; }

.product-choice { min-width: 0; border: 0; padding: 0; margin: 0; }
.product-choice legend { padding: 0; margin-bottom: 7px; font-size: 13px; }
.product-choice-options { display: flex; flex-wrap: wrap; gap: 7px; }
.product-choice-options button {
  min-width: 44px;
  min-height: 44px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.product-choice-options button[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.product-choice-options button.is-unavailable { color: var(--muted); text-decoration: line-through; background: #f5f2f2; }
.product-info .product-size-guide { border: 0; padding: 8px 0 0; }
.product-size-guide p { white-space: pre-line; }
.product-delivery-info { margin: 10px 0; padding: 10px 12px; background: #faf4f4; font-size: 13px; }
.product-delivery-info h2 { margin: 0 0 4px; font: inherit; font-weight: 700; }
.product-delivery-info p { margin: 0 0 3px; }
.product-delivery-info a { text-decoration: underline; text-underline-offset: 3px; }

.product-size-guide-button {
  min-height: 44px;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  cursor: pointer;
  font: inherit;
  padding-inline: 0;
}
.product-size-dialog {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(100%, 580px);
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: clamp(16px, 3vw, 30px);
  border: 0;
  background: #fff;
  color: var(--ink);
  overflow: auto;
  overscroll-behavior: contain;
}
.product-size-dialog::backdrop { background: #19191999; }
html:has(.product-size-dialog[open]) { overflow: hidden; }
.product-size-dialog-heading, .product-size-dialog-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.product-size-dialog-heading { justify-content: space-between; }
.product-size-dialog-heading h2 { margin: 0; font-size: clamp(24px, 4vw, 32px); }
.product-size-dialog-heading button {
  min-width: 44px;
  min-height: 44px;
  background: #fff;
  border: 1px solid var(--line);
  cursor: pointer;
  font-size: 24px;
}
.product-size-dialog-item img { width: 68px; height: 84px; object-fit: contain; }
.product-size-dialog-item p { margin: 2px 0 0; }
.product-size-table-scroll { overflow-x: auto; margin-bottom: 16px; }
.product-size-table-scroll table { width: 100%; border-collapse: collapse; }
.product-size-table-scroll caption { text-align: start; font-weight: 600; padding-bottom: 8px; }
.product-size-table-scroll :is(th, td) { border: 1px solid var(--line); padding: 8px; text-align: start; }
.product-size-table-scroll :is(thead, tr:nth-child(even)) { background: #f7f2f2; }
#size-guide { white-space: pre-line; }
