/* KEXQO Studio — kids coloring-book store
   Sticker-book aesthetic: thick ink outlines, hard offset shadows,
   slight rotations, dashed coupon badges. Cream + ink dominant,
   one crayon accent per section. */

:root {
  --cream: #FFF8EC;
  --cream-deep: #FBEED3;
  --ink: #2A2A2A;
  --coral: #E4572E;
  --sunny: #FFC53D;
  --sky: #4EA8DE;
  --grass: #72B01D;
  --white: #FFFFFF;
  --radius: 18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  overflow-x: hidden;
}

h1, h2, h3, .display {
  font-family: 'Baloo 2', 'Nunito', sans-serif;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 22px; }

/* ---------- header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 3px solid var(--ink);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  display: flex; align-items: center; gap: 18px;
  padding: 12px 22px; max-width: 1180px; margin: 0 auto;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo img { width: 44px; height: 58px; object-fit: contain; }
.logo-word { font-family: 'Baloo 2'; font-weight: 800; font-size: 24px; }
.logo-word span { color: var(--coral); }
.logo-tag { font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; opacity: .65; display: block; line-height: 1; }

.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav a {
  text-decoration: none; font-weight: 800; font-size: 15px;
  padding: 8px 14px; border-radius: 12px; border: 3px solid transparent;
}
.nav a:hover { border-color: var(--ink); background: var(--sunny); }

.header-spacer { flex: 1; }

.cart-btn {
  font-family: 'Baloo 2'; font-weight: 800; font-size: 16px;
  background: var(--sunny); border: 3px solid var(--ink); border-radius: 14px;
  padding: 8px 16px; cursor: pointer; display: flex; align-items: center; gap: 8px;
  box-shadow: 3px 3px 0 var(--ink); transition: transform .12s;
}
.cart-btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.cart-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.cart-count {
  background: var(--ink); color: #fff; border-radius: 50%;
  min-width: 24px; height: 24px; display: inline-flex;
  align-items: center; justify-content: center; font-size: 13px; padding: 0 4px;
}

/* ---------- buttons ---------- */
.btn {
  font-family: 'Baloo 2'; font-weight: 800; font-size: 18px;
  border: 3px solid var(--ink); border-radius: 14px;
  padding: 12px 26px; cursor: pointer; text-decoration: none;
  display: inline-block; box-shadow: 4px 4px 0 var(--ink);
  transition: transform .12s, box-shadow .12s; color: var(--ink);
  background: var(--white);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-primary { background: var(--coral); color: #fff; }
.btn-sunny { background: var(--sunny); }
.btn-sky { background: var(--sky); color: #fff; }
.btn-grass { background: var(--grass); color: #fff; }
.btn-small { font-size: 15px; padding: 8px 18px; border-radius: 12px; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  border-bottom: 3px solid var(--ink);
  background:
    radial-gradient(circle at 12% 20%, rgba(255,197,61,.25) 0 90px, transparent 91px),
    radial-gradient(circle at 88% 78%, rgba(78,168,222,.18) 0 110px, transparent 111px),
    var(--cream);
}
.hero-inner {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 30px;
  align-items: center; padding: 64px 22px 72px; max-width: 1180px; margin: 0 auto;
  position: relative;
}
.hero-kicker {
  display: inline-block; font-weight: 800; font-size: 14px;
  text-transform: uppercase; letter-spacing: .1em;
  border: 2px dashed var(--ink); border-radius: 999px;
  padding: 6px 16px; margin-bottom: 18px; background: var(--white);
}
.hero h1 { font-size: clamp(38px, 5.2vw, 62px); margin-bottom: 16px; }
.hero h1 .hl {
  background: linear-gradient(transparent 62%, var(--sunny) 62%, var(--sunny) 94%, transparent 94%);
  padding: 0 6px;
}
.hero p.lead { font-size: 19px; max-width: 46ch; margin-bottom: 26px; font-weight: 600; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-proof { margin-top: 22px; font-size: 14px; font-weight: 700; opacity: .75; }

.hero-art { position: relative; min-height: 380px; }
.mascot {
  position: absolute; filter: drop-shadow(4px 5px 0 rgba(42,42,42,.18));
  animation: floaty 5s ease-in-out infinite;
}
.mascot.m-cat { width: 46%; left: 4%; top: 2%; animation-delay: 0s; }
.mascot.m-dino { width: 52%; right: 0; top: 22%; animation-delay: 1.4s; }
.mascot.m-penguin { width: 34%; left: 32%; bottom: 0; animation-delay: 2.6s; }
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-14px) rotate(2deg); }
}
.doodle { position: absolute; opacity: .9; }
.doodle.s1 { top: 6%; right: 12%; animation: spin 14s linear infinite; }
.doodle.s2 { bottom: 10%; left: 0; animation: spin 18s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- section titles ---------- */
.section { padding: 56px 0 8px; }
.section-head { margin-bottom: 26px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); }
.section-head h2 .u-squiggle { position: relative; white-space: nowrap; }
.section-head p.sub { font-weight: 600; opacity: .75; margin-top: 6px; max-width: 62ch; }

/* ---------- category cards ---------- */
.cat-row {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px;
}
.cat-card {
  background: var(--white); border: 3px solid var(--ink); border-radius: var(--radius);
  padding: 18px 14px 16px; text-align: center; text-decoration: none;
  box-shadow: 4px 4px 0 var(--ink); transition: transform .15s;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.cat-card:nth-child(odd) { transform: rotate(-1.4deg); }
.cat-card:nth-child(even) { transform: rotate(1.2deg); }
.cat-card:hover { transform: rotate(0) translateY(-6px); }
.cat-card img { width: 96px; height: 126px; object-fit: contain; }
.cat-card h3 { font-size: 19px; }
.cat-card .count {
  font-size: 13px; font-weight: 800; border: 2px dashed var(--ink);
  border-radius: 999px; padding: 2px 12px; background: var(--cream);
}
.cat-card .bar { height: 8px; width: 100%; border-radius: 99px; border: 2px solid var(--ink); }
.bar.coral { background: var(--coral); } .bar.sunny { background: var(--sunny); }
.bar.sky { background: var(--sky); } .bar.grass { background: var(--grass); }
.bar.ink { background: var(--ink); }

/* ---------- product grid ---------- */
.book-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
  padding-bottom: 18px;
}
.book-card {
  background: var(--white); border: 3px solid var(--ink); border-radius: var(--radius);
  overflow: hidden; box-shadow: 4px 4px 0 var(--ink);
  transition: transform .15s; display: flex; flex-direction: column;
  text-decoration: none;
}
.book-grid .book-card:nth-child(4n+1) { transform: rotate(-.8deg); }
.book-grid .book-card:nth-child(4n+3) { transform: rotate(.9deg); }
.book-card:hover { transform: rotate(0) translateY(-6px); }
.book-card .cover-wrap { border-bottom: 3px solid var(--ink); background: var(--cream-deep); }
.book-card .cover-wrap img { width: 100%; aspect-ratio: 17/22; object-fit: cover; }
.book-card .info { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.book-card .cat-tag {
  align-self: flex-start; font-size: 12px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .08em; border: 2px solid var(--ink); border-radius: 8px;
  padding: 2px 10px; background: var(--sunny);
}
.book-card h3 { font-size: 19px; line-height: 1.25; }
.book-card .row { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.book-card .price { font-family: 'Baloo 2'; font-weight: 800; font-size: 22px; }
.book-card .price small { font-size: 13px; font-family: 'Nunito'; font-weight: 700; opacity: .6; }

/* ---------- trust strip ---------- */
.trust-strip {
  margin: 54px 0 8px; background: var(--white);
  border: 3px solid var(--ink); border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--ink);
  display: grid; grid-template-columns: repeat(3, 1fr);
}
.trust-item {
  display: flex; gap: 14px; align-items: center; padding: 20px 24px;
}
.trust-item + .trust-item { border-left: 3px dashed var(--ink); }
.trust-item svg { flex: none; width: 44px; height: 44px; }
.trust-item b { font-family: 'Baloo 2'; font-size: 17px; display: block; }
.trust-item span { font-size: 14px; font-weight: 600; opacity: .75; }

/* ---------- footer ---------- */
.site-footer { border-top: 3px solid var(--ink); background: var(--ink); color: #FFF8EC; margin-top: 64px; }
.footer-inner {
  max-width: 1180px; margin: 0 auto; padding: 44px 22px 30px;
  display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 30px;
}
.footer-inner h4 { font-family: 'Baloo 2'; font-size: 18px; margin-bottom: 12px; color: var(--sunny); }
.footer-inner p, .footer-inner a { font-size: 15px; opacity: .85; }
.footer-inner a { display: block; text-decoration: none; margin-bottom: 8px; }
.footer-inner a:hover { opacity: 1; text-decoration: underline; }
.footer-bottom {
  border-top: 2px dashed rgba(255,248,236,.3); margin-top: 26px; padding-top: 18px;
  display: flex; justify-content: space-between; font-size: 13px; opacity: .7;
  max-width: 1180px; margin-left: auto; margin-right: auto; padding-left: 22px; padding-right: 22px;
}

/* ---------- category page ---------- */
.cat-hero {
  border-bottom: 3px solid var(--ink); padding: 44px 0 40px;
  display: flex; align-items: center; gap: 26px;
}
.cat-hero img.mascot-img { width: 130px; }
.cat-hero h1 { font-size: clamp(34px, 4.4vw, 52px); }
.cat-hero p { font-weight: 600; opacity: .8; max-width: 60ch; }
.sort-row { display: flex; justify-content: space-between; align-items: center; margin: 26px 0 20px; }
.sort-row .n { font-weight: 800; }
select.sort {
  font-family: 'Nunito'; font-weight: 800; font-size: 15px;
  border: 3px solid var(--ink); border-radius: 12px; padding: 8px 14px;
  background: var(--white); cursor: pointer; box-shadow: 3px 3px 0 var(--ink);
}

/* ---------- product page ---------- */
.product-layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 44px;
  padding: 44px 0 20px;
}
.gallery { position: sticky; top: 96px; align-self: start; }
.gallery-main {
  border: 3px solid var(--ink); border-radius: var(--radius);
  overflow: hidden; box-shadow: 5px 5px 0 var(--ink); background: var(--white);
}
.gallery-main img { width: 100%; aspect-ratio: 17/22; object-fit: cover; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 12px; }
.gallery-thumbs button {
  border: 3px solid var(--ink); border-radius: 12px; overflow: hidden;
  cursor: pointer; background: var(--white); padding: 0; opacity: .75;
  transition: opacity .12s, transform .12s;
}
.gallery-thumbs button.active { opacity: 1; outline: 3px solid var(--coral); outline-offset: 2px; }
.gallery-thumbs button:hover { opacity: 1; transform: translateY(-2px); }
.gallery-thumbs img { width: 100%; aspect-ratio: 17/22; object-fit: cover; }

.product-info .cat-tag {
  display: inline-block; font-size: 13px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .08em; border: 2px solid var(--ink); border-radius: 8px;
  padding: 4px 12px; background: var(--sky); color: #fff; margin-bottom: 12px;
  text-decoration: none;
}
.product-info h1 { font-size: clamp(30px, 3.6vw, 44px); margin-bottom: 10px; }
.stars { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-weight: 700; font-size: 14px; }
.stars svg { width: 20px; height: 20px; }
.price-row { display: flex; align-items: baseline; gap: 12px; margin: 16px 0; }
.price-now { font-family: 'Baloo 2'; font-weight: 800; font-size: 40px; }
.price-was { font-size: 20px; font-weight: 700; opacity: .5; text-decoration: line-through; }
.save-badge {
  font-size: 13px; font-weight: 800; background: var(--grass); color: #fff;
  border: 2px dashed #fff; outline: 2px solid var(--ink);
  border-radius: 10px; padding: 4px 12px;
}
.buy-row { display: flex; gap: 12px; margin: 20px 0; flex-wrap: wrap; }
.qty { display: flex; align-items: center; border: 3px solid var(--ink); border-radius: 12px; background: #fff; box-shadow: 3px 3px 0 var(--ink); }
.qty button { width: 44px; height: 52px; font-size: 22px; font-weight: 800; background: none; border: none; cursor: pointer; font-family: 'Baloo 2'; }
.qty span { min-width: 36px; text-align: center; font-weight: 800; font-size: 18px; }

.spec-box {
  border: 3px solid var(--ink); border-radius: var(--radius);
  background: var(--white); box-shadow: 4px 4px 0 var(--ink);
  margin: 26px 0; overflow: hidden;
}
.spec-box h3 { padding: 14px 20px; border-bottom: 3px solid var(--ink); background: var(--sunny); font-size: 19px; }
.spec-box ul { list-style: none; padding: 8px 20px 16px; }
.spec-box li { padding: 9px 0; border-bottom: 2px dashed rgba(42,42,42,.18); font-weight: 600; display: flex; gap: 10px; }
.spec-box li:last-child { border-bottom: none; }
.spec-box li svg { flex: none; width: 22px; height: 22px; margin-top: 2px; }

.desc h2 { font-size: 26px; margin: 30px 0 12px; }
.desc p { margin-bottom: 14px; font-weight: 500; }

.preview-strip { margin: 34px 0; }
.preview-strip h2 { font-size: 26px; margin-bottom: 6px; }
.preview-strip p.sub { font-weight: 600; opacity: .7; margin-bottom: 16px; }
.preview-pages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.preview-pages .pp {
  border: 3px solid var(--ink); border-radius: 12px; overflow: hidden;
  background: #fff; box-shadow: 3px 3px 0 var(--ink);
}
.preview-pages .pp:nth-child(odd) { transform: rotate(-1deg); }
.preview-pages .pp:nth-child(even) { transform: rotate(1deg); }
.preview-pages img { width: 100%; aspect-ratio: 17/22; object-fit: cover; }

.related h2 { font-size: 26px; margin: 40px 0 18px; }

.sticky-buy {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: var(--white); border-top: 3px solid var(--ink);
  padding: 12px 22px; display: none; align-items: center; gap: 14px;
  box-shadow: 0 -4px 0 rgba(42,42,42,.08);
}
.sticky-buy img { width: 44px; border: 2px solid var(--ink); border-radius: 8px; }
.sticky-buy .t { flex: 1; font-weight: 800; font-size: 14px; }
.sticky-buy .p { font-family: 'Baloo 2'; font-weight: 800; font-size: 20px; }

/* ---------- cart drawer ---------- */
.cart-overlay {
  position: fixed; inset: 0; background: rgba(42,42,42,.45);
  opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 90;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }
.cart-drawer {
  position: fixed; top: 0; right: -420px; width: min(400px, 92vw); height: 100dvh;
  background: var(--cream); border-left: 3px solid var(--ink); z-index: 95;
  display: flex; flex-direction: column; transition: right .25s ease;
}
.cart-drawer.open { right: 0; }
.cart-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 20px; border-bottom: 3px solid var(--ink); background: var(--sunny);
}
.cart-head h3 { font-size: 22px; }
.cart-close { background: #fff; border: 3px solid var(--ink); border-radius: 10px;
  width: 38px; height: 38px; font-size: 18px; font-weight: 800; cursor: pointer; }
.cart-items { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.cart-empty { text-align: center; padding: 40px 10px; font-weight: 600; opacity: .7; }
.cart-empty img { width: 120px; margin: 0 auto 16px; }
.cart-item {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 12px;
  background: #fff; border: 3px solid var(--ink); border-radius: 14px; padding: 10px;
  align-items: center;
}
.cart-item img { width: 64px; border: 2px solid var(--ink); border-radius: 8px; }
.cart-item .nm { font-weight: 800; font-size: 14px; line-height: 1.3; }
.cart-item .pr { font-weight: 700; font-size: 14px; opacity: .7; }
.cart-item .qq { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.cart-item .qq button { width: 28px; height: 28px; border: 2px solid var(--ink); border-radius: 8px; background: var(--cream); font-weight: 800; cursor: pointer; }
.cart-item .rm { background: none; border: none; cursor: pointer; font-size: 18px; opacity: .5; }
.cart-item .rm:hover { opacity: 1; }
.cart-foot { border-top: 3px solid var(--ink); padding: 18px 20px; background: #fff; }
.cart-total { display: flex; justify-content: space-between; font-family: 'Baloo 2'; font-weight: 800; font-size: 20px; margin-bottom: 14px; }
.cart-foot .btn { width: 100%; text-align: center; }
.cart-note { text-align: center; font-size: 13px; font-weight: 600; opacity: .6; margin-top: 10px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translate(-50%, 120px);
  background: var(--ink); color: #fff; font-weight: 700; font-size: 15px;
  padding: 14px 24px; border-radius: 14px; border: 3px solid #fff;
  box-shadow: 4px 4px 0 rgba(0,0,0,.25); z-index: 120;
  transition: transform .25s ease; max-width: 90vw; text-align: center;
}
.toast.show { transform: translate(-50%, 0); }

/* ---------- bundle banner ---------- */
.bundle-banner {
  margin: 40px 0; border: 3px solid var(--ink); border-radius: var(--radius);
  background: var(--grass); color: #fff; box-shadow: 5px 5px 0 var(--ink);
  padding: 30px 34px; display: flex; align-items: center; gap: 26px;
  transform: rotate(-.5deg);
}
.bundle-banner h2 { font-size: clamp(24px, 3vw, 34px); margin-bottom: 8px; }
.bundle-banner p { font-weight: 600; opacity: .95; }
.bundle-banner .btn { flex: none; }
.bundle-banner img { width: 130px; flex: none; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; padding: 44px 22px 50px; }
  .hero-art { min-height: 300px; max-width: 480px; }
  .cat-row { grid-template-columns: repeat(3, 1fr); }
  .book-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-strip { grid-template-columns: 1fr; }
  .trust-item + .trust-item { border-left: none; border-top: 3px dashed var(--ink); }
  .product-layout { grid-template-columns: 1fr; }
  .gallery { position: static; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .bundle-banner { flex-direction: column; text-align: center; }
  .nav { display: none; }
}
@media (max-width: 560px) {
  .cat-row { grid-template-columns: repeat(2, 1fr); }
  .book-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .preview-pages { grid-template-columns: repeat(2, 1fr); }
  .sticky-buy { display: flex; }
  .footer-inner { grid-template-columns: 1fr; }
  body { padding-bottom: 76px; }
  .cat-hero { flex-direction: column; text-align: center; }
}
