/* ============================================================
   TINY WORLD — playful cinematic theme (shared)
   ============================================================ */

:root {
  --night: #1A1033;
  --plum: #2B1B5A;
  --violet: #5B3FA8;
  --pink: #FF7A9C;
  --peach: #FFC27A;
  --cream: #FFF6E9;
  --cream-2: #FCEBD3;
  --tomato: #FF5A4E;
  --sun: #FFC93C;
  --mint: #3DD6B5;
  --sky: #4FA3FF;
  --lilac: #B48CFF;
  --ink: #1A1033;
  --ink-2: #5A4E78;
  --ink-3: #8E84A8;
  --line: rgba(26, 16, 51, .12);

  --f: 'Baloo Bhaijaan 2', system-ui, sans-serif;
  --ease: cubic-bezier(.22, .9, .24, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --gutter: clamp(16px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--f);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.locked { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
::selection { background: var(--pink); color: #fff; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; letter-spacing: .04em;
  color: var(--violet);
}

/* ---------- chunky toy buttons ---------- */
.btn {
  --c: var(--tomato); --c2: #C93A30; --t: #fff;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 58px; padding: 0 30px; border-radius: 20px;
  background: var(--c); color: var(--t);
  font-size: 18px; font-weight: 800;
  box-shadow: 0 6px 0 var(--c2), 0 14px 24px -8px rgba(26,16,51,.35);
  transform: translateY(0);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), filter .2s;
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.06); transform: translateY(-2px); box-shadow: 0 8px 0 var(--c2), 0 18px 28px -8px rgba(26,16,51,.4); }
.btn:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--c2), 0 6px 10px -6px rgba(26,16,51,.4); }
.btn--sun { --c: var(--sun); --c2: #D49A12; --t: var(--ink); }
.btn--teal { --c: #0A9AA0; --c2: #067277; --t: #fff; } /* logo teal: final checkout steps */
.btn--mint { --c: var(--mint); --c2: #22A487; --t: var(--ink); }
.btn--white { --c: #fff; --c2: #D9CFE8; --t: var(--ink); }
.btn--ghost { --c: transparent; --c2: transparent; --t: var(--ink); box-shadow: inset 0 0 0 2.5px var(--ink); }
.btn--ghost:hover { box-shadow: inset 0 0 0 2.5px var(--ink); background: rgba(26,16,51,.05); }
.btn--ghost:active { box-shadow: inset 0 0 0 2.5px var(--ink); }
.btn .arrow { transition: transform .4s var(--spring); }
.btn:hover .arrow { transform: translateX(-5px); }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; inset-inline: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 16px var(--gutter);
  pointer-events: none;
}
.nav > * { pointer-events: auto; }
.brand {
  display: inline-flex; align-items: center;
  transition: transform .4s var(--spring);
}
.brand__logo { height: 58px; width: auto; filter: drop-shadow(0 4px 0 rgba(26,16,51,.18)); }
@media (max-width: 640px) { .brand__logo { height: 46px; } }
.brand:hover { transform: rotate(-3deg) scale(1.04); }
.brand__mark {
  width: 36px; height: 36px; border-radius: 50%;
  background: conic-gradient(var(--tomato) 0 25%, var(--sun) 0 50%, var(--mint) 0 75%, var(--sky) 0);
  display: grid; place-items: center;
  animation: spinmark 8s linear infinite;
}
@keyframes spinmark { to { transform: rotate(360deg); } }
.brand__mark::after { content: ''; width: 16px; height: 16px; border-radius: 50%; background: #fff; }
.brand__txt { display: grid; line-height: 1; }
.brand__en { font-weight: 800; font-size: 19px; letter-spacing: -.01em; direction: ltr; }
.brand__ar { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.nav__end { display: flex; align-items: center; gap: 10px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 46px; padding: 0 18px; border-radius: 99px;
  background: #fff; color: var(--ink);
  font-weight: 700; font-size: 16px;
  box-shadow: 0 4px 0 rgba(26,16,51,.14);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.pill:hover { transform: translateY(-2px); }
.pill:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(26,16,51,.14); }
.pill--icon { width: 46px; padding: 0; justify-content: center; font-size: 19px; }
.cart-btn__count {
  min-width: 26px; height: 26px; border-radius: 13px; padding: 0 7px;
  display: grid; place-items: center;
  background: var(--tomato); color: #fff; font-size: 14px; font-weight: 800;
}
.cart-btn__count.bump { animation: bump .7s var(--spring); }
@keyframes bump { 30% { transform: scale(1.7) rotate(-12deg); } }
@media (max-width: 640px) {
  .brand__ar { display: none; }
  .pill .lbl { display: none; }
  .pill { padding: 0 12px; }
}

/* ---------- cursor ---------- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 400;
  pointer-events: none;
  width: 22px; height: 22px; margin: -11px 0 0 -11px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px rgba(26,16,51,.25);
  display: grid; place-items: center;
  transition: width .35s var(--spring), height .35s var(--spring), margin .35s var(--spring), background .25s, border-color .25s;
}
.cursor span { font-size: 14px; font-weight: 800; color: var(--ink); opacity: 0; white-space: nowrap; transition: opacity .2s; }
.cursor.big { width: 104px; height: 104px; margin: -52px 0 0 -52px; background: var(--sun); border-color: var(--sun); }
.cursor.big span { opacity: 1; transition-delay: .12s; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---------- price ---------- */
.price { font-weight: 800; font-size: 22px; white-space: nowrap; line-height: 1.1; }
.price small { font-size: 13px; font-weight: 600; color: var(--ink-3); margin-inline-start: 4px; }
.price s { display: block; font-size: 14px; font-weight: 500; color: var(--ink-3); }

/* ---------- qty ---------- */
.qty { display: inline-flex; align-items: center; background: #fff; border-radius: 14px; height: 38px; box-shadow: inset 0 0 0 2px var(--line); }
.qty button { width: 36px; height: 38px; font-size: 18px; font-weight: 800; }
.qty span { min-width: 22px; text-align: center; font-weight: 800; }

/* ---------- cart drawer ---------- */
.scrim { position: fixed; inset: 0; z-index: 150; background: rgba(26,16,51,.45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity .4s; }
.scrim.on { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 12px; bottom: 12px; left: 12px; z-index: 160;
  width: min(440px, calc(100vw - 24px));
  background: var(--cream);
  border-radius: 28px;
  transform: translateX(-112%) rotate(-4deg);
  transition: transform .7s var(--spring);
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(26,16,51,.6);
}
.drawer.on { transform: none; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; background: var(--sun); }
.drawer__title { font-size: 28px; font-weight: 800; margin: 0; }
.drawer__close { width: 42px; height: 42px; border-radius: 50%; background: #fff; font-size: 22px; font-weight: 800; transition: transform .5s var(--spring); }
.drawer__close:hover { transform: rotate(90deg) scale(1.1); }
.drawer__body { flex: 1; overflow-y: auto; padding: 6px 24px; }
.drawer__empty { text-align: center; padding: 60px 0; color: var(--ink-2); }
.drawer__empty .big { font-size: 26px; font-weight: 800; color: var(--ink); margin-bottom: 4px; }
.drawer__empty .emo { font-size: 64px; display: block; animation: wob 2.4s ease-in-out infinite; }
@keyframes wob { 50% { transform: rotate(-10deg) translateY(-6px); } }
.line { display: grid; grid-template-columns: 80px 1fr auto; gap: 14px; align-items: center; padding: 16px 0; border-bottom: 2px dashed var(--line); }
.line__img { width: 80px; height: 80px; border-radius: 18px; overflow: hidden; background: #fff; box-shadow: 0 4px 0 rgba(26,16,51,.08); }
.line__img img { width: 100%; height: 100%; object-fit: cover; }
.line__name { font-size: 18px; font-weight: 700; line-height: 1.25; margin: 0 0 8px; }
.line__rm { font-size: 13px; color: var(--ink-3); margin-inline-start: 10px; text-decoration: underline; }
.drawer__foot { padding: 20px 24px 24px; display: grid; gap: 12px; background: #fff; }
.drawer__row { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; }
.drawer__row .price { font-size: 30px; }
.drawer__note { font-size: 14px; color: var(--ink-2); margin: 0; }

/* ---------- toast ---------- */
.toast {
  position: fixed; z-index: 170; bottom: 24px; left: 50%;
  transform: translate(-50%, 160%) scale(.8);
  background: var(--ink); color: #fff;
  padding: 14px 22px; border-radius: 20px; font-weight: 700;
  display: flex; gap: 10px; align-items: center;
  box-shadow: 0 6px 0 #000;
  transition: transform .6s var(--spring);
  max-width: calc(100vw - 32px);
}
.toast.on { transform: translate(-50%, 0) scale(1); }
.toast i { font-style: normal; font-size: 22px; }

/* confetti canvas (add-to-cart celebration) */
.confetti { position: fixed; inset: 0; z-index: 180; pointer-events: none; }

/* ---------- footer ---------- */
.footer { background: var(--night); color: #fff; padding: 80px var(--gutter) 30px; border-radius: 40px 40px 0 0; margin-top: 60px; overflow: hidden; position: relative; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; padding-bottom: 50px; }
.footer h4 { font-weight: 700; font-size: 15px; color: var(--peach); margin: 0 0 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; color: rgba(255,255,255,.75); }
.footer a:hover { color: var(--sun); }
.footer__lead { font-size: 28px; font-weight: 700; line-height: 1.3; max-width: 380px; margin: 0; }
.footer__giant {
  font-weight: 800; font-size: 17vw; line-height: .85; letter-spacing: -.04em;
  text-align: center; direction: ltr; white-space: nowrap; margin: 10px 0 20px;
  background: linear-gradient(90deg, #FFC21A, #FFC21A 45%, #12C4C9 55%, #12C4C9);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.footer__base { display: flex; justify-content: space-between; gap: 20px; font-size: 14px; color: rgba(255,255,255,.5); flex-wrap: wrap; }
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr 1fr; } .footer__grid > :first-child { grid-column: 1 / -1; } }

/* ---------- reveal ---------- */
.rv { opacity: 0; transform: translateY(40px) scale(.96); transition: opacity .9s var(--ease), transform 1s var(--spring); }
.rv.in { opacity: 1; transform: none; }
.rv-d1 { transition-delay: .08s; } .rv-d2 { transition-delay: .16s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
