/* ========================================
   Absorbent and Safety Supply - Main Styles
   ======================================== */

:root {
    --primary: #dc2626;
    --primary-dark: #b91c1c;
    --primary-light: #ef4444;
    --accent: #fbbf24;
    --accent-dark: #f59e0b;
    --bg: #f8fafc;
    --bg-dark: #0a0a0a;
    --bg-darker: #000000;
    --bg-card: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --white: #ffffff;
    
    /* Product type colors */
    --oil-only: #d97706;
    --hazmat: #dc2626;
    --universal: #2563eb;
    --lab: #7c3aed;
    --general: #64748b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* ========== TOP BAR ========== */
.top-bar {
    background: linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.85)), url('/images/web_background.png');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 0.75rem 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.top-bar-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    min-height: 120px;
}

.logo-veteran {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo-link {
    display: block;
}

.company-logo {
    height: 200px;
    width: auto;
    margin-top: -20px;
    margin-bottom: -20px;
}

.veteran-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(220, 38, 38, 0.2);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    border: 2px solid var(--primary);
}

.veteran-badge img {
    height: 55px;
    width: auto;
}

.contact-header {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.phone-cta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2rem;
    transition: all 0.2s;
    border: 2px solid var(--primary);
}

.phone-cta:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: scale(1.02);
}

.contact-text {
    text-align: right;
}

.email-link {
    color: var(--white);
    text-decoration: none;
    font-size: 1rem;
    display: block;
    margin-bottom: 0.25rem;
}

.email-link:hover {
    color: var(--primary-light);
}

.credit-cards {
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 500;
}

/* ========== NAVIGATION ========== */
.nav-bar {
    background: #2d2d2d;
    padding: 0;
    position: sticky;
    top: 0; /* sticky at top */
    z-index: 1001; /* above top bar and content */
    border-bottom: 3px solid var(--primary);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.nav-bar > .nav-container > ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-bar > .nav-container > ul > li {
    position: relative;
}

.nav-bar li a {
    display: block;
    color: var(--white);
    text-decoration: none;
    padding: 1rem 1.5rem;
    font-weight: 500;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
}

.nav-bar li a:hover {
    background: #444;
    color: var(--white);
}

.nav-bar li a.active {
    background: var(--primary);
    color: var(--white);
    border-bottom-color: var(--accent);
    font-weight: 700;
}

/* Dropdown */
.dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-toggle::after {
    content: '▼';
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.dropdown-toggle.open::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #3a3a3a;
    min-width: 220px;
    max-height: 70vh;
    overflow-y: auto;
    border: 1px solid #555;
    border-top: 3px solid var(--primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: none;
    visibility: hidden;
    opacity: 0;
    z-index: 1003;
    flex-direction: column;
}

.dropdown-menu.show {
    display: flex;
    visibility: visible;
    opacity: 1;
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu li a {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid #4a4a4a;
    font-size: 0.95rem;
    display: block;
}

.dropdown-menu li:last-child a {
    border-bottom: none;
}

.dropdown-menu li a:hover {
    background: #555;
    padding-left: 1.5rem;
}

.dropdown-divider {
    border-top: 1px solid #555;
    margin: 0.5rem 0;
}

.dropdown-header {
    padding: 0.5rem 1.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Mobile Menu Toggle (desktop default: hidden) */
.menu-toggle {
    display: none;
    background: var(--primary);
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

/* ========== PAGE HEADER (for inner pages) ========== */
.page-header {
    background: linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.85)), url('/images/black-diamond-plate.jpg');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 3rem 2rem;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.page-header h1 span {
    color: var(--primary);
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(220, 38, 38, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--bg-dark);
}

/* ========== HERO SECTION ========== */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.85)), url('/images/black-diamond-plate.jpg');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 5rem 2rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(220,38,38,0.1)" stroke-width="1"/></svg>');
    background-size: 300px;
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.hero-text h1 span {
    color: var(--primary);
}

.hero-text p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.15);
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-images {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.hero-images img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 2px solid #333;
}

.hero-images img:first-child {
    grid-column: span 2;
    height: 220px;
}

/* ========== SECTIONS ========== */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}

.section-header h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text);
}

.section-header h2 span {
    color: var(--primary);
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Why Choose Us */
.why-us {
    padding: 5rem 2rem;
    background: var(--white);
}

.features-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: 12px;
    background: var(--bg);
    transition: all 0.3s;
    border: 2px solid transparent;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-color: var(--primary);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 2.25rem;
}

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* Products Section */
.products {
    padding: 5rem 2rem;
    background: var(--bg);
}

.products-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.product-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s;
    border: 2px solid transparent;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    border-color: var(--primary);
}

.product-image {
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-content {
    padding: 1.5rem;
}

.product-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.product-content p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1.25rem;
}

.product-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.product-link:hover {
    color: var(--primary-dark);
    gap: 0.75rem;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--bg-darker) 0%, #1a1a1a 100%);
    color: var(--white);
    padding: 4rem 2rem;
    text-align: center;
    border-top: 4px solid var(--primary);
    border-bottom: 4px solid var(--primary);
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-content h2 span {
    color: var(--primary);
}

.cta-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ========== FOOTER ========== */
.top-footer {
    background: var(--bg-dark);
    color: var(--white);
    padding: 4rem 2rem 2rem;
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
}

.footer-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--primary);
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.75rem;
}

.footer-section a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: var(--white);
}

.bottom-footer {
    background: var(--bg-darker);
    color: rgba(255,255,255,0.6);
    padding: 1.5rem 2rem;
    text-align: center;
    font-size: 0.85rem;
    border-top: 1px solid #222;
}

.bottom-footer a {
    color: var(--primary);
    text-decoration: none;
}

/* ========== UTILITY CLASSES ========== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* ========== RESPONSIVE ========== */

/* Tablet adjustments */
@media (max-width: 1024px) {
    .top-bar-content {
        min-height: 80px;
    }

    .company-logo {
        height: 160px;
    }
}

/* Mobile: sticky nav, slide-out menu, stacked top-bar */
@media (max-width: 768px) {

    /* NAV BAR STAYS FIXED AT TOP */
    .nav-bar {
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100% !important;
        z-index: 9999;
        transform: none !important;
    }

    /* HAMBURGER BUTTON */
    .menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: flex-start;
        gap: 0.6rem;
        font-size: 1.2rem;
        padding: 0.6rem 1rem;
        background: var(--primary);
        color: #fff;
        border-radius: 6px;
        border: none;
        cursor: pointer;
        width: auto;
        max-width: 100%;
    }

    /* SLIDE-OUT MAIN NAV */
    #main-nav {
        display: flex !important;
        position: fixed;
        top: 0;
        left: -260px !important; /* hidden off-screen */
        height: 100vh;
        width: 260px;
        background: rgba(0, 0, 0, 0.95);
        padding-top: 4rem;
        flex-direction: column;
        gap: 1.2rem;
        overflow-y: auto;
        opacity: 1;
        transition: left 0.3s ease, opacity 0.3s ease;
    }

    /* Visible when .active is added (hamburger clicked) */
    #main-nav.active {
        left: 0 !important;
    }

    /* When JS adds .scroll-away on scroll */
    #main-nav.scroll-away {
        opacity: 0;
        pointer-events: none;
        left: -260px !important;
    }

    /* Full-width dropdown inside slide-out if opened */
    .dropdown-menu {
        position: static;
        width: 100%;
        border-left: 3px solid var(--primary);
        box-shadow: none;
        max-height: none;
    }

    .dropdown-menu.show {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .dropdown-toggle {
        width: 100%;
        justify-content: center;
    }

    /* TOP BAR STACKED UNDER NAV, SCROLLING NORMALLY */
    .top-bar {
        position: static !important;
        width: 100% !important;
        margin-top: 50px !important; /* sits below fixed nav */
        transform: none !important;
    }

    .top-bar-content {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        gap: 1rem !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 1rem !important;
    }

    .logo-veteran,
    .contact-header {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .contact-text {
        width: 100% !important;
        text-align: center !important;
    }

    /* Prevent weird sideways scroll */
    body,
    html {
        overflow-x: hidden !important;
        width: 100vw !important;
        max-width: 100vw !important;
    }
}

/* Desktop: normal horizontal menu, hover dropdown */
@media (min-width: 769px) {
    .menu-toggle {
        display: none !important;
    }

    #main-nav {
        display: flex !important;
        flex-direction: row !important;
        position: static !important;
        height: auto;
        width: auto;
        background: transparent;
        padding-top: 0;
        overflow: visible;
    }

    .dropdown-menu {
        display: none;
        position: absolute !important;
    }

    .dropdown-menu.show {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}
