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

.hero-logo {
  display: block;
  width: clamp(116px, 18vw, 190px);
  height: auto;
  margin: 0 0 18px;
  filter: drop-shadow(0 16px 24px rgba(32, 43, 63, .18));
}

.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-fill, minmax(248px, 1fr));
  gap: 22px;
  align-items: stretch;
}

.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;
  height: 100%;
}

.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;
  width: 100%;
  height: 192px;
  min-height: 0;
  max-height: none;
  place-items: center;
  overflow: hidden;
  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%;
  display: block;
  object-fit: contain;
  background: #fff;
}

.product-body {
  display: grid;
  grid-template-rows: 38px 54px 72px 34px;
  align-content: start;
  min-width: 0;
  padding: 16px 18px 18px;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  line-height: 1.25;
  overflow: hidden;
}

.product-meta span {
  min-width: 0;
}

.product-meta span:first-child {
  overflow-wrap: anywhere;
}

.product-meta span:last-child {
  flex: none;
  text-align: right;
}

.product-card h3 {
  margin-top: 6px;
  font-size: 1.35rem;
  overflow-wrap: anywhere;
  line-height: 1.05;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-card p {
  margin: 6px 0 12px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

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

.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(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  align-items: stretch;
}

.category-card {
  display: grid;
  grid-template-rows: 190px 58px 24px;
  gap: 12px;
  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;
  height: 190px;
  min-height: 0;
  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: contain;
  background: #fff;
}

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

.category-card strong {
  font-family: "Baloo 2";
  font-size: 1.35rem;
  line-height: 1.05;
  overflow: hidden;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

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

.page-products.product-grid {
  justify-content: start;
}

.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;
  height: min(520px, 58vw);
  min-height: 320px;
  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: contain;
  background: #fff;
}

.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.2rem, 5.4vw, 4.2rem);
  overflow-wrap: anywhere;
}

.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-logo {
    width: clamp(96px, 34vw, 136px);
    margin-bottom: 12px;
  }
  .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-rows: auto 1fr;
  }
  .product-art {
    height: 180px;
    max-height: 180px;
    min-height: 0;
  }
  .product-art span { font-size: 3rem; }
  .product-body {
    grid-template-rows: 34px 48px 54px 32px;
    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;
    -webkit-line-clamp: 2;
  }
  .product-bottom { align-items: center; }
  .card-price { font-size: 1rem; }
  .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;
  }
  .page-hero h1 { font-size: clamp(2.4rem, 14vw, 3.6rem); }
  .category-grid { grid-template-columns: 1fr; }
  .category-card {
    grid-template-rows: 172px auto 22px;
  }
  .category-card-art {
    height: 172px;
  }
  .product-detail { grid-template-columns: 1fr; }
  .gallery-main {
    height: 320px;
    min-height: 0;
  }
}

/* Classy boutique refinement pass */
:root {
  --bg: var(--color-bg);
  --ink: var(--color-ink);
  --muted: var(--color-muted);
  --card: var(--color-surface);
  --line: var(--color-line);
  --red: var(--color-primary);
  --blue: var(--color-secondary);
  --yellow: var(--color-yellow);
  --green: var(--color-green);
  --shadow: var(--shadow-panel);
}

body {
  font-family: var(--font-body);
}

h1,
h2,
h3,
.logo {
  font-family: var(--font-display);
}

.topbar {
  border-bottom: 1px solid var(--color-line);
}

.cart-toggle {
  position: relative;
}

#cartCount {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  font-size: .82rem;
}

.hero {
  min-height: min(720px, 74svh);
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(255,249,241,.96) 0%, rgba(255,249,241,.76) 44%, rgba(255,249,241,.24) 100%),
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,249,241,.44));
}

.hero-logo {
  width: clamp(104px, 15vw, 164px);
  margin-bottom: var(--space-3);
}

.hero h1 {
  font-size: var(--step-hero);
}

.quick-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-radius: var(--radius-lg);
  box-shadow: none;
}

.quick-strip div {
  padding: var(--space-4) var(--space-5);
  box-shadow: none;
}

.quick-strip strong {
  font-size: 1.02rem;
}

.quick-strip span {
  font-size: .9rem;
}

.filters {
  max-width: 1120px;
  width: min(1120px, 100%);
  padding-bottom: var(--space-2);
  padding-inline: 2px;
  scroll-padding-inline: var(--space-4);
}

.filters button.active {
  background: var(--color-ink);
  box-shadow: inset 0 -2px 0 var(--color-primary);
}

.filters button {
  max-width: min(280px, 72vw);
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-section .section-search {
  width: min(680px, 100%);
}

.section-search button,
.search-page-form button {
  min-width: 56px;
  width: 84px;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
}

.client-filters {
  grid-template-columns: minmax(240px, .85fr) minmax(280px, 1.15fr);
  background: rgba(255,255,255,.9);
}

.section-search button,
.search-page-form button {
  min-width: 52px;
  padding: 0 var(--space-4);
}

.product-grid {
  grid-template-columns: repeat(auto-fill, minmax(246px, 1fr));
  gap: var(--space-5);
}

.product-card {
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.product-card-link {
  grid-template-rows: 188px 230px;
}

.product-art {
  height: 188px;
  background:
    radial-gradient(circle at 20% 18%, rgba(255,255,255,.72), transparent 26%),
    linear-gradient(135deg, color-mix(in srgb, var(--toy-color) 18%, #fff), color-mix(in srgb, var(--toy-color) 58%, #fff));
}

.product-art img {
  padding: var(--space-3);
}

.product-body {
  grid-template-rows: 34px 52px 58px 44px;
  padding: var(--space-4);
}

.product-card h3 {
  font-size: 1.18rem;
  line-height: 1.08;
}

.product-card p {
  -webkit-line-clamp: 2;
}

.product-bottom {
  align-items: end;
}

.card-price {
  color: var(--color-ink);
  font-size: 1rem;
  font-weight: 900;
}

.card-price span {
  font-size: .78rem;
}

.sale-ribbon {
  max-width: calc(100% - 20px);
}

.mini-link {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(71,198,220,.28);
  background: #fff;
  color: var(--color-secondary);
}

.product-card.out-of-stock .mini-link {
  border-color: var(--color-line);
  background: #f2f4f7;
  color: var(--color-muted);
}

.category-grid {
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
}

.category-card {
  grid-template-rows: 160px 48px 24px;
}

.category-card-art {
  height: 160px;
}

.page-hero.compact {
  display: grid;
  gap: var(--space-2);
  padding-block: var(--space-5);
}

.page-hero.compact h1 {
  max-width: 760px;
  font-size: clamp(2rem, 4.4vw, 3.5rem);
}

.gallery-main {
  background:
    radial-gradient(circle at 18% 18%, rgba(255,255,255,.78), transparent 30%),
    linear-gradient(135deg, color-mix(in srgb, var(--toy-color) 12%, #fff), color-mix(in srgb, var(--toy-color) 44%, #fff));
}

.footer {
  border-top: 1px solid var(--color-line);
}

@media (max-width: 900px) {
  .client-filters {
    grid-template-columns: 1fr;
  }

  .product-card-link {
    grid-template-rows: 180px 218px;
  }
}

@media (max-width: 620px) {
  .hero {
    min-height: 68svh;
  }

  .hero h1 {
    font-size: clamp(2.8rem, 15vw, 4.1rem);
  }

  .quick-strip {
    grid-template-columns: 1fr;
  }

  .filters {
    width: calc(100% + 24px);
    margin-left: -12px;
    padding-inline: 12px;
  }

  .section-search button,
  .search-page-form button {
    width: 100%;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .product-card-link {
    grid-template-rows: 172px 206px;
  }

  .product-art {
    height: 172px;
  }

  .product-body {
    grid-template-rows: 30px 44px 48px 42px;
  }

  .cart-drawer {
    align-items: end;
  }

  .cart-panel {
    width: 100%;
    max-height: calc(100svh - 24px);
    border-radius: 18px 18px 0 0;
  }
}

@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 {
    height: 168px;
    max-height: 168px;
    min-height: 0;
  }
  .product-art span { font-size: 2.45rem; }
  .sale-ribbon {
    top: 8px;
    left: 8px;
    padding: 5px 8px;
    font-size: .68rem;
  }
  .product-body {
    grid-template-rows: 34px 46px 50px 32px;
    padding: 12px;
  }
  .product-card h3 { font-size: 1.05rem; }
  .product-card p { font-size: .9rem; }
  .product-bottom {
    gap: 8px;
  }
  .mini-link {
    font-size: .92rem;
  }
  .button { width: 100%; }
  .cart-row { grid-template-columns: 1fr; }
.qty-controls { justify-content: space-between; }
}

/* Accessibility and conversion polish */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--color-secondary) 55%, white);
  outline-offset: 3px;
}

.results-count {
  width: min(1120px, 100%);
  margin: 0 auto var(--space-4);
  color: var(--color-muted);
  font-weight: 900;
}

.empty,
.catalog-empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--color-line);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  background: rgba(255,255,255,.82);
  color: var(--color-muted);
  text-align: center;
  font-weight: 900;
}

.cart-row {
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
}

.cart-thumb {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: 12px;
  background: #fff;
}

.cart-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cart-thumb span {
  font-size: 1.45rem;
}

#sendOrder {
  min-height: 50px;
  box-shadow: 0 14px 28px rgba(236, 0, 140, .22);
}

@media (max-width: 620px) {
  .cart-row {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .qty-controls {
    grid-column: 1 / -1;
  }
}

/* Professional boutique revamp layer */
:root {
  --bg: #fff9f1;
  --ink: #202b3f;
  --muted: #667085;
  --card: #ffffff;
  --line: rgba(32, 43, 63, .10);
  --red: #ec008c;
  --blue: #47c6dc;
  --yellow: #ffc719;
  --green: #7fc40d;
  --turquoise: #08d5c4;
  --shadow: 0 14px 34px rgba(32, 43, 63, .10);
  --shadow-hover: 0 20px 42px rgba(32, 43, 63, .14);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
}

body {
  background:
    linear-gradient(180deg, #fff9f1 0%, #fffdf9 44%, #fff8ef 100%);
}

.topbar {
  min-height: 74px;
  padding: 12px clamp(16px, 4vw, 56px);
  background: rgba(255, 253, 249, .94);
  box-shadow: 0 8px 24px rgba(32, 43, 63, .06);
}

.logo {
  gap: 12px;
  font-size: 1.34rem;
}

.logo-img {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  object-fit: contain;
  padding: 3px;
}

.nav-links {
  gap: 18px;
  font-size: .98rem;
}

.nav-links a {
  position: relative;
  padding: 8px 2px;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  border-radius: 999px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .18s ease;
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.site-search {
  width: min(340px, 30vw);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(32, 43, 63, .05);
}

.site-search input {
  height: 44px;
  font-weight: 800;
}

.site-search button {
  width: 48px;
  height: 44px;
  background: var(--blue);
}

.icon-button,
.cart-toggle {
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(32, 43, 63, .08);
}

.hero {
  min-height: min(760px, 78svh);
  padding: clamp(60px, 9vw, 100px) clamp(18px, 5vw, 72px);
}

h1 {
  font-size: clamp(3.8rem, 10vw, 7.2rem);
  text-shadow: 3px 3px 0 #fff, 6px 6px 0 rgba(255, 199, 25, .32);
}

h2 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
}

.shop-section,
.why-section {
  padding: clamp(54px, 7vw, 78px) clamp(16px, 4vw, 56px);
}

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

.filters {
  gap: 8px;
  margin-bottom: 18px;
}

.filters button,
.gender-filter label {
  min-height: 38px;
  border-radius: 999px;
  padding: 8px 14px;
  box-shadow: none;
}

.section-search,
.search-page-form {
  max-width: 680px;
  border-radius: 12px;
}

.client-filters {
  max-width: 900px;
  margin-bottom: 28px;
  padding: 16px;
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 28px rgba(32, 43, 63, .08);
}

.age-filter {
  border-radius: 14px;
  background: #f3fbfc;
}

.product-grid {
  width: min(1120px, 100%);
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: 20px;
}

.product-card {
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(32, 43, 63, .08);
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.product-art {
  height: 178px;
  border-bottom: 1px solid var(--line);
}

.product-art img {
  padding: 8px;
}

.product-body {
  grid-template-rows: 34px 50px 66px 34px;
  padding: 14px 16px 16px;
}

.product-meta {
  font-size: .76rem;
}

.product-card h3 {
  margin-top: 4px;
  font-size: 1.23rem;
}

.product-card p {
  margin-top: 4px;
  font-size: .96rem;
}

.product-bottom strong {
  font-size: 1.04rem;
}

.mini-link {
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(71, 198, 220, .10);
  font-size: .92rem;
}

.sale-ribbon {
  top: 10px;
  left: 10px;
  border-radius: 999px;
  padding: 5px 9px;
}

.page-main {
  width: min(1120px, calc(100% - 32px));
}

.page-hero {
  padding: clamp(28px, 5vw, 44px);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 30px rgba(32, 43, 63, .08);
}

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

.page-hero.compact h1 {
  font-size: clamp(2.2rem, 5.4vw, 3.8rem);
}

.category-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.category-card {
  grid-template-rows: 156px 52px 22px;
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 10px 24px rgba(32, 43, 63, .08);
}

.category-card-art {
  height: 156px;
  border-radius: 12px;
}

.category-card-art img {
  padding: 8px;
}

.category-card strong {
  font-size: 1.22rem;
}

.gallery-main {
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(32, 43, 63, .08);
}

.product-detail-info {
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(32, 43, 63, .08);
}

.welcome-card,
.cart-panel {
  border-radius: 18px;
}

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

@media (max-width: 900px) {
  .topbar {
    flex-wrap: wrap;
    gap: 10px;
  }

  .site-search {
    order: 3;
    width: 100%;
    flex-basis: 100%;
  }

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

@media (max-width: 620px) {
  .topbar {
    min-height: 64px;
    padding: 10px 12px;
  }

  .logo span {
    font-size: 1.16rem;
  }

  .logo-img {
    width: 40px;
    height: 40px;
  }

  .hero {
    min-height: 70svh;
  }

  .quick-strip {
    border-radius: 14px;
  }

  .client-filters {
    border-radius: 14px;
  }

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

  .gender-filter label {
    min-width: 0;
    padding-inline: 8px;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .product-card {
    border-radius: 14px;
  }

  .product-art {
    height: 164px;
  }

  .product-body {
    grid-template-rows: 32px 44px 50px 32px;
    padding: 12px 14px 14px;
  }

  .category-card {
    grid-template-rows: 146px auto 22px;
  }

  .category-card-art {
    height: 146px;
  }
}

/* Final mobile/header/category fixes */
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--color-line);
  border-radius: 12px;
  background: #fff;
  color: var(--color-ink);
  font-size: 1.2rem;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(32, 43, 63, .08);
  cursor: pointer;
}

.filters {
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 621px) {
  .filters {
    flex-wrap: wrap;
    justify-content: center;
    overflow: visible;
    max-height: 92px;
    padding-inline: 18px;
  }

  .filters button {
    max-width: 280px;
  }
}

/* JoyToyLB identity separation: puzzle boutique system */
body {
  background:
    radial-gradient(circle at 8% 12%, rgba(255, 199, 25, .18), transparent 18rem),
    radial-gradient(circle at 92% 22%, rgba(71, 198, 220, .14), transparent 20rem),
    linear-gradient(180deg, #fff9f1 0%, #fffdf8 38%, #fff7ec 100%);
}

.topbar {
  width: min(1180px, calc(100% - 28px));
  top: 12px;
  margin: 12px auto 0;
  border: 1px solid rgba(32,43,63,.08);
  border-radius: 18px;
  background: rgba(255,255,255,.92);
}

.logo-img {
  border-radius: 10px 16px 10px 16px;
  box-shadow: 0 8px 18px rgba(32,43,63,.10);
}

.logo span {
  color: var(--color-ink);
}

.hero {
  margin-top: -86px;
  padding-top: 148px;
  border-bottom: 1px solid var(--color-line);
}

.hero-content {
  padding: clamp(18px, 3vw, 30px);
  border-left: 6px solid var(--color-primary);
  background: linear-gradient(90deg, rgba(255,255,255,.74), rgba(255,255,255,.18));
  backdrop-filter: blur(2px);
}

.hero-logo {
  width: clamp(92px, 13vw, 148px);
}

.hero h1 {
  letter-spacing: 0;
}

.quick-strip {
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  background: #fff;
}

.quick-strip div {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.quick-strip div::before {
  content: "";
  width: 12px;
  height: 12px;
  flex: none;
  border-radius: 4px;
  background: var(--color-primary);
  box-shadow: 8px 0 0 var(--color-yellow), 16px 0 0 var(--color-secondary);
}

.section-heading {
  text-align: left;
}

.shop-section .section-heading {
  width: min(1120px, 100%);
}

.shop-section .section-heading h2 {
  max-width: 720px;
}

.filters {
  justify-content: flex-start;
}

.filters button {
  border-radius: 10px 18px 10px 18px;
}

.filters button.active {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 10px 22px rgba(236,0,140,.20);
}

.section-search,
.search-page-form,
.client-filters {
  margin-left: 0;
  margin-right: auto;
}

.product-grid {
  margin-left: 0;
  margin-right: auto;
}

.product-card {
  position: relative;
  border-radius: 10px 22px 10px 22px;
}

.product-card::before {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 0 0 6px rgba(255,255,255,.32);
}

.product-art {
  border-radius: 10px 22px 0 0;
}

.product-body {
  border-top: 4px solid color-mix(in srgb, var(--toy-color) 38%, white);
}

.mini-link {
  border-radius: 9px 15px 9px 15px;
  background: var(--color-ink);
  color: #fff;
  border: 0;
}

.category-card {
  border-radius: 10px 24px 10px 24px;
}

.category-card-art {
  border-radius: 8px 20px 8px 20px;
}

.page-hero {
  border-radius: 10px 26px 10px 26px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.94), rgba(255,244,221,.88)),
    radial-gradient(circle at right center, rgba(71,198,220,.18), transparent 20rem);
}

.product-detail-info,
.gallery-main,
.welcome-card,
.cart-panel {
  border-radius: 10px 24px 10px 24px;
}

.footer {
  background:
    linear-gradient(135deg, #202b3f, #2f394d);
  color: #fff;
}

.footer p,
.footer .logo span {
  color: rgba(255,255,255,.82);
}

@media (max-width: 900px) {
  .section-heading {
    text-align: center;
  }

  .shop-section .section-heading h2 {
    margin-inline: auto;
  }

  .filters,
  .product-grid,
  .section-search,
  .search-page-form,
  .client-filters {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 620px) {
  .topbar {
    width: calc(100% - 20px);
    top: 8px;
    margin-top: 8px;
    border-radius: 14px;
  }

  .hero {
    margin-top: -78px;
    padding-top: 126px;
  }

  .hero-content {
    border-left-width: 4px;
    border-radius: 0 18px 18px 0;
  }
}

/* Stability fixes after identity pass */
.topbar {
  width: 100%;
  top: 0;
  margin: 0;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  border-radius: 0;
}

.hero {
  margin-top: 0;
  padding-top: clamp(76px, 10vw, 112px);
}

.shop-section .section-heading,
.product-grid,
.section-search,
.search-page-form,
.client-filters {
  margin-left: auto;
  margin-right: auto;
}

.shop-section .section-heading {
  text-align: center;
}

.shop-section .section-heading h2 {
  margin-left: auto;
  margin-right: auto;
}

.filters {
  justify-content: center;
}

.quick-strip {
  width: min(1040px, calc(100% - 36px));
  border-radius: 14px;
}

.product-card::before {
  pointer-events: none;
}

.product-card-link {
  overflow: hidden;
}

.product-bottom {
  gap: 8px;
}

@media (max-width: 620px) {
  .topbar {
    width: 100%;
    top: 0;
    margin: 0;
    border-radius: 0;
  }

  .hero {
    margin-top: 0;
    padding-top: 70px;
  }

  .hero-content {
    border-radius: 0 16px 16px 0;
  }
}

@media (max-width: 620px) {
  .menu-toggle {
    display: grid;
    order: 2;
  }

  .topbar .nav-links {
    display: none;
    order: 4;
    flex-basis: 100%;
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 8px;
    border: 1px solid var(--color-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow-card);
  }

  .topbar.menu-open .nav-links {
    display: grid;
  }

  .topbar .nav-links a {
    min-height: 42px;
    padding: 11px 12px;
    border-radius: 10px;
  }

  .topbar .nav-links a:hover {
    background: #fff7eb;
  }

  .cart-toggle {
    order: 2;
    margin-left: auto;
  }

  .topbar .site-search {
    order: 3;
  }

  .shop-section .section-search,
  .search-page-form {
    display: flex;
    grid-template-columns: none;
  }

  .section-search button,
  .search-page-form button {
    width: 56px;
    min-width: 56px;
    min-height: 46px;
    padding: 0;
  }

  .filters {
    width: min(100%, 100vw);
    margin-left: auto;
    margin-right: auto;
    padding: 0 14px 10px;
    overflow-x: auto;
  }

  .filters button {
    min-height: 40px;
    padding: 8px 14px;
    max-width: 78vw;
  }

  .client-filters {
    padding: 12px;
    gap: 12px;
  }

  .age-filter {
    padding: 10px 12px;
    gap: 6px 10px;
  }

  .age-filter input[type="range"] {
    min-height: 22px;
  }

  .product-card-link {
    grid-template-rows: 164px 196px;
  }

  .product-art {
    height: 164px;
  }

  .product-body {
    grid-template-rows: 30px 42px 46px 34px;
  }
}

/* JoyToyLB revamp v2: distinct, stable boutique layout */
.topbar {
  width: min(1180px, calc(100% - 28px));
  top: 10px;
  margin: 10px auto 0;
  border: 1px solid rgba(32,43,63,.09);
  border-radius: 18px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 14px 34px rgba(32,43,63,.10);
}

.hero {
  margin-top: -84px;
  padding-top: 148px;
}

.shop-section,
.why-section {
  overflow: hidden;
}

.section-heading,
.shop-section .section-heading {
  width: min(1120px, 100%);
  text-align: center;
}

.filters,
.product-grid,
.section-search,
.search-page-form,
.client-filters,
.category-grid {
  margin-left: auto;
  margin-right: auto;
}

.product-grid {
  justify-content: center;
}

.product-body {
  padding-left: 18px;
  padding-right: 18px;
}

.product-meta,
.product-card h3,
.product-card p,
.product-bottom {
  width: 100%;
}

.product-bottom {
  justify-self: stretch;
}

/* Inner pages should not feel like the other project */
.page-main {
  width: min(1160px, calc(100% - 32px));
}

.page-main > .back-link {
  margin-top: 10px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(236,0,140,.10);
  border-radius: 14px 34px 14px 34px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(255,248,238,.90)),
    radial-gradient(circle at 82% 28%, rgba(255,199,25,.28), transparent 14rem),
    radial-gradient(circle at 96% 72%, rgba(71,198,220,.20), transparent 16rem);
}

.page-hero::after {
  content: "";
  position: absolute;
  right: 28px;
  top: 50%;
  width: 92px;
  height: 92px;
  border-radius: 22px 34px 22px 34px;
  background: url("assets/joytoy-logo-transparent.png") center/contain no-repeat;
  opacity: .14;
  transform: translateY(-50%);
}

.page-hero .eyebrow,
.page-hero h1,
.page-hero p {
  position: relative;
  z-index: 1;
}

.category-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.category-card {
  position: relative;
  grid-template-rows: 148px 48px 24px;
  border: 1px solid rgba(32,43,63,.09);
  border-radius: 12px 28px 12px 28px;
  background:
    linear-gradient(180deg, #fff, #fffaf2);
}

.category-card::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--color-primary);
  box-shadow: -14px 0 0 var(--color-secondary), -28px 0 0 var(--color-yellow);
  opacity: .82;
}

.category-card-art {
  height: 148px;
  background:
    radial-gradient(circle at 20% 18%, rgba(255,255,255,.76), transparent 30%),
    linear-gradient(135deg, color-mix(in srgb, var(--toy-color) 12%, #fff), color-mix(in srgb, var(--toy-color) 48%, #fff));
}

.page-products.product-grid {
  width: min(1120px, 100%);
  grid-template-columns: repeat(auto-fill, minmax(246px, 270px));
  justify-content: center;
}

.product-detail {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: 24px;
}

.product-gallery {
  border-radius: 16px 36px 16px 36px;
  background:
    linear-gradient(180deg, #fff, #fffaf2);
}

.product-detail-info {
  position: sticky;
  top: 104px;
  border-left: 5px solid var(--color-primary);
  border-radius: 16px 34px 16px 34px;
}

.detail-price {
  color: var(--color-primary);
}

.detail-actions .button.primary {
  border-radius: 10px 18px 10px 18px;
}

@media (max-width: 900px) {
  .topbar {
    width: min(100% - 20px, 760px);
  }

  .hero {
    margin-top: -78px;
    padding-top: 130px;
  }

  .product-detail {
    grid-template-columns: 1fr;
  }

  .product-detail-info {
    position: static;
  }
}

@media (max-width: 620px) {
  .topbar {
    width: calc(100% - 16px);
    top: 8px;
    margin-top: 8px;
    border-radius: 14px;
  }

  .hero {
    margin-top: -76px;
    padding-top: 122px;
  }

  .product-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .page-main {
    width: calc(100% - 22px);
  }

  .page-hero {
    border-radius: 12px 24px 12px 24px;
  }

  .page-hero::after {
    right: 14px;
    width: 64px;
    height: 64px;
  }

  .category-grid,
  .page-products.product-grid {
    grid-template-columns: 1fr;
  }
}

/* JoyToyLB final polish: card rhythm + distinct catalog/detail pages */
.product-grid,
.page-products.product-grid {
  width: min(1160px, calc(100% - 32px));
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(248px, 270px));
  justify-content: center;
  align-items: stretch;
  gap: 24px;
  margin: 0 auto;
}

.product-card {
  overflow: hidden;
  min-width: 0;
  border: 1px solid rgba(32, 43, 63, .08);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(32, 43, 63, .10);
}

.product-card-link {
  display: grid;
  grid-template-rows: 192px 236px;
  min-height: 428px;
  height: 100%;
}

.product-art {
  height: 192px;
  border-radius: 0;
}

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

.product-art.has-image img {
  object-fit: cover;
  padding: 0;
  background: transparent;
}

.product-body {
  display: grid;
  grid-template-rows: 38px 54px 68px 42px;
  gap: 6px;
  min-width: 0;
  padding: 18px 20px 18px;
  border-top: 4px solid color-mix(in srgb, var(--toy-color) 42%, white);
  text-align: left;
}

.product-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  width: 100%;
}

.product-meta span {
  min-width: 0;
  overflow: hidden;
  color: var(--color-muted);
  font-size: .78rem;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.product-meta span:first-child {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-meta span:last-child {
  text-align: right;
  white-space: nowrap;
}

.product-card h3 {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--color-ink);
  font-size: 1.25rem;
  line-height: 1.08;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-card p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--color-muted);
  font-size: .98rem;
  font-weight: 800;
  line-height: 1.36;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.product-bottom {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin: 0;
}

.card-price {
  display: grid;
  gap: 0;
  min-width: 0;
  color: var(--color-ink);
  font-size: 1.08rem;
  line-height: 1.05;
}

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

.mini-link {
  flex: 0 0 auto;
  min-width: 76px;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--color-ink);
  color: #fff;
  font-weight: 900;
  text-align: center;
}

.page-main {
  width: min(1160px, calc(100% - 32px));
  padding-top: 36px;
}

.page-main .page-hero {
  min-height: 230px;
  margin-bottom: 30px;
  padding: clamp(28px, 5vw, 54px);
  border: 1px solid rgba(236, 0, 140, .12);
  border-radius: 22px 44px 22px 44px;
  background:
    linear-gradient(105deg, rgba(255,255,255,.98) 0 48%, rgba(255,245,207,.90) 48% 100%),
    radial-gradient(circle at 88% 35%, rgba(71,198,220,.24), transparent 16rem);
  box-shadow: 0 20px 54px rgba(32, 43, 63, .10);
}

.page-hero h1 {
  max-width: 760px;
  color: var(--color-primary);
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: .92;
  text-shadow: 4px 4px 0 rgba(255, 199, 25, .45);
}

.page-hero p {
  max-width: 560px;
}

.category-grid {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
  margin: 0 auto;
}

.category-card {
  display: grid;
  grid-template-rows: 156px minmax(48px, auto) 26px;
  gap: 14px;
  min-height: 270px;
  padding: 14px;
  border-radius: 18px 34px 18px 34px;
  background: linear-gradient(180deg, #fff 0%, #fffaf1 100%);
}

.category-card-art {
  height: 156px;
  overflow: hidden;
  border-radius: 14px 28px 14px 28px;
}

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

.category-card strong {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--color-ink);
  font-size: 1.22rem;
  line-height: 1.12;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.product-detail {
  width: min(1120px, 100%);
  margin: 0 auto;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 430px);
  gap: 28px;
}

.product-gallery {
  padding: 16px;
  border-radius: 22px 44px 22px 44px;
  background:
    linear-gradient(180deg, #fff, #fff8ec),
    radial-gradient(circle at 20% 20%, rgba(71,198,220,.18), transparent 14rem);
}

.gallery-main {
  height: clamp(360px, 48vw, 560px);
  border-radius: 18px 36px 18px 36px;
}

.gallery-main img {
  object-fit: contain;
  background: #fff;
}

.product-detail-info {
  padding: 24px;
  border: 1px solid rgba(32, 43, 63, .09);
  border-left: 6px solid var(--color-primary);
  border-radius: 18px 38px 18px 38px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(32, 43, 63, .12);
}

.product-detail-info h1 {
  margin-bottom: 8px;
  color: var(--color-ink);
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: .96;
}

.product-detail-info p:not(.eyebrow) {
  color: var(--color-muted);
  font-size: 1.02rem;
  line-height: 1.55;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-meta span {
  border: 1px solid rgba(71,198,220,.32);
  border-radius: 999px;
  background: rgba(71,198,220,.08);
}

@media (max-width: 900px) {
  .product-grid,
  .page-products.product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-detail {
    grid-template-columns: 1fr;
  }

  .product-detail-info {
    position: static;
  }
}

@media (max-width: 620px) {
  .product-grid,
  .page-products.product-grid {
    width: calc(100% - 20px);
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .product-card-link {
    grid-template-rows: 176px 224px;
    min-height: 400px;
  }

  .product-art {
    height: 176px;
  }

  .product-body {
    grid-template-rows: 34px 48px 58px 40px;
    padding: 15px 16px;
  }

  .product-meta {
    gap: 8px;
  }

  .product-meta span {
    font-size: .74rem;
  }

  .product-card h3 {
    font-size: 1.18rem;
  }

  .product-card p {
    font-size: .94rem;
  }

  .page-main {
    width: calc(100% - 20px);
    padding-top: 22px;
  }

  .page-main .page-hero {
    min-height: 0;
    padding: 28px 18px;
    border-radius: 16px 28px 16px 28px;
  }

  .page-hero::after {
    opacity: .08;
  }

  .page-hero h1 {
    font-size: clamp(2.2rem, 12vw, 3.4rem);
  }

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

  .category-card {
    min-height: 250px;
    grid-template-rows: 146px minmax(42px, auto) 24px;
  }

  .category-card-art {
    height: 146px;
  }

  .product-gallery,
  .product-detail-info {
    padding: 14px;
    border-radius: 16px 28px 16px 28px;
  }

  .gallery-main {
    height: 330px;
  }
}

/* JoyToyLB card fit fix: keep all content inside the card on every page */
.product-card {
  overflow: hidden;
}

.product-card-link {
  grid-template-rows: 192px minmax(260px, auto);
  min-height: 452px;
}

.product-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 260px;
  padding: 20px;
}

.product-meta {
  flex: 0 0 auto;
}

.product-card h3,
.product-card p {
  flex: 0 0 auto;
}

.product-card p {
  -webkit-line-clamp: 4;
}

.product-bottom {
  flex: 0 0 auto;
  align-items: center;
  margin-top: auto;
  padding-top: 8px;
}

.card-price {
  min-width: 0;
  overflow-wrap: anywhere;
}

.mini-link {
  align-self: center;
}

.page-products.product-grid .product-card-link,
#searchResults.product-grid .product-card-link,
#productGrid.product-grid .product-card-link {
  grid-template-rows: 192px minmax(260px, auto);
}

@media (max-width: 620px) {
  .product-card-link,
  .page-products.product-grid .product-card-link,
  #searchResults.product-grid .product-card-link,
  #productGrid.product-grid .product-card-link {
    grid-template-rows: 176px minmax(250px, auto);
    min-height: 426px;
  }

  .product-body {
    min-height: 250px;
    padding: 18px 16px;
    gap: 10px;
  }

  .product-card p {
    -webkit-line-clamp: 3;
  }

  .product-bottom {
    padding-top: 6px;
  }
}

/* JoyToyLB responsive authority layer */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

img,
svg,
video {
  max-width: 100%;
}

.topbar,
.hero-content,
.quick-strip,
.shop-section,
.why-section,
.footer,
.page-main,
.section-heading,
.section-search,
.search-page-form,
.client-filters,
.product-grid,
.category-grid,
.product-detail {
  max-width: 100%;
}

.topbar {
  grid-template-columns: auto minmax(0, 1fr) minmax(220px, 340px) auto;
}

.nav-links {
  min-width: 0;
  justify-content: center;
}

.site-search {
  min-width: 0;
}

.hero {
  min-height: clamp(560px, 70vh, 760px);
}

.quick-strip {
  width: min(1040px, calc(100% - 32px));
}

.shop-section,
.why-section {
  padding-left: clamp(14px, 3vw, 36px);
  padding-right: clamp(14px, 3vw, 36px);
}

.filters {
  width: min(960px, 100%);
  justify-content: center;
  overflow: visible;
}

.section-search,
.search-page-form {
  width: min(680px, 100%);
}

.client-filters {
  width: min(900px, 100%);
  grid-template-columns: minmax(230px, .75fr) minmax(300px, 1.25fr);
}

.gender-filter {
  min-width: 0;
}

.age-filter {
  min-width: 0;
}

.product-grid,
.page-products.product-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 270px));
}

.product-card {
  width: 100%;
}

.category-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.cart-panel {
  width: min(420px, calc(100vw - 24px));
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: auto minmax(0, 1fr) minmax(210px, 300px) auto;
  }

  .product-grid,
  .page-products.product-grid {
    width: min(920px, calc(100% - 32px));
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .page-main {
    width: min(980px, calc(100% - 32px));
  }
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    gap: 10px;
  }

  .topbar .nav-links {
    order: 5;
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
  }

  .topbar .site-search {
    grid-column: auto;
  }

  .hero {
    min-height: 640px;
  }

  .hero-content {
    width: min(620px, calc(100% - 28px));
  }

  .quick-strip {
    grid-template-columns: 1fr;
    width: min(620px, calc(100% - 28px));
  }

  .client-filters {
    grid-template-columns: 1fr;
  }

  .product-grid,
  .page-products.product-grid {
    width: min(640px, calc(100% - 28px));
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .product-card-link,
  .page-products.product-grid .product-card-link,
  #searchResults.product-grid .product-card-link,
  #productGrid.product-grid .product-card-link {
    grid-template-rows: 184px minmax(258px, auto);
    min-height: 442px;
  }

  .product-art {
    height: 184px;
  }

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

  .product-detail {
    width: min(680px, 100%);
  }
}

@media (max-width: 700px) {
  .topbar {
    width: calc(100% - 16px);
    grid-template-columns: auto auto auto;
    align-items: center;
    padding: 10px;
  }

  .topbar .logo {
    min-width: 0;
  }

  .topbar .logo span {
    max-width: 145px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar .site-search {
    order: 4;
    grid-column: 1 / -1;
    width: 100%;
  }

  .menu-toggle {
    display: inline-grid;
  }

  .hero {
    min-height: 620px;
    padding-top: 132px;
  }

  .hero-content {
    padding: 28px 18px;
  }

  .hero h1 {
    font-size: clamp(3rem, 15vw, 4.6rem);
  }

  .hero-copy {
    max-width: 28rem;
  }

  .filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding-inline: 0;
  }

  .filters button {
    max-width: 100%;
    min-height: 38px;
    padding: 8px 12px;
    white-space: normal;
  }

  .section-search,
  .search-page-form {
    display: grid;
    grid-template-columns: 1fr;
    overflow: hidden;
    border-radius: 14px;
  }

  .section-search input,
  .search-page-form input {
    min-height: 50px;
  }

  .section-search button,
  .search-page-form button {
    width: 100%;
    min-height: 48px;
  }

  .client-filters {
    padding: 14px;
    gap: 14px;
  }

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

  .gender-filter legend {
    grid-column: 1 / -1;
  }

  .gender-filter label {
    justify-content: center;
    min-width: 0;
    padding: 10px 8px;
  }

  .age-filter {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .product-grid,
  .page-products.product-grid {
    width: min(390px, calc(100% - 20px));
    grid-template-columns: 1fr;
  }

  .product-card-link,
  .page-products.product-grid .product-card-link,
  #searchResults.product-grid .product-card-link,
  #productGrid.product-grid .product-card-link {
    grid-template-rows: 178px minmax(252px, auto);
    min-height: 430px;
  }

  .product-art {
    height: 178px;
  }

  .product-body {
    min-height: 252px;
  }

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

  .footer {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer .logo,
  .footer-actions {
    justify-content: center;
  }
}

@media (max-width: 420px) {
  .topbar .logo span {
    max-width: 120px;
  }

  .hero {
    min-height: 600px;
  }

  .hero-logo {
    width: min(148px, 50vw);
  }

  .hero-actions {
    width: 100%;
    grid-template-columns: 1fr auto;
  }

  .product-grid,
  .page-products.product-grid {
    width: calc(100% - 18px);
  }

  .product-card-link,
  .page-products.product-grid .product-card-link,
  #searchResults.product-grid .product-card-link,
  #productGrid.product-grid .product-card-link {
    grid-template-rows: 164px minmax(258px, auto);
    min-height: 422px;
  }

  .product-art {
    height: 164px;
  }

  .product-body {
    min-height: 258px;
    padding: 16px 14px;
  }

  .product-meta {
    grid-template-columns: 1fr;
  }

  .product-meta span:last-child {
    text-align: left;
    white-space: normal;
  }

  .product-bottom {
    align-items: end;
  }

  .mini-link {
    min-width: 70px;
    padding-inline: 10px;
  }

  .gender-filter {
    grid-template-columns: 1fr;
  }

  .age-filter {
    grid-template-columns: 1fr;
  }

  .gallery-main {
    height: min(330px, 78vw);
  }

  .detail-actions {
    grid-template-columns: 1fr;
  }
}

/* Mobile search correction: visible input + clear action */
@media (max-width: 700px) {
  .shop-section .section-search,
  .section-search,
  .search-page-form {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: min(390px, calc(100% - 28px));
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
    border: 1px solid rgba(32, 43, 63, .10);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(32, 43, 63, .08);
  }

  .shop-section .section-search input,
  .section-search input,
  .search-page-form input {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 54px;
    height: auto;
    padding: 0 18px;
    border: 0;
    background: #fff;
    color: var(--color-ink);
    font: inherit;
    font-weight: 800;
    opacity: 1;
    appearance: none;
  }

  .shop-section .section-search input::placeholder,
  .section-search input::placeholder,
  .search-page-form input::placeholder {
    color: rgba(102, 112, 133, .86);
    opacity: 1;
  }

  .shop-section .section-search button,
  .section-search button,
  .search-page-form button {
    display: grid;
    place-items: center;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 50px;
    padding: 0 16px;
    border: 0;
    border-top: 1px solid rgba(32, 43, 63, .06);
    border-radius: 0;
    background: var(--color-primary);
    color: #fff;
    font-size: 1rem;
    font-weight: 900;
  }

  .topbar .site-search {
    display: flex;
    width: 100%;
    border-radius: 12px;
    background: #fff;
  }

  .topbar .site-search input {
    display: block;
    min-width: 0;
    flex: 1;
    color: var(--color-ink);
    opacity: 1;
  }

  .topbar .site-search button {
    flex: 0 0 48px;
    width: 48px;
  }
}
