/* ============================================
   BROLLO KENYA - MASTER DESIGN SYSTEM
   Mobile-First | Responsive | Sticky Header
   ============================================ */

:root {
    /* Brand Colors */
    --navy: #0A1D3C;
    --navy-light: #163059;
    --red: #E63946;
    --red-hover: #C41E2C;
    --silver: #F4F6F9;
    --gray: #6C757D;
    --dark: #1A1A1A;
    --white: #FFFFFF;
    --border: #E2E8F0;

    /* Typography */
    --font-heading: 'Barlow Condensed', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --sp-xs: 0.5rem;
    --sp-sm: 1rem;
    --sp-md: 2rem;
    --sp-lg: 4rem;
    --sp-xl: 6rem;

    /* Utility */
    --container: 1280px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* RESET & BASE */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--dark); background: var(--white); line-height: 1.6; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: color var(--transition); }

/* TYPOGRAPHY (Fluid for Mobile) */
h1, h2, h3, h4, h5 { font-family: var(--font-heading); text-transform: uppercase; font-weight: 700; line-height: 1.1; color: var(--navy); }
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); letter-spacing: -0.5px; }
h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: var(--sp-sm); }
h3 { font-size: clamp(1.5rem, 3vw, 1.8rem); margin-bottom: var(--sp-xs); }
p { margin-bottom: var(--sp-sm); font-size: 1.05rem; color: var(--gray); }

/* CONTAINER */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-md); width: 100%; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 1rem 2rem; font-family: var(--font-heading); font-size: 1.1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; border: none; cursor: pointer; transition: all var(--transition); text-align: center; }
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-hover); transform: translateY(-2px); box-shadow: 0 10px 20px rgba(230, 57, 70, 0.2); }
.btn-outline { background: transparent; color: var(--navy); border: 2px solid var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-white { background: var(--white); color: var(--navy); }
.btn-white:hover { background: var(--silver); }

/* SECTIONS */
.section { padding: var(--sp-lg) 0; }
.section-dark { background: var(--navy); }
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4, .section-dark p { color: var(--white); }
.section-silver { background: var(--silver); }
.section-header { text-align: center; max-width: 800px; margin: 0 auto var(--sp-md); }
.eyebrow { font-family: var(--font-body); font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: var(--red); display: block; margin-bottom: 10px; }

/* FORMS */
.form-group { margin-bottom: var(--sp-sm); }
.form-label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 5px; color: var(--navy); }
.form-control { width: 100%; padding: 1rem; border: 1px solid var(--border); font-family: var(--font-body); font-size: 1rem; background: var(--white); transition: border var(--transition); }
.form-control:focus { outline: none; border-color: var(--navy); }

/* ============================================
   HEADER & STICKY NAVIGATION
   ============================================ */
.site-header { position: sticky; top: 0; z-index: 1000; background: var(--white); box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.header-top { background: var(--navy); color: var(--white); padding: 10px 0; font-size: 0.85rem; }
.header-top .container { display: flex; justify-content: space-between; align-items: center; }
.header-main { background: var(--white); border-bottom: 1px solid var(--border); }
.header-main .container { display: flex; justify-content: space-between; align-items: center; height: 90px; }

/* Logo */
.logo img { height: 60px; width: auto; }

/* Desktop Nav */
.desktop-nav { display: flex; gap: 30px; align-items: center; height: 100%; font-family: var(--font-heading); font-size: 1.2rem; font-weight: 700; text-transform: uppercase; color: var(--navy); }
.nav-link { position: relative; padding: 10px 0; }
.nav-link::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--red); transition: width 0.3s; }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-link:hover { color: var(--red); }

/* Header Actions */
.header-actions { display: flex; gap: 15px; align-items: center; }
.mobile-toggle { display: none; background: none; border: none; cursor: pointer; color: var(--navy); }

/* ============================================
   MOBILE NAVIGATION DRAWER
   ============================================ */
.mobile-overlay { position: fixed; inset: 0; background: rgba(10,29,60,0.8); z-index: 9998; opacity: 0; visibility: hidden; transition: all 0.3s; }
.mobile-overlay.active { opacity: 1; visibility: visible; }
.mobile-nav { position: fixed; top: 0; left: -100%; width: 100%; max-width: 350px; height: 100vh; background: var(--white); z-index: 9999; transition: left 0.3s ease; overflow-y: auto; display: flex; flex-direction: column; }
.mobile-nav.active { left: 0; }
.mobile-nav-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid var(--border); }
.mobile-nav-close { background: none; border: none; font-size: 2rem; cursor: pointer; color: var(--navy); }
.mobile-nav-links { display: flex; flex-direction: column; padding: 20px; gap: 20px; font-family: var(--font-heading); font-size: 1.5rem; text-transform: uppercase; font-weight: 700; color: var(--navy); }
.mobile-nav-links a { border-bottom: 1px solid var(--silver); padding-bottom: 10px; }
.mobile-nav-cta { padding: 20px; margin-top: auto; }

/* ============================================
   RESPONSIVE GRIDS
   ============================================ */
.grid-2 { display: grid; grid-template-columns: 1fr; gap: var(--sp-md); }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: var(--sp-md); }
.grid-4 { display: grid; grid-template-columns: 1fr; gap: var(--sp-md); }

/* Tablets (768px and up) */
@media (min-width: 768px) {
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* Desktops (1024px and up) */
@media (min-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================
   MOBILE RESPONSIVE HEADER
   ============================================ */
@media (max-width: 992px) {
    .header-top { display: none; }
    .desktop-nav { display: none; }
    .header-actions .btn { display: none; } /* Hide desktop buttons */
    .mobile-toggle { display: block; }
    .header-main .container { height: 70px; }
    .logo img { height: 45px; }
}

/* ============================================
   MOBILE LAYOUT FIXES FOR SPECIFIC PAGES
   ============================================ */
/* For Product Detail, Contact, About, Export layouts that use inline grids */
@media (max-width: 992px) {
    /* Force all inline 2-column grids to stack */
    div[style*="grid-template-columns: 1fr 1fr"],
    div[style*="grid-template-columns: 280px 1fr"],
    div[style*="grid-template-columns: 1fr 1.5fr"] {
        grid-template-columns: 1fr !important;
        gap: var(--sp-md) !important;
    }
    
    /* Adjust padding on mobile */
    .section { padding: var(--sp-md) 0; }
    .container { padding: 0 var(--sp-sm); }
    
    /* Force images to not overflow on mobile */
    img { max-width: 100% !important; height: auto !important; }
}

/* Overlay specific fixes */
.mobile-overlay { backdrop-filter: blur(2px); }