:root {
  --bg: #f3efe8;
  --surface: #fffdf9;
  --surface-2: #f8f3ec;
  --surface-3: #efe7dd;
  --text: #1f1b18;
  --muted: #6b625b;
  --line: rgba(31, 27, 24, 0.1);
  --line-strong: rgba(31, 27, 24, 0.18);
  --primary: #1f3a5f;
  --primary-strong: #152a46;
  --accent: #bb7a4f;
  --success-bg: #edf7f0;
  --success-text: #2f6b45;
  --shadow: 0 18px 40px rgba(31, 27, 24, 0.08);
  --radius: 24px;
  --radius-sm: 16px;
  --max-width: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(187, 122, 79, 0.08), transparent 28%),
    linear-gradient(180deg, #f7f3ed 0%, #f3efe8 100%);
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p,
ul {
  margin-top: 0;
}

.promo-bar {
  padding: 12px 16px;
  color: #f8f4ef;
  text-align: center;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  background: linear-gradient(90deg, var(--primary-strong), var(--primary));
}

.page-shell {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
  padding: 22px 0 64px;
}

.topbar {
  position: sticky;
  top: 10px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 22px;
  margin-bottom: 28px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.8);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 30px rgba(31, 27, 24, 0.06);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: "Manrope", sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 8px 16px rgba(31, 58, 95, 0.14);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topnav {
  display: inline-flex;
  gap: 28px;
}

.topnav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

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

.cart-toggle,
.button,
.icon-button,
.chip,
.variant-options button,
.thumb-row button,
.text-link {
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease,
    box-shadow 180ms ease, transform 180ms ease;
}

.cart-toggle,
.button,
.icon-button {
  border: 1px solid transparent;
}

.cart-toggle:hover,
.button:hover,
.icon-button:hover,
.text-link:hover {
  transform: translateY(-1px);
}

.cart-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 15px;
  border-color: var(--line);
  border-radius: 999px;
  background: #fff;
}

.cart-toggle span {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.76rem;
  background: var(--accent);
}

main {
  display: grid;
  gap: 28px;
}

.hero,
.featured,
.catalog,
.insights {
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 32px;
  background: rgba(255, 253, 249, 0.84);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(330px, 0.85fr);
  gap: 28px;
  align-items: stretch;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(248, 243, 236, 0.94)),
    radial-gradient(circle at bottom right, rgba(187, 122, 79, 0.12), transparent 28%);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2 {
  font-family: "Manrope", sans-serif;
  letter-spacing: -0.04em;
}

h1 {
  max-width: 11ch;
  margin-bottom: 16px;
  font-size: clamp(2.8rem, 5vw, 5rem);
  line-height: 0.98;
}

h2 {
  font-size: clamp(2rem, 3.3vw, 3rem);
  line-height: 1.02;
}

h3 {
  margin-bottom: 10px;
  font-family: "Manrope", sans-serif;
  font-size: 1.18rem;
  line-height: 1.2;
}

.hero-text,
.section-copy,
.card-description,
.modal-copy,
.stack-item span,
.cart-item-meta,
.collection-card p {
  color: var(--muted);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
}

.button-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #486a90);
  box-shadow: 0 12px 24px rgba(31, 58, 95, 0.18);
}

.button-primary:hover {
  background: linear-gradient(135deg, var(--primary-strong), var(--primary));
}

.button-secondary {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.button-secondary:hover {
  background: #fff;
}

.button-block {
  width: 100%;
}

.hero-panel {
  display: block;
}

.hero-showcase {
  display: grid;
  height: 100%;
  min-height: 430px;
  grid-template-columns: 1.15fr 0.85fr;
  grid-template-rows: 1fr 1fr;
  gap: 14px;
}

.hero-product {
  position: relative;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 24px;
  text-align: left;
  background: #fff;
  box-shadow: 0 16px 30px rgba(31, 27, 24, 0.08);
}

.hero-product img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-product::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(17, 17, 17, 0.58) 100%);
}

.hero-product-copy {
  position: absolute;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 1;
  color: #fff;
}

.hero-product-copy strong,
.hero-product-copy small {
  display: block;
}

.hero-product-copy strong {
  font-family: "Manrope", sans-serif;
  font-size: 1rem;
}

.hero-product-copy small {
  margin-top: 4px;
  opacity: 0.82;
}

.hero-product-1 {
  grid-row: 1 / 3;
}

.collection-card,
.insight-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.7);
}

.collections {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 18px;
}

.collection-card-dark {
  color: #f8f4ef;
  background: linear-gradient(135deg, var(--primary-strong), #334d6f);
}

.collection-card-dark .eyebrow,
.collection-card-dark p,
.collection-card-dark h3 {
  color: inherit;
}

.text-link {
  display: inline-flex;
  margin-top: 8px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

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

.section-copy {
  max-width: 480px;
}

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

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

.featured-card,
.product-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 16px 30px rgba(31, 27, 24, 0.06);
}

.featured-card {
  display: grid;
  grid-template-rows: 260px auto;
}

.featured-card img,
.card-media img,
.modal-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-copy {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.featured-copy h3 {
  margin-bottom: 0;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 16px;
  margin-bottom: 18px;
}

.search-field,
.select-field {
  display: grid;
  gap: 8px;
}

.search-field span,
.select-field span {
  font-size: 0.88rem;
  font-weight: 600;
}

.search-field input,
.select-field select {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.chip {
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
}

.chip.active {
  color: #fff;
  border-color: transparent;
  background: var(--primary);
}

.product-card {
  display: grid;
  grid-template-rows: 270px auto;
}

.card-media {
  padding: 0;
  border: 0;
  background: transparent;
}

.card-body {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.card-meta,
.stack-item strong,
.cart-total span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.product-card h3 {
  margin-bottom: 0;
  font-size: 1.06rem;
  line-height: 1.4;
}

.card-description {
  display: -webkit-box;
  min-height: 72px;
  overflow: hidden;
  font-size: 0.94rem;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

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

.price-group {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.sale-price {
  font-family: "Manrope", sans-serif;
  font-size: 1.12rem;
}

.regular-price {
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: line-through;
}

.stock-pill {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--success-text);
  font-size: 0.76rem;
  font-weight: 600;
  background: var(--success-bg);
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  padding-top: 22px;
}

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

.stack-list {
  display: grid;
  gap: 14px;
}

.stack-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(26, 23, 20, 0.38);
  backdrop-filter: blur(4px);
}

.hidden {
  display: none;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 60;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(430px, 100%);
  height: 100dvh;
  padding: 24px;
  background: #fffdf9;
  box-shadow: -20px 0 40px rgba(31, 27, 24, 0.12);
  transform: translateX(100%);
  transition: transform 220ms ease;
}

.cart-drawer.open {
  transform: translateX(0);
}

.drawer-header,
.cart-total,
.cart-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.cart-items {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px 0;
  overflow: auto;
}

.cart-item {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.cart-item strong,
.cart-total strong {
  font-size: 1rem;
}

.cart-item .icon-button {
  margin-top: 8px;
}

.cart-footer {
  display: grid;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-color: var(--line);
  border-radius: 50%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.85);
}

.product-modal {
  width: min(1080px, calc(100% - 24px));
  padding: 0;
  border: 0;
  border-radius: 28px;
  background: transparent;
}

.product-modal::backdrop {
  background: rgba(26, 23, 20, 0.4);
  backdrop-filter: blur(4px);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
}

.modal-content {
  overflow: hidden;
  border-radius: 28px;
  background: #fffdf9;
  box-shadow: 0 24px 60px rgba(31, 27, 24, 0.12);
}

.modal-layout {
  display: grid;
  grid-template-columns: 1fr 0.95fr;
}

.modal-gallery {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: var(--surface-2);
}

.modal-gallery-main {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 20px;
}

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

.thumb-row button {
  aspect-ratio: 1 / 1;
  padding: 0;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 14px;
  background: #fff;
}

.thumb-row button.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.modal-copy {
  padding: 28px;
}

.modal-copy h2 {
  margin-bottom: 10px;
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  line-height: 1.08;
}

.modal-price {
  margin: 18px 0 22px;
}

.variant-groups {
  display: grid;
  gap: 16px;
  margin-bottom: 22px;
}

.variant-group {
  display: grid;
  gap: 8px;
}

.variant-group strong {
  font-size: 0.92rem;
}

.variant-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.variant-options button {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
}

.variant-options button.active {
  color: #fff;
  border-color: transparent;
  background: var(--primary);
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.empty-state {
  padding: 42px 20px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.7);
}

@media (max-width: 1080px) {
  .hero,
  .collections,
  .modal-layout,
  .insight-layout {
    grid-template-columns: 1fr;
  }

  .hero-showcase {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: 220px;
    grid-template-rows: 220px;
  }

  .hero-product-1 {
    grid-row: auto;
  }

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

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

@media (max-width: 820px) {
  .page-shell {
    width: min(calc(100% - 20px), var(--max-width));
    padding-top: 14px;
  }

  .topbar {
    position: static;
    flex-wrap: wrap;
    border-radius: 26px;
  }

  .topnav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 16px;
  }

  .section-heading,
  .toolbar {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .hero,
  .featured,
  .catalog,
  .insights {
    padding: 22px;
    border-radius: 24px;
  }

  .featured-grid,
  .product-grid,
  .hero-showcase {
    grid-template-columns: 1fr;
  }

  .hero-showcase {
    grid-template-rows: repeat(3, 220px);
    min-height: auto;
  }

  .topnav {
    overflow: auto;
  }

  .thumb-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
