:root {
  --bg: #f7f1e7;
  --bg-strong: #fffaf4;
  --panel: rgba(255, 249, 242, 0.82);
  --card: rgba(255, 252, 247, 0.92);
  --card-strong: #fffdf9;
  --ink: #1d2330;
  --muted: #6e7280;
  --line: rgba(29, 35, 48, 0.1);
  --line-strong: rgba(29, 35, 48, 0.16);
  --accent: #154c8f;
  --accent-deep: #0d3561;
  --accent-soft: rgba(21, 76, 143, 0.12);
  --warm: #d97d45;
  --warm-soft: rgba(217, 125, 69, 0.14);
  --success: #1f7a60;
  --danger: #8d3742;
  --shadow: 0 24px 64px rgba(74, 48, 25, 0.12);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --heading-font: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body-font: "Space Grotesk", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body-font);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(217, 125, 69, 0.22), transparent 24%),
    radial-gradient(circle at top right, rgba(21, 76, 143, 0.18), transparent 28%),
    linear-gradient(180deg, #fbf7f1 0%, #f1e7da 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.32;
  background-image:
    linear-gradient(rgba(29, 35, 48, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 35, 48, 0.02) 1px, transparent 1px);
  background-size: 28px 28px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.store-page {
  position: relative;
  z-index: 1;
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 64px;
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  margin-bottom: 22px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  background: rgba(255, 251, 246, 0.76);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--warm) 100%);
  color: #fff8f1;
  font-family: var(--heading-font);
  font-size: 1.35rem;
  font-weight: 700;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 1rem;
}

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

.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.cart-pill,
.ghost-filter,
.load-more-button,
.sheet-close,
.secondary-link {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.cart-pill,
.primary-link,
.secondary-link,
.ghost-filter,
.load-more-button,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  padding: 12px 18px;
  text-decoration: none;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.cart-pill:hover,
.primary-link:hover,
.secondary-link:hover,
.ghost-filter:hover,
.load-more-button:hover,
.primary-button:hover {
  transform: translateY(-1px);
}

.cart-pill span {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff9f4;
  font-size: 0.88rem;
  font-weight: 700;
}

.storefront {
  display: grid;
  gap: 24px;
}

.hero {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr;
  gap: 22px;
}

.hero-copy,
.hero-panel,
.filters-bar,
.info-card,
.ops-panel,
.product-card,
.product-sheet,
.cart-drawer {
  border: 1px solid rgba(255, 255, 255, 0.62);
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-copy,
.hero-panel,
.filters-bar,
.info-card,
.ops-panel {
  border-radius: var(--radius-xl);
}

.hero-copy {
  padding: 34px;
}

.hero-copy h1 {
  margin: 10px 0 16px;
  font-family: var(--heading-font);
  font-size: clamp(2.4rem, 5vw, 4.9rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
  max-width: 10ch;
}

.hero-text,
.section-copy,
.hero-note span {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.primary-link,
.primary-button {
  border: 0;
  background: linear-gradient(135deg, var(--accent) 0%, #1f73c7 100%);
  color: #fef8f1;
  box-shadow: 0 14px 32px rgba(21, 76, 143, 0.24);
}

.secondary-link {
  padding-inline: 20px;
}

.hero-panel {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.hero-stat,
.hero-note,
.ops-card,
.cart-summary article {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(29, 35, 48, 0.06);
}

.hero-stat span,
.hero-note p,
.ops-card span,
.cart-summary span,
.section-heading small,
.sheet-kicker,
.eyebrow,
.subtle {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-stat strong,
.hero-note strong,
.cart-summary strong {
  display: block;
  margin-top: 10px;
  font-family: var(--heading-font);
  font-size: 1.8rem;
  line-height: 1;
}

.hero-note strong {
  font-size: 1.3rem;
}

.filters-bar {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 220px auto;
  gap: 14px;
  padding: 18px;
  align-items: end;
}

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

.search-field span,
.sort-field span,
.section-heading span {
  font-size: 0.84rem;
  color: var(--muted);
  font-weight: 700;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  padding: 14px 16px;
  color: var(--ink);
}

input:focus,
select:focus {
  outline: none;
  border-color: rgba(21, 76, 143, 0.42);
  box-shadow: 0 0 0 4px rgba(21, 76, 143, 0.1);
}

.ghost-filter.is-active {
  border-color: rgba(21, 76, 143, 0.34);
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
}

.section-head h2,
.drawer-head h3,
.sheet-body h3 {
  margin: 6px 0 0;
  font-family: var(--heading-font);
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1;
}

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

.product-card {
  display: grid;
  gap: 16px;
  padding: 16px;
  border-radius: 28px;
  background: rgba(255, 253, 249, 0.96);
}

.product-art {
  position: relative;
  min-height: 210px;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, var(--art-a), transparent 42%),
    radial-gradient(circle at bottom right, var(--art-b), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.86) 0%, rgba(244, 232, 219, 0.88) 100%);
  display: grid;
  place-items: end start;
  padding: 18px;
}

.product-art::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.product-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.product-art span {
  position: relative;
  z-index: 1;
  font-family: var(--heading-font);
  font-size: 2rem;
  line-height: 1;
  color: rgba(29, 35, 48, 0.78);
}

.product-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.pill,
.stock-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.pill {
  background: var(--warm-soft);
  color: #8e4e22;
}

.stock-pill {
  background: rgba(31, 122, 96, 0.12);
  color: var(--success);
}

.stock-pill.out {
  background: rgba(141, 55, 66, 0.12);
  color: var(--danger);
}

.product-card h3 {
  margin: 0;
  font-size: 1.22rem;
  line-height: 1.2;
}

.product-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

.price-preview {
  display: grid;
  gap: 4px;
}

.price-preview span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.price-preview strong {
  font-family: var(--heading-font);
  font-size: 1.48rem;
  line-height: 1;
}

.product-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.card-action {
  border: 0;
  border-radius: 18px;
  padding: 12px 14px;
  background: rgba(21, 76, 143, 0.08);
  color: var(--accent-deep);
  font-weight: 700;
}

.card-action:hover {
  background: rgba(21, 76, 143, 0.14);
}

.load-more-wrap {
  display: flex;
  justify-content: center;
}

.load-more-button[hidden] {
  display: none;
}

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

.info-card {
  padding: 22px;
}

.info-card p {
  margin: 0 0 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
}

.info-card strong {
  font-size: 1rem;
  line-height: 1.55;
}

.ops-panel {
  padding: 18px 20px;
}

.ops-panel summary {
  cursor: pointer;
  font-weight: 700;
}

.ops-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.ops-card code {
  display: block;
  margin-top: 10px;
  font-size: 0.86rem;
  line-height: 1.6;
  word-break: break-word;
}

.ops-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  grid-column: 1 / -1;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 19;
  background: rgba(17, 21, 28, 0.38);
  backdrop-filter: blur(8px);
}

.product-sheet,
.cart-drawer {
  position: fixed;
  top: 18px;
  bottom: 18px;
  right: 18px;
  z-index: 20;
  width: min(540px, calc(100vw - 24px));
  border-radius: 34px;
  transform: translateX(110%);
  transition: transform 180ms ease;
  overflow: hidden;
}

.cart-drawer {
  z-index: 21;
  width: min(420px, calc(100vw - 24px));
}

.product-sheet.is-open,
.cart-drawer.is-open {
  transform: translateX(0);
}

.sheet-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 1.5rem;
  z-index: 2;
}

.sheet-media {
  position: relative;
  min-height: 280px;
  padding: 26px;
  display: grid;
  place-items: end start;
  background:
    radial-gradient(circle at top left, var(--sheet-art-a), transparent 44%),
    radial-gradient(circle at bottom right, var(--sheet-art-b), transparent 40%),
    linear-gradient(150deg, #fffefb 0%, #f0e4d5 100%);
}

.sheet-media::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.sheet-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sheet-media span {
  position: relative;
  z-index: 1;
  font-family: var(--heading-font);
  font-size: 2.9rem;
  line-height: 1;
  color: rgba(29, 35, 48, 0.82);
}

.sheet-body,
.cart-drawer {
  display: grid;
}

.sheet-body {
  gap: 20px;
  padding: 26px;
}

.sheet-description,
.cart-footer p,
.bundleline-list li,
.cart-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

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

.sheet-price-row strong {
  font-family: var(--heading-font);
  font-size: 2rem;
  line-height: 1;
}

.sheet-price-row span {
  color: var(--success);
  font-weight: 700;
}

.sheet-section {
  display: grid;
  gap: 12px;
}

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

.offer-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.offer-option {
  min-width: 140px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  text-align: left;
}

.offer-option span {
  display: block;
  font-weight: 700;
}

.offer-option small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.offer-option.is-active {
  border-color: rgba(21, 76, 143, 0.38);
  background: rgba(21, 76, 143, 0.1);
  color: var(--accent-deep);
}

.bundleline-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
}

.sheet-purchase {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 14px;
}

.qty-stepper {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  gap: 8px;
  align-items: center;
}

.qty-stepper button {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
  font-size: 1.3rem;
}

.qty-stepper input {
  text-align: center;
  padding-inline: 0;
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  padding: 24px 24px 12px;
}

.drawer-head .sheet-close {
  position: static;
}

.cart-drawer {
  padding: 0;
  grid-template-rows: auto auto 1fr auto;
}

.cart-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 24px 18px;
}

.cart-list {
  padding: 0 24px 18px;
  overflow: auto;
  display: grid;
  gap: 12px;
}

.cart-item {
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(29, 35, 48, 0.06);
  display: grid;
  gap: 10px;
}

.cart-item-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.cart-item h4 {
  margin: 0;
  font-size: 1rem;
}

.cart-item strong {
  white-space: nowrap;
}

.cart-item-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.inline-stepper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.inline-stepper button,
.inline-remove {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
  padding: 8px 10px;
}

.cart-footer {
  padding: 0 24px 24px;
}

.empty-cart,
.empty-results {
  margin: 0;
  padding: 24px;
  border-radius: 24px;
  border: 1px dashed var(--line-strong);
  background: rgba(255, 255, 255, 0.56);
  color: var(--muted);
  text-align: center;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 30;
  transform: translateX(-50%);
  max-width: min(90vw, 520px);
  padding: 14px 18px;
  border-radius: 999px;
  background: rgba(23, 28, 39, 0.92);
  color: #fffef9;
  box-shadow: 0 18px 40px rgba(10, 16, 24, 0.28);
}

.toast.is-error {
  background: rgba(141, 55, 66, 0.94);
}

.skeleton-card {
  min-height: 360px;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.78) 8%, rgba(255, 255, 255, 0.46) 18%, rgba(255, 255, 255, 0.78) 33%),
    rgba(255, 255, 255, 0.68);
  background-size: 240% 100%;
  animation: shimmer 1.8s linear infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -40% 0;
  }
}

@media (max-width: 1120px) {
  .hero,
  .product-grid,
  .info-strip,
  .ops-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .store-page {
    width: min(100% - 20px, 1320px);
    padding-top: 18px;
  }

  .topbar,
  .hero-copy,
  .hero-panel,
  .filters-bar,
  .info-card,
  .ops-panel,
  .product-card,
  .product-sheet,
  .cart-drawer {
    border-radius: 24px;
  }

  .filters-bar,
  .product-grid,
  .info-strip,
  .ops-grid,
  .sheet-purchase,
  .cart-summary {
    grid-template-columns: 1fr;
  }

  .section-head,
  .product-footer,
  .sheet-price-row,
  .drawer-head,
  .cart-item-top,
  .cart-item-actions {
    flex-direction: column;
    align-items: start;
  }

  .product-sheet,
  .cart-drawer {
    top: auto;
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
  }

  .sheet-media {
    min-height: 220px;
  }
}
