/* ===== VARIABLES ===== */
:root {
  --primary: #7a3e12;
  --primary-light: #c76b22;
  --primary-dark: #4e2508;
  --gold: #d4a24e;
  --gold-light: #f5dca0;
  --bg: #fdfaf5;
  --surface: #fff;
  --ink: #2b2217;
  --muted: #6e5a43;
  --border: #e8d9c0;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 8px rgba(80,43,18,.06);
  --shadow: 0 8px 30px rgba(80,43,18,.10);
  --shadow-lg: 0 20px 50px rgba(80,43,18,.14);
  --transition: .3s cubic-bezier(.4,0,.2,1);
  --font: 'Tajawal', sans-serif;
  --font-heading: 'Changa', sans-serif;
}

/* ===== BASE (alongside Bootstrap 5) ===== */
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4 { font-family: var(--font-heading); line-height: 1.25; }

/* ===== HEADER — Blur Navbar ===== */
.site-header {
  background: rgba(253,250,245,.6) !important;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(232,217,192,.4);
  transition: background var(--transition), box-shadow var(--transition);
  padding: 0 !important;
}
.site-header.scrolled {
  background: rgba(253,250,245,.95) !important;
  box-shadow: var(--shadow-sm);
}
.site-header .navbar-brand {
  display: flex; align-items: center; gap: 10px; padding: 0;
}
.brand-logo { width: 44px; height: 44px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font-size: .8rem; color: var(--muted); font-weight: 500; }
.brand-sub { font-family: var(--font-heading); font-weight: 800; font-size: 1.1rem; color: var(--primary); }

.site-header .nav-link {
  padding: 8px 14px !important; border-radius: 999px; font-weight: 600; font-size: .9rem;
  color: var(--muted) !important; transition: all var(--transition);
}
.site-header .nav-link:hover,
.site-header .nav-link.active {
  background: var(--primary); color: #fff !important;
}
.site-header .navbar-toggler { border: none; padding: 6px; }
.site-header .navbar-toggler:focus { box-shadow: none; }

.lang-switch {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%; font-weight: 700; font-size: .82rem;
  background: var(--primary); color: #fff !important; transition: background var(--transition);
  text-decoration: none;
}
.lang-switch:hover { background: var(--primary-dark); color: #fff !important; }

/* ===== HERO ===== */
.hero {
  position: relative; min-height: 92vh; display: flex; align-items: center;
  background: linear-gradient(135deg, #3e1c08 0%, #7a3e12 40%, #c76b22 100%);
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url('assets/ghalat-chaouia.png') no-repeat center;
  background-size: 340px; opacity: .06;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(212,162,78,.18) 0%, transparent 60%);
}
.hero-content { position: relative; z-index: 2; max-width: 700px; padding: 120px 0 80px; }
.hero-kicker {
  display: inline-block; padding: 6px 18px; border-radius: 999px;
  background: rgba(255,255,255,.12); color: var(--gold-light);
  font-weight: 600; font-size: .9rem; margin-bottom: 18px;
  border: 1px solid rgba(255,255,255,.15);
}
.hero-title { font-size: clamp(2rem, 5vw, 3.4rem); color: #fff; margin-bottom: 18px; }
.hero-desc { color: rgba(255,255,255,.78); font-size: 1.05rem; max-width: 540px; margin-bottom: 32px; }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }

/* ===== Brand Buttons (avoid Bootstrap .btn conflicts) ===== */
.btn-brand {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 28px; border-radius: 999px; font-weight: 700; font-size: .95rem;
  border: 2px solid transparent; cursor: pointer; transition: all var(--transition);
  text-decoration: none;
}
.btn-gold { background: var(--gold); color: var(--primary-dark); border-color: var(--gold); }
.btn-gold:hover { background: #e6b85a; color: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(212,162,78,.4); }
.btn-ghost { border-color: rgba(255,255,255,.4); color: #fff; background: transparent; }
.btn-ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; color: #fff; }
.btn-cta { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-cta:hover { background: var(--primary-dark); color: #fff; transform: translateY(-2px); }

/* ===== STATS ===== */
.stats { background: var(--primary); padding: 32px 0; margin-top: -1px; }
.stat-item { padding: 12px 8px; text-align: center; }
.stat-number { font-family: var(--font-heading); font-size: clamp(1.8rem, 3vw, 2.8rem); font-weight: 800; color: var(--gold); display: block; }
.stat-suffix { font-family: var(--font-heading); font-size: 1.4rem; color: var(--gold); font-weight: 700; }
.stat-label { display: block; color: rgba(255,255,255,.8); font-size: .88rem; margin-top: 4px; }

/* Stat borders — direction-aware */
[dir="rtl"] .stat-item { border-left: 1px solid rgba(255,255,255,.15); }
[dir="rtl"] .stat-item:last-child { border-left: none; }
[dir="ltr"] .stat-item { border-right: 1px solid rgba(255,255,255,.15); }
[dir="ltr"] .stat-item:last-child { border-right: none; }

/* ===== SECTION COMMON ===== */
.section-tag {
  display: inline-block; padding: 5px 16px; border-radius: 999px;
  background: rgba(199,107,34,.1); color: var(--primary-light); font-weight: 700;
  font-size: .82rem; margin-bottom: 10px; letter-spacing: .3px;
}
.section-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem); color: var(--primary-dark);
  margin-bottom: 10px;
}
.section-subtitle { color: var(--muted); max-width: 560px; margin-bottom: 36px; }

/* ===== BRANDS ===== */
.brands { padding: 72px 0; }
.brand-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 32px 20px; text-align: center; transition: all var(--transition);
  box-shadow: var(--shadow-sm); height: 100%;
}
.brand-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.brand-card-img { height: 100px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.brand-card-img img { max-height: 90px; max-width: 160px; object-fit: contain; }
.brand-card h3 { font-size: 1.1rem; color: var(--primary-dark); margin-bottom: 4px; }
.brand-card p { color: var(--muted); font-size: .88rem; }

/* ===== ABOUT ===== */
.about { padding: 72px 0; background: linear-gradient(170deg, #fdf8f0 0%, #f9f0e0 100%); }
.text-muted-custom { color: var(--muted); }
.highlight {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface); border-radius: var(--radius); padding: 16px;
  border: 1px solid var(--border); transition: all var(--transition);
}
.highlight:hover { box-shadow: var(--shadow); transform: translateX(-4px); }
.highlight-icon {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px;
  background: rgba(199,107,34,.1); color: var(--primary-light);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.highlight h4 { font-size: .95rem; color: var(--primary-dark); margin-bottom: 2px; }
.highlight p { font-size: .85rem; color: var(--muted); margin-bottom: 0; }

.about-badge {
  width: 280px; height: 280px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg); margin: 0 auto;
}
.about-badge img { max-width: 170px; max-height: 170px; object-fit: contain; filter: brightness(0) invert(1); opacity: .9; }

/* ===== PRODUCTS ===== */
.products { padding: 72px 0; }
.product-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px 20px; text-align: center; transition: all var(--transition);
  box-shadow: var(--shadow-sm); height: 100%;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.product-icon { font-size: 2.4rem; margin-bottom: 14px; }
.product-card h3 { font-size: 1.05rem; color: var(--primary-dark); margin-bottom: 8px; }
.product-card p { font-size: .88rem; color: var(--muted); margin-bottom: 0; }

/* ===== QUALITY ===== */
.quality { padding: 72px 0; background: linear-gradient(135deg, #3e1c08 0%, #7a3e12 50%, #c76b22 100%); }
.quality .section-tag { background: rgba(255,255,255,.12); color: var(--gold-light); }
.quality .section-title { color: #fff; }
.quality-card {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-lg); padding: 32px 20px;
  transition: all var(--transition); height: 100%;
}
.quality-card:hover { background: rgba(255,255,255,.14); transform: translateY(-4px); }
.quality-icon { font-size: 2rem; margin-bottom: 14px; }
.quality-card h3 { color: #fff; font-size: 1.05rem; margin-bottom: 8px; }
.quality-card p { color: rgba(255,255,255,.75); font-size: .88rem; margin-bottom: 0; }

/* ===== FOOTER ===== */
.site-footer { background: #1a0e05; color: rgba(255,255,255,.7); }
.footer-brand { display: flex; flex-direction: column; gap: 8px; }
.footer-logo { width: 52px; height: 52px; object-fit: contain; margin-bottom: 12px; filter: brightness(0) invert(1); opacity: .8; }
.footer-tagline { font-size: .92rem; line-height: 1.6; }
.footer-links h4, .footer-contact h4, .footer-lang h4 { color: var(--gold); font-size: .95rem; margin-bottom: 14px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: rgba(255,255,255,.7); font-size: .9rem; transition: color var(--transition); text-decoration: none; }
.footer-links a:hover { color: var(--gold); }
.footer-contact p { font-size: .9rem; margin-bottom: 10px; }
.footer-map {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--gold); font-weight: 600; font-size: .88rem;
  transition: color var(--transition); text-decoration: none;
}
.footer-map:hover { color: var(--gold-light); }
.footer-lang a { color: rgba(255,255,255,.7); font-size: .9rem; transition: color var(--transition); text-decoration: none; }
.footer-lang a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08); padding: 18px 0;
  font-size: .82rem; color: rgba(255,255,255,.4);
}

/* ===== CONTACT PAGE ===== */
.contact-hero { padding-top: 130px; padding-bottom: 40px; }
.contact-title { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
.contact-form-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow);
}
.contact-form-card h3 { font-size: 1.2rem; color: var(--primary-dark); margin-bottom: 20px; }
.contact-form .form-control {
  border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px;
  font-size: .95rem; background: var(--bg); transition: border-color var(--transition);
}
.contact-form .form-control:focus { border-color: var(--primary-light); box-shadow: 0 0 0 .2rem rgba(199,107,34,.15); }
.contact-form .form-label { font-weight: 600; color: var(--primary-dark); font-size: .9rem; }
.contact-side .trust-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm);
}
.contact-side .trust-item h4 { color: var(--primary-dark); margin-bottom: 6px; }
.contact-side .trust-item p { color: var(--muted); font-size: .9rem; margin-bottom: 0; }
.form-feedback { min-height: 20px; color: var(--primary); font-weight: 700; font-size: .9rem; }
.location-link {
  display: inline-flex; color: var(--primary-light); font-weight: 600; font-size: .88rem;
  margin-top: 6px; border-bottom: 2px solid var(--gold); text-decoration: none;
}
.location-link:hover { color: var(--primary-dark); }

/* ===== RESPONSIVE ===== */
@media (max-width: 991.98px) {
  .site-header .navbar-collapse {
    background: rgba(253,250,245,.98);
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 16px;
    margin-top: 8px;
    box-shadow: var(--shadow);
  }
  .about-badge { width: 200px; height: 200px; }
  .about-badge img { max-width: 120px; }
}

@media (max-width: 767.98px) {
  .hero { min-height: 80vh; }
  .hero-content { padding: 100px 0 60px; }
  .hero-title { font-size: clamp(1.6rem, 6vw, 2.4rem); }
  .brand-logo { width: 36px; height: 36px; }
}
