:root {
  color-scheme: light;
  --butter: #fcefb1;
  --peach: #ffd2b7;
  --pistachio: #a19f5c;
  --burgundy: #63252d;
  --cream: #f7e8d7;
  --ink: #63252d;
  --hero-height: 72.8%;
  --card-height: clamp(338px, 41%, 400px);
  --ease-out: cubic-bezier(0.22, 0.8, 0.22, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  overflow: hidden;
  background: #24191a;
  color: var(--ink);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

button,
select {
  font: inherit;
}

button:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid var(--butter);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.showcase-shell {
  position: relative;
  width: min(100vw, 573px);
  height: min(100dvh, 1234px);
  overflow: hidden;
  border-radius: clamp(0px, 1.7vw, 10px);
  background: var(--butter);
  box-shadow: 0 32px 90px rgb(0 0 0 / 35%);
  isolation: isolate;
}

.showcase {
  position: absolute;
  inset: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  touch-action: pan-y;
  cursor: grab;
}

.showcase::-webkit-scrollbar {
  display: none;
}

.showcase.is-dragging {
  cursor: grabbing;
}

.track {
  display: flex;
  width: 100%;
  height: 100%;
}

.slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: transparent;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.photo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--hero-height);
  object-fit: cover;
  object-position: center top;
  pointer-events: none;
  user-select: none;
}

.glass {
  border: 1.5px solid rgb(252 239 177 / 72%);
  background: rgb(247 232 215 / 80%);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 38%),
    0 8px 28px rgb(73 38 28 / 9%);
  -webkit-backdrop-filter: blur(20px) saturate(130%);
  backdrop-filter: blur(20px) saturate(130%);
}

.cart-button {
  position: absolute;
  z-index: 5;
  top: 5.8%;
  right: 6.6%;
  display: inline-flex;
  min-width: 27.6%;
  height: 5.15%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: clamp(7px, 1.7vw, 11px);
  padding: 0 clamp(10px, 2.2vw, 16px);
  border-radius: 999px;
  color: var(--butter);
  background: rgb(99 37 45 / 66%);
  font-size: clamp(15px, 3.7vw, 22px);
  font-weight: 500;
  cursor: pointer;
}

.cart-button img {
  width: clamp(18px, 3.7vw, 23px);
  height: clamp(18px, 3.7vw, 23px);
}

.cart-count {
  display: grid;
  width: clamp(31px, 6.3vw, 38px);
  height: clamp(31px, 6.3vw, 38px);
  place-items: center;
  border-radius: 50%;
  background: rgb(255 210 183 / 92%);
  color: var(--burgundy);
  font-size: clamp(13px, 3vw, 18px);
  font-weight: 750;
}

.language-control {
  position: absolute;
  z-index: 12;
  top: 1.45%;
  right: 6.6%;
  width: clamp(126px, 27vw, 156px);
  height: 3.1%;
  min-height: 34px;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(247 232 215 / 63%);
}

.language-control::after {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 6px;
  height: 6px;
  border: solid var(--burgundy);
  border-width: 0 1.5px 1.5px 0;
  content: "";
  pointer-events: none;
  transform: translateY(-70%) rotate(45deg);
}

.language-control select {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 100%;
  padding: 0 28px 0 16px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--burgundy);
  font-size: clamp(11.5px, 2.8vw, 15px);
  font-weight: 750;
  cursor: pointer;
}

.category-tabs {
  position: absolute;
  z-index: 5;
  top: 13.35%;
  left: 6.5%;
  display: grid;
  width: 87%;
  height: 5%;
  min-height: 50px;
  grid-template-columns: 0.9fr 1.3fr 1.1fr;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(247 232 215 / 40%);
}

.category-tab {
  position: relative;
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 1.25vw, 9px);
  padding: 0 clamp(4px, 1vw, 8px);
  border: 0;
  border-right: 1px solid rgb(99 37 45 / 12%);
  background: transparent;
  color: var(--burgundy);
  font-size: clamp(10.5px, 2.45vw, 15px);
  font-weight: 560;
  white-space: nowrap;
  cursor: pointer;
}

.category-tab:last-child {
  border-right: 0;
}

.category-tab[aria-selected="true"] {
  border-right-color: transparent;
  border-radius: 999px;
  background: rgb(255 210 183 / 91%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 46%);
  font-weight: 720;
}

.category-tab img {
  width: clamp(15px, 3.2vw, 20px);
  height: clamp(15px, 3.2vw, 20px);
  flex: 0 0 auto;
  opacity: 0.9;
}

.pager {
  position: absolute;
  z-index: 5;
  top: auto;
  bottom: calc(var(--card-height) + 10px);
  left: 50%;
  display: grid;
  grid-template-columns: 44px minmax(74px, auto) 44px;
  align-items: center;
  gap: 7px;
  transform: translateX(-50%);
}

.pager-arrow,
.pager-status {
  height: 44px;
  border-radius: 999px;
}

.pager-arrow {
  display: grid;
  width: 44px;
  place-items: center;
  padding: 0;
  color: var(--burgundy);
  cursor: pointer;
}

.pager-arrow img {
  width: 18px;
  height: 18px;
}

.pager-arrow:disabled {
  opacity: 0.38;
  cursor: default;
}

.pager-status {
  display: grid;
  min-width: 74px;
  align-content: center;
  justify-items: center;
  padding: 4px 13px;
  color: var(--burgundy);
  line-height: 1.05;
  white-space: nowrap;
}

.pager-status strong {
  font-size: clamp(11px, 2.5vw, 14px);
  letter-spacing: 0.06em;
}

.pager-status span {
  margin-top: 3px;
  font-size: clamp(8px, 1.8vw, 10px);
  font-weight: 650;
  opacity: 0.72;
}

.info-card {
  position: absolute;
  z-index: 4;
  inset: auto 0 0;
  display: flex;
  height: var(--card-height);
  min-height: 0;
  flex-direction: column;
  justify-content: space-between;
  padding:
    clamp(22px, 5.8vw, 34px)
    clamp(28px, 7.2vw, 42px)
    max(clamp(18px, 4.8vw, 31px), env(safe-area-inset-bottom));
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 48%);
  border-bottom: 0;
  border-radius: clamp(26px, 6.6vw, 38px) clamp(26px, 6.6vw, 38px) 0 0;
  background: rgb(247 232 215 / 96%);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 68%),
    0 -12px 32px rgb(94 48 35 / 8%);
  -webkit-backdrop-filter: blur(26px) saturate(115%);
  backdrop-filter: blur(26px) saturate(115%);
}

.info-copy {
  position: relative;
  z-index: 1;
  width: 100%;
}

.product-title {
  max-width: 100%;
  margin: 0;
  color: var(--burgundy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 8.2vw, 48px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
}

.product-story {
  width: 100%;
  margin: clamp(12px, 3vw, 18px) 0 0;
  color: var(--burgundy);
  font-size: clamp(13px, 3.65vw, 19px);
  line-height: 1.4;
}

.product-moment {
  width: 100%;
  margin: clamp(14px, 3.5vw, 20px) 0 0;
  color: var(--pistachio);
  font-size: clamp(13px, 3.35vw, 17px);
  font-style: italic;
  font-weight: 600;
  line-height: 1.35;
}

.brand-leaf {
  display: inline-block;
  width: 1.35em;
  height: 1.15em;
  margin-right: 0.46em;
  vertical-align: -0.2em;
}

.commerce-row {
  position: static;
  display: grid;
  width: 100%;
  grid-template-columns: auto minmax(175px, 1fr);
  align-items: center;
  gap: clamp(18px, 5vw, 36px);
  margin-top: clamp(18px, 4.5vw, 30px);
}

.price {
  display: inline-flex;
  align-items: baseline;
  gap: clamp(6px, 1.4vw, 9px);
  color: var(--burgundy);
  white-space: nowrap;
}

.price-value {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(40px, 10.2vw, 58px);
  line-height: 0.9;
  letter-spacing: -0.045em;
}

.price-currency {
  font-size: clamp(12px, 2.9vw, 18px);
  font-weight: 500;
}

.add-button {
  height: clamp(54px, 13.8vw, 70px);
  border: 0;
  border-radius: 999px;
  background: var(--burgundy);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 14%),
    0 8px 20px rgb(99 37 45 / 12%);
  color: #fff5e8;
  font-size: clamp(16px, 4vw, 21px);
  font-weight: 520;
  cursor: pointer;
  transition:
    transform 160ms ease,
    opacity 160ms ease;
}

.add-button:active {
  transform: scale(0.975);
}

.add-button.is-added {
  opacity: 0.82;
}

.toast {
  position: absolute;
  z-index: 20;
  top: 23%;
  left: 50%;
  max-width: 80%;
  margin: 0;
  padding: 11px 18px;
  border: 1px solid rgb(252 239 177 / 70%);
  border-radius: 999px;
  background: rgb(99 37 45 / 88%);
  color: #fff5e8;
  font-size: clamp(12px, 2.9vw, 15px);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -8px);
  transition: 180ms ease;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.cart-dialog {
  width: min(calc(100% - 42px), 480px);
  max-height: min(76dvh, 760px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 62%);
  border-radius: 30px;
  background: rgb(247 232 215 / 97%);
  box-shadow: 0 28px 80px rgb(47 20 22 / 42%);
  color: var(--burgundy);
}

.cart-dialog::backdrop {
  background: rgb(45 24 24 / 42%);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.cart-panel,
.checkout-panel {
  display: grid;
  max-height: min(76dvh, 760px);
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: 28px;
}

.cart-panel[hidden],
.checkout-panel[hidden] {
  display: none;
}

.cart-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.cart-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 31px;
  font-weight: 500;
}

.cart-close,
.cart-clear,
.cart-copy,
.back-to-cart {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgb(99 37 45 / 22%);
  border-radius: 999px;
  background: rgb(255 255 255 / 32%);
  color: var(--burgundy);
  cursor: pointer;
}

.cart-copy {
  background: rgb(255 255 255 / 38%);
}

.cart-copy:disabled,
.cart-checkout:disabled {
  opacity: 0.42;
  cursor: default;
}

#cartContents {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgb(99 37 45 / 34%) transparent;
}

.cart-items {
  display: grid;
  gap: 12px;
  margin: 24px 0;
  padding: 0 5px 0 0;
  list-style: none;
}

.cart-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgb(99 37 45 / 14%);
  font-size: 15px;
  line-height: 1.35;
}

.cart-item strong {
  display: block;
  margin-bottom: 3px;
}

.cart-item span {
  color: rgb(99 37 45 / 72%);
}

.cart-empty {
  margin: 26px 0;
  color: rgb(99 37 45 / 74%);
}

.cart-footer {
  display: grid;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid rgb(99 37 45 / 12%);
}

.cart-total {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
}

.cart-checkout {
  min-height: 54px;
  border: 1px solid rgb(255 255 255 / 24%);
  border-radius: 999px;
  background: var(--burgundy);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 16%),
    0 10px 24px rgb(99 37 45 / 16%);
  color: #fff5e8;
  font-weight: 650;
  cursor: pointer;
}

.cart-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.checkout-panel {
  grid-template-rows: auto auto minmax(92px, 1fr) auto auto auto;
  gap: 14px;
  overflow: hidden;
}

.checkout-panel .cart-heading h2 {
  max-width: 74%;
  font-size: clamp(25px, 6.6vw, 31px);
  line-height: 1.04;
}

.checkout-intro,
.contact-hint {
  margin: 0;
  color: rgb(99 37 45 / 78%);
  font-size: 14px;
  line-height: 1.42;
}

.order-preview {
  min-height: 92px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  border: 1px solid rgb(99 37 45 / 12%);
  border-radius: 18px;
  background: rgb(255 255 255 / 30%);
  color: var(--burgundy);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.contact-options {
  display: grid;
  gap: 10px;
}

.contact-button {
  display: grid;
  min-height: 56px;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 7px 18px 7px 8px;
  border: 1px solid rgb(255 255 255 / 58%);
  border-radius: 999px;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 42%),
    0 8px 24px rgb(73 38 28 / 8%);
  color: var(--burgundy);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  -webkit-backdrop-filter: blur(20px) saturate(125%);
  backdrop-filter: blur(20px) saturate(125%);
}

.whatsapp-button {
  background: rgb(37 211 102 / 13%);
}

.line-button {
  background: rgb(6 199 85 / 14%);
}

.contact-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 56%);
  border-radius: 50%;
  background: rgb(255 255 255 / 38%);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.back-to-cart {
  width: 100%;
}

html[data-language="th"] body,
html[data-language="th"] .order-preview {
  font-family: "Leelawadee UI", Tahoma, "Noto Sans Thai", sans-serif;
}

html[data-language="th"] .product-title,
html[data-language="th"] .cart-heading h2 {
  font-family: "Leelawadee UI", Tahoma, "Noto Sans Thai", sans-serif;
  font-size: clamp(28px, 7vw, 40px);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

html[data-language="th"] .product-story {
  font-size: clamp(12.5px, 3.15vw, 17px);
  line-height: 1.45;
}

html[data-language="ru"] .product-title {
  font-size: clamp(30px, 7.6vw, 44px);
}

html[data-language="ru"] .product-story {
  font-size: clamp(13px, 3.35vw, 18px);
}

.noscript-message {
  position: absolute;
  z-index: 30;
  inset: 40% 24px auto;
  margin: 0;
  padding: 20px;
  border-radius: 24px;
  background: var(--cream);
  color: var(--burgundy);
  text-align: center;
}

@media (max-width: 480px) {
  :root {
    --card-height: clamp(270px, 38dvh, 286px);
  }

  .showcase-shell {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }

  .cart-button {
    top: max(48px, calc(env(safe-area-inset-top) + 46px));
    right: max(20px, env(safe-area-inset-right));
    min-width: 0;
    height: 42px;
    min-height: 42px;
    gap: 6px;
    padding: 0 10px;
    font-size: clamp(13px, 3.6vw, 15px);
  }

  .cart-button img {
    width: 17px;
    height: 17px;
  }

  .cart-count {
    width: 29px;
    height: 29px;
    font-size: 12px;
  }

  .category-tabs {
    top: max(100px, calc(env(safe-area-inset-top) + 98px));
    left: max(20px, env(safe-area-inset-left));
    display: grid;
    width: calc(100% - max(40px, env(safe-area-inset-left) + env(safe-area-inset-right)));
    height: 44px;
    min-height: 44px;
    grid-template-columns: 0.82fr 1.32fr 1.06fr;
    overflow: hidden;
    border-radius: 999px;
  }

  .category-tab {
    min-width: 0;
    gap: 4px;
    padding: 0 4px;
    font-size: clamp(9px, 2.6vw, 10.5px);
  }

  .category-tab img {
    width: 14px;
    height: 14px;
  }

  .info-copy {
    width: 100%;
  }

  .info-card {
    padding:
      clamp(17px, 4.5vw, 20px)
      clamp(20px, 6vw, 26px)
      max(clamp(15px, 4vw, 18px), env(safe-area-inset-bottom));
    border-radius: 26px 26px 0 0;
  }

  .product-title,
  html[data-language="ru"] .product-title,
  html[data-language="th"] .product-title {
    font-size: clamp(28px, 8vw, 34px);
    line-height: 1.02;
  }

  .product-story,
  html[data-language="ru"] .product-story,
  html[data-language="th"] .product-story {
    margin-top: 8px;
    font-size: clamp(12.5px, 3.45vw, 14px);
    line-height: 1.34;
  }

  .product-moment {
    margin-top: 10px;
    font-size: clamp(12px, 3.2vw, 13px);
    line-height: 1.28;
  }

  .commerce-row {
    grid-template-columns: auto 1fr;
    gap: clamp(14px, 4vw, 20px);
    margin-top: 12px;
  }

  .price-value {
    font-size: clamp(36px, 10vw, 42px);
  }

  .price-currency {
    font-size: 12px;
  }

  .add-button {
    height: 48px;
    font-size: clamp(14px, 3.8vw, 16px);
  }

  .pager {
    grid-template-columns: 40px minmax(68px, auto) 40px;
    gap: 6px;
  }

  .pager-arrow,
  .pager-status {
    height: 40px;
  }

  .pager-arrow {
    width: 40px;
  }

  .pager-status {
    min-width: 68px;
    padding-inline: 10px;
  }

  .cart-panel {
    padding: 22px;
  }

  .checkout-panel {
    padding: 22px;
  }

  .language-control {
    top: max(10px, calc(env(safe-area-inset-top) + 8px));
    right: max(20px, env(safe-area-inset-right));
    width: 116px;
    height: 30px;
    min-height: 30px;
  }

  .language-control select {
    padding: 0 26px 0 14px;
  }
}

@media (max-width: 340px) {
  :root {
    --card-height: clamp(306px, 46dvh, 326px);
  }

  .category-tabs {
    left: max(14px, env(safe-area-inset-left));
    width: calc(100% - max(28px, env(safe-area-inset-left) + env(safe-area-inset-right)));
  }

  .info-card {
    padding-inline: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .showcase {
    scroll-behavior: auto;
  }

  .add-button,
  .toast {
    transition-duration: 1ms !important;
  }
}

@media (forced-colors: active) {
  .glass,
  .info-card,
  .cart-dialog {
    border: 2px solid CanvasText;
    background: Canvas;
    color: CanvasText;
  }
}
