/* assets/css/style.css */
/* =========================================
   Core Configurations & Color Palette
========================================= */
:root {
    --primary: #0d6efd; 
    --primary-dark: #0a58ca;
    --dark-navy: #05132d; 
    --light-bg: #f4f7fa; 
    --border: #e2e8f0;
    --text-main: #475569; 
    --text-dark: #1e293b;
    --white: #ffffff;
    --warning: #ffca28;
    --danger: #ff4757;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: var(--light-bg);
    color: var(--text-main);
    overflow-x: hidden; 
}

.container {
    width: 100%;
    max-width: 1180px; 
    margin: 0 auto;
    padding: 0 24px; 
}

a { text-decoration: none; transition: all 0.3s ease; }
ul { list-style: none; }
img { max-width: 100%; height: auto; }

/* =========================================
   Global Buttons & Badges
========================================= */
.btn {
    padding: 10px 24px;
    border: 0;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-size: 15px;
}

.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); }

.btn-outline { background: transparent; border: 1px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--light-bg); }

.btn-white { background: var(--white); color: var(--primary); }
.btn-white:hover { background: #e2e6ea; }

.btn-large { padding: 14px 32px; font-size: 16px; }
.btn-sm { padding: 6px 16px; font-size: 13px; }

.badge { background: var(--primary); color: var(--white); padding: 5px 12px; border-radius: 20px; font-size: 12px; }

/* =========================================
   1. Top Contact Bar
========================================= */
.top-bar {
    background: linear-gradient(90deg, #081a60 0%, #0d6efd 100%);
    color: var(--white);
    padding: 8px 0;
    font-size: 13px;
    font-weight: 500;
}
.top-bar-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.top-info span { margin-right: 25px; display: inline-flex; align-items: center; gap: 5px; }

.top-social a { 
    color: var(--white); 
    background: rgba(255, 255, 255, 0.15);
    width: 28px;
    height: 28px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 50px;
    margin-left: 8px;
}
.top-social a:hover { background: var(--white); color: var(--primary); }

/* =========================================
   2. Main Header & Search Box
========================================= */
.main-header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
.header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0; /* Reduced padding slightly */
}

.hamburger-btn { display: none; background: none; border: 0; font-size: 28px; cursor: pointer; color: var(--primary); }

.search-box {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    width: 45%; /* Slightly adjusted width */
    background: var(--white);
    margin: 0 15px; /* Added margin to prevent squishing */
}
.search-select { 
    background: #f8fafc; 
    border: 0;
    padding: 10px 15px; /* Reduced padding slightly */
    color: var(--text-dark);
    font-weight: 500;
    outline: none;
    cursor: pointer;
}
.search-input { 
    width: 100%; 
    border: 0; 
    padding: 10px 15px; /* Reduced padding slightly */
    color: var(--text-dark);
    outline: none;
}
.search-btn { 
    background: var(--primary); 
    border: 0; 
    color: var(--white); 
    padding: 0 20px; /* Reduced padding slightly */
    cursor: pointer; 
}
.search-btn:hover { background: var(--primary-dark); }

.auth-buttons { display: flex; gap: 10px; }

/* =========================================
   3. Navigation Menu (Optimized for One Line)
========================================= */
.main-nav { background: var(--white); padding: 12px 0; border: solid var(--border); border-width: 1px 0; }
.nav-flex { display: flex; justify-content: space-between; align-items: center; }

/* Adjusted gap and font-size to fit all items perfectly on one line */
.nav-links { display: flex; gap: 18px; font-weight: 600; font-size: clamp(13px, 1vw, 14px); align-items: center; } 
.nav-links a { color: var(--text-dark); white-space: nowrap; } /* white-space: nowrap prevents breaking */
.nav-links a:hover, .nav-links a.active { color: var(--primary); }

.nav-offer { font-size: clamp(12px, 1vw, 13px); font-weight: 600; color: var(--primary); display: flex; align-items: center; gap: 8px; white-space: nowrap; }

/* =========================================
   4. Hero Section
========================================= */
.hero-section {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: var(--white);
    padding: 80px 0;
}
.hero-flex { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.hero-content { flex: 1; }
.hero-subtitle { font-size: 18px; font-weight: 500; opacity: 0.9; }
.hero-content h1 { font-size: 46px; margin: 15px 0; font-weight: 700; line-height: 1.2; }
.hero-content p { font-size: 16px; opacity: 0.8; margin-bottom: 30px; max-width: 550px; line-height: 1.6; }
.hero-features { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 35px; font-size: 14px; font-weight: 500; }
.hero-actions { display: flex; gap: 15px; flex-wrap: wrap; }
.hero-image-wrapper { flex: 1; text-align: right; }
.hero-image-wrapper img { width: 100%; max-width: 650px; border-radius: 12px; }

/* =========================================
   5. Stats Section
========================================= */
.stats-section { padding: 50px 0; background: var(--white); border: solid var(--border); border-width: 0 0 1px 0; }
.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    text-align: center;
}
.stat-item {
    border: 1px solid var(--border);
    padding: 25px 15px;
    border-radius: 8px;
    font-size: 14px;
}
.stat-item b { font-size: 24px; color: var(--text-dark); display: block; margin-bottom: 8px; }

/* =========================================
   6. Products Section (Auto Grid)
========================================= */
.products-section { padding: 70px 0; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }
.section-header h2 { font-size: 30px; color: var(--text-dark); }
.view-all { color: var(--primary); font-weight: 600; font-size: 15px; }

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); /* Slightly reduced min-width to fit 4 */
    gap: 25px;
}
.product-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    padding: 16px;
    transition: transform 0.3s, box-shadow 0.3s;
}
.product-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.05); }
.product-card img { width: 100%; height: 180px; object-fit: cover; border-radius: 8px; margin-bottom: 15px; }
.card-body h3 { font-size: 18px; color: var(--text-dark); margin-bottom: 12px; font-weight: 600; }
.price { font-size: 20px; color: var(--primary); font-weight: 700; margin-bottom: 18px; }
.card-footer { 
    display: flex; justify-content: space-between; align-items: center; 
    border: solid var(--border); border-width: 1px 0 0 0; 
    padding-top: 15px; 
}
.rating { font-size: 14px; color: var(--warning); font-weight: 600; }

/* =========================================
   7. Features Section
========================================= */
.features-section { padding: 70px 0; background: var(--white); }
.features-section h2 { font-size: 30px; color: var(--text-dark); text-align: center; margin-bottom: 45px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.feature-card {
    border: 1px solid var(--border);
    padding: 30px 20px;
    border-radius: 12px;
    text-align: center;
    transition: box-shadow 0.3s;
}
.feature-card:hover { box-shadow: 0 5px 20px rgba(0,0,0,0.04); }
.feature-card h4 { font-size: 19px; color: var(--text-dark); margin-bottom: 12px; font-weight: 600; }
.feature-card p { font-size: 15px; line-height: 1.6; }

/* =========================================
   8. Newsletter Section
========================================= */
.newsletter-section { padding: 50px 0; background: var(--light-bg); }
.newsletter-box {
    background: linear-gradient(90deg, #052c7a 0%, #0d6efd 100%);
    border-radius: 12px;
    padding: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--white);
    box-shadow: 0 10px 30px rgba(13, 110, 253, 0.2);
}
.news-text h3 { font-size: 26px; margin-bottom: 5px; font-weight: 700; }
.news-text p { opacity: 0.9; font-size: 15px; }
.news-form { display: flex; width: 45%; background: var(--white); padding: 6px; border-radius: 6px; }
.news-form input { border: 0; padding: 12px 15px; width: 100%; outline: none; font-size: 15px; border-radius: 6px; }
.news-form button { margin: 0; border-radius: 6px; padding: 12px 25px; }

/* =========================================
   9. Main Footer (Optimized Space & Perfect Columns)
========================================= */
.main-footer { 
    background: var(--dark-navy); 
    color: var(--white); 
    padding: 50px 0 0; 
}

/* 5 Columns Grid Setup - Brand Column space significantly decreased to 1.8fr */
.footer-grid { 
    display: grid; 
    grid-template-columns: 1.8fr 1fr 1fr 1.2fr 1.8fr; 
    gap: 35px; /* Increased gap slightly to distribute new space */
}

/* Shorthand Border for Column Separators (Applied to col 1, 2, 3, 4) */
.col-border-right {
    border: solid rgba(255, 255, 255, 0.08);
    border-width: 0 1px 0 0;
    padding-right: 30px; 
}

/* Brand Column Adjustments */
.brand-col {
    padding-right: 0px; /* Removed right padding to push content extremely left */
}
.footer-logo {
    margin-left: -5px; 
}

/* Fluid Typography for Headings */
.footer-col h4 { 
    font-size: clamp(15px, 1.5vw, 17px); 
    margin-bottom: 16px; 
    font-weight: 600; 
}

/* Links and Lists */
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { 
    color: #94a3b8; 
    font-size: clamp(13px, 1.2vw, 14px); 
    transition: color 0.3s;
}
.footer-col ul li a:hover { color: var(--white); }

/* Brand Description */
.brand-col p { 
    color: #94a3b8; 
    font-size: clamp(13px, 1.2vw, 14px); 
    margin: 18px 0; 
    line-height: 1.6; 
}

/* Social Icons */
.social-links { display: flex; gap: 8px; }
.social-links a { 
    background: var(--primary); 
    color: var(--white); 
    width: 32px; 
    height: 32px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 50%; 
    transition: background 0.3s;
}
.social-links a:hover { background: var(--white); color: var(--primary-dark); }

/* Contact Us Text */
.footer-col p { 
    color: #94a3b8; 
    font-size: clamp(13px, 1.2vw, 14px); 
    margin-bottom: 10px; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}

/* Footer Bottom Section */
.footer-bottom { 
    border: solid rgba(255, 255, 255, 0.05); 
    border-width: 1px 0 0 0; 
    padding: 15px 0; 
    margin-top: 25px; 
    font-size: clamp(12px, 1.1vw, 14px); 
    color: #94a3b8; 
}
.flex-between { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

/* =========================================
   10. Mobile Drawer (Left Sidebar)
========================================= */
.mobile-drawer {
    position: fixed;
    inset: 0 auto 0 -350px;
    width: 300px;
    background: var(--white);
    box-shadow: 5px 0 25px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: inset 0.3s ease-in-out;
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
}
.mobile-drawer.active { inset: 0 auto 0 0; }
.drawer-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 35px; }
.close-btn { background: #f1f5f9; border: 0; color: var(--text-dark); padding: 8px 12px; border-radius: 6px; cursor: pointer; font-size: 16px; }
.mobile-nav-list li { margin-bottom: 18px; }
.mobile-nav-list a { color: var(--text-dark); font-weight: 600; font-size: 16px; display: block; }

/* =========================================
   11. 100% Fully Responsive Media Queries
========================================= */
/* Large Devices (Desktops/Laptops) */
@media (max-width: 1200px) {
    .hero-content h1 { font-size: 38px; }
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { 
        grid-template-columns: repeat(3, 1fr); 
        gap: 40px; 
    }
    .col-border-right { 
        border-width: 0; 
        padding-right: 0; 
    }
    .brand-col {
        padding-right: 0;
    }
    
    /* Navigation Adjustments for Large Tablets/Small Laptops */
    .nav-links { gap: 12px; }
}

/* Medium Devices (Tablets) */
@media (max-width: 992px) {
    .nav-links, .nav-offer, .top-social { display: none; }
    .hamburger-btn { display: block; }
    .header-flex { flex-wrap: wrap; }
    .search-box { width: 100%; margin: 15px 0 0 0; order: 3; }
    
    .hero-flex { flex-direction: column-reverse; text-align: center; }
    .hero-content p { margin: 0 auto 25px auto; }
    .hero-features, .hero-actions { justify-content: center; }
    .hero-image-wrapper { text-align: center; }
    
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    
    .newsletter-box { flex-direction: column; text-align: center; gap: 25px; padding: 30px 20px; }
    .news-form { width: 100%; flex-direction: column; background: transparent; padding: 0; gap: 10px; }
    .news-form input { padding: 15px; }
    .news-form button { width: 100%; justify-content: center; }
    
    .footer-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 30px; 
    }
}

/* Small Devices (Landscape Phones) */
@media (max-width: 768px) {
    .container { padding: 0 15px; } 
    .top-bar-flex { flex-direction: column; text-align: center; gap: 10px; }
    .top-info span { margin: 0 10px 10px 10px; display: inline-block; }
    
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .feature-grid { grid-template-columns: 1fr; }
    
    .flex-between { 
        flex-direction: column; 
        gap: 15px; 
        text-align: center; 
    }
}

/* Extra Small Devices (Portrait Phones) */
@media (max-width: 576px) {
    .hero-content h1 { font-size: 32px; }
    .stats-grid { grid-template-columns: 1fr; }
    
    .search-select { display: none; } 
    .search-input { border-radius: 6px 0 0 6px; }
    
    .footer-grid { 
        grid-template-columns: 1fr; 
        text-align: center; 
    }
    .social-links { justify-content: center; }
    .footer-col p { justify-content: center; }
    .footer-logo { margin-left: 0; }
}