:root {
  --primary: #ea2c52;
  --secondary: #ea5370;
  --tertiary: #6e6bff;
  --quarter: #6a4cf6;
  --ink: #282828;
  --muted: #67616a;
  --line: #ece7ea;
  --surface: #ffffff;
  --soft: #fff5f7;
  --lavender: #f1f0ff;
  --shadow: 0 18px 40px rgba(40, 40, 40, .12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #fff;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #fff;
  font-weight: 800;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--quarter));
}

.brand strong, .brand small { display: block; line-height: 1.05; }
.brand small { color: var(--muted); font-size: 12px; margin-top: 3px; }

.header-action {
  padding: 10px 14px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  background: var(--ink);
}

.hero {
  display: grid;
  gap: 22px;
  min-height: calc(100svh - 64px);
  padding: 42px 18px 26px;
  align-content: end;
  color: #fff;
  background:
    linear-gradient(160deg, rgba(40, 40, 40, .42), rgba(234, 44, 82, .84)),
    url("https://images.unsplash.com/photo-1604654894610-df63bc536371?auto=format&fit=crop&w=1400&q=78") center/cover;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow { color: #fff; }

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: clamp(46px, 15vw, 76px); line-height: .95; letter-spacing: 0; }
h2 { margin-bottom: 0; font-size: 28px; line-height: 1.08; letter-spacing: 0; }

.hero-text {
  max-width: 560px;
  margin-bottom: 20px;
  font-size: 17px;
  line-height: 1.5;
}

.hero-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 0;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.button.primary { color: #fff; background: var(--primary); }
.button.secondary { color: var(--ink); background: #fff; }
.button.dark { color: #fff; background: var(--ink); }
.button.full { width: 100%; }

.hero-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 8px;
  background: rgba(255, 255, 255, .25);
}

.hero-panel div {
  padding: 16px;
  background: rgba(255, 255, 255, .16);
}

.metric { display: block; font-size: 30px; font-weight: 800; }
.hero-panel small { color: rgba(255, 255, 255, .86); }

.catalog-shell {
  padding: 28px 16px 36px;
  background: #fff;
}

.section-heading { margin-bottom: 18px; }

.tools {
  display: grid;
  grid-template-columns: 1fr 48px;
  gap: 10px;
  margin-bottom: 14px;
}

.search-field input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

.search-field input:focus {
  border-color: var(--tertiary);
  box-shadow: 0 0 0 3px rgba(110, 107, 255, .16);
}

.icon-button, .modal-close {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
}

.icon-button svg, .modal-close svg { width: 22px; height: 22px; fill: currentColor; }

.category-tabs {
  display: flex;
  gap: 10px;
  padding: 0 0 14px;
  margin: 0 -16px 14px;
  overflow-x: auto;
  scroll-padding-left: 16px;
}

.category-banner {
  flex: 0 0 auto;
  display: grid;
  align-content: end;
  width: 150px;
  min-height: 88px;
  padding: 12px;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(40, 40, 40, .12), rgba(40, 40, 40, .72)),
    var(--banner-image) center/cover;
  box-shadow: 0 12px 24px rgba(40, 40, 40, .12);
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease, filter .22s ease;
}

.category-banner:hover {
  filter: saturate(1.05);
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(40, 40, 40, .16);
}

.category-banner:first-child { margin-left: 16px; }
.category-banner:last-child { margin-right: 16px; }
.category-banner:focus-visible { outline: 3px solid rgba(110, 107, 255, .32); outline-offset: 2px; }

.category-banner-name {
  display: -webkit-box;
  overflow: hidden;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.1;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.category-banner-count {
  margin-top: 5px;
  color: rgba(255, 255, 255, .88);
  font-size: 11px;
  font-weight: 700;
}

.status {
  min-height: 24px;
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.catalog-sections {
  display: grid;
  gap: 18px;
  width: 100vw;
  margin-left: 50%;
  transform: translateX(-50%);
}

.category-section {
  display: grid;
  min-height: 100svh;
  align-content: start;
  background: #fff;
  scroll-margin-top: 74px;
}

.category-hero {
  display: grid;
  min-height: 44svh;
  padding: 28px 16px;
  align-content: end;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(40, 40, 40, .08), rgba(40, 40, 40, .76)),
    var(--category-image) center/cover;
}

.category-hero .eyebrow { color: #fff; }

.category-hero h3 {
  max-width: 720px;
  margin-bottom: 8px;
  font-size: 38px;
  line-height: 1;
  letter-spacing: 0;
}

.category-count {
  margin: 0;
  color: rgba(255, 255, 255, .9);
  font-weight: 700;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px 16px 28px;
}

.product-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(40, 40, 40, .05);
  transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease;
}

.product-card:hover,
.product-card:focus-within {
  border-color: rgba(234, 44, 82, .42);
  box-shadow: 0 18px 34px rgba(40, 40, 40, .14);
  transform: translateY(-3px);
}

.product-button {
  display: grid;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.product-button:focus-visible {
  outline: 3px solid rgba(110, 107, 255, .26);
  outline-offset: -3px;
}

.product-image-wrap {
  position: relative;
  display: block;
  aspect-ratio: 1;
  background: var(--soft);
  overflow: hidden;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease, opacity .22s ease;
}

.product-card:hover .product-image,
.product-card:focus-within .product-image {
  transform: scale(1.055);
}

.product-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  max-width: calc(100% - 16px);
  padding: 6px 8px;
  overflow: hidden;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 999px;
  background: rgba(40, 40, 40, .78);
  backdrop-filter: blur(8px);
}

.product-info {
  display: grid;
  gap: 5px;
  padding: 11px;
}

.product-category, .product-meta {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.product-name {
  display: -webkit-box;
  min-height: 38px;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-variants {
  display: -webkit-box;
  min-height: 30px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-price {
  color: var(--primary);
  font-weight: 800;
  font-size: 14px;
}

.modal-variations {
  display: grid;
  gap: 8px;
  margin: -2px 0 16px;
}

.modal-variations h4 {
  margin: 0;
  font-size: 15px;
}

.variation-item {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.variation-item span {
  font-size: 13px;
  font-weight: 800;
}

.variation-item small {
  color: var(--muted);
  font-weight: 700;
}

.advisor-band {
  display: grid;
  gap: 18px;
  padding: 30px 16px 36px;
  background: var(--lavender);
}

.advisor-band h2 { max-width: 720px; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
}

.modal[aria-hidden="false"] { display: block; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(40, 40, 40, .58);
}

.modal-card {
  position: absolute;
  inset: auto 0 0;
  max-height: 92svh;
  overflow: auto;
  border-radius: 16px 16px 0 0;
  background: #fff;
  box-shadow: var(--shadow);
}

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

.modal-media {
  aspect-ratio: 1.1;
  background: var(--soft);
}

.modal-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-content { padding: 18px 16px 22px; }
.modal-category { margin-bottom: 6px; color: var(--quarter); font-size: 13px; font-weight: 800; }
.modal-content h3 { margin-bottom: 8px; font-size: 24px; line-height: 1.15; }
.modal-price { margin-bottom: 12px; color: var(--primary); font-size: 20px; font-weight: 800; }
.modal-description { color: var(--muted); line-height: 1.55; }

.product-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 16px 0;
}

.product-facts div {
  padding: 10px;
  border-radius: 8px;
  background: #faf8f9;
}

.product-facts dt { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.product-facts dd { margin: 4px 0 0; font-weight: 800; overflow-wrap: anywhere; }

body.modal-open { overflow: hidden; }

@media (min-width: 680px) {
  .site-header { padding-inline: 28px; }
  .hero { grid-template-columns: minmax(0, 1fr) 300px; align-items: end; padding: 70px 32px 34px; }
  .hero-actions { grid-template-columns: max-content max-content; }
  .catalog-shell, .advisor-band { padding-inline: 32px; }
  .category-tabs { margin-inline: -32px; scroll-padding-left: 32px; }
  .category-banner { width: 190px; min-height: 106px; }
  .category-banner:first-child { margin-left: 32px; }
  .category-banner:last-child { margin-right: 32px; }
  .category-hero { padding-inline: 32px; min-height: 52svh; }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .modal-card { left: 50%; top: 50%; bottom: auto; width: min(920px, calc(100vw - 40px)); max-height: 88vh; display: grid; grid-template-columns: .95fr 1fr; border-radius: 8px; transform: translate(-50%, -50%); }
  .modal-media { min-height: 100%; aspect-ratio: auto; }
}

@media (min-width: 1040px) {
  .site-header, .hero, .catalog-shell, .advisor-band { padding-inline: max(48px, calc((100vw - 1180px) / 2)); }
  .category-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-inline: 0;
    overflow: visible;
  }
  .category-banner {
    width: auto;
    min-height: 128px;
  }
  .category-banner:first-child,
  .category-banner:last-child {
    margin: 0;
  }
  .category-hero, .product-grid { padding-inline: max(48px, calc((100vw - 1180px) / 2)); }
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  .modal-media img {
    width: 100%;
    height: auto;
    object-fit: auto;
    position: sticky;
    top: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
