/* Focused interaction layer: preserve the approved storefront tokens and extend only the new controls and full-screen surfaces. */
:root {
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  scrollbar-color: var(--muted) var(--page);
  accent-color: var(--brand);
}
:root[lang="en"] {
  --copy: "DM Sans", system-ui, sans-serif;
  --display: Georgia, "Times New Roman", serif;
  font-size: 16px;
}

button.text-link {
  padding: 5px 0;
  border: 0;
  background: transparent;
  font-family: var(--copy);
  cursor: pointer;
}
button.text-link:active { transform: scale(.985); }

.language-switch {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: inherit;
}
.language-switch button {
  min-width: 35px;
  min-height: 30px;
  padding: 4px 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: 600 .76rem/1 var(--copy);
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease;
}
.language-switch button[aria-pressed="true"] {
  background: var(--brand);
  color: var(--brand-ink);
}
.language-switch button:focus-visible { outline-offset: 1px; }

.product-card { cursor: pointer; }
.product-image-button, .wishlist-button, .product-actions button, .product-actions a { cursor: pointer; }
.filter-button { transition: color 160ms var(--ease-out), background-color 160ms var(--ease-out); }
.category-photo img.image-enter,
.product-image-button img.image-enter { opacity: 0; transition: opacity 180ms var(--ease-out), transform .55s var(--ease); }
.related-photo img.image-enter,
.dialog-image img.image-enter { opacity: 0; transition: opacity 180ms var(--ease-out); }
img.image-enter.is-loaded { opacity: 1; }

.category-gallery {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: var(--page);
  color: var(--ink);
  overscroll-behavior: contain;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out), display 220ms allow-discrete;
}
.category-gallery[open] { display: block; opacity: 1; transform: translateY(0); }
.category-gallery::backdrop {
  background: rgba(12, 14, 12, .72);
  opacity: 0;
  transition: opacity 220ms var(--ease-out), display 220ms allow-discrete;
}
.category-gallery[open]::backdrop { opacity: 1; }
@starting-style {
  .category-gallery[open] { opacity: 0; transform: translateY(8px); }
  .category-gallery[open]::backdrop { opacity: 0; }
}
.gallery-shell {
  width: min(100%, var(--page-width));
  max-height: 100%;
  margin-inline: auto;
  padding: clamp(28px, 4.5vw, 62px) var(--gutter) max(28px, env(safe-area-inset-bottom));
  overflow-y: auto;
  scrollbar-color: var(--muted) var(--page);
  scrollbar-width: thin;
}
.gallery-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-right: 52px;
}
.gallery-header h2 {
  max-width: 900px;
  margin: 0;
  font: 500 clamp(2rem, 4.8vw, 4rem)/1.08 var(--display);
  letter-spacing: -.035em;
  text-wrap: balance;
}
.gallery-header p {
  max-width: 58ch;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}
.gallery-close {
  position: fixed;
  z-index: 5;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08); /* taste-skill-ignore: floating close control inside the real category-gallery dialog */
}
.gallery-count {
  margin: 23px 0 14px;
  color: var(--muted);
  font-size: .93rem;
  font-variant-numeric: tabular-nums;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 17px 20px;
  padding-bottom: 24px;
}
.gallery-card {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.gallery-card .category-photo {
  aspect-ratio: 1.12;
  overflow: hidden;
  border-radius: 9px;
  background: var(--photo);
}
.gallery-card .category-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .42s var(--ease);
}
.gallery-card .category-caption {
  min-height: 74px;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 2px 0;
}
.gallery-card .category-caption strong {
  display: block;
  font: 500 clamp(.96rem, 1.25vw, 1.2rem)/1.22 var(--display);
}
.gallery-card .category-caption span {
  margin-top: 4px;
  font-size: .82rem;
  line-height: 1.35;
}
.gallery-card .category-arrow { width: 28px; height: 28px; }
.gallery-card .category-arrow svg { width: 18px; height: 18px; }
.gallery-card:focus-visible { outline-offset: 4px; }

.product-dialog {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--page);
  color: var(--ink);
  transform-origin: top left;
  will-change: transform, opacity;
  overscroll-behavior: contain;
}
.product-dialog[open] { display: block; }
.product-dialog::backdrop {
  background: rgba(12, 14, 12, 0);
  transition: background-color 270ms var(--ease-in-out);
}
.product-dialog.is-active::backdrop { background: rgba(12, 14, 12, .74); }
.product-dialog-close {
  position: absolute;
  z-index: 4;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08); /* taste-skill-ignore: floating close control inside the real product-detail dialog */
}
.dialog-layout {
  width: 100%;
  height: 100%;
  min-height: 0;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
}
.dialog-image {
  min-width: 0;
  min-height: 0;
  border-radius: 0;
  background: var(--photo);
}
.dialog-image img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}
.dialog-image .tile { width: 100%; height: 100%; min-height: 0; }
.dialog-copy {
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
  justify-content: center;
  overflow-y: auto;
  padding: clamp(34px, 5vw, 78px);
  scrollbar-color: var(--muted) var(--page);
  scrollbar-width: thin;
}
.dialog-category { margin-top: 0; }
.dialog-copy h2 { max-width: 22ch; }
.dialog-description { max-height: 26vh; scrollbar-color: var(--muted) var(--surface); }
.dialog-actions .primary-link { width: fit-content; }
.dialog-note { max-width: 50ch; }

@media (hover: hover) and (pointer: fine) {
  .gallery-card:hover .category-photo img { transform: scale(1.035); }
  .related-card:hover { color: var(--brand); }
}

@media (max-width: 900px) {
  .site-header { gap: 20px; }
  .main-nav { gap: clamp(14px, 2.7vw, 23px); }
  .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dialog-copy { padding: 34px 30px; }
  .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .site-header { gap: 8px 10px; }
  .header-actions { gap: 2px; }
  .language-switch { padding: 2px; }
  .language-switch button { min-width: 31px; min-height: 28px; padding: 4px 6px; font-size: .72rem; }
  .gallery-shell { padding: max(26px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom)); }
  .gallery-header { padding-right: 42px; }
  .gallery-header h2 { font-size: clamp(1.8rem, 8vw, 2.55rem); }
  .gallery-header p { max-width: 36ch; margin-top: 8px; font-size: .92rem; }
  .gallery-close { top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); width: 42px; height: 42px; }
  .gallery-count { margin: 18px 0 11px; font-size: .86rem; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 13px; }
  .gallery-card .category-photo { aspect-ratio: .97; border-radius: 8px; }
  .gallery-card .category-caption { min-height: 67px; gap: 5px; padding-top: 7px; }
  .gallery-card .category-caption strong { font-size: .93rem; }
  .gallery-card .category-caption span { font-size: .75rem; }
  .gallery-card .category-arrow { width: 23px; height: 24px; }
  .gallery-card .category-arrow svg { width: 16px; height: 16px; }
  .product-dialog { height: 100svh; height: 100dvh; }
  .dialog-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 44svh) minmax(0, 1fr);
    height: 100%;
  }
  .dialog-image { width: 100%; height: 100%; }
  .dialog-image img { width: 100%; height: 100%; object-fit: contain; }
  .dialog-copy {
    height: auto;
    padding: 22px 21px max(24px, env(safe-area-inset-bottom));
    justify-content: flex-start;
  }
  .dialog-category { margin-right: 50px; font-size: .87rem; }
  .dialog-copy h2 { max-width: none; margin-right: 44px; font-size: clamp(1.5rem, 6.3vw, 2rem); }
  .dialog-price { margin-top: 9px; font-size: 1.45rem; }
  .dialog-description { max-height: none; margin-top: 12px; font-size: .9rem; }
  .dialog-actions { gap: 8px 14px; margin-top: 14px; }
  .dialog-actions .primary-link { width: 100%; min-height: 48px; justify-content: space-between; }
  .dialog-actions .text-button { min-height: 44px; }
  .dialog-note { margin-top: 7px; font-size: .82rem; }
  .related-products { margin-top: 25px; }
  .related-products h3 { margin-bottom: 11px; font-size: 1.12rem; }
  .related-grid { gap: 9px; }
  .related-card { gap: 5px; padding: 6px; }
  .related-name { font-size: .8rem; }
  .related-sku { font-size: .72rem; }
  .related-price { font-size: .88rem; }
}

@media (max-width: 360px) {
  .site-header { gap: 7px 5px; }
  .header-actions { gap: 1px; }
  .icon-button { width: 32px; height: 32px; padding: 5px; }
  .icon-button svg { width: 20px; height: 20px; }
  .language-switch button { min-width: 28px; padding-inline: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  .product-dialog::backdrop { transition: none; }
  .category-gallery,
  .category-gallery[open] { transform: none; transition-duration: .01ms; }
  .category-gallery::backdrop,
  .category-photo img.image-enter,
  .product-image-button img.image-enter,
  .related-photo img.image-enter,
  .dialog-image img.image-enter { transition-duration: .01ms; }
  .gallery-card .category-photo img,
  .language-switch button { transition-duration: .01ms; }
}

.related-products { margin-top: 28px; }
.related-products h3 { margin: 0 0 13px; font: 500 1.24rem/1.25 var(--display); }
.related-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.related-card { display: grid; min-width: 0; gap: 7px; padding: 7px; border: 0; background: var(--surface-soft); color: var(--ink); text-align: left; cursor: pointer; transition: color .16s ease; }
.related-photo { aspect-ratio: 1; overflow: hidden; background: var(--photo); }
.related-photo img { width: 100%; height: 100%; object-fit: cover; }
.related-photo .tile { display: flex; min-height: 100%; flex-direction: column; justify-content: space-between; padding: 9px; background: var(--photo); color: var(--muted); font-size: .72rem; }
.related-name { display: -webkit-box; overflow: hidden; color: inherit; font-size: .84rem; font-weight: 600; line-height: 1.25; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.related-sku { overflow: hidden; color: var(--muted); font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }
.related-price { color: var(--brand); font-size: .92rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.related-card:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

@media (max-width: 900px) {
  .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .related-products { margin-top: 25px; }
  .related-products h3 { margin-bottom: 11px; font-size: 1.12rem; }
  .related-products .related-grid { gap: 9px; }
  .related-products .related-card { gap: 5px; padding: 6px; }
  .related-products .related-name { font-size: .8rem; }
  .related-products .related-sku { font-size: .72rem; }
  .related-products .related-price { font-size: .88rem; }
}

/* Crawlable catalog links: same look as the original buttons and text. */
.product-title-link { color: inherit; text-decoration: none; }
.product-title-link:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
a.cat-row { text-decoration: none; }
a.cat-row:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.pager .pager-link {
  display: inline-flex; min-height: 46px; align-items: center; padding: 8px 17px; border-radius: 5px;
  background: var(--surface); color: var(--ink); font-size: .96rem; text-decoration: none; cursor: pointer;
  transition: background .18s ease, color .18s ease;
}
.pager .pager-link:hover { color: var(--brand); }
.pager .pager-link:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.pager .pager-link[aria-disabled="true"] { color: var(--muted); cursor: default; opacity: .55; pointer-events: none; }
.route-notice[hidden] { display: none; }
.route-notice { margin: 0 0 14px; }
.sub-index { margin: 4px 0 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.sub-index-title { margin: 0 0 12px; color: var(--muted); font-size: .9rem; font-weight: 600; }
.sub-index-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 24px; }
.sub-index-group h4 { margin: 0 0 6px; font-size: .96rem; font-weight: 600; }
.sub-index-group h4 a { color: var(--ink); text-decoration: none; }
.sub-index-group ul { display: grid; gap: 1px; margin: 0; padding: 0; list-style: none; }
.sub-index-group li a {
  display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; color: var(--muted);
  font-size: .9rem; text-decoration: none;
}
.sub-index-group li a span { font-variant-numeric: tabular-nums; }
.sub-index-group a:hover { color: var(--brand); }
.sub-index-group a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (max-width: 680px) {
  .pager .pager-link { min-height: 42px; padding-inline: 12px; font-size: .88rem; }
  .sub-index-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .sub-index-group li a { font-size: .84rem; }
}
