/* =========================================================================
   BongoToys v3 — Utility ecommerce design tokens
   Cobalt + Amber. Anek bilingual. Modern, functional, transactional.
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Anek+Latin:wght@400;500;600;700;800&family=Anek+Bangla:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* -----------------------------------------------------------------------
     BRAND PALETTE — utility ecommerce, confident, standard
     ----------------------------------------------------------------------- */

  /* Cobalt — primary action, trust, navigation */
  --cobalt-50:  #EFF4FF;
  --cobalt-100: #DBE6FE;
  --cobalt-200: #BFD2FE;
  --cobalt-300: #93B4FD;
  --cobalt-400: #608AFA;
  --cobalt-500: #3D67F5;
  --cobalt-600: #2549E8;
  --cobalt-700: #1E40AF;  /* primary */
  --cobalt-800: #1E3A8A;
  --cobalt-900: #1E3578;
  --cobalt-950: #172554;

  /* Amber — CTA accent, sale, promo, urgency */
  --amber-50:  #FFFBEB;
  --amber-100: #FEF3C7;
  --amber-200: #FDE68A;
  --amber-300: #FCD34D;
  --amber-400: #FBBF24;
  --amber-500: #F59E0B;  /* accent */
  --amber-600: #D97706;
  --amber-700: #B45309;
  --amber-800: #92400E;
  --amber-900: #78350F;

  /* Emerald — success, in-stock, verified */
  --emerald-50:  #ECFDF5;
  --emerald-100: #D1FAE5;
  --emerald-200: #A7F3D0;
  --emerald-300: #6EE7B7;
  --emerald-400: #34D399;
  --emerald-500: #10B981;
  --emerald-600: #059669;  /* success */
  --emerald-700: #047857;

  /* Rose — destructive, out-of-stock, errors */
  --rose-50:  #FFF1F2;
  --rose-100: #FFE4E6;
  --rose-500: #F43F5E;
  --rose-600: #E11D48;  /* destructive */
  --rose-700: #BE123C;

  /* -----------------------------------------------------------------------
     KIDS ZONE — playful pops for category tiles & illustrations
     ----------------------------------------------------------------------- */
  --berry-100: #FCE7F3; --berry-300: #F9A8D4; --berry-500: #EC4899; --berry-700: #BE185D;
  --mint-100:  #CCFBF1; --mint-300:  #5EEAD4; --mint-500:  #14B8A6; --mint-700:  #0F766E;
  --sky-100:   #E0F2FE; --sky-300:   #7DD3FC; --sky-500:   #0EA5E9; --sky-700:   #0369A1;
  --grape-100: #EDE9FE; --grape-300: #C4B5FD; --grape-500: #8B5CF6; --grape-700: #6D28D9;
  --sun-100:   #FEF9C3; --sun-300:   #FDE047; --sun-500:   #EAB308; --sun-700:   #A16207;

  /* Slate neutrals — clinical, modern, ecommerce-standard */
  --slate-0:   #FFFFFF;
  --slate-50:  #F8FAFC;
  --slate-100: #F1F5F9;
  --slate-200: #E2E8F0;
  --slate-300: #CBD5E1;
  --slate-400: #94A3B8;
  --slate-500: #64748B;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1E293B;
  --slate-900: #0F172A;
  --slate-950: #020617;

  /* -----------------------------------------------------------------------
     SEMANTIC TOKENS — light mode (Kids Zone — warm amber-led)
     ----------------------------------------------------------------------- */
  --background: #FFFCF5;          /* warm off-white, like fresh paper */
  --surface: #FFF8EA;             /* honeyed cream */
  --surface-raised: #FFFFFF;
  --surface-sunken: var(--amber-100);
  --surface-muted: var(--amber-100);

  --foreground: var(--slate-900);
  --foreground-muted: var(--slate-600);
  --foreground-subtle: var(--slate-500);
  --foreground-inverse: var(--slate-0);

  --primary: var(--amber-500);          /* warm amber — the "kids zone" */
  --primary-hover: var(--amber-600);
  --primary-active: var(--amber-700);
  --primary-foreground: #422006;        /* deep amber-brown for readable amber-on-text */
  --primary-soft: var(--amber-50);

  --accent: var(--cobalt-700);          /* cobalt is now the secondary accent */
  --accent-hover: var(--cobalt-800);
  --accent-foreground: var(--slate-0);
  --accent-soft: var(--cobalt-50);

  --success: var(--emerald-600);
  --success-foreground: var(--slate-0);
  --success-soft: var(--emerald-50);

  --destructive: var(--rose-600);
  --destructive-foreground: var(--slate-0);
  --destructive-soft: var(--rose-50);

  --border: #F2E3C6;                    /* warm sand border */
  --border-strong: #E8D2A2;
  --border-ink: var(--slate-900);
  --ring: var(--amber-600);
  --divider: #FBEFD6;

  /* -----------------------------------------------------------------------
     TYPOGRAPHY
       Anek Latin + Anek Bangla — single family, both scripts harmonised
       JetBrains Mono — order IDs, prices in dev contexts
     ----------------------------------------------------------------------- */
  --font-body: "Anek Latin", "Anek Bangla", system-ui, sans-serif;
  --font-display: "Anek Latin", "Anek Bangla", system-ui, sans-serif;
  --font-bangla: "Anek Bangla", "Anek Latin", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  /* Type scale — bigger, friendlier (no fonts below 14px in UI) */
  --text-display: 56px;     --lh-display: 1.05;   --tracking-display: -0.02em;
  --text-h1: 40px;          --lh-h1: 1.1;         --tracking-h1: -0.015em;
  --text-h2: 28px;          --lh-h2: 1.2;         --tracking-h2: -0.01em;
  --text-h3: 20px;          --lh-h3: 1.3;         --tracking-h3: -0.005em;
  --text-lede: 18px;        --lh-lede: 1.55;
  --text-body: 16px;        --lh-body: 1.55;
  --text-small: 14px;       --lh-small: 1.45;
  --text-micro: 12px;       --lh-micro: 1.4;      --tracking-micro: 0.04em;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-extrabold: 800;

  /* -----------------------------------------------------------------------
     SPACING — 4px base
     ----------------------------------------------------------------------- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  /* -----------------------------------------------------------------------
     RADIUS — friendly, slightly larger for the kids zone
     ----------------------------------------------------------------------- */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-2xl: 26px;
  --radius-pill: 999px;

  /* -----------------------------------------------------------------------
     SHADOW — crisp ecommerce, not warm
     ----------------------------------------------------------------------- */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12), 0 4px 8px rgba(15, 23, 42, 0.06);
  --shadow-xl: 0 24px 56px rgba(15, 23, 42, 0.16), 0 8px 16px rgba(15, 23, 42, 0.08);
  --shadow-focus: 0 0 0 3px rgba(37, 73, 232, 0.25);

  /* -----------------------------------------------------------------------
     MOTION
     ----------------------------------------------------------------------- */
  --duration-fast: 150ms;
  --duration-base: 220ms;
  --duration-slow: 360ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* -----------------------------------------------------------------------
     LAYOUT
     ----------------------------------------------------------------------- */
  --container-max: 1440px;
  --sidebar-width: 260px;
  --header-height: 64px;
  --topbar-height: 36px;
}

/* =========================================================================
   BASE
   ========================================================================= */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button { font-family: inherit; }

/* Anek looks great a touch heavier for UI */
body { font-weight: 450; }

/* =========================================================================
   UTILITY CLASSES — bilingual helpers
   ========================================================================= */
.bn { font-family: var(--font-bangla); font-feature-settings: "calt"; }
.tnum { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* =========================================================================
   SCROLLBAR — subtle, fits modern utility ecommerce
   ========================================================================= */
.thin-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.thin-scroll::-webkit-scrollbar-track { background: transparent; }
.thin-scroll::-webkit-scrollbar-thumb {
  background: var(--slate-200);
  border-radius: 999px;
}
.thin-scroll::-webkit-scrollbar-thumb:hover { background: var(--slate-300); }

/* =========================================================================
   ANIMATIONS — shimmer, fade, slide, gloss-sweep, pulse, drop, lift
   ========================================================================= */
@keyframes bt-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
@keyframes bt-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes bt-fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes bt-pop {
  0%   { opacity: 0; transform: scale(0.92); }
  60%  { opacity: 1; transform: scale(1.04); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes bt-slide-in-left {
  from { transform: translateX(-100%); }
  to   { transform: translateX(0); }
}
@keyframes bt-slide-in-right {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}
@keyframes bt-slide-down {
  from { opacity: 0; transform: translateY(-8px); max-height: 0; }
  to   { opacity: 1; transform: translateY(0); max-height: 800px; }
}
@keyframes bt-pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.4); opacity: 0.55; }
}
@keyframes bt-rotate {
  to { transform: rotate(360deg); }
}
@keyframes bt-glossy-sweep {
  0%   { transform: translateX(-150%) skewX(-18deg); }
  100% { transform: translateX(260%)  skewX(-18deg); }
}
@keyframes bt-cart-bump {
  0%, 100% { transform: scale(1); }
  35%      { transform: scale(1.18) rotate(-6deg); }
  70%      { transform: scale(0.94) rotate(3deg); }
}
@keyframes bt-fly-to-cart {
  0%   { opacity: 1; transform: translate(0,0) scale(1); }
  100% { opacity: 0; transform: translate(var(--fly-x, 60vw), var(--fly-y, -40vh)) scale(0.25); }
}
@keyframes bt-heart-burst {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.5); }
  70%  { transform: scale(0.85); }
  100% { transform: scale(1); }
}
@keyframes bt-chip-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes bt-float {
  0%, 100% { transform: translateY(0) rotate(var(--bt-float-rot, 0deg)); }
  50%      { transform: translateY(-10px) rotate(var(--bt-float-rot, 0deg)); }
}
@keyframes bt-float-slow {
  0%, 100% { transform: translateY(0) translateX(0); }
  50%      { transform: translateY(-8px) translateX(4px); }
}

/* Image placeholder shimmer (covers photo slot while "loading") */
.bt-shimmer {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg,
      rgba(255,255,255,0)   0%,
      rgba(255,255,255,0.7) 50%,
      rgba(255,255,255,0)   100%);
  background-size: 200% 100%;
  animation: bt-shimmer 1.6s linear infinite;
  mix-blend-mode: screen;
}

/* Glossy diagonal sheen — used on product cards & hero badges */
.bt-gloss {
  position: absolute; top: 0; bottom: 0;
  left: 0; width: 55%;
  pointer-events: none;
  background: linear-gradient(100deg,
    rgba(255,255,255,0)   0%,
    rgba(255,255,255,0.0) 20%,
    rgba(255,255,255,0.55) 50%,
    rgba(255,255,255,0.0) 80%,
    rgba(255,255,255,0)   100%);
  transform: translateX(-150%) skewX(-18deg);
}
.bt-gloss-trigger:hover .bt-gloss {
  animation: bt-glossy-sweep 1.05s cubic-bezier(.2,.7,.2,1) forwards;
}

/* Convenience entrance utility — fades in with slight y on mount */
.bt-fade-in    { animation: bt-fade-in    var(--duration-base) var(--ease-out) both; }
.bt-fade-up    { animation: bt-fade-up    var(--duration-slow) var(--ease-out) both; }
.bt-pop        { animation: bt-pop        var(--duration-base) var(--ease-out) both; }
.bt-spin       { animation: bt-rotate 1s linear infinite; }

/* Lift-on-hover for arbitrary cards */
.bt-liftable {
  transition: transform var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out);
  will-change: transform;
}
.bt-liftable:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* Underline-grow link */
.bt-link {
  position: relative; text-decoration: none; color: inherit;
  display: inline-block;
}
.bt-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1.5px; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--duration-base) var(--ease-out);
}
.bt-link:hover::after { transform: scaleX(1); }

/* =========================================================================
   RESPONSIVE — mobile-first overrides
     The design still targets desktop 1280–1440. We add responsive rules so
     a phone visitor gets a single-column layout with off-canvas nav.
   ========================================================================= */
@media (max-width: 900px) {
  :root {
    --header-height: 56px;
    --topbar-height: 32px;
    --sidebar-width: 0px;
    --text-display: 36px;
    --text-h1: 28px;
    --text-h2: 22px;
  }
  body { min-width: 0 !important; }

  /* Hero + trust collapse to single column on mobile */
  .bt-hero { grid-template-columns: 1fr !important; }
  .bt-trust { grid-template-columns: repeat(2, 1fr) !important; }
  .bt-footer-grid { grid-template-columns: 1fr 1fr !important; gap: 24px !important; }
  .bt-checkout-grid { grid-template-columns: 1fr !important; }
  .bt-account-grid  { grid-template-columns: 1fr !important; }
  .bt-collection-grid {
    grid-template-columns: 1fr 1fr !important;
    grid-auto-rows: auto !important;
  }
  .bt-collection-grid > div[style*="span 2"],
  .bt-collection-grid > div[style*="span 3"] {
    grid-column: span 2 !important;
    grid-row: auto !important;
  }

  /* Page padding shrinks */
  .bt-page-pad { padding: 16px 16px 48px !important; }

  /* Tree becomes off-canvas drawer */
  .bt-tree-aside {
    position: fixed !important;
    top: 0 !important; left: 0 !important;
    height: 100vh !important;
    width: min(320px, 86vw) !important;
    z-index: 95;
    transform: translateX(-100%);
    transition: transform var(--duration-base) var(--ease-out);
    box-shadow: none;
  }
  .bt-tree-aside.is-open {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }
  .bt-tree-backdrop {
    position: fixed; inset: 0;
    background: rgba(15,23,42,0.45);
    backdrop-filter: blur(2px);
    z-index: 94;
    opacity: 0; pointer-events: none;
    transition: opacity var(--duration-base) var(--ease-out);
  }
  .bt-tree-backdrop.is-open {
    opacity: 1; pointer-events: auto;
  }

  /* Hide desktop-only items, show mobile-only items */
  .bt-desktop-only { display: none !important; }
}
@media (min-width: 901px) {
  .bt-mobile-only { display: none !important; }
}

/* =========================================================================
   FOCUS — keyboard accessibility
   ========================================================================= */
:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-radius: var(--radius-sm);
}
