:root {
  --bg: #fff8ef;
  --ink: #243044;
  --muted: #667085;
  --card: #ffffff;
  --line: rgba(36, 48, 68, 0.12);
  --red: #ff665a;
  --blue: #1ba7ec;
  --yellow: #ffc845;
  --green: #41c99b;
  --shadow: 0 18px 50px rgba(36, 48, 68, 0.14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Nunito", system-ui, sans-serif;
  overflow-x: hidden;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(18px, 4vw, 54px);
  background: rgba(255, 248, 239, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Baloo 2", system-ui, sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  min-width: 0;
}

.logo-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--red), var(--yellow));
  color: #fff;
  box-shadow: 0 12px 22px rgba(255, 102, 90, 0.28);
}

.nav-links {
  display: flex;
  gap: 22px;
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.icon-button {
  display: inline-grid;
  min-width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(36, 48, 68, 0.1);
  cursor: pointer;
}

.cart-toggle {
  grid-template-columns: auto auto;
  gap: 6px;
  padding: 0 12px;
  font-weight: 900;
}

.hero {
  position: relative;
  min-height: 82svh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 80px clamp(20px, 5vw, 70px);
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  background: linear-gradient(90deg, rgba(255, 248, 239, 0.96) 0%, rgba(255, 248, 239, 0.82) 38%, rgba(255, 248, 239, 0.18) 72%);
}

.hero-content {
  position: relative;
  max-width: 620px;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Baloo 2", system-ui, sans-serif;
  line-height: 0.98;
}

h1 {
  font-size: clamp(4.2rem, 11vw, 8.5rem);
  color: var(--red);
  text-shadow: 4px 4px 0 #fff, 8px 8px 0 rgba(255, 200, 69, 0.38);
}

.hero-copy {
  max-width: 520px;
  margin: 20px 0 28px;
  color: #4b5870;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  font-weight: 700;
}

.hero-actions,
.footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  padding: 12px 20px;
  font-weight: 900;
  cursor: pointer;
}

.button.primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 14px 26px rgba(255, 102, 90, 0.28);
}

.button.soft {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.quick-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: -34px auto 0;
  max-width: 1040px;
  width: calc(100% - 36px);
  position: relative;
  z-index: 2;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--line);
  box-shadow: var(--shadow);
}

.quick-strip div {
  display: grid;
  gap: 4px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.94);
}

.quick-strip strong { font-family: "Baloo 2", system-ui, sans-serif; font-size: 1.2rem; }
.quick-strip span { color: var(--muted); font-weight: 700; }

.shop-section,
.why-section {
  padding: 82px clamp(18px, 4vw, 54px);
}

.section-heading {
  max-width: 860px;
  margin: 0 auto 28px;
  text-align: center;
}

h2 { font-size: clamp(2.3rem, 6vw, 4rem); }

.filters {
  display: flex;
  max-width: 1040px;
  margin: 0 auto 26px;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}

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

.filters button {
  flex: none;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 16px;
  background: #fff;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}

.filters button.active {
  background: var(--ink);
  color: #fff;
}

.product-grid,
.feature-grid {
  display: grid;
  max-width: 1040px;
  margin: 0 auto;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.product-card,
.feature-grid article {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 12px 32px rgba(36, 48, 68, 0.08);
}

.product-art {
  position: relative;
  display: grid;
  min-height: 160px;
  place-items: center;
  background:
    radial-gradient(circle at 22% 24%, rgba(255, 255, 255, 0.8), transparent 28%),
    linear-gradient(135deg, color-mix(in srgb, var(--toy-color) 72%, white), var(--toy-color));
}

.sale-ribbon {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--red);
  color: #fff;
  font-size: .78rem;
  box-shadow: 0 10px 22px rgba(255, 102, 90, .28);
}

.product-art span {
  font-size: 4rem;
  filter: drop-shadow(0 14px 12px rgba(36, 48, 68, 0.16));
}

.product-art.has-image {
  background: #fff;
}

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

.product-body { padding: 18px; }

.product-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
}

.product-card h3 {
  margin-top: 10px;
  font-size: 1.35rem;
  overflow-wrap: anywhere;
}

.product-card p {
  min-height: 66px;
  margin: 8px 0 16px;
  color: var(--muted);
  font-weight: 700;
}

.product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.product-bottom strong { font-size: 1.05rem; }
.card-price {
  display: grid;
  line-height: 1.1;
  min-width: 0;
}
.card-price span {
  color: var(--muted);
  font-size: .82rem;
  text-decoration: line-through;
}

.product-bottom button,
.qty-controls button {
  border: 0;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.product-bottom button {
  min-width: 70px;
  min-height: 40px;
}

.why-section { background: #ffffff; }

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

.feature-grid article {
  padding: 24px;
}

.feature-grid span { font-size: 2.4rem; }
.feature-grid h3 { margin-top: 16px; font-size: 1.6rem; }
.feature-grid p { color: var(--muted); font-weight: 700; }

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 38px clamp(18px, 4vw, 54px);
  background: var(--ink);
  color: #fff;
}

.footer p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  justify-content: flex-end;
  background: rgba(36, 48, 68, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.cart-drawer.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(420px, 100%);
  height: 100%;
  background: #fff;
  box-shadow: var(--shadow);
}

.cart-panel header,
.cart-panel footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.cart-panel footer { border-top: 1px solid var(--line); border-bottom: 0; }

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

.cart-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.cart-row strong {
  overflow-wrap: anywhere;
}

.cart-row span,
.empty {
  color: var(--muted);
  font-weight: 700;
}

.catalog-empty {
  grid-column: 1 / -1;
  padding: 26px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: #fff;
  text-align: center;
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-controls button {
  width: 30px;
  height: 30px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 30;
  transform: translate(-50%, 18px);
  opacity: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
  transition: 0.2s ease;
}

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

@media (max-width: 900px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-strip,
  .feature-grid { grid-template-columns: 1fr; }
  .hero-overlay { background: rgba(255, 248, 239, 0.78); }
  .hero-image { object-position: 58% center; }
}

@media (max-width: 620px) {
  .nav-links { display: none; }
  .topbar { padding: 10px 14px; gap: 10px; }
  .logo { font-size: 1.22rem; }
  .logo-mark { width: 36px; height: 36px; border-radius: 11px; }
  .hero {
    min-height: 74svh;
    padding: 52px 18px;
    align-items: end;
  }
  h1 { font-size: clamp(3.15rem, 18vw, 4.2rem); }
  .hero-copy { font-size: 1rem; margin-top: 14px; }
  .hero-actions .button { width: 100%; }
  .quick-strip { width: calc(100% - 24px); margin-top: -18px; }
  .quick-strip div { padding: 16px; }
  .shop-section,
  .why-section { padding: 56px 14px; }
  .product-grid { grid-template-columns: 1fr; }
  .product-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
  }
  .product-art { min-height: 100%; }
  .product-art span { font-size: 3rem; }
  .product-body { padding: 14px; min-width: 0; }
  .product-meta { display: grid; gap: 2px; }
  .product-card h3 { font-size: 1.16rem; line-height: 1.05; }
  .product-card p { min-height: 0; }
  .product-bottom { align-items: end; }
  .product-bottom button { min-width: 58px; padding-inline: 12px; }
  .cart-panel { width: 100%; }
  .cart-panel footer { display: grid; grid-template-columns: 1fr; align-items: stretch; }
  .cart-panel footer .button { width: 100%; }
  .footer {
    display: grid;
    text-align: center;
  }
  .footer .logo,
  .footer-actions { justify-content: center; }
}

@media (max-width: 390px) {
  .topbar .cart-icon { display: none; }
  .product-card {
    grid-template-columns: 92px minmax(0, 1fr);
  }
  .product-art span { font-size: 2.45rem; }
  .sale-ribbon {
    top: 8px;
    left: 8px;
    padding: 5px 8px;
    font-size: .68rem;
  }
  .product-body { padding: 12px; }
  .product-card h3 { font-size: 1.05rem; }
  .product-card p { font-size: .9rem; }
  .button { width: 100%; }
  .cart-row { grid-template-columns: 1fr; }
  .qty-controls { justify-content: space-between; }
}
