:root {
  --ink: oklch(0.29 0.075 248);
  --ink-soft: oklch(0.42 0.055 248);
  --paper: oklch(0.95 0.035 82);
  --paper-deep: oklch(0.9 0.045 79);
  --line: oklch(0.69 0.045 78);
  --red: oklch(0.51 0.13 24);
  --green: oklch(0.45 0.075 158);
  --shadow: 0 22px 60px oklch(0.24 0.04 248 / 0.18);
  --display: "Bodoni Moda", Georgia, serif;
  --text: "Libre Baskerville", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 10%, oklch(0.99 0.025 78), transparent 32rem),
    linear-gradient(135deg, oklch(0.96 0.04 84), oklch(0.89 0.04 74));
  font-family: var(--text);
  letter-spacing: 0;
  opacity: 0;
  transition: opacity 180ms ease-out;
}

body.page-ready {
  opacity: 1;
}

body.page-leaving {
  opacity: 0;
}

body.no-scroll {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(90deg, oklch(0.55 0.02 80 / 0.16) 1px, transparent 1px),
    linear-gradient(oklch(0.55 0.02 80 / 0.12) 1px, transparent 1px);
  background-size: 44px 44px;
  mix-blend-mode: multiply;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 4vw, 56px);
  background: oklch(0.94 0.035 82 / 0.92);
  border-bottom: 1px solid oklch(0.67 0.04 80 / 0.55);
  backdrop-filter: blur(10px);
}

.header-search {
  display: flex;
  flex: 1 1 360px;
  max-width: 520px;
  min-width: 240px;
  margin-left: auto;
  border: 1px solid var(--ink);
  background: oklch(0.98 0.025 82 / 0.72);
}

.header-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  padding: 0 12px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  outline: none;
}

.header-search button {
  min-height: 40px;
  padding: 0 15px;
  color: var(--paper);
  background: var(--ink);
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
}

.brand-image {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
  font-size: 13px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: clamp(28px, 6vw, 84px);
  align-items: center;
  min-height: calc(100vh - 77px);
  padding: clamp(32px, 5vw, 72px) clamp(20px, 5vw, 72px) 44px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--red);
  font-family: var(--text);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: var(--display);
  line-height: 0.98;
}

h1 {
  max-width: 720px;
  font-size: clamp(62px, 9.4vw, 136px);
  font-weight: 700;
  line-height: 0.9;
}

h2 {
  font-size: clamp(34px, 5vw, 64px);
}

.hero-text {
  max-width: 650px;
  margin: 24px 0 0;
  color: var(--ink-soft);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid var(--ink);
  font-family: var(--text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.button.primary {
  color: var(--paper);
  background: var(--ink);
}

.button.secondary {
  color: var(--ink);
  background: transparent;
}

.button.small {
  min-height: 42px;
  padding-inline: 18px;
}

.country-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 36px;
}

.country-strip span,
.country-strip a {
  padding: 8px 11px;
  border: 1px solid oklch(0.64 0.04 248 / 0.35);
  background: oklch(0.97 0.028 82 / 0.62);
  font-size: 12px;
}

.stamp-logo {
  width: min(100%, 560px);
  margin-inline: auto;
}

.stamp-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.showcase,
.catalog-shell,
.site-footer {
  padding-inline: clamp(20px, 5vw, 72px);
}

.showcase {
  scroll-margin-top: 118px;
  padding-top: 22px;
  padding-bottom: 70px;
}

.home-catalog-prompt {
  display: grid;
  gap: 18px;
  padding: clamp(34px, 5vw, 70px) clamp(20px, 5vw, 72px);
  border-top: 1px solid oklch(0.67 0.04 80 / 0.55);
  background: oklch(0.96 0.03 82 / 0.7);
}

.home-catalog-prompt h2 {
  max-width: 980px;
  font-size: clamp(30px, 4.2vw, 58px);
  line-height: 1.02;
}

.home-catalog-prompt .button {
  width: max-content;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.carousel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.carousel-button {
  min-width: 42px;
  min-height: 42px;
  padding: 0 14px;
  color: var(--ink);
  background: oklch(0.97 0.028 82 / 0.72);
  border: 1px solid var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition:
    background-color 180ms ease-out,
    color 180ms ease-out,
    transform 180ms ease-out;
}

.carousel-button:hover {
  color: var(--paper);
  background: var(--ink);
  transform: translateY(-1px);
}

.arrival-carousel {
  position: relative;
  margin-inline: calc(clamp(20px, 5vw, 72px) * -1);
  padding-inline: clamp(20px, 5vw, 72px);
  overflow: hidden;
}

.arrival-carousel::before,
.arrival-carousel::after {
  content: "";
  position: absolute;
  top: 0;
  z-index: 2;
  width: clamp(24px, 6vw, 96px);
  height: 100%;
  pointer-events: none;
}

.arrival-carousel::before {
  left: 0;
  background: linear-gradient(90deg, oklch(0.95 0.035 82), transparent);
}

.arrival-carousel::after {
  right: 0;
  background: linear-gradient(270deg, oklch(0.95 0.035 82), transparent);
}

.arrival-track {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 4px 0 18px;
}

.arrival-track::-webkit-scrollbar {
  display: none;
}

.arrival-track .card {
  flex: 0 0 clamp(236px, 22vw, 310px);
  scroll-snap-align: start;
  opacity: 0.28;
  transform: translateX(18px);
  transition:
    opacity 520ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.arrival-track .card.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.catalog-shell {
  display: grid;
  grid-template-columns: clamp(220px, 19vw, 270px) minmax(0, 1fr);
  gap: clamp(22px, 3vw, 38px);
  align-items: start;
  padding-top: 34px;
  padding-bottom: 76px;
  background: oklch(0.96 0.03 82 / 0.72);
  border-top: 1px solid oklch(0.67 0.04 80 / 0.55);
}

.catalog-page .catalog-shell,
.catalog-shell.standalone {
  padding-top: clamp(24px, 3.6vw, 46px);
}

.home-catalog {
  padding-top: clamp(34px, 5vw, 64px);
}

.home-catalog .catalog-top {
  display: flex;
  align-items: end;
  justify-content: space-between;
}

.home-catalog .catalog-top .button {
  width: max-content;
}

.home-product-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--ink-soft);
  font-size: 13px;
}

.breadcrumbs a {
  border-bottom: 1px solid oklch(0.62 0.04 248 / 0.45);
}

.breadcrumbs span {
  color: var(--red);
}

.catalog-sidebar {
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  padding: 14px 0;
  border-top: 3px double var(--ink);
  border-bottom: 3px double var(--ink);
  scrollbar-color: var(--line) transparent;
  scrollbar-width: thin;
}

.sidebar-title {
  margin-bottom: 12px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
}

.sidebar-title.gap {
  margin-top: 26px;
}

.filter-panel {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.filter-panel summary {
  color: var(--red);
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

.filter-panel .filter-stack {
  margin-top: 12px;
}

.category {
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  color: var(--ink);
  background: none;
  border: 0;
  border-bottom: 1px solid oklch(0.67 0.04 80 / 0.45);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.category.child {
  padding-left: 14px;
  font-size: 13px;
}

.category-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 12px 0 5px;
  padding: 7px 0 6px;
  color: var(--red);
  background: oklch(0.94 0.032 82 / 0.72);
  border-top: 1px solid oklch(0.67 0.04 80 / 0.55);
  border-right: 0;
  border-bottom: 1px solid oklch(0.67 0.04 80 / 0.35);
  border-left: 0;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--text);
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
}

.section-caret {
  color: var(--ink);
  font-size: 14px;
  transition: transform 180ms ease-out;
}

.category-group.is-collapsed .section-caret {
  transform: rotate(-90deg);
}

.category-group.is-collapsed .category-group-body {
  display: none;
}

.category.active span {
  color: var(--red);
  font-weight: 700;
}

.category.active {
  padding-left: 8px;
  background: oklch(0.96 0.035 82 / 0.82);
  border-left: 3px solid var(--red);
}

.check {
  display: block;
  margin: 12px 0;
  font-size: 13px;
}

.filter-stack {
  display: grid;
  gap: 12px;
}

.filter-stack label {
  display: grid;
  gap: 6px;
}

.filter-stack label span {
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.catalog-top {
  display: grid;
  grid-template-columns: minmax(220px, 1fr);
  gap: 24px;
  align-items: end;
}

.catalog-page .catalog-top {
  align-items: start;
}

.catalog-page #catalogTitle {
  max-width: 760px;
  font-size: clamp(42px, 5vw, 74px);
  line-height: 0.96;
}

.search-box {
  display: flex;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--ink);
  background: oklch(0.98 0.025 82);
}

.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  padding: 0 12px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  outline: none;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 0 20px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

select {
  border: 1px solid var(--ink);
  padding: 7px 10px;
  color: var(--ink);
  background: var(--paper);
  font: inherit;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: clamp(18px, 2vw, 24px);
}

.card {
  display: grid;
  gap: 12px;
}

.card-image {
  position: relative;
  aspect-ratio: 1 / 1.08;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: oklch(0.9 0.025 80);
  border: 1px solid oklch(0.62 0.04 80 / 0.55);
  box-shadow: 0 8px 20px oklch(0.29 0.04 248 / 0.1);
}

.card-image img {
  position: absolute;
  inset: 10px;
  display: block;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  padding: 0;
  box-sizing: border-box;
  object-fit: contain;
  object-position: center;
}

.card-image.missing img {
  display: none;
}

.card-image.missing::after {
  content: "Image pending";
  display: grid;
  width: calc(100% - 28px);
  height: calc(100% - 28px);
  place-items: center;
  color: var(--ink-soft);
  border: 3px double oklch(0.62 0.04 248 / 0.42);
  font-family: var(--display);
  font-size: 18px;
  text-align: center;
}

.badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 7px;
  color: var(--ink);
  background: oklch(0.97 0.025 82);
  border: 1px solid oklch(0.66 0.05 248 / 0.4);
  font-size: 10px;
}

.card h3 {
  margin: 0;
  min-height: 44px;
  font-size: 14px;
  line-height: 1.45;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 11px;
}

.meta span,
.meta a {
  padding: 4px 6px;
  border: 1px solid oklch(0.68 0.04 80 / 0.45);
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.price {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
}

.buy-link {
  color: var(--paper);
  background: var(--red);
  padding: 9px 11px;
  font-size: 12px;
  font-weight: 700;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 28px;
  padding-bottom: 28px;
  color: var(--paper);
  background: var(--ink);
}

.site-footer div {
  display: grid;
  gap: 4px;
}

.site-footer span,
.site-footer p {
  margin: 0;
  color: oklch(0.86 0.035 82);
  font-size: 13px;
}

.item-page {
  padding: clamp(28px, 5vw, 72px) clamp(20px, 5vw, 72px) 0;
}

.item-breadcrumbs {
  margin-bottom: 12px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 24px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.item-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(320px, 1.05fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.item-gallery {
  display: grid;
  gap: 14px;
}

.item-image-frame {
  position: relative;
  display: grid;
  width: 100%;
  min-height: min(70vh, 680px);
  place-items: center;
  padding: clamp(14px, 2.6vw, 28px);
  background: oklch(0.91 0.03 78 / 0.62);
  border: 1px solid oklch(0.62 0.04 80 / 0.55);
  cursor: zoom-in;
}

.item-image-frame img {
  display: block;
  max-width: 100%;
  max-height: min(64vh, 620px);
  object-fit: contain;
}

.item-image-frame .badge {
  pointer-events: none;
}

.item-image-frame.missing::after {
  content: "Image pending";
  display: grid;
  width: min(100%, 460px);
  min-height: 420px;
  place-items: center;
  color: var(--ink-soft);
  border: 3px double oklch(0.62 0.04 248 / 0.42);
  font-family: var(--display);
  font-size: 24px;
}

.item-image-frame.missing img {
  display: none;
}

.image-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.image-tab {
  min-height: 42px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  font: inherit;
  cursor: pointer;
}

.image-tab.active {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
  font-weight: 700;
}

.item-details h1 {
  margin-bottom: 18px;
  max-width: 880px;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.08;
}

.item-price-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  border: 1px solid var(--line);
  background: var(--line);
}

.facts div {
  display: grid;
  gap: 5px;
  padding: 12px;
  background: oklch(0.96 0.03 82);
}

.facts div:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.facts dt {
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.facts dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}

.description-block {
  margin-top: 28px;
}

.description-block h2 {
  font-size: clamp(26px, 3vw, 40px);
}

.description-block p {
  max-width: 68ch;
  color: var(--ink-soft);
  line-height: 1.65;
}

.related-section {
  padding-top: clamp(42px, 6vw, 84px);
  padding-bottom: 74px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  padding: clamp(14px, 3vw, 34px);
  background: oklch(0.16 0.035 248 / 0.82);
}

.lightbox.open {
  display: grid;
}

.lightbox-panel {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  width: min(92vw, 1120px);
  height: min(88vh, 840px);
  max-height: calc(100vh - 36px);
  padding-top: 0;
}

.lightbox-close {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  width: 44px;
  height: 44px;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid oklch(0.88 0.03 82 / 0.8);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-image-frame {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  min-height: 0;
  height: 100%;
  padding: clamp(12px, 2vw, 22px);
  background: oklch(0.94 0.035 82);
  border: 1px solid oklch(0.76 0.035 82);
}

.lightbox-image-frame img {
  position: absolute;
  inset: clamp(12px, 2vw, 22px);
  display: block;
  width: calc(100% - clamp(24px, 4vw, 44px));
  height: calc(100% - clamp(24px, 4vw, 44px));
  object-fit: contain;
}

.lightbox-tabs {
  width: min(100%, 760px);
  margin-inline: auto;
  background: oklch(0.94 0.035 82);
}

@media (max-width: 980px) {
  .hero,
  .catalog-shell,
  .item-layout,
  .catalog-top {
    grid-template-columns: 1fr;
  }

  .featured-grid:not(.arrival-track) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .catalog-sidebar {
    position: static;
  }
}

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

  .header-search {
    width: 100%;
    max-width: none;
    min-width: 0;
    flex: 0 0 auto;
    margin-left: 0;
  }

  .header-search input,
  .header-search button {
    min-height: 44px;
  }

  nav {
    justify-content: flex-start;
  }

  .hero {
    padding-top: 26px;
  }

  .featured-grid:not(.arrival-track) {
    grid-template-columns: 1fr;
  }

  .home-product-grid {
    grid-template-columns: 1fr;
  }

  .catalog-results {
    order: 1;
  }

  .catalog-sidebar {
    order: 2;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .carousel-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .carousel-button {
    min-width: 42px;
    min-height: 38px;
  }

  .arrival-track .card {
    flex-basis: min(78vw, 300px);
  }

  .search-box,
  .toolbar,
  .site-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .facts,
  .image-tabs {
    grid-template-columns: 1fr;
  }
}
