:root {
  --bg: #fff8ef;
  --ink: #243044;
  --muted: #667085;
  --card: #ffffff;
  --line: rgba(36, 48, 68, 0.12);
  --red: #ec008c;
  --blue: #49c7df;
  --yellow: #ffc300;
  --green: #7ac70c;
  --brown: #bf7a3d;
  --turquoise: #00d8c8;
  --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);
}

.logo-img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  background: #fff;
  border: 1px solid var(--line);
}

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

.site-search {
  display: flex;
  align-items: center;
  width: min(280px, 28vw);
  min-width: 180px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.site-search input {
  min-width: 0;
  flex: 1;
  height: 42px;
  border: 0;
  background: transparent;
  padding: 0 0 0 14px;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.site-search button {
  width: 42px;
  height: 42px;
  border: 0;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.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-slides,
.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-slides {
  z-index: -2;
}

.hero-image {
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity .8s ease;
}

.hero-image.active {
  opacity: 1;
}

.hero-overlay {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(255, 248, 239, 0.97) 0%, rgba(255, 248, 239, 0.82) 42%, rgba(255, 248, 239, 0.12) 76%),
    linear-gradient(180deg, rgba(236, 0, 140, .12), rgba(73, 199, 223, .1));
}

.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;
  transition: transform .18s ease, box-shadow .18s ease;
}

.button:hover,
.whatsapp-action:hover,
.product-card:hover,
.category-card:hover {
  transform: translateY(-3px);
}

.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);
}

.whatsapp-action,
.whatsapp-order {
  display: inline-grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 16px;
  background: #25d366;
  color: #fff;
  box-shadow: 0 14px 26px rgba(37, 211, 102, .25);
  font-size: 1.35rem;
  font-weight: 900;
  transition: transform .18s ease, box-shadow .18s ease;
  animation: softPulse 2.8s ease-in-out infinite;
}

.whatsapp-action.small {
  width: 44px;
  height: 44px;
  font-size: 1.1rem;
}

.wa-icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.social-icon {
  display: inline-grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  box-shadow: 0 14px 26px rgba(36, 48, 68, .18);
  transition: transform .18s ease, box-shadow .18s ease;
}

.social-icon:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(36, 48, 68, .26);
}

.social-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.social-icon.instagram {
  background: linear-gradient(135deg, var(--red), var(--yellow));
}

.social-icon.facebook {
  background: #1877f2;
}

.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;
}

.section-search,
.search-page-form {
  display: flex;
  max-width: 700px;
  margin: 0 auto 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(36,48,68,.09);
}

.client-filters {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.2fr);
  gap: 20px;
  max-width: 920px;
  margin: 0 auto 30px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(255,248,239,.96)),
    radial-gradient(circle at top left, rgba(73,199,223,.14), transparent 40%);
  box-shadow: 0 18px 42px rgba(36,48,68,.1);
  align-items: center;
}

.page-filter-bar {
  max-width: none;
}

.client-filters label,
.client-filters legend,
.age-filter span {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.gender-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.gender-filter legend,
.age-filter span {
  width: 100%;
}

.gender-filter label {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 15px;
  background: #fff;
  color: var(--ink);
  text-transform: none;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.gender-filter label:hover {
  border-color: rgba(236, 0, 140, .32);
  box-shadow: 0 10px 20px rgba(36,48,68,.08);
}

.gender-filter label:has(input:checked) {
  border-color: var(--red);
  background: var(--red);
  color: var(--red);
  color: #fff;
  transform: translateY(-1px);
}

.gender-filter input {
  width: 16px;
  height: 16px;
  accent-color: var(--red);
}

.gender-filter label:has(input:checked) input {
  accent-color: #fff;
}

.age-filter {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr);
  gap: 10px 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(73, 199, 223, .24);
  border-radius: 18px;
  background: rgba(73, 199, 223, .07);
}

.age-filter strong {
  color: var(--red);
}

.age-filter small {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.age-filter span {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.client-filters select {
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 9px 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.age-filter input[type="range"] {
  width: 100%;
  min-height: 28px;
  accent-color: var(--red);
  cursor: pointer;
}

.age-filter input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(236,0,140,.18), rgba(73,199,223,.2));
}

.age-filter input[type="range"]::-webkit-slider-thumb {
  margin-top: -5px;
}

.age-filter input[type="range"]::before {
  color: var(--muted);
}

.section-search input,
.search-page-form input {
  min-width: 0;
  flex: 1;
  border: 0;
  padding: 15px 18px;
  font: inherit;
  font-weight: 800;
}

.section-search button,
.search-page-form button {
  border: 0;
  background: var(--red);
  color: #fff;
  padding: 0 20px;
  font-weight: 900;
}

.product-grid,
.feature-grid {
  display: grid;
  max-width: 1120px;
  margin: 0 auto;
  grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
  gap: 22px;
}

.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);
  transition: transform .2s ease, box-shadow .2s ease;
}

.product-card {
  min-width: 0;
}

.product-card:hover,
.category-card:hover {
  box-shadow: 0 20px 46px rgba(36, 48, 68, .14);
}

.product-card.out-of-stock {
  filter: grayscale(.9);
  opacity: .58;
}

.product-card.out-of-stock .product-art::after {
  content: "Out of stock";
  position: absolute;
  right: 12px;
  bottom: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(36, 48, 68, .86);
  color: #fff;
  font-size: .78rem;
  font-weight: 900;
}

.button:disabled {
  background: #98a2b3;
  cursor: not-allowed;
  box-shadow: none;
}

.product-card-link {
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100%;
  color: inherit;
}

.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));
  animation: floatToy 3.2s ease-in-out infinite;
}

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

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

.product-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  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;
  line-height: 1.05;
}

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

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

.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;
}

.mini-link {
  color: var(--blue);
  font-weight: 900;
}

.page-main {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 36px 0 70px;
}

.page-hero {
  padding: 52px clamp(18px, 5vw, 56px);
  margin-bottom: 28px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(255,243,194,.9)),
    url("assets/joytoy-logo.jpeg") right 32px center/170px auto no-repeat;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.page-hero.compact {
  padding-block: 36px;
}

.page-hero h1 {
  font-size: clamp(3rem, 8vw, 6rem);
}

.page-hero p {
  max-width: 560px;
  color: var(--muted);
  font-weight: 800;
}

.back-link {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--blue);
  font-weight: 900;
}

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

.category-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(36,48,68,.08);
  transition: transform .2s ease, box-shadow .2s ease;
}

.category-card-art {
  display: grid;
  min-height: 170px;
  place-items: center;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--toy-color) 70%, white), var(--toy-color));
}

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

.category-card-art span {
  font-size: 4rem;
}

.category-card strong {
  font-family: "Baloo 2";
  font-size: 1.5rem;
}

.category-card span {
  color: var(--muted);
  font-weight: 800;
}

.page-products {
  padding-bottom: 20px;
}

.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: 28px;
  align-items: start;
}

.product-detail.out-of-stock-detail {
  filter: grayscale(.85);
}

.product-detail.out-of-stock-detail .gallery-main,
.product-detail.out-of-stock-detail .product-detail-info {
  opacity: .62;
}

.product-detail.out-of-stock-detail .gallery-main::after {
  content: "Out of stock";
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(36, 48, 68, .9);
  color: #fff;
  font-weight: 900;
}

.product-gallery,
.product-detail-info {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.gallery-main {
  position: relative;
  display: grid;
  min-height: 430px;
  place-items: center;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--toy-color) 70%, white), var(--toy-color));
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-main span {
  font-size: 7rem;
  animation: floatToy 3.2s ease-in-out infinite;
}

@keyframes floatToy {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-7px) rotate(2deg); }
}

@keyframes softPulse {
  0%, 100% { box-shadow: 0 14px 26px rgba(37, 211, 102, .25); }
  50% { box-shadow: 0 18px 34px rgba(37, 211, 102, .38); }
}

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

.gallery-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-top: 12px;
}

.gallery-thumbs button {
  width: 78px;
  height: 78px;
  flex: none;
  border: 2px solid transparent;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  padding: 0;
}

.gallery-thumbs button.active {
  border-color: var(--red);
}

.gallery-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail-info h1 {
  font-size: clamp(2.6rem, 7vw, 5.4rem);
}

.product-detail-info p {
  color: var(--muted);
  font-size: 1.08rem;
  font-weight: 800;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: #f1fbfd;
  color: var(--blue);
  font-weight: 900;
}

.detail-price {
  display: grid;
  margin-bottom: 18px;
  color: var(--red);
  font-size: 1.8rem;
}

.detail-sale {
  display: inline-flex;
  width: max-content;
  margin: 14px 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-weight: 900;
}

.detail-price span {
  color: var(--muted);
  font-size: 1rem;
  text-decoration: line-through;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.whatsapp-order {
  display: inline-flex;
  width: auto;
  min-height: 54px;
  padding: 0 18px;
  gap: 10px;
}

.whatsapp-order.disabled {
  background: #98a2b3;
  box-shadow: none;
  cursor: not-allowed;
  animation: none;
}

.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;
}

.welcome-popup {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(36, 48, 68, .46);
  backdrop-filter: blur(10px);
  animation: fadeIn .18s ease;
}

.welcome-card {
  position: relative;
  width: min(460px, 100%);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 26px;
  padding: 34px clamp(22px, 6vw, 38px);
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 195, 0, .42), transparent 28%),
    radial-gradient(circle at 88% 10%, rgba(73, 199, 223, .34), transparent 30%),
    linear-gradient(145deg, #fff, #fff8ef 58%, #ffeef8);
  box-shadow: 0 26px 70px rgba(36, 48, 68, .3);
  text-align: center;
  animation: popIn .28s ease;
}

.welcome-card h2 {
  margin: 4px 0 10px;
  color: var(--red);
  font-size: clamp(2.1rem, 8vw, 3.6rem);
  text-shadow: 3px 3px 0 #fff, 6px 6px 0 rgba(255, 195, 0, .24);
}

.welcome-card p:not(.eyebrow) {
  margin: 0 auto 22px;
  max-width: 34ch;
  color: #4b5870;
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.45;
}

.welcome-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 10px 20px rgba(36,48,68,.12);
  font-weight: 900;
  cursor: pointer;
}

.welcome-sparkles {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}

.welcome-sparkles span {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: var(--yellow);
  animation: bounceSparkle 1.8s ease-in-out infinite;
}

.welcome-sparkles span:nth-child(2) {
  background: var(--blue);
  animation-delay: .15s;
}

.welcome-sparkles span:nth-child(3) {
  background: var(--red);
  animation-delay: .3s;
}

@keyframes fadeIn {
  from { opacity: 0; }
}

@keyframes popIn {
  from { opacity: 0; transform: translateY(16px) scale(.96); }
}

@keyframes bounceSparkle {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(12deg); }
}

.back-to-top {
  position: fixed;
  right: calc(18px + env(safe-area-inset-right));
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 25;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 0;
  border-radius: 16px;
  background: var(--red);
  color: #fff;
  box-shadow: 0 16px 34px rgba(236, 0, 140, .28);
  font-size: 1.35rem;
  font-weight: 900;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity .18s ease, transform .18s ease;
}

.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@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; }
  .site-search {
    order: 3;
    width: 100%;
    min-width: 0;
    flex-basis: 100%;
  }
  .topbar {
    flex-wrap: wrap;
  }
}

@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; }
  .logo-img { width: 38px; height: 38px; }
  .hero {
    min-height: 74svh;
    padding: 52px 18px;
    align-items: end;
  }
  .hero-image { object-position: 60% center; }
  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(255, 248, 239, .46) 0%, rgba(255, 248, 239, .9) 48%, rgba(255, 248, 239, .98) 100%),
      linear-gradient(90deg, rgba(236, 0, 140, .14), rgba(73, 199, 223, .12));
  }
  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: 1fr;
  }
  .product-card-link {
    display: grid;
    grid-template-columns: 1fr;
  }
  .product-art {
    min-height: 190px;
    aspect-ratio: 16 / 10;
  }
  .product-art span { font-size: 3rem; }
  .product-body { padding: 14px; min-width: 0; }
  .product-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
  }
  .product-card h3 { font-size: 1.16rem; line-height: 1.05; }
  .product-card p {
    min-height: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .product-bottom { align-items: center; }
  .product-bottom button { min-width: 58px; padding-inline: 12px; }
  .cart-panel { width: 100%; }
  .back-to-top {
    bottom: calc(76px + env(safe-area-inset-bottom));
  }
  .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; }
  .section-search,
  .search-page-form {
    display: grid;
    grid-template-columns: 1fr;
    border-radius: 18px;
  }
  .client-filters {
    grid-template-columns: 1fr;
    padding: 14px;
    gap: 14px;
  }
  .gender-filter label {
    flex: 1 1 30%;
    justify-content: center;
  }
  .age-filter {
    grid-template-columns: 1fr;
  }
  .section-search button,
  .search-page-form button {
    min-height: 46px;
  }
  .page-main { width: calc(100% - 24px); padding-top: 22px; }
  .page-hero {
    padding: 34px 18px;
    background:
      linear-gradient(135deg, rgba(255,255,255,.94), rgba(255,243,194,.92)),
      url("assets/joytoy-logo.jpeg") right 18px bottom 18px/108px auto no-repeat;
  }
  .category-grid { grid-template-columns: 1fr; }
  .product-detail { grid-template-columns: 1fr; }
  .gallery-main { min-height: 280px; }
}

@media (max-width: 390px) {
  .topbar .cart-icon { display: none; }
  .filters {
    width: calc(100% + 24px);
    margin-left: -12px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .filters button {
    min-height: 46px;
    padding: 10px 18px;
  }
  .product-art {
    min-height: 176px;
  }
  .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; }
}
