/* =========================================
   1. GLOBAL VARIABLES & RESET
   ========================================= */
:root {
    /* Digital Trust Palette */
    --primary-color: #0ea5e9; /* Electric Sky Blue */
    --primary-dark: #0284c7;  /* Deep Blue */
    --header-bg: #0f172a;     /* Midnight Slate */
    --footer-bg: #0f172a;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --white: #ffffff;
    
    /* Modern UI Variables */
    --max-width: 1200px;
    --font-body: 'Open Sans', sans-serif;
    --font-heading: 'Merriweather', serif;
    --border-rad-sm: 8px;
    --border-rad-md: 12px;
    --shadow-soft: 0 10px 40px rgba(0,0,0,0.05);
    --shadow-hover: 0 15px 50px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* Common Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Common Buttons */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 12px 30px;
    font-weight: 700;
    border-radius: var(--border-rad-sm);
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
}
.btn:hover { 
    background-color: var(--primary-dark); 
    transform: translateY(-2px); 
    box-shadow: var(--shadow-soft);
}

/* =========================================
   2. HEADER & NAVIGATION (Global)
   ========================================= */
header {
    background: var(--header-bg);
    padding: 15px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 50px;
}
/* Replaced image logo with sleek text version for now */
.logo { font-family: var(--font-body); font-size: 1.6rem; font-weight: 800; color: var(--white); letter-spacing: 0.5px; }
.logo span { color: var(--primary-color); }

.nav-menu { display: flex; gap: 25px; }
.nav-menu a {
    font-weight: 600;
    color: var(--white);
    font-size: 0.95rem;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
}
.nav-menu a:hover, .nav-menu a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}
.header-actions { display: flex; align-items: center; gap: 20px; }

/* Header Auth Buttons */
.btn-auth {
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-dark);
    border: 1px solid #e2e8f0;
    background: var(--white);
    padding: 8px 16px;
    border-radius: var(--border-rad-sm);
    margin-right: 15px;
    transition: all 0.2s;
    display: inline-block;
}
.btn-auth:hover { background: #f1f5f9; }

/* Logged In Dashboard State */
.btn-dashboard-active {
    background: #8b5cf6 !important; /* Soft violet for the dashboard button to stand out */
    color: white !important;
    border-color: #8b5cf6 !important;
}
.btn-dashboard-active:hover { background: #7c3aed !important; }

.cart-link { color: white; position:relative; font-size: 1.3rem; }
.cart-badge-icon {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--primary-color);
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 50%;
    min-width: 18px;
    text-align: center;
}
.mobile-toggle { display: none; color: white; font-size: 24px; cursor: pointer; }

@media (max-width: 768px) {
    .nav-menu { display: none; }
    .mobile-toggle { display: block; }
}

/* =========================================
   3. FOOTER (Global)
   ========================================= */
.site-footer {
    background: var(--footer-bg);
    color: #94a3b8;
    padding: 60px 0 20px;
    margin-top: auto;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #334155;
}
.footer-section h4 { color: var(--white); margin-bottom: 20px; font-size: 1.1rem; }

.sub-form { display: flex; gap: 10px; }
.sub-form input {
    padding: 10px;
    border-radius: var(--border-rad-sm);
    border: 1px solid #334155;
    background: #1e293b;
    color: white;
    flex-grow: 1;
}
.sub-form button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--border-rad-sm);
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
}
.sub-form button:hover { background: var(--primary-dark); }

.footer-actions-group { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.btn-contact-footer {
    border: 2px solid var(--white);
    color: var(--white);
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 600;
    transition: 0.3s;
}
.btn-contact-footer:hover { background: var(--white); color: var(--footer-bg); }

.social-icons { display: flex; gap: 15px; }
.social-icons a {
    width: 40px; height: 40px;
    background: #1e293b;
    color: var(--white);
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    font-size: 1.2rem;
    transition: 0.3s;
}
.social-icons a:hover { background: var(--primary-color); }
.footer-bottom { text-align: center; padding-top: 20px; font-size: 0.9rem; }

/* =========================================
   MOBILE NAVIGATION MENU FIX
   ========================================= */
@media (max-width: 768px) {
    /* Hide the default horizontal menu and prep it for vertical dropdown */
    .nav-menu { 
        display: none; 
        flex-direction: column; 
        position: absolute; 
        top: 80px; /* Pushes it just below the header */
        left: 0; 
        width: 100%; 
        background: var(--header-bg); 
        padding: 20px; 
        box-shadow: 0 10px 20px rgba(0,0,0,0.2);
        gap: 15px;
    }
    
    /* The class we will toggle with Javascript */
    .nav-menu.mobile-active {
        display: flex;
    }

    .nav-menu a {
        display: block;
        padding: 10px;
        border-bottom: 1px solid #1e293b; /* Subtle separator line */
    }

    .mobile-toggle { 
        display: block; 
    }
}

/* =========================================
   4. HOME PAGE (Carousel & Grid)
   ========================================= */
.hero-carousel {
    position: relative;
    width: 100%;
    height: 680px;
    overflow: hidden;
}
.carousel-track {
    display: flex;
    width: 300%;
    height: 100%;
    animation: heroLoop 40s infinite linear;
}
@keyframes heroLoop {
    0%    { transform: translateX(0); }
    37.5% { transform: translateX(0); }
    50%   { transform: translateX(-33.333333%); }
    87.5% { transform: translateX(-33.333333%); }
    100%  { transform: translateX(-66.666666%); }
}
.carousel-slide {
    width: 33.333333%;
    flex-shrink: 0;
    position: relative;
}
.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.carousel-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.7); /* Slate tinted overlay */
    z-index: 1;
}
.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    z-index: 2;
    width: 90%;
    max-width: 800px;
}
.hero-content h1 { font-size: 3.5rem; margin-bottom: 20px; font-weight: 800; line-height: 1.2; }
.hero-content h1 span { color: var(--primary-color); }
.hero-content p { font-size: 1.4rem; margin-bottom: 30px; color: #f8fafc; }

.duplicate-btn {
    position: absolute;
    bottom: 34%;
    left: 9%;
    z-index: 3;
    padding: 14px 40px;
    font-size: 1.1rem;
    border-radius: var(--border-rad-sm);
}

/* Home Products */
.products-section { padding: 80px 0; background: var(--white); }
.section-title { text-align: center; margin-bottom: 50px; font-size: 2.2rem; color: var(--text-dark); }
.product-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 40px; 
    max-width: 900px; 
    margin: 0 auto; 
}
.product-card { 
    border: 1px solid #e2e8f0; 
    border-radius: var(--border-rad-md); 
    padding: 20px; 
    text-align: center; 
    transition: transform 0.3s, box-shadow 0.3s; 
    background: white; 
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: transparent; }
.price { color: var(--primary-color); font-weight: bold; display: block; margin-bottom: 15px; font-size: 1.1rem; }

/* =========================================
   5. UTILITY & COMPONENT STYLES
   ========================================= */
/* Quote Box */
.quote-box { border-left: 4px solid var(--primary-color); padding: 20px; font-style: italic; background: #f0f9ff; margin: 25px 0; font-family: var(--font-heading); font-size: 1.1rem; border-radius: 0 var(--border-rad-sm) var(--border-rad-sm) 0;}

/* FAQ Styles */
details { border: 1px solid #e2e8f0; border-radius: var(--border-rad-sm); margin-bottom: 10px; background: white; }
summary { padding: 15px; cursor: pointer; font-weight: 600; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; position: absolute; right: 20px; font-size: 1.5rem; color: var(--primary-color); line-height: 1; }
details[open] summary::after { content: '-'; }
summary:hover { background-color: #f8fafc; color: var(--primary-color); }
.faq-ans { padding: 15px 20px; border-top: 1px solid #e2e8f0; color: var(--text-light); }

/* Glossary */
.glossary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 15px; }
.term-box { padding: 15px; border: 1px solid #e2e8f0; border-radius: var(--border-rad-sm); text-align: center; background: white; transition: 0.2s; }
.term-box:hover { box-shadow: var(--shadow-soft); transform: translateY(-2px); }
.term-box b { color: var(--primary-color); display: block; font-size: 1.2em; margin-bottom: 5px; }