/* Qorako'l Shop: the design tokens are described in DESIGN.md */

@font-face {
  font-family: 'Lora';
  src: url('../fonts/lora-var.woff') format('woff');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-semibold.woff') format('woff');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

*,
*::after,
*::before {
  box-sizing: border-box;
}

:root {
  font-size: 14px;
  --color-text: #f4efe6;
  --color-bg: #0f0e0e;
  --color-link: #ffffff;
  --color-link-hover: #c9a24a;
  --color-gold: #c9a24a;
  --page-padding: 0.5rem;
  --aspect: 4/5;
  --grid-item-height: 20vh;
  --c-gap: 3rem;
  --r-gap: 3rem;
  --column: 80px;
  --column-count: 2;
  --preview-padding: 1.5rem;

  /* Colour (DESIGN.md › Color) */
  --ink: #0f0e0e;
  --surface: #171515;
  --surface-2: #211e1d;
  --line: rgba(244, 239, 230, 0.12);
  --line-strong: rgba(244, 239, 230, 0.24);
  --text: #f4efe6;
  --text-muted: rgba(244, 239, 230, 0.68);
  --gold-strong: #ddb965;
  --on-gold: #0f0e0e;
  --tg: #2aabee;
  --wa: #25d366;

  /* Type */
  --font-display: 'Lora', 'Georgia', 'Times New Roman', serif;
  --font-text: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --fs-hero: clamp(40px, 6vw, 80px);
  --fs-h1: clamp(30px, 3.4vw, 44px);
  --fs-h2: 28px;
  --fs-h3: 20px;
  --fs-body: 16px;
  --fs-small: 14px;
  --fs-label: 12px;
  --track-label: 0.12em;

  /* Space, shape, depth */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --header-h: 72px;
  --side: 24px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media screen and (max-width: 53em) {
  :root {
    --header-h: 60px;
    --side: 16px;
  }
}

html {
  height: 100%;
  overflow-x: clip;
}

body {
  height: 100%;
  width: 100%;
  font-family: var(--font-text);
  font-size: var(--fs-small);
  line-height: 1.5;
  letter-spacing: 0;
  font-feature-settings: 'kern', 'calt';
  margin: 0;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (scripting: enabled) {
  .loading {
    &::before,
    &::after {
      content: '';
      position: fixed;
      z-index: 10000;
    }

    &::before {
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: var(--color-bg);
    }

    &::after {
      top: 50%;
      left: 50%;
      width: 100px;
      height: 1px;
      margin: 0 0 0 -50px;
      background: var(--color-link);
      animation: loaderAnim 1.5s ease-in-out infinite alternate forwards;
    }
  }
}

@keyframes loaderAnim {
  0% {
    transform: scaleX(0);
    transform-origin: 0% 50%;
  }

  50% {
    transform: scaleX(1);
    transform-origin: 0% 50%;
  }

  50.1% {
    transform: scaleX(1);
    transform-origin: 100% 50%;
  }

  100% {
    transform: scaleX(0);
    transform-origin: 100% 50%;
  }
}

a {
  text-decoration: none;
  color: var(--color-link);
  outline: none;
  cursor: pointer;
  transition: all 0.3s ease;

  &:hover {
    text-decoration: none;
    color: var(--color-link-hover);
  }

  /* Focus is shown with a ring only. The demo's rule set a link's background on focus, which
     wiped the Telegram / WhatsApp buttons' colour when a reader came back from the app
     (the tapped button keeps the focus) */
  &:focus {
    outline: none;
  }

  &:focus-visible {
    outline: 2px solid var(--color-gold);
    outline-offset: 2px;
  }
}

.line {
  display: inline-block;
  overflow: hidden;
  position: relative;
  vertical-align: top;

  &::before {
    background: var(--color-link-hover);
    bottom: 0;
    content: '';
    height: 1px;
    left: 0;
    position: absolute;
    transition: transform 0.4s ease;
    width: 100%;
    transform: scaleX(0);
    transform-origin: right center;
  }

  &:hover::before {
    transform: scaleX(1);
    transform-origin: left center;
  }
}

.frame {
  display: grid;
  z-index: 1000;
  width: 100%;
  height: 100svh;
  position: fixed;
  grid-column-gap: var(--c-gap);
  grid-row-gap: 0.5rem;
  pointer-events: none;
  justify-items: start;
  padding: var(--page-padding);
  align-content: space-between;
  justify-content: space-between;
  align-items: end;
  grid-template-areas: 'title links' 'tags lang';

  #cdawrap {
    justify-self: start;
    grid-area: sponsor;
    max-width: 230px;
    text-align: right;
  }

  a,
  button {
    pointer-events: auto;
    color: var(--color-text);
  }

  .frame__title {
    font-size: 1.15rem;
    margin: 0;
    font-weight: 700;
    grid-area: title;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    letter-spacing: 0.08em;

    small {
      font-size: 0.75rem;
      font-weight: 400;
      color: var(--color-gold);
      letter-spacing: 0.04em;
    }
  }

  .frame__tags,
  .frame__links {
    grid-area: tags;
    display: flex;
    gap: 1rem;
    align-items: start;
  }

  .frame__links {
    grid-area: links;
    justify-self: end;
  }

  @media screen and (max-width: 53em) {
    grid-template-columns: 100%;
    grid-template-rows: auto auto 1fr auto auto;
    grid-template-areas: 'title' 'links' '.' 'tags' 'lang';

    .frame__title {
      text-align: left;
    }

    .frame__links {
      justify-self: start;
    }

    .frame__tags,
    .frame__links {
      flex-wrap: wrap;
    }
  }
}

.scene {
  cursor: grab; /* The sliders can be dragged */
  perspective: 900px;
  position: relative;
  height: 100svh;
  overflow: clip;
  display: flex;
  justify-content: center;
  align-items: center;
}

.scene__title {
  position: relative;
  z-index: 10;
  margin: 0;
}

.scene__title a {
  display: block;
}

.scene__title span {
  display: inline-block;
}

.scene__title .char {
  display: inline-block;
  transform-style: preserve-3d;
  transform-origin: 50% 0%;
}

.carousel {
  width: 400px;
  height: 500px;
  top: 50%;
  left: 50%;
  margin: -250px 0 0 -200px;
  position: absolute;
  transform-style: preserve-3d;
  will-change: transform;
  transform: translateZ(-550px) rotateY(0deg);
}

@media screen and (max-width: 53em) {
  .carousel {
    scale: 0.7 0.7 0.7;
  }
}

.carousel__cell {
  position: absolute;
  width: 350px;
  height: 420px;
  left: 0;
  top: 0;
  transform-style: preserve-3d;
}

.card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  rotate: y calc(var(--lean, 0deg) + var(--spin-lean, 0deg)); /* Leans against the scroll and the drag (set from their speed), on top of GSAP's transform */
}

.card__face {
  width: 100%;
  height: 100%;
  position: absolute;
  backface-visibility: hidden;
  background-image: var(--img);
  background-size: cover;
}

.card__face--back {
  transform: rotateY(180deg);
}

.preview {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: var(--preview-padding);
  display: grid;
  grid-template-rows: auto 1fr; /* The title and close at the top, the grid centered below */
  align-items: center;
  justify-items: center;
  grid-row-gap: 1rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preview__header {
  align-self: start;
  display: flex;
  width: 100%;
  align-items: flex-end;
  justify-content: space-between;
  line-height: 1;
}

.preview__title {
  margin: 0;
}

.preview__close {
  background: none;
  text-transform: inherit;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  white-space: nowrap;
  cursor: pointer;
  color: var(--color-link);
  &:hover {
    color: var(--color-link-hover);
  }
  &:focus-visible {
    outline: 2px solid var(--color-gold);
  }
}

.grid {
  padding: 1rem 0;
  display: grid;
  grid-template-columns: repeat(var(--column-count), var(--column-width, minmax(var(--column), 1fr)));
  justify-content: center;
  grid-column-gap: var(--c-gap);
  grid-row-gap: var(--r-gap);
  width: 100%;
}

.grid__item {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow: hidden;
  position: relative;
}

.grid__item-image {
  width: 100%;
  aspect-ratio: var(--aspect);
  background-size: 100%;
  background-position: 50% 50%;
  transition: opacity 0.15s cubic-bezier(0.2, 0, 0.2, 1);
}

.grid__item:hover .grid__item-image {
  opacity: 0.7;
}

/* Hidden while the WebGL canvas draws it */
.grid__item-image.is-drawn {
  visibility: hidden;
}

/* While a slider is dragged */
.is-dragging,
.is-dragging * {
  cursor: grabbing !important;
  user-select: none;
}

/* First in the page and without a z-index: below the carousel and the previews' text */
.grid-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.grid__item-caption h3 {
  font-size: 1rem;
  font-weight: 400;
  margin: 0;
}

@media screen and (min-width: 53em) {
  :root {
    --column-count: 5;
    --c-gap: 2.5rem;
    --r-gap: 3rem;
    /* Product cards take their width from the screen's width only: at most 5 a row, each
       between 210 and 270px, and the category scrolls when there are more rows. (Sizing them
       from the screen's height, as the demo did, squeezed the cards once they got buttons) */
    --column-width: clamp(210px, calc((100vw - 2 * var(--preview-padding) - 4 * var(--c-gap)) / 5), 270px);
  }
}

/* ---------- Qorako'l Shop ---------- */

.frame {
  --page-padding: 1.25rem;
  padding: var(--page-padding);
}

.frame .frame__links {
  gap: 0.5rem;
}

.contact {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(15, 14, 14, 0.55);
  backdrop-filter: blur(8px);
  font-size: 0.8rem;

  svg {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
  }

  &:hover {
    border-color: var(--color-gold);
    color: var(--color-gold) !important;
  }
}

.frame .frame__tags {
  gap: 1.25rem;
  flex-wrap: wrap;
}

.frame__lang {
  grid-area: lang;
  justify-self: end;
  display: flex;
  gap: 0.25rem;

  button {
    pointer-events: auto;
    font: inherit;
    text-transform: inherit;
    color: var(--color-text);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    cursor: pointer;

    &.is-current {
      background: var(--color-gold);
      border-color: var(--color-gold);
      color: #0f0e0e;
    }

    &:focus-visible {
      outline: 2px solid var(--color-gold);
    }
  }
}

.hero {
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 6rem 1.5rem;
  gap: 1.5rem;
}

.hero__kicker {
  margin: 0;
  color: var(--color-gold);
  letter-spacing: 0.2em;
  font-size: 0.85rem;
}

.hero__title {
  margin: 0;
  font-size: clamp(2rem, 6.5vw, 5.5rem);
  line-height: 1.02;
  font-weight: 700;
  max-width: 16ch;
  text-transform: none;
}

.hero__hint {
  margin: 0;
  opacity: 0.6;
  font-size: 0.8rem;
}

.scene__title {
  font-size: clamp(1rem, 2.2vw, 1.6rem);
  text-align: center;
  padding: 0 1.5rem;

  a {
    padding: 0.4em 0.2em;
  }
}

.scene__count {
  position: absolute;
  bottom: 14vh;
  left: 50%;
  translate: -50% 0;
  margin: 0;
  color: var(--color-gold);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  pointer-events: none;
}

.card__face {
  border-radius: 14px;
  background-position: 50% 50%;
}

.preview__title {
  color: var(--color-gold);
}

.grid__item-image {
  border-radius: 12px;
  background-size: cover;
}

.grid__item-caption {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-top: 0.35rem;
}

.grid__item-caption h3 {
  font-size: 0.85rem;
  line-height: 1.25;
}

.grid__item-price {
  margin: 0;
  color: var(--color-gold);
  font-size: 0.85rem;
}

.grid__item-order {
  align-self: flex-start;
  font-size: 0.8rem;
}

.about {
  min-height: 90svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
  padding: 8rem 1.5rem;
  border-top: 1px solid rgba(201, 162, 74, 0.3);

  h2 {
    margin: 0;
    color: var(--color-gold);
    font-size: clamp(1.6rem, 4vw, 3rem);
  }

  p {
    margin: 0;
    max-width: 60ch;
    line-height: 1.6;
    text-transform: none;
  }
}

.about__contacts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.about__phone a {
  font-size: 1.4rem;
  color: var(--color-gold);
}

.about__credit {
  opacity: 0.35;
  font-size: 0.7rem;
}

@media screen and (max-width: 53em) {
  .frame {
    --page-padding: 0.9rem;
    grid-row-gap: 0.6rem;
  }

  .contact span {
    display: none; /* Icons only on phones */
  }

  .contact {
    padding: 0.55rem;
  }

  .frame .frame__tags {
    gap: 0.4rem 0.9rem;
    font-size: 0.8rem;
  }

  .frame__lang {
    justify-self: start;
  }

  .scene__count {
    bottom: 22vh;
  }

  :root {
    --c-gap: 1rem;
    --r-gap: 1.75rem;
    --preview-padding: 1rem;
  }
}

@media screen and (max-width: 53em) {
  .preview__title {
    font-size: 1rem;
    padding-right: 1rem;
  }
}

/* Husan Sher logo */
.frame__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;

  img {
    width: 44px;
    height: auto;
  }
}

.frame__title small {
  padding-left: calc(44px + 0.6rem);
}

.hero__logo {
  width: clamp(120px, 16vw, 190px);
  height: auto;
  filter: drop-shadow(0 10px 30px rgba(201, 162, 74, 0.25));
}

.hero {
  gap: 1.2rem;
}

.about__logo {
  width: 120px;
  height: auto;
}

@media screen and (max-width: 53em) {
  .frame__brand img {
    width: 34px;
  }

  .frame__title small {
    padding-left: calc(34px + 0.6rem);
  }

  .hero__logo {
    width: 110px;
  }
}

.hero__title {
  font-size: clamp(1.9rem, 5vw, 4.2rem);
  max-width: 18ch;
}

.hero__kicker {
  margin-top: 0.5rem;
}

.hero__kicker {
  margin-bottom: 1.5rem; /* The title drifts up a little with data-speed */
}

/* ---------- Phones: a swipeable strip instead of the 3D ring ---------- */
.strip {
  display: none;
}

@media screen and (max-width: 53em) {
  .scene {
    flex-direction: column;
    justify-content: center;
    gap: 1.1rem;
    padding: 7.5rem 0 6.5rem; /* Clear of the fixed header and menu */
    cursor: auto;
  }

  .scene .carousel {
    display: none;
  }

  .strip {
    display: flex;
    gap: 12px;
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    padding: 0 14vw;
    scroll-padding: 0 14vw;
    scrollbar-width: none;
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;

    &::-webkit-scrollbar {
      display: none;
    }
  }

  .strip__item {
    flex: 0 0 72vw;
    max-width: 340px;
    max-height: 56svh;
    aspect-ratio: 4 / 5;
    border-radius: 14px;
    background-size: cover;
    background-position: 50% 50%;
    scroll-snap-align: center;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  }

  .scene__title {
    font-size: 1.05rem;
  }
}

@media screen and (max-width: 53em) {
  .grid__item-caption h3 {
    font-size: 0.72rem;
    letter-spacing: 0;
  }
}

/* Phones: dark bands behind the header and the menu, so the page scrolls underneath them
   instead of running into their text (heights are measured in i18n.js) */
@media screen and (max-width: 53em) {
  .frame::before,
  .frame::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    z-index: -1;
    pointer-events: none;
  }

  .frame::before {
    top: 0;
    height: calc(var(--frame-top, 130px) + 22px);
    background: linear-gradient(to bottom, #0f0e0e 0, #0f0e0e calc(100% - 22px), rgba(15, 14, 14, 0));
  }

  .frame::after {
    bottom: 0;
    height: calc(var(--frame-bottom, 100px) + 22px);
    background: linear-gradient(to top, #0f0e0e 0, #0f0e0e calc(100% - 22px), rgba(15, 14, 14, 0));
  }
}

/* ---------- Product cards: badge, subtitle, "ask for the price", details link ---------- */
.badge {
  display: inline-block;
  margin-left: 0.5em;
  padding: 0.15em 0.5em;
  border-radius: 999px;
  background: var(--color-gold);
  color: #0f0e0e;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  vertical-align: middle;
}

.grid__item {
  cursor: pointer;
}

.grid__item:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 4px;
  border-radius: 12px;
}

.grid__item-sub {
  margin: 0;
  font-size: 0.75rem;
  opacity: 0.75;
  text-transform: none;
  line-height: 1.3;
}

.grid__item-ask {
  font-size: 0.75rem;
  line-height: 1.5;

  span {
    color: var(--color-text);
    opacity: 0.75;
  }

  a {
    color: var(--color-gold);
  }
}

.grid__item-more {
  align-self: flex-start;
  font-size: 0.75rem;
  opacity: 0.85;
}

/* ---------- Product details window ---------- */
.product {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.product[hidden] {
  display: none;
}

.product__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 7, 7, 0.78);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.product__panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  width: min(960px, 100%);
  max-height: calc(100svh - 2rem);
  overflow: auto;
  overscroll-behavior: contain;
  background: #171515;
  border: 1px solid rgba(201, 162, 74, 0.35);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.product.is-open .product__backdrop,
.product.is-open .product__panel {
  opacity: 1;
}

.product.is-open .product__panel {
  transform: none;
}

.product__close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 1;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(15, 14, 14, 0.7);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;

  &:hover,
  &:focus-visible {
    border-color: var(--color-gold);
    color: var(--color-gold);
    outline: none;
  }
}

.product__image {
  aspect-ratio: 4 / 5;
  background-size: cover;
  background-position: 50% 40%;
  border-radius: 18px 0 0 18px;
}

.product__info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 2.2rem 1.8rem 1.8rem;
  text-transform: none;
}

.product__sku {
  margin: 0;
  color: var(--color-gold);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
}

.product__title {
  margin: 0;
  font-size: 1.6rem;
  line-height: 1.15;
}

.product__sub {
  margin: 0;
  font-size: 1rem;
  opacity: 0.85;
}

.product__desc {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  opacity: 0.8;
}

.product__facts {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.4rem 1rem;
  margin: 0.3rem 0;
  padding: 0.9rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;

  dt {
    opacity: 0.6;
  }

  dd {
    margin: 0;
  }

  dt:empty {
    display: none;
  }

  dt:empty + dd {
    grid-column: 1 / -1;
  }
}

.product__order-label {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  opacity: 0.8;
}

.product__buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.product__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  transition: filter 0.2s;

  svg {
    width: 1.2rem;
    height: 1.2rem;
    fill: currentColor;
  }

  &:hover,
  &:focus-visible {
    filter: brightness(1.12);
    color: #fff !important;
  }
}

.product__btn--tg {
  background: #2aabee;
}

.product__btn--wa {
  background: #25d366;
  color: #0f0e0e;

  &:hover,
  &:focus-visible {
    color: #0f0e0e !important;
  }
}

.product__phone {
  margin: 0;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.7;
}

@media screen and (max-width: 53em) {
  .product {
    padding: 0;
    place-items: end stretch;
  }

  .product__panel {
    grid-template-columns: minmax(0, 1fr);
    max-height: 92svh;
    border-radius: 18px 18px 0 0;
    transform: translateY(40px);
  }

  .product__image {
    aspect-ratio: 4 / 4.2;
    border-radius: 18px 18px 0 0;
  }

  .product__info {
    padding: 1.3rem 1.1rem calc(1.3rem + env(safe-area-inset-bottom));
  }

  .product__title {
    font-size: 1.3rem;
  }

  .grid__item-sub,
  .grid__item-ask,
  .grid__item-more {
    font-size: 0.68rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product__panel,
  .product__backdrop {
    transition: none;
  }
}

@media screen and (max-width: 53em) {
  .product__image {
    aspect-ratio: auto;
    height: 34svh;
    background-position: 50% 35%;
  }

  .product__info {
    gap: 0.55rem;
  }

  .product__desc {
    font-size: 0.82rem;
    line-height: 1.5;
  }

  /* The order buttons stay in view while the text scrolls */
  .product__buttons {
    position: sticky;
    bottom: 0;
    padding: 0.5rem 0 calc(0.25rem + env(safe-area-inset-bottom));
    background: #171515;
  }
}

/* The product window's warp: its WebGL layer sits above the panel */
.product__panel {
  z-index: 1;
}

.product__canvas {
  z-index: 2;
}

.product__image.is-drawn {
  visibility: hidden;
}

/* With the warp, the panel itself doesn't slide: WebGL measures the photo where it rests */
.product.is-warp .product__panel {
  transform: none;
  transition: opacity 0.2s ease;
}

/* ---------- The photo in the product window: the whole photo, tap for the full view ---------- */
.product__image {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  margin: 0;
  background-color: #0f0e0e;
  background-size: cover;
  background-position: 50% 50%;
  cursor: zoom-in;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.product__image:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: -2px;
}

.product__zoom {
  position: absolute;
  right: 0.7rem;
  bottom: 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(15, 14, 14, 0.72);
  backdrop-filter: blur(6px);
  color: #fff;
  font: inherit;
  font-size: 0.72rem;
  text-transform: none;

  svg {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
  }
}

.product__image.is-drawn .product__zoom {
  visibility: hidden;
}

/* Buttons: no grey tap flash, and no hover tint left behind after coming back from the app */
.product__btn {
  -webkit-tap-highlight-color: transparent;
}

@media (hover: none) {
  .product__btn:hover {
    filter: none;
  }
}

@media screen and (max-width: 53em) {
  /* The whole photo (4:5), centred, instead of a cropped band */
  .product__image {
    width: auto;
    height: min(50svh, 110vw);
    aspect-ratio: 4 / 5;
    margin: 0.9rem auto 0;
    border-radius: 14px;
    background-position: 50% 50%;
  }

  .product__panel {
    padding-top: 0;
  }
}

/* ---------- Full view ---------- */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 30000;
  background: rgba(8, 7, 7, var(--fade, 1));
  opacity: 0;
  transition: opacity 0.25s ease;
  touch-action: none;
  text-transform: none;
}

.viewer[hidden] {
  display: none;
}

.viewer.is-open {
  opacity: 1;
}

.viewer__track {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior: contain;
  scrollbar-width: none;
  touch-action: pan-x; /* Sideways swipes scroll natively; the rest is handled in product.js */
  transform: translateY(var(--pull, 0));

  &::-webkit-scrollbar {
    display: none;
  }
}

.viewer.is-zoomed .viewer__track {
  overflow-x: hidden;
  touch-action: none;
}

.viewer__slide {
  flex: 0 0 100%;
  min-width: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 3.5rem 0.75rem 3.2rem;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  overflow: hidden;

  img {
    max-width: 100%;
    max-height: calc(100svh - 9.5rem);
    object-fit: contain;
    border-radius: 10px;
    user-select: none;
    -webkit-user-drag: none;
    transform-origin: 50% 50%;
    will-change: transform;
  }

  figcaption {
    font-size: 0.85rem;
    opacity: 0.85;
    text-align: center;
  }
}

.viewer.is-zoomed .viewer__slide figcaption {
  opacity: 0;
}

.viewer__bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.75rem;
  pointer-events: none;
}

.viewer__count {
  color: var(--color-gold);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  padding-left: 0.4rem;
}

.viewer__close,
.viewer__nav {
  pointer-events: auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(15, 14, 14, 0.7);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;

  &:hover,
  &:focus-visible {
    border-color: var(--color-gold);
    color: var(--color-gold);
    outline: none;
  }
}

.viewer__nav {
  position: absolute;
  top: 50%;
  translate: 0 -50%;

  &:disabled {
    opacity: 0.25;
    cursor: default;
  }
}

.viewer__nav--prev {
  left: 1rem;
}

.viewer__nav--next {
  right: 1rem;
}

.viewer__hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.8rem;
  margin: 0;
  text-align: center;
  font-size: 0.7rem;
  opacity: 0.55;
  pointer-events: none;
  padding: 0 1rem;
}

@media (hover: none) {
  .viewer__nav {
    display: none; /* Phones swipe */
  }
}

@media screen and (max-width: 53em) {
  .product__image {
    justify-self: center;
  }
}

/* ---------- Product cards: big, separate tap targets ---------- */
.grid__item-ask {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  opacity: 0.75;
  text-transform: none;
}

.grid__item-contacts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.chip {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.2rem;
  padding: 0 0.4rem;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: none;
  color: #fff;
  -webkit-tap-highlight-color: transparent;

  &:hover,
  &:focus-visible {
    filter: brightness(1.1);
    color: #fff !important;
  }
}

.chip--tg {
  background: #2aabee;
}

.chip--wa {
  background: #25d366;
  color: #0f0e0e;

  &:hover,
  &:focus-visible {
    color: #0f0e0e !important;
  }
}

.grid__item-more {
  margin-top: 0.15rem;
  min-height: 2.3rem;
  width: 100%;
  border: 1px solid var(--color-gold);
  border-radius: 10px;
  background: transparent;
  color: var(--color-gold);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;

  &:hover,
  &:focus-visible {
    background: var(--color-gold);
    color: #0f0e0e;
    outline: none;
  }
}

@media screen and (max-width: 53em) {
  .grid__item-caption h3 {
    font-size: 0.8rem;
  }

  .grid__item-sub {
    font-size: 0.74rem;
  }

  .grid__item-ask {
    font-size: 0.72rem;
  }

  .chip {
    min-height: 2.6rem; /* About 42px: an easy thumb target */
    font-size: 0.74rem;
  }

  .grid__item-more {
    min-height: 2.75rem;
    font-size: 0.8rem;
    margin-top: 0.3rem;
  }

  @media (hover: none) {
    .grid__item-more:hover {
      background: transparent;
      color: var(--color-gold);
    }
  }

  /* The window: × sits in its own strip above the photo, never on it */
  .product__panel {
    padding-top: 3.4rem;
  }

  .product__close {
    top: 0.45rem;
    right: 0.6rem;
  }

  .product__image {
    margin-top: 0;
  }
}

@media screen and (max-width: 53em) {
  /* × stays at the top of the window even when its text is scrolled */
  .product__close {
    position: fixed;
    top: calc(8svh + 0.45rem);
    z-index: 3;
  }
}

/* =====================================================================
   Design system v2 (DESIGN.md): header, language, menu, typography
   ===================================================================== */

/* ---------- Header ---------- */
.frame {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: auto;
  padding: 0;
  z-index: 1000;
  pointer-events: none;
  transition: transform 0.35s var(--ease-out);
}

.frame::before,
.frame::after {
  display: none; /* The old fixed bands behind the header and the bottom menu */
}

.frame[data-state='hidden'] {
  transform: translateY(-100%);
}

.frame__bar {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--s-5);
  height: var(--header-h);
  padding: 0 var(--side);
  pointer-events: auto;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}

/* Once the page is scrolled the bar becomes a quiet dark strip, legible over any photo */
.frame:not([data-state='top']) .frame__bar,
.frame.is-menu-open .frame__bar {
  background: rgba(15, 14, 14, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}

.frame a,
.frame button {
  pointer-events: auto;
}

/* Brand: the round mark and the name share one line */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  color: var(--text);
  line-height: 1;
}

.brand:hover {
  color: var(--text);
}

.brand__mark {
  width: 40px;
  height: 44px;
  object-fit: contain;
  flex: none;
}

.brand__name {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: 500;
  letter-spacing: -0.005em;
  white-space: nowrap;
}

/* Categories */
.frame__nav {
  display: flex;
  justify-content: center;
  gap: var(--s-6);
}

.frame__navlink {
  position: relative;
  padding: var(--s-2) 0;
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;

  &::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: var(--gold);
    transform: scaleX(0);
    transition: transform 0.3s var(--ease-out);
  }

  &:hover,
  &.is-active {
    color: var(--text);
  }

  &.is-active::after {
    transform: scaleX(1);
  }
}

.frame__actions {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.frame__icons {
  display: flex;
  gap: var(--s-2);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--text);

  svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
  }

  &:hover {
    border-color: var(--gold);
    color: var(--gold);
  }
}

/* ---------- Language switch ---------- */
.lang {
  position: relative;
}

.lang__btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 40px;
  padding: 0 var(--s-2) 0 var(--s-4);
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font: 600 var(--fs-label) / 1 var(--font-text);
  letter-spacing: var(--track-label);
  cursor: pointer;

  svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: transform 0.2s ease;
  }

  &:hover {
    border-color: var(--gold);
  }

  &[aria-expanded='true'] svg {
    transform: rotate(180deg);
  }

  &:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
  }
}

.lang__menu {
  position: absolute;
  top: calc(100% + var(--s-2));
  right: 0;
  min-width: 168px;
  padding: var(--s-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow);

  &[hidden] {
    display: none;
  }

  button,
  a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 44px;
    padding: 0 var(--s-3);
    border: 0;
    border-radius: var(--r-sm);
    background: transparent;
    color: var(--text);
    font: 400 var(--fs-small) / 1 var(--font-text);
    text-align: left;
    text-decoration: none;
    cursor: pointer;

    &:hover,
    &:focus-visible {
      background: var(--surface-2);
      outline: none;
    }

    &[aria-checked='true']::after {
      content: '';
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--gold);
    }
  }
}

/* The old pill buttons' gold fill */
.lang__menu button.is-current,
.lang__menu a.is-current {
  background: transparent;
  color: var(--text);
}

/* ---------- Phone menu ---------- */
.frame__burger {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;

  span {
    position: absolute;
    left: 13px;
    right: 13px;
    height: 1.5px;
    background: var(--text);
    transition: transform 0.3s var(--ease-out), top 0.3s var(--ease-out);
  }

  span:first-child {
    top: 17px;
  }

  span:last-child {
    top: 25px;
  }

  &[aria-expanded='true'] span:first-child {
    top: 21px;
    transform: rotate(45deg);
  }

  &[aria-expanded='true'] span:last-child {
    top: 21px;
    transform: rotate(-45deg);
  }
}

.sheet {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--s-5) var(--side) calc(var(--s-6) + env(safe-area-inset-bottom));
  background: var(--ink);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.3s var(--ease-out);

  &[hidden] {
    display: none;
  }

  &.is-open {
    opacity: 1;
    transform: none;
  }
}

.sheet__nav {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.sheet__link {
  display: flex;
  align-items: baseline;
  gap: var(--s-4);
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  color: var(--text);

  &.is-active {
    color: var(--gold);
  }
}

.sheet__num {
  font: 600 var(--fs-label) / 1 var(--font-text);
  letter-spacing: var(--track-label);
  color: var(--gold);
}

.sheet__label {
  margin: var(--s-6) 0 var(--s-3);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--text-muted);
}

.sheet__contacts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-2);
}

.sheet__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 48px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-weight: 600;
  font-size: var(--fs-small);

  svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
  }
}

.sheet__btn--wa {
  background: var(--wa);
  border-color: var(--wa);
  color: var(--ink);
}

.sheet__btn--tg {
  background: var(--tg);
  border-color: var(--tg);
  color: #fff;
}

.sheet__btn--wa:hover {
  color: var(--ink);
}

.sheet__btn--tg:hover {
  color: #fff;
}

.sheet__phone {
  margin: var(--s-5) 0 0;
  text-align: center;

  a {
    font-family: var(--font-display);
    font-size: 22px;
    color: var(--gold);
  }
}

html.has-menu,
html.has-menu body {
  overflow: hidden;
}

/* Phones and small tablets: brand · language · menu */
@media screen and (max-width: 63em) {
  .frame__bar {
    grid-template-columns: 1fr auto;
  }

  .frame__nav,
  .frame__icons {
    display: none;
  }

  .frame__burger {
    display: block;
  }

  .brand__mark {
    width: 34px;
    height: 37px;
  }

  .brand__name {
    font-size: 18px;
  }
}

/* Desktop between 1008 and 1200px: the icons give way to the categories */
@media screen and (min-width: 63.01em) and (max-width: 75em) {
  .frame__icons {
    display: none;
  }

  .frame__nav {
    gap: var(--s-5);
  }
}

@media screen and (min-width: 63.01em) {
  .sheet {
    display: none !important;
  }
}

/* ---------- Typography of the page ---------- */
.hero {
  padding: calc(var(--header-h) + var(--s-6)) var(--side) var(--s-8);
  gap: var(--s-4);
}

.hero__logo {
  width: clamp(96px, 11vw, 150px);
  margin-bottom: var(--s-2);
}

.hero__kicker {
  margin: 0;
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--fs-hero);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.015em;
  max-width: 14ch;
  text-wrap: balance;
}

.hero__hint {
  margin-top: var(--s-3);
  font-size: var(--fs-small);
  color: var(--text-muted);
  opacity: 1;
}

.scene__title {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  font-weight: 500;
  letter-spacing: -0.01em;
  text-transform: none;
  line-height: 1.1;
}

.preview__title {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 500;
  text-transform: none;
  color: var(--text);
}

.preview__close {
  font: 600 var(--fs-label) / 1 var(--font-text);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.grid__item-caption h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.grid__item-sub {
  font-size: 13px;
  color: var(--text-muted);
  opacity: 1;
}

.grid__item-ask {
  font-size: 12px;
  color: var(--text-muted);
  opacity: 1;
}

.chip,
.grid__item-more,
.product__btn,
.sheet__btn {
  font-family: var(--font-text);
  letter-spacing: 0.02em;
}

.grid__item-more {
  text-transform: uppercase;
  font-size: var(--fs-label);
  letter-spacing: var(--track-label);
}

.product__sku,
.viewer__count {
  font-family: var(--font-text);
  font-weight: 600;
}

.product__title {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.product__sub {
  color: var(--text-muted);
  opacity: 1;
}

.product__desc {
  font-size: 15px;
  color: var(--text-muted);
  opacity: 1;
}

.about h2 {
  font-family: var(--font-display);
  font-weight: 500;
  text-transform: none;
}

.about p {
  font-size: var(--fs-body);
  color: var(--text-muted);
}

.about__phone a {
  font-family: var(--font-display);
}

/* Sections on phones: room for the header only (the bottom menu is gone) */
@media screen and (max-width: 53em) {
  .scene {
    padding: calc(var(--header-h) + var(--s-4)) 0 var(--s-6);
  }

  .product__title {
    font-size: 24px;
  }

  .grid__item-caption h3 {
    font-size: 15px;
  }
}

.frame__bar {
  width: 100%;
}

/* Titles over the 3D photos stay legible on light pictures */
.scene__title {
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.55), 0 1px 2px rgba(0, 0, 0, 0.4);
}

.hero__title {
  max-width: 16ch;
}

.frame__navlink::after {
  height: 2px;
  bottom: -2px;
}

.frame .sheet__phone a {
  color: var(--gold);
}

.frame .brand,
.frame .brand:hover {
  color: var(--text);
}

/* Desktop categories: the cards wrap to as many columns as fit (max 5) and start under the title */
@media screen and (min-width: 53em) {
  .grid {
    grid-template-columns: repeat(auto-fit, var(--column-width));
    width: 100%;
    max-width: calc(5 * 270px + 4 * var(--c-gap));
    padding: var(--s-5) 0 var(--s-8);
  }

  .preview {
    align-items: start;
    --preview-padding: 2rem;
  }

  .preview__header {
    padding-bottom: var(--s-3);
  }
}

/* The two messenger buttons never get clipped: they share the row, and the label shrinks first */
.grid__item-contacts .chip {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* The category's single column is as wide as the screen, so the cards wrap instead of overflowing */
.preview {
  grid-template-columns: minmax(0, 1fr);
}

/* =====================================================================
   Messenger buttons (DESIGN.md › Components › Messenger buttons)
   ===================================================================== */
.chip--tg,
.product__btn--tg,
.sheet__btn--tg {
  --brand: #2aabee;
  --brand-deep: #1b8ccc;
  --brand-rgb: 42, 171, 238;
  --on-brand: #ffffff;
}

.chip--wa,
.product__btn--wa,
.sheet__btn--wa {
  --brand: #2fdc77;
  --brand-deep: #1fb85a;
  --brand-rgb: 37, 211, 102;
  --on-brand: #0f0e0e;
}

/* ---------- Quiet: in the product cards ---------- */
.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 10px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
  font: 600 12.5px / 1 var(--font-text);
  letter-spacing: 0.01em;
  text-transform: none;
  isolation: isolate;
  transition:
    border-color 0.25s ease,
    background-color 0.25s ease,
    box-shadow 0.3s ease,
    transform 0.2s var(--ease-out);

  .chip__icon {
    flex: none;
    width: 16px;
    height: 16px;
    fill: var(--brand);
    transition: transform 0.3s var(--ease-out);
  }

  span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* The base link colour and the earlier flat fills give way */
.chip--tg,
.chip--wa,
.chip--tg:hover,
.chip--wa:hover,
.chip--tg:focus-visible,
.chip--wa:focus-visible {
  background: var(--surface-2);
  color: var(--text) !important;
  filter: none;
}

@media (hover: hover) {
  .chip:hover {
    border-color: rgba(var(--brand-rgb), 0.7);
    background: linear-gradient(180deg, rgba(var(--brand-rgb), 0.16), rgba(var(--brand-rgb), 0.08)) !important;
    box-shadow: 0 8px 22px -8px rgba(var(--brand-rgb), 0.55);
    transform: translateY(-1px);
  }

  .chip:hover .chip__icon {
    transform: scale(1.12) rotate(-6deg);
  }
}

.chip:active {
  transform: translateY(0) scale(0.97);
  transition-duration: 0.08s;
}

.chip:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-color: rgba(var(--brand-rgb), 0.7);
}

/* ---------- Solid: in the product window and the phone menu ---------- */
.product__btn--tg,
.product__btn--wa,
.sheet__btn--tg,
.sheet__btn--wa {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, var(--brand), var(--brand-deep));
  color: var(--on-brand) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 10px 26px -12px rgba(var(--brand-rgb), 0.8);
  font-weight: 600;
  letter-spacing: 0.01em;
  filter: none;
  transition:
    transform 0.2s var(--ease-out),
    box-shadow 0.3s ease,
    filter 0.25s ease;

  svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: transform 0.3s var(--ease-out);
  }

  /* A soft sheen that crosses the button on hover */
  &::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.32) 50%, transparent 70%);
    transform: translateX(-120%);
    transition: transform 0.7s var(--ease-out);
  }
}

@media (hover: hover) {
  .product__btn--tg:hover,
  .product__btn--wa:hover,
  .sheet__btn--tg:hover,
  .sheet__btn--wa:hover {
    transform: translateY(-2px);
    filter: brightness(1.05) saturate(1.05);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.32),
      0 16px 34px -12px rgba(var(--brand-rgb), 0.9);
    color: var(--on-brand) !important;
  }

  .product__btn--tg:hover::before,
  .product__btn--wa:hover::before,
  .sheet__btn--tg:hover::before,
  .sheet__btn--wa:hover::before {
    transform: translateX(120%);
  }

  .product__btn--tg:hover svg,
  .product__btn--wa:hover svg,
  .sheet__btn--tg:hover svg,
  .sheet__btn--wa:hover svg {
    transform: scale(1.1) rotate(-6deg);
  }
}

.product__btn--tg:active,
.product__btn--wa:active,
.sheet__btn--tg:active,
.sheet__btn--wa:active {
  transform: translateY(0) scale(0.98);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 6px 16px -10px rgba(var(--brand-rgb), 0.8);
  transition-duration: 0.08s;
}

.product__btn--tg:focus-visible,
.product__btn--wa:focus-visible,
.sheet__btn--tg:focus-visible,
.sheet__btn--wa:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.product__btn {
  min-height: 52px;
  border-radius: var(--r-md);
  font-size: 15px;
  gap: 10px;
}

/* The secondary "Details" button: gold outline that fills on hover */
.grid__item-more {
  transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.3s ease, transform 0.2s var(--ease-out);
}

@media (hover: hover) {
  .grid__item-more:hover {
    box-shadow: 0 8px 22px -10px rgba(201, 162, 74, 0.7);
    transform: translateY(-1px);
  }
}

.grid__item-more:active {
  transform: scale(0.98);
}

.grid__item-more:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

@media screen and (max-width: 53em) {
  .chip {
    min-height: 42px;
    font-size: 12px;
    gap: 6px;
    padding: 0 6px;
  }

  .chip .chip__icon {
    width: 15px;
    height: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chip,
  .chip__icon,
  .product__btn,
  .product__btn::before,
  .sheet__btn,
  .sheet__btn::before,
  .grid__item-more {
    transition: none !important;
  }
}

/* Narrow cards (phones, small laptops): the messenger buttons stack, so their labels never get cut */
.grid__item-caption {
  container-type: inline-size;
}

@container (max-width: 232px) {
  .grid__item-contacts {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .grid__item-contacts .chip {
    justify-content: flex-start;
    padding: 0 12px;
  }
}
