/*
Theme Name: INGCO Officiel
Theme URI: https://ingcoofficiel.tn
Description: Astra Child Theme — INGCO power tools store. Industrial luxury aesthetic.
Author: INGCO Team
Template: astra
Version: 2.0.0
Text Domain: astra-child-ingco
*/

/* ============================================================
   Google Fonts
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Barlow+Condensed:wght@300;400;500;600;700&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

/* ============================================================
   Design System — CSS Custom Properties (dark/default)
   ============================================================ */
:root {
  /* Base surfaces */
  --c-base:        #0F0D0A;
  --c-surface:     #1A1712;
  --c-surface-2:   #242018;
  --c-border:      #2E2920;

  /* Brand */
  --c-brand:       #FF9900;
  --c-brand-dim:   #CC7A00;
  --c-brand-glow:  rgba(255, 153, 0, 0.25);

  /* Text */
  --c-text-primary:   #F0EDE8;
  --c-text-secondary: #9A9080;
  --c-text-muted:     #5A5248;

  /* Feedback */
  --c-success:  #3DBE6C;
  --c-error:    #E84545;
  --c-warning:  #FF9900;

  /* Glow */
  --c-glow-active:  rgba(255, 153, 0, 0.40);
  --c-glow-strong:  rgba(255, 153, 0, 0.70);

  /* Shadows */
  --shadow-card:    0 2px 8px rgba(0,0,0,0.4), 0 0 0 1px var(--c-border);
  --shadow-raised:  0 8px 24px rgba(0,0,0,0.5);
  --shadow-brand:   0 0 20px var(--c-brand-glow);
  --shadow-glow-lg: 0 0 40px rgba(255,153,0,0.35), 0 0 80px rgba(255,153,0,0.15);

  /* Fonts */
  --font-display: 'Bebas Neue', sans-serif;
  --font-ui:      'Barlow Condensed', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  /* Type scale */
  --text-hero:    clamp(2.5rem, 8vw, 5.5rem);
  --text-h1:      clamp(1.8rem, 4vw, 3rem);
  --text-h2:      clamp(1.4rem, 3vw, 2rem);
  --text-h3:      clamp(1.1rem, 2vw, 1.4rem);
  --text-body:    clamp(0.875rem, 1.5vw, 1rem);
  --text-small:   clamp(0.75rem, 1.2vw, 0.875rem);
  --text-label:   clamp(0.7rem, 1vw, 0.8rem);

  /* Spacing */
  --space-1:   4px;  --space-2:   8px;  --space-3:  12px;
  --space-4:  16px;  --space-5:  24px;  --space-6:  32px;
  --space-7:  48px;  --space-8:  64px;  --space-9:  96px;
  --space-10: 128px;

  /* Breakpoints (reference) */
  --bp-sm:   600px;
  --bp-md:  1024px;
  --bp-lg:  1366px;
  --bp-xl:  1920px;
}

/* ============================================================
   Explicit dark mode override
   ============================================================ */
[data-theme="dark"] {
  --c-base:        #0F0D0A;
  --c-surface:     #1A1712;
  --c-surface-2:   #242018;
  --c-border:      #2E2920;
  --c-text-primary:   #F0EDE8;
  --c-text-secondary: #9A9080;
  --c-text-muted:     #5A5248;
}

/* ============================================================
   Light mode overrides
   ============================================================ */
@media (prefers-color-scheme: light) {
  :root {
    --c-base:        #F5F3EF;
    --c-surface:     #FFFFFF;
    --c-surface-2:   #EDEBE6;
    --c-border:      #D4CFC5;
    --c-text-primary:   #1A1712;
    --c-text-secondary: #5A5248;
    --c-text-muted:     #9A9080;
    --shadow-card:    0 2px 8px rgba(0,0,0,0.10), 0 0 0 1px var(--c-border);
    --shadow-raised:  0 8px 24px rgba(0,0,0,0.12);
  }
}

[data-theme="light"] {
  --c-base:        #F5F3EF;
  --c-surface:     #FFFFFF;
  --c-surface-2:   #EDEBE6;
  --c-border:      #D4CFC5;
  --c-text-primary:   #1A1712;
  --c-text-secondary: #5A5248;
  --c-text-muted:     #9A9080;
  --shadow-card:    0 2px 8px rgba(0,0,0,0.10), 0 0 0 1px var(--c-border);
  --shadow-raised:  0 8px 24px rgba(0,0,0,0.12);
}

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

/* ============================================================
   Base body reset
   ============================================================ */
body {
  font-family: var(--font-body);
  color: var(--c-text-primary);
  background-color: var(--c-base);
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ═══════════════════════════════════════════════════════════
   Recherche-autre — section search bar (single-product,
   cart, checkout) + scrollable mega menu
   ═══════════════════════════════════════════════════════════ */

.recherche-autre-section {
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--c-border);
}

.recherche-autre-section--top {
  border-top: none;
  border-bottom: 1px solid var(--c-border);
  padding: var(--space-md) 0;
}

.recherche-autre-container {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.recherche-autre-bar {
  flex: 1;
  position: relative;
}

/* Mega menu of recherche-autre: product list scrollable */
.search-mega-panel--autre .search-mega-col--center .search-mega-products {
  max-height: 360px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--c-border) transparent;
}
.search-mega-panel--autre .search-mega-col--center .search-mega-products::-webkit-scrollbar {
  width: 4px;
}
.search-mega-panel--autre .search-mega-col--center .search-mega-products::-webkit-scrollbar-thumb {
  background: var(--c-border);
  border-radius: 2px;
}

@media (max-width: 768px) {
  .recherche-autre-container {
    flex-direction: column;
    align-items: stretch;
  }
}
