/* ==========================================================================
   CSS Custom Properties — Single source of truth for the entire theme.
   All other CSS files consume these variables; never hardcode values elsewhere.
   ========================================================================== */

:root {

  /* ── Brand colours ──────────────────────────────────────────────────────── */
  --color-primary:       #FFBA01;   /* Main CTA buttons                         */
  --color-primary-hover: #F4891E;   /* Hover / secondary orange                 */
  --color-primary-dark:  #F4891E;   /* Alias for backward compat                */
  --color-pink:          #EC849D;   /* Footer wave, minus btn, remove (×)        */
  --color-pink-light:    #F8D5DE;   /* Light pink tints / testimonial bg         */
  --color-footer-pink:   #F3849D;   /* Footer body — точно = дъното на footer-wave.png (безшевен стик) */
  --color-footer-cta-bg: #f7f7f7;   /* Секцията над футъра + фон зад вълнистите „захапки" */
  --color-blue:          #64C6F5;   /* Plus button, "Приложи код", accents        */
  --color-blue-light:    #C8E8F5;   /* Hero sky / light blue tints               */
  --color-green:         #5FBA51;   /* "Завърши поръчката" / checkout CTA        */
  --color-orange-light:  #FDE8C8;   /* Hero peach background                     */
  --color-orange-dark:   #C2670A;   /* "Imagine" box bg — white text (≈4:1, AA large) */

  /* ── Етап 9.8 — дизайн-калибрация (1:1) ─────────────────────────────────────
     Нови, добавъчни токени. Глобалните --color-blue/--color-pink/--color-green
     НЕ са пипани (за да не променят cart/shop/product); home/футър ползват
     долните точни дизайн-цветове. */
  --color-yellow:      #FFBA01;   /* бутони (= primary)                         */
  --color-orange:      #F79344;   /* top-bar, футър блоб                        */
  --color-blue-soft:   #9BD6F1;   /* „Представи си" ляв фон + футър (дизайн blue) */
  --color-hero-cream:  #FFF1DA;   /* hero фон                                   */
  --color-header-bg:   #F0F0F0;   /* хедър фон                                  */
  --color-card-cream:  #F8EFD2;   /* отзив-карти (еднакви)                      */

  /* Основатели / ползи — точни дизайн-цветове (по menu_order helper) */
  --founder-pink:   #F3849C;
  --founder-blue:   #26C3F3;
  --founder-green:  #5EBB51;
  --founder-orange: #F69445;

  /* Розетки (статистика) */
  --rosette-blue:   #3FB9E8;
  --rosette-green:  #63BE55;
  --rosette-orange: #E9933E;

  /* Neutrals */
  --color-bg:         #F5F5F5;   /* Page background                              */
  --color-bg-alt:     #FAFAFA;   /* Subtle alternate background                  */
  --color-text:       #252525;   /* Body copy                                    */
  --color-text-muted: #6B6B6B;   /* Secondary / muted text                       */
  --color-border:     #E5E5E5;   /* Default border colour                        */
  --color-white:      #FFFFFF;
  --color-black:      #000000;   /* design specifies pure #000 for some headings */

  /* Status */
  --color-success: #5FBA51;
  --color-error:   #E74C3C;
  --color-warning: #F39C12;
  --color-info:    #64C6F5;

  /* Semantic aliases */
  --color-muted:      var(--color-text-muted);
  --color-star:       var(--color-pink);
  --color-remove:     var(--color-pink);
  --color-qty-minus:  var(--color-pink);
  --color-qty-plus:   var(--color-blue);

  /* Legacy hero aliases */
  --color-hero-peach: var(--color-orange-light);
  --color-hero-sky:   var(--color-blue-light);

  /* ── Typography ─────────────────────────────────────────────────────────── */
  --font-primary: 'Sofia Sans', system-ui, -apple-system, sans-serif;
  --font-main:    var(--font-primary);           /* backward compat alias       */
  --font-brush:   'BrushType', cursive;          /* Configurator name preview   */
  --font-open:    'Open Sans', sans-serif;       /* Product titles / descs      */

  --font-weight-regular:   400;
  --font-weight-semibold:  600;
  --font-weight-bold:      700;
  --font-weight-extrabold: 800;
  --font-weight-black:     900;

  /* Декоративен шрифт за числата в розетките. Етап 9.12: ползва локалния
     BrushType (четка-стил, с кирилица — за „9.9 от 10"), тъй като „Chocolate
     Classical Sans" не е четка и няма кирилица. Ако дизайнерът потвърди реалния
     „Chocolate cyr-lat" шрифт, добави го като @font-face и го сложи тук пръв. */
  --font-display: var(--font-brush);

  /* Fluid heading sizes */
  --font-h1: clamp(2rem, 5vw, 3.5rem);
  --font-h2: clamp(1.5rem, 4vw, 2.5rem);
  --font-h3: clamp(1.25rem, 3vw, 1.875rem);
  --font-h4: clamp(1.125rem, 2vw, 1.5rem);

  /* Static size scale */
  --font-size-xs:   0.75rem;    /*  12px */
  --font-size-sm:   0.875rem;   /*  14px */
  --font-size-base: 1rem;       /*  16px */
  --font-size-lg:   1.125rem;   /*  18px */
  --font-size-xl:   1.25rem;    /*  20px */
  --font-size-2xl:  1.5rem;     /*  24px */
  --font-size-3xl:  1.875rem;   /*  30px */
  --font-size-4xl:  2.25rem;    /*  36px */
  --font-size-5xl:  3rem;       /*  48px */

  /* Legacy --text-* aliases */
  --text-xs:   var(--font-size-xs);
  --text-sm:   var(--font-size-sm);
  --text-base: var(--font-size-base);
  --text-md:   var(--font-size-lg);
  --text-lg:   var(--font-size-xl);
  --text-xl:   var(--font-size-2xl);
  --text-2xl:  var(--font-size-3xl);
  --text-3xl:  var(--font-size-4xl);
  --text-4xl:  var(--font-size-5xl);
  --text-5xl:  3.75rem;  /* 60px — above the new scale */

  /* Line heights */
  --line-height-tight:   1.2;
  --line-height-snug:    1.375;
  --line-height-normal:  1.5;
  --line-height-relaxed: 1.625;
  --line-height-loose:   1.75;

  /* ── Spacing (8px base scale) ────────────────────────────────────────────── */
  --space-0:  0;
  --space-1:  0.25rem;   /*  4px */
  --space-2:  0.5rem;    /*  8px */
  --space-3:  0.75rem;   /* 12px */
  --space-4:  1rem;      /* 16px */
  --space-5:  1.25rem;   /* 20px */
  --space-6:  1.5rem;    /* 24px */
  --space-8:  2rem;      /* 32px */
  --space-10: 2.5rem;    /* 40px */
  --space-12: 3rem;      /* 48px */
  --space-16: 4rem;      /* 64px */
  --space-20: 5rem;      /* 80px */
  --space-24: 6rem;      /* 96px */

  /* Legacy --sp-* aliases */
  --sp-1:  var(--space-1);
  --sp-2:  var(--space-2);
  --sp-3:  var(--space-3);
  --sp-4:  var(--space-4);
  --sp-5:  var(--space-5);
  --sp-6:  var(--space-6);
  --sp-8:  var(--space-8);
  --sp-10: var(--space-10);
  --sp-12: var(--space-12);
  --sp-16: var(--space-16);
  --sp-20: var(--space-20);
  --sp-24: var(--space-24);

  /* ── Border radius ───────────────────────────────────────────────────────── */
  --radius-none:   0;
  --radius-sm:     8px;
  --radius-md:     16px;
  --radius-lg:     24px;
  --radius-xl:     32px;
  --radius-pill:   9999px;
  --radius-full:   9999px;   /* kept = --radius-pill for backward compat         */
  --radius-circle: 50%;      /* use on elements with equal width/height          */

  /* ── Shadows ─────────────────────────────────────────────────────────────── */
  --shadow-sm:      0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md:      0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg:      0 8px 20px rgba(0, 0, 0, 0.12);
  --shadow-xl:      0 12px 32px rgba(0, 0, 0, 0.16);
  --shadow-hover:   0 8px 24px rgba(0, 0, 0, 0.15);
  --shadow-product: -3px 2px 8px #bfbfbf;   /* product card diagonal shadow     */
  --shadow-blue:    1px 3px 3px #a3c2d0;    /* blue-tinted input focus shadow   */

  /* ── Transitions ─────────────────────────────────────────────────────────── */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* ── Breakpoints (reference — use plain values in @media rules) ─────────── */
  /* CSS custom properties cannot be used inside @media directly.              */
  /* Documented here as single source of truth.                                */
  /* --bp-sm: 480px | --bp-md: 768px | --bp-lg: 1024px | --bp-xl: 1280px     */

  /* ── Container widths ────────────────────────────────────────────────────── */
  --container-sm:      640px;
  --container-md:      768px;
  --container-lg:      1024px;
  --container-xl:      1280px;
  --container-2xl:     1536px;
  --container-max:     var(--container-xl);   /* legacy alias                  */
  --container-padding: clamp(1rem, 4vw, 1.5rem);

  /* ── Header ──────────────────────────────────────────────────────────────── */
  --topbar-height: 36px;
  --header-height: 70px;
  --header-total:  calc(var(--topbar-height) + var(--header-height));

  /* ── z-index ladder ──────────────────────────────────────────────────────── */
  --z-base:           0;
  --z-dropdown:       100;
  --z-sticky:         200;
  --z-fixed:          300;
  --z-modal-backdrop: 400;
  --z-modal:          500;
  --z-popover:        600;
  --z-toast:          700;

  /* Legacy aliases */
  --z-header:  var(--z-sticky);
  --z-tooltip: var(--z-popover);
}
