/* ==========================================================================
   1. COLOR CONTROL CENTER (:root)
   Change these colors here to affect the whole site.
   ========================================================================== */
:root {
    /* Navbar Colors */
    --nav-bg: #111111;           /* The black background of the menu bar */
    --nav-text: #ffffff;         /* The white text of links */
    --nav-hover-bg: #25D366;     /* The Green hover effect (WhatsApp Green) */
    --nav-hover-text: #000000;   /* Text color when hovering (Black) */
    
    /* General Colors */
    --body-bg: #ffffff;          /* Main page background */
    --text-color: #222222;       /* Main reading text color */
    --accent-gray: #f4f4f4;      /* Light gray used for backgrounds/boxes */
}

/* ==========================================================================
   2. BASIC RESET & BODY structure
   Sets the canvas for the whole website.
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html, body {
    max-width: 100%;
    overflow-x: hidden; /* Prevents side-scrolling on mobile */
    position: relative;
    background: var(--body-bg);
    color: var(--text-color);
    line-height: 1.6;
}

/* Ensures images never overflow their container */
img {
    max-width: 100%;
    height: auto;
}

/* Styling for the new About Section layout */
#about {
    padding: 60px 40px;
    max-width: 1000px;
    margin: 0 auto;
}

#about h2 {
    color: #003366; /* Corporate Blue */
    font-size: 32px;
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 10px;
}


.about-lead {
    font-size: 20px;
    line-height: 1.6;
    color: #003366;
    margin-bottom: 15px;
}

.about-body {
    font-size: 16px;
    line-height: 1.6;
    color: #4a5568;
    margin-bottom: 40px;
}

/* Minimalist Highlight Grid */
.about-highlights {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid #e2e8f0;
    padding-top: 30px;
}

.highlight-item {
    flex: 1;
    text-align: center;
}

.highlight-label {
    font-size: 14px;
    font-weight: 600;
    color: #003366; /* Corporate Blue */
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive fix for mobile layout */
@media (max-width: 768px) {
    .about-highlights {
        flex-direction: column;
        gap: 30px;
    }
}

/* ==========================================================================
   3. HEADER & LOGO
   The top strip containing your logo.
   ========================================================================== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 40px;
    background: #ffffff;
    border-bottom: 1px solid #eee;
    position: sticky; /* Keeps header at top when scrolling */
    top: 0;
    z-index: 1000;    /* Ensures it stays on top of other content */
}

.logo {
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 22px;
    color: #111;
    text-decoration: none;
}

.logo-img {
    width: 150px; 
    height: 60px;
    object-fit: contain;
    margin-right: 12px;
}

/* ==========================================================================
   4. NAVBAR & LINKS
   The black bar with Home, About, etc. Uses colors from Section 1.
   ========================================================================== */
.navbar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--nav-bg); /* Uses the variable defined at top */
    padding: 10px 20px;
    border-radius: 4px; /* Optional: Slight curve to the black bar */
}

.navbar a {
    color: var(--nav-text);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 6px;
    transition: 0.2s ease;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
}

.navbar a:hover,
.navbar a.active {
    background: var(--nav-hover-bg);
    color: var(--nav-hover-text);
    transform: translateY(-2px);
}

/* To offset scrolling so titles aren't hidden behind the sticky header */
section {
    scroll-margin-top: 120px; 
}

/* ==========================================================================
   5. DROPDOWN MENU
   The popup menu logic.
   ========================================================================== */
.dropdown {
    position: relative;
    display: inline-block;
}

/* The Button that opens the menu */
.dropbtn {
    background: #222;
    color: var(--nav-text);
    font-weight: 600;
    padding: 10px 16px;
    border: 2px solid #444;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dropbtn:hover {
    background: var(--nav-hover-bg);
    color: var(--nav-hover-text);
    border-color: black;
}

/* The Menu Box itself (Hidden by default) */
.dropdown-content {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    background-color: white;
    min-width: 220px;
    border-radius: 8px;
    border: 2px solid black;
    top: 48px;
    
    /* --- THE FIX --- */
    right: 0;        /* Align to the right edge of the Info button */
    left: auto;      /* Ensure it doesn't try to stick to the left */
    /* --------------- */

    box-shadow: 0 5px 12px rgba(0,0,0,0.15);
    z-index: 999;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Links inside the dropdown */
.dropdown-content a {
    color: black !important; /* Force black text on white background */
    padding: 12px;
    text-decoration: none;
    display: block;
    font-weight: 500;
    background: transparent;
}

.dropdown-content a:hover {
    background: #f2f2f2 !important;
    padding-left: 18px; /* Slide effect */
}

/* Show menu on hover */
.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   6. HERO SECTION
   The big main banner area.
   ========================================================================== */
.hero {
    text-align: center;
    padding: 130px 20px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    color: #fff;
}

.hero h1, .hero p {
    font-weight: bold;
    /* Black outline text shadow for readability on images */
    text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000, 0 0 5px #000;
}

.hero h1 { font-size: 48px; margin-bottom: 20px; }
.hero p { font-size: 20px; margin-bottom: 30px; }

/* Call to Action Button */
.cta {
    display: inline-block;
    padding: 12px 22px;
    background: #25D366;
    color: white;
    font-weight: 700;
    text-decoration: none;
    border-radius: 6px;
    border: 2px solid #25D366;
    box-shadow: 0 3px 6px #00000049;
    transition: transform 0.15s ease;
}

.cta:hover { transform: translateY(3px); }

/* ==========================================================================
   7. PRODUCTS SECTION
   The list of items and the category sidebar.
   ========================================================================== */
.product-wrapper {
    display: flex;
    gap: 30px;
    margin-top: 40px;
}

/* Left Sidebar Categories */
.product-categories {
    width: 220px;
    margin-left: 20px;
}

.product-categories ul { list-style: none; padding: 0; }

.product-categories li {
    padding: 12px 15px;
    background: #f4f4f4;
    margin-bottom: 8px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #ddd;
    transition: 0.25s;
}

.product-categories li:hover { background: #e8e8e8; }

.product-categories li.active {
    background: #CED2D7;
    color: #111; /* Dark text on gray background */
    font-weight: bold;
    border: none;
}

/* Right Side Product Grid */
.product-display { flex: 1; }
.product-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}
.hidden { display: none; }

/* Product Card Styling */
.card img {
    width: 100%;
    height: 270px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    margin-bottom: 10px;
    transition: transform 0.3s;
}
.card:hover img { transform: scale(1.05); }

/* ==========================================================================
   8. INFO PAGES & TEXT CONTENT
   Everything for About, Terms, and Product Detail pages.
   ========================================================================== */

.info-page {
    padding: 60px 20px;       /* vertical 60px, horizontal 20px */
    max-width: 1000px;        /* limits text width for readability */
    margin: 0 auto;           /* centers the container */
    display: flex;
    flex-direction: column;   /* stacks text and images vertically */
    gap: 40px;                /* space between sections */
}

.info-page img {
    max-width: 100%;
    height: auto;
    display: block;           /* avoids inline spacing issues */
    margin: 20px auto;        /* centers the image */
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.info-page p {
    margin-bottom: 20px;      /* space between paragraphs */
    line-height: 1.8;         /* improves readability */
    text-align: justify;       /* makes edges aligned */
    color: #333;
    font-size: 16px;           /* readable for paragraphs */
}

.info-page h2 {
    text-align: center;        /* headings centered */
    margin-bottom: 30px;
    font-weight: 700;
    font-size: 28px;
}

.info-page h3 {
    text-align: left;          /* subheadings left aligned */
    margin-top: 20px;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 20px;
}

.content-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
    line-height: 1.7;
}

h1, h2, h3 {
    text-align: center;
    margin-bottom: 20px;
}

.section {
    margin-bottom: 50px;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.section img {
    width: 48%;
    margin: 1%;
    border-radius: 10px;
}

hr {
    margin: 40px 0;
    opacity: 0.4;
}

/* ==========================================================================
   8a. BOXES & IMAGE LAYOUTS (Original Style)
   ========================================================================== */

/* IMAGE BOX FOR INFO PAGES */
.img-box {
    max-width: 1400px;          /* bigger viewing area */
    margin: 50px auto;          /* more breathing room */
    padding: 30px;              /* bigger internal padding */
    background: #fafafa;
    border-radius: 16px;
    border: 1px solid #ddd;
    box-shadow: 0 3px 12px rgba(0,0,0,0.12);
    display: flex;
    justify-content: center;
}

/* Slightly limit image width for nice framing */
.img-box img {
    width: 95%;                 /* not glued to the box edges */
    height: auto;
    border-radius: 16px;
}

/* MULTIPLE IMAGES SIDE BY SIDE */
.img-box.multi {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    padding: 35px;              /* same bigger padding */
}

.img-box.multi img {
    width: calc(50% - 20px);
    border-radius: 16px;
}

/* Interactive Clickable Slots */
.info-page .image-slot {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin: 30px 0;
}

.info-page .image-slot img {
    width: 280px;
    border-radius: 8px;
    border: 2px solid #ddd;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.info-page .image-slot {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin: 30px 0;
}

.info-page .image-slot img {
    width: 280px;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #ddd;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.info-page .image-slot img:hover {
    transform: scale(1.05);
}

/* Image row (two images side-by-side, responsive) */
.image-row {
    display: flex;
    gap: 18px;
    justify-content: center;
    align-items: center;
    margin: 18px 0 26px 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.image-row img {
    width: calc(50% - 9px);
    height: auto;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e6e6e6;
}

.image-box {
    width: 48%;
    text-align: center;
}

.image-box img {
    width: auto;
    max-width: 100%; /* <- reasonable image limit */
    height: auto;
    border-radius: 10px;
    object-fit: cover;
}

.image-box h2 {
    margin-top: 10px;
    font-size: 20px;
    font-weight: 600;
    color: #222;
}

/* ==========================================================================
   9. TABLES (COMPARISONS)
   The technical specification tables.
   ========================================================================== */
/* Wrapper to allow horizontal scrolling on small screens */
.table-wrap {
    width: 100%;
    max-width: 100%;
    margin: 20px auto 40px auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
    border: 1px solid #eee;
}

/* General Table Style */
.comparison-table, .compare-table {
    width: 100%;
    min-width: 650px; /* Forces table to allow scrolling instead of squishing */
    border-collapse: collapse;
    font-size: 15px;
    background: #ffffff;
}

.comparison-table thead th, .compare-table th {
    background: linear-gradient(90deg, #f3f7fb, #eef3f8);
    color: #163458;
    padding: 12px 14px;
    text-align: left;
    border-bottom: 2px solid #e6e9ee;
}

.comparison-table tbody td, .compare-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f1f3f6;
    vertical-align: top;
}

/* Zebra Striping */
.comparison-table tbody tr:nth-child(even) { background: #fbfdff; }
.comparison-table tbody tr:hover { background: #f1f7ff; }

/* ==========================================================================
   10. FOOTER, CONTACT & EXTRAS
   ========================================================================== */
.about, .contact { padding: 60px 40px; text-align: center; }

.whatsapp-btn {
    display: inline-block;
    padding: 14px 26px;
    background: #25D366;
    color: white;
    border: 3px solid #25D366;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}
.whatsapp-btn:hover { transform: scale(1.05); }

.reference-section {
    background: #e5e5e5;
    padding: 20px;       /* Increased padding for better look */
    margin-top: 25px;
    border-radius: 8px;
    font-size: 0.9rem;
    
    /* Alignment Fixes */
    text-align: left !important;  /* Forces text to the left */
    width: 100%;                  /* Makes the gray box fill the space */
    max-width: 100%;              /* Ensures it doesn't get squished */
    display: block;               /* Ensures it behaves like a full-width block */
}

/* Ensure headings and paragraphs inside follow the left alignment */
.reference-section h3, 
.reference-section p {
    text-align: left !important;
    margin-left: 0;
    margin-right: auto;
}
.footer-text { margin-top: 20px; font-size: 0.8rem; text-align: center; color: #555; }

/* Image Viewer Modal (Full screen popup) */
.image-viewer {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}
.gallery-img { max-width: 90%; border: 2px solid #fff; }

/* ==========================================================================
   11. MOBILE RESPONSIVE RULES (@media)
   All adjustments for phones go here.
   ========================================================================== */
@media (max-width: 768px) {

    /* HEADER & NAV: Stack vertically */
    header {
        flex-direction: column;
        padding: 10px;
        position: relative; /* Not sticky on mobile to save screen space */
    }
    
    .logo { margin-bottom: 8px; }
    
    .navbar {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        background: transparent; /* Remove black bar background on mobile */
    }
    
    .navbar a {
        color: #111; /* Dark text for white background */
        font-size: 13px;
        padding: 5px 8px;
    }
    .navbar a:hover {
        background: #25D366;
        color: white;
    }

    /* DROPDOWN FIXES */
    .dropbtn {
        background: #f4f4f4;
        color: #111;
        width: 100%;
        text-align: center;
    }
    .dropdown-content {
        position: absolute; /* Push content down instead of floating over it */
        top: 0;
        width: 100%;
        box-shadow: none;
        border: 1px solid #eee;
    }

    /* PRODUCT LAYOUT: Stack vertically */
    .product-wrapper { 
        flex-direction: column; 
        width: 100%;
        padding: 0;
    }

    /* 1. The Container: Remove all desktop restrictions */
    .product-categories {
        width: 100vw !important; /* Use full viewport width */
        margin-left: -10px !important; /* Pulls it back if your parent has padding */
        margin-right: -10px !important;
        padding: 10px 0;
        background: #fff; /* Ensures bar is visible */
        overflow: hidden; /* Hide anything that spills vertically */
    }

    /* 2. The List: The actual sliding track */
    .product-categories ul {
        display: flex;
        flex-wrap: nowrap;     /* IMPORTANT: Force them into one line */
        overflow-x: auto;      /* Enable horizontal scroll */
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch; /* Smooth momentum scroll for iPhone */
        gap: 12px;
        padding: 0 20px;       /* Padding at start/end of the slide */
        list-style: none;
        scroll-snap-type: x proximity; /* Snaps buttons into place nicely */
    }

    /* 3. The Items: Ensure they stay solid and don't squish */
    .product-categories li {
        flex: 0 0 auto;        /* DONT shrink, DONT grow, just use your text width */
        white-space: nowrap;   /* Keep text on one line */
        font-size: 14px;
        padding: 10px 18px;
        background: #f4f4f4;
        border-radius: 20px;   /* Makes them look like pill buttons */
        border: 1px solid #ddd;
        scroll-snap-align: start;
    }

    /* Hide scrollbar for a clean app-like look */
    .product-categories ul::-webkit-scrollbar {
        display: auto;
    }

    /* HERO TEXT SIZE */
    .hero h1 { font-size: 28px; }
    .hero p { font-size: 16px; }

    /* IMAGE AUTO-ALIGN: Ensures images center themselves */
    img, .img-box img, .image-row img {
        width: auto !important;
        max-width: 100%;
        height: auto;
        display: block;      /* Blocks take up their own line */
        margin: 10px auto;   /* Centers the image */
        float: none;         /* Clears any left/right floating */
    }
    
    /* TABLES: Ensure text shrinks slightly */
    .comparison-table, .compare-table { font-size: 13px; }
}
