:root {
    --primary-orange: #ff6b35;
    --primary-orange-dark: #e85a2a;
    --dark-blue: #0a1628;
    --dark-blue-bg: #0f2746;
    --text-main: #1f2937;
    --text-light: #6b7280;
    --text-white: #ffffff;
    --border-color: #e5e7eb;
    --bg-light: #f9fafb;
    --bg-card: #ffffff;
}

* {
    box-sizing: border-box;
}

/* GLOBAL SETTINGS */
html, body {
    width: 100%;
    margin: 0;
    padding: 0;
}
#products-section, #header-section {
    overflow-x: hidden;
}
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6, p { margin: 0; }
ul { list-style: none; padding: 0; margin: 0; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

.container {
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
    padding: 0 20px;
}

/* =========================================
   HEADER
   ========================================= */
#header-section {
    background-color: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid #e6eef7;
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 72px;
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo-text {
    font-weight: 700;
    font-size: 20px;
    color: #0c2340;
    letter-spacing: 0.5px;
}

.site-logo {
    height: 50px;
    width: auto;
    display: block;
}

.main-nav { display: flex; gap: 32px; }
.nav-link { color: #5a6b7d; font-weight: 500; font-size: 16px; }
.nav-link:hover { color: var(--primary-orange); }

.btn-request {
    background-color: #ff7a18;
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
}

@media (max-width: 1024px) {
    .main-nav, .header-actions { display: none; }
}

/* =========================================
   HAMBURGER MENU
   ========================================= */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    z-index: 2000;
}
.hamburger .bar {
    width: 100%;
    height: 3px;
    background-color: var(--dark-blue);
    border-radius: 2px;
    transition: all 0.3s ease;
}
.hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active .bar:nth-child(2) { opacity: 0; }
.hamburger.active .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.mobile-menu-overlay {
    position: fixed;
    top: 72px;
    left: 0;
    width: 100%;
    height: calc(100vh - 72px);
    background-color: var(--text-white);
    z-index: 1500;
    padding: 40px 20px;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    border-top: 1px solid #e6eef7;
    overflow-y: auto;
}
.mobile-menu-overlay.active { transform: translateX(0); }
.mobile-menu-container { display: flex; flex-direction: column; gap: 32px; }
.mobile-nav { display: flex; flex-direction: column; gap: 24px; }
.mobile-nav-link {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark-blue);
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 12px;
}
body.menu-open { overflow: hidden; }

@media (max-width: 1024px) {
    .hamburger { display: flex; }
}

/* =========================================
   HERO
   ========================================= */
#hero-section {
    background: linear-gradient(135deg, #0a1628 0%, #1a2942 50%, #243b5c 100%);
    padding: 72px 0;
    color: white;
    text-align: center;
}
.hero-content {
    max-width: 896px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.hero-title { font-size: 48px; font-weight: 700; margin-bottom: 16px; }
.hero-subtitle { font-size: 18px; color: #c6c6c6; margin-bottom: 48px; max-width: 600px; }

.search-container { width: 100%; max-width: 672px; margin-bottom: 48px; }
.search-bar {
    background: white;
    border-radius: 9999px;
    padding: 8px;
    display: flex;
    align-items: center;
    box-shadow: 0px 20px 25px rgba(0,0,0,0.1);
}
.search-input {
    flex: 1;
    border: none;
    padding: 0 24px;
    font-size: 16px;
    outline: none;
    color: #374151;
    min-width: 0;
}
.search-btn {
    background-color: var(--primary-orange);
    color: white;
    border-radius: 9999px;
    padding: 12px 32px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}
.category-pills { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.pill {
    background-color: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 8px 20px;
    border-radius: 9999px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}
.pill:hover, .pill.active { background-color: #1a2942; border-color: var(--primary-orange); }

@media (max-width: 768px) {
    .hero-title { font-size: 32px; }
    .search-btn span { display: none; }
    .search-btn { padding: 12px; }
}

/* =========================================
   FILTER BAR (Top Horizontal)
   ========================================= */
#filter-bar {
    background-color: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 14px 0;
}
.filter-nav { display: flex; align-items: center; }
.filter-toggle {
    display: flex; align-items: center; gap: 8px; font-weight: 600;
    color: #374151; margin-right: 24px; flex-shrink: 0;
}
.divider { width: 1px; height: 24px; background-color: #e5e7eb; margin-right: 24px; flex-shrink: 0; }
.quick-filters {
    display: flex; gap: 24px; overflow-x: auto; padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}
.q-filter {
    color: #374151; font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer;
}
.q-filter:hover, .q-filter.active { color: var(--primary-orange); font-weight: 700; }

/* =========================================
   MAIN LAYOUT & STICKY SIDEBAR
   ========================================= */
#products-container {
    padding: 40px 0;
    /* Forces desktop container to allow sticky children */
    overflow: visible !important; 
}

.layout-grid {
    display: flex;
    gap: 24px;
    /* CRITICAL: Ensures desktop sidebar is sticky */
    align-items: flex-start;
    position: relative;
}

/* Desktop Sidebar (Sticky) */
.sidebar {
    width: 272px;
    flex-shrink: 0;
    background: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0px 1px 2px rgba(0,0,0,0.05);
    
    /* Sticky Logic */
    position: -webkit-sticky; 
    position: sticky;
    top: 100px;
    z-index: 10;
    
    /* Fix: Ensures sidebar height is intrinsic so it can stick */
    height: fit-content;
    align-self: flex-start;
    
    max-height: calc(100vh - 120px); 
    overflow-y: auto;
}

.sidebar-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px;
}
.sidebar-header h3 { font-size: 18px; font-weight: 700; color: #0a1f44; }
.clear-btn { color: var(--primary-orange); font-size: 14px; font-weight: 600; background: none; border: none; cursor: pointer; }
.filter-group { margin-bottom: 32px; }
.filter-group h4 { font-size: 16px; font-weight: 700; margin-bottom: 16px; color: #0a1f44; }
.checkbox-item { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 14px; color: #000; cursor: pointer; }

/* Mobile Only Elements (Default hidden) */
.mobile-filter-btn, .close-sidebar-btn, .mobile-apply-btn, .sidebar-overlay { display: none; }


/* =========================================
   MOBILE RESPONSIVENESS FIXES
   ========================================= */
@media (max-width: 1024px) {
    /* FIX 1: Remove layout gap */
    .layout-grid { flex-direction: column; gap: 0; } 

    /* FIX 2: Filter Button Spacing */
    .mobile-filter-btn {
        display: flex; align-items: center; justify-content: center; gap: 8px;
        background-color: var(--dark-blue); color: white; padding: 12px 24px;
        border-radius: 8px; font-weight: 600; 
        margin-bottom: 30px; 
        width: 100%; max-width: 300px; align-self: center;
    }

    /* FIX 3: SIDEBAR DRAWER (Bulletproof Anchoring) */
    .sidebar {
        display: none; /* Hidden by default */
        position: fixed; 
        top: 0; 
        left: 0; 
        bottom: 0; /* Anchors to bottom of screen */
        width: 85%; 
        max-width: 320px; 
        z-index: 9999; /* Ensure it is on top of EVERYTHING */
        background: white;
        border-radius: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        padding: 0;
        box-shadow: 2px 0 20px rgba(0,0,0,0.2);
        
        /* Flex column allows the internal area to scroll while header stays fixed */
        flex-direction: column; 
    }
    
    /* When active, show it */
    .sidebar.active { 
        display: flex; 
        transform: translateX(0); 
    }
    
    /* Header stays fixed at top of drawer */
    .sidebar-header { 
        padding: 20px; 
        border-bottom: 1px solid #eee; 
        margin-bottom: 0; 
        flex-shrink: 0; /* Prevents header from shrinking */
    }
    
    /* Scroll Area - Takes remaining height */
    .sidebar-scroll-area { 
        padding: 20px; 
        overflow-y: auto; /* Only this part scrolls */
        flex-grow: 1; /* Fills the rest of the height */
        padding-bottom: 100px; /* Extra space at bottom for buttons */
    }
    
    .close-sidebar-btn { display: block; font-size: 24px; padding: 5px 15px; background: #f1f5f9; border-radius: 4px; }
    .mobile-apply-btn { display: block; margin-top: 20px; width: 100%; }

    /* Overlay Background */
    .sidebar-overlay {
        position: fixed; top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(0,0,0,0.5); z-index: 9990; display: none;
        backdrop-filter: blur(2px);
    }
    .sidebar-overlay.active { display: block; }
}


/* =========================================
   PRODUCT GRID
   ========================================= */
.product-list { flex: 1; width: 100%; }
.category-section { margin-bottom: 60px; }
.section-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 24px; border-bottom: 1px solid #e5e7eb; padding-bottom: 12px;
}
.section-header h2 { font-size: 24px; color: var(--dark-blue-bg); }
.sort-select {
    border: 1px solid #d1d5db; padding: 8px 12px; border-radius: 8px;
    font-size: 14px; color: #374151; outline: none; cursor: pointer; background: white;
}
.product-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 24px;
}

@media (max-width: 768px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .section-header { flex-direction: column; align-items: flex-start; gap: 12px; }
}
@media (max-width: 480px) {
    .product-grid { grid-template-columns: 1fr; }
}

/* Card Styles */
.product-card {
    background: white; border: 1px solid #e5e7eb; border-radius: 12px;
    overflow: hidden; transition: box-shadow 0.2s; display: flex; flex-direction: column;
}
.product-card:hover { box-shadow: 0px 10px 15px rgba(0,0,0,0.1); }
.card-image {
    height: 256px; background-color: #f3f4f6; position: relative;
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.card-image img { max-height: 100%; max-width: 100%; object-fit: contain; }
.tag-featured {
    position: absolute; top: 12px; right: 12px; background-color: var(--primary-orange);
    color: white; padding: 4px 12px; border-radius: 9999px; font-size: 12px; font-weight: 600;
}
.card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.card-category {
    color: var(--primary-orange); font-size: 12px; font-weight: 700;
    margin-bottom: 8px; text-transform: uppercase;
}
.card-title {
    font-size: 16px; font-weight: 700; color: var(--dark-blue); margin-bottom: 16px;
    line-height: 1.4; height: 44px; overflow: hidden;
}
.specs-list { margin-bottom: 20px; flex: 1; }
.specs-list li {
    display: flex; align-items: center; gap: 8px; font-size: 13px; color: #4b5563; margin-bottom: 8px;
}
.card-actions { display: flex; gap: 12px; margin-bottom: 0; margin-top: auto; }
.btn-details {
    flex: 1; background-color: #0a1628; color: white; padding: 10px; border-radius: 6px;
    font-size: 14px; font-weight: 600; border: none; cursor: pointer;
}
.btn-icon {
    position: relative; width: 40px; display: flex; align-items: center; justify-content: center;
    border: 1px solid #e5e7eb; border-radius: 6px; cursor: pointer; background: white;
}
.btn-icon:hover::after {
    content: "Add to Quote"; position: absolute; bottom: 130%; left: 50%;
    transform: translateX(-50%); background: #0a1628; color: white; font-size: 12px;
    padding: 6px 10px; border-radius: 6px; white-space: nowrap; pointer-events: none;
}
.load-more-container { text-align: center; margin-top: 40px; }
.btn-load-more {
    border: 2px solid var(--dark-blue); color: var(--dark-blue);
    padding: 12px 48px; border-radius: 8px; font-weight: 600;
}

/* =========================================
   BRANDS SECTION
   ========================================= */
#brands-section {
    background-color: #0f2746; padding: 80px 0; color: white; text-align: center;
    width: 100%; max-width: 100vw; overflow: hidden;
}
.brands-content { max-width: 1216px; margin: 0 auto; }
.partners-scroll {
    overflow: hidden; width: 100%; position: relative;
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.partners-grid {
    display: flex; gap: 24px; width: max-content;
    animation: partners-scroll 25s linear infinite;
}
.partner-card {
    background: var(--bg-card); border-radius: 12px; height: 112px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border-color); padding: 20px; flex-shrink: 0;
}
.partner-card img {
    max-height: 64px; width: auto; opacity: 0.8; filter: grayscale(100%); transition: all 0.3s;
}
.partner-card:hover img { opacity: 1; filter: grayscale(0%); }
@keyframes partners-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* =========================================
   CTA SECTION
   ========================================= */
#cta-section {
    background: linear-gradient(90deg, #ff6b35 0%, #e85a2a 100%);
    padding: 64px 0; color: white; text-align: center;
}
.cta-wrapper { max-width: 960px; margin: 0 auto; }
.cta-actions { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; }
.btn-consult {
    background: white; color: var(--primary-orange); padding: 16px 32px;
    border-radius: 8px; font-weight: 700; display: flex; align-items: center; gap: 12px;
}
.btn-catalog {
    background: #0a1628; color: white; padding: 16px 32px;
    border-radius: 8px; font-weight: 700; display: flex; align-items: center; gap: 12px;
}

/* =========================================
   FOOTER
   ========================================= */
#footer {
    background-color: #0f2746; color: #d1d5db; padding: 80px 0 40px;
}
.footer-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; margin-bottom: 60px;
}
.footer-col h4 { color: var(--text-white); font-size: 16px; font-weight: 700; margin-bottom: 24px; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a:hover { color: var(--primary-orange); }
.social-icons { display: flex; gap: 16px; margin-bottom: 32px; }
.newsletter .input-group {
    display: flex; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px; padding: 4px;
}
.newsletter input {
    background: transparent; border: none; color: var(--text-white); padding: 8px 12px; flex: 1; outline: none; min-width: 0;
}
.newsletter button {
    background-color: #00d4ff; border-radius: 4px; width: 40px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.footer-locations {
    display: flex; gap: 80px; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 40px; margin-bottom: 40px;
}
.location h5 { color: var(--text-white); margin-bottom: 12px; }
.location p { font-size: 14px; line-height: 1.6; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1); padding-top: 32px; display: flex;
    justify-content: space-between; font-size: 14px; color: #9ca3af;
}
.footer-links {
  display: flex;
  align-items: center;
  justify-content: flex-end; /* Aligns to right on desktop */
  gap: 5px; /* Reduced gap so it reads like a sentence */
  color: #9ca3af;
  font-size: 14px;
}

/* Styling for your Name (The Link) */
.designer-link {
  text-decoration: none;
  color: #9ca3af; /* Default gray */
  font-weight: 700; /* Bold text */
  transition: all 0.3s ease;
}

/* Hover Effect - Turns Orange */
.designer-link:hover {
  color: #ff7a18; 
  text-decoration: underline;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-locations { flex-direction: column; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
  
  /* Centers the text on mobile */
  .footer-links { justify-content: center; } 
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* =========================================
   QUOTE BOX (DESKTOP & MOBILE FIX)
   ========================================= */
/* Desktop Default */
#quote-box {
    position: fixed; 
    top: 120px; 
    right: 24px; 
    width: 280px;
    background: white; 
    border-radius: 12px; 
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    padding: 16px; 
    z-index: 200; 
    display: none; 
    max-height: 70vh; 
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.quote-box-header { display: flex; justify-content: space-between; align-items: center; font-weight: 700; margin-bottom: 12px; }
#quote-items li { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 10px; }
#quote-items button { color: red; font-size: 12px; }
.quote-action {
    display: block; text-align: center; margin-top: 12px; padding: 10px;
    background: var(--primary-orange); color: white; border-radius: 8px; font-weight: 600;
}

/* FIX: MOBILE QUOTE BOX (CIRCULAR BUTTON) */
@media (max-width: 1024px) {
    #quote-box { 
        top: auto; 
        bottom: 30px; 
        right: 20px; 
        left: auto; 
        width: 60px; /* Standard FAB size */
        height: 60px;
        min-width: 0;
        border-radius: 50%;
        padding: 0;
        background-color: var(--primary-orange);
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 14px rgba(0,0,0,0.4);
        z-index: 10000;
        animation: slideUp 0.3s ease;
        cursor: pointer;
    }
    
    @keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

    /* HIDE THE LIST & Action Text on mobile */
    #quote-items, .quote-action { display: none !important; }
    
    /* Center the header/count */
    .quote-box-header { 
        margin: 0; 
        padding: 0; 
        width: 100%; 
        height: 100%; 
        display: flex; 
        flex-direction: column;
        align-items: center; 
        justify-content: center;
        gap: 2px;
    }
    
    .quote-box-header h4 { display: none; } 
    
    /* Add a Cart Icon via pseudo-element on the header */
    .quote-box-header::before {
        content: "";
        display: block;
        width: 20px;
        height: 20px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'%3E%3C/circle%3E%3Ccircle cx='20' cy='21' r='1'%3E%3C/circle%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'%3E%3C/path%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
    }

    #quote-count { 
        background: transparent; 
        color: white; 
        padding: 0; 
        font-size: 12px;
        font-weight: 700;
        border-radius: 0;
        line-height: 1;
    }
    
    /* Remove the "Items" text */
    #quote-count::after { content: ""; }
}