/* Global & Theme */
:root {
    --primary-color: #ffc107; /* Rugged, industrial yellow/orange */
    --dark-bg: #1a1a1a;
    --medium-bg: #2c2c2c;
    --light-text: #f4f4f4;
    --dark-text: #333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--dark-bg);
    color: var(--light-text);
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* --- ADDED: Utility class for JS toggle --- */
body.body-no-scroll {
    overflow: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

ul {
    list-style: none;
}

/* --- UPDATED: Switched to explicit top/bottom padding --- */
.page-section {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 700;
}

h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 400;
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: var(--dark-text);
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 700;
    text-transform: uppercase;
    transition: background 0.3s ease;
}

.btn:hover {
    background: #e0a800;
}

/* --- UPDATED: 'Read More' button now visible by default --- */
.btn-mobile-read-more {
    display: inline-block;
    margin-top: 1rem;
}

/* Header & Navigation */
header {
    background: #111;
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 2px solid var(--primary-color);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    color: #fff;
    font-weight: 700;
    z-index: 1001; /* Ensure logo stays on top */
}
.logo strong {
    color: var(--primary-color);
}

header nav ul {
    display: flex;
}

header nav li {
    margin-left: 1.5rem;
}

header nav a {
    color: #fff;
    font-weight: 300;
    transition: color 0.3s ease;
}

header nav a:hover {
    color: var(--primary-color);
}


/* --- MOBILE MENU STYLES --- */
.menu-toggle {
    display: none; /* Hidden on desktop */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 5px;
    transition: all 0.3s ease;
}

/* Burger to "X" animation */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}
/* ---------------------------------- */


/* 1.a Home Hero Slider */
.hero-slider {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    margin-top: 60px; /* Adjust for fixed header height */
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.75s ease-in-out;
    display: flex;
    align-items: flex-end;
    padding: 4rem;
}

/* --- ADDED: Desktop background images --- */
#slide-1 { background-image: url('media/Long_LastPhone.jpg'); }
#slide-2 { background-image: url('media/Shield_ProPhone.jpg'); }
#slide-3 { background-image: url('media/Shield_Tablet.jpg'); }
/* -------------------------------------- */

.slide.active {
    opacity: 1;
}

.slide::after { /* Dark overlay for text readability */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}

.slide-text {
    position: relative;
    z-index: 10;
}

.slide-text h2 {
    font-size: 3.5rem;
    color: #fff;
    text-align: left;
    margin-bottom: 0;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
    /* --- USER PREFERENCE APPLIED --- */
    font-weight: 200;
}

/* 2, 3, & 4. Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--medium-bg);
    border-radius: 8px;
    overflow: hidden; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.5);
}

.product-card img {
    width: 100%;
    /* This is the base height (for #phones) */
    height: 250px; 
    object-fit: cover; 
    background-color: #111; /* Fallback color */
}

/* --- Specific height for tablet --- */
#tablet .product-card img {
    height: 450px;
}

/* --- UPDATED: Use aspect-ratio for 16:9 accessories images --- */
#accessories .product-card img {
    aspect-ratio: 16 / 9;
    height: auto; /* Override the base 250px height */
}
/* ----------------------------------------------------------------- */

.card-content {
    padding: 1.5rem;
}

/* 5. Contact Form */
#contact p {
    text-align: center;
    margin-bottom: 1.5rem;
}

.contact-form {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form label {
    font-weight: 700;
    display: block;
    margin-bottom: 0.5rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #555;
    background: #333;
    color: var(--light-text);
    border-radius: 5px;
    font-family: 'Roboto', sans-serif;
}

.contact-form button {
    align-self: flex-start;
}

/* 6. Address */
#address {
    padding: 0; /* Full-width section */
}
.address-container {
    display: flex;
    flex-wrap: wrap;
}
.address-text {
    flex: 1;
    padding: 4rem;
    background: var(--medium-bg);
    min-width: 300px;
}
.address-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.7;
}
.map {
    flex: 1.5;
    min-width: 300px;
    min-height: 450px;
}
.map iframe {
    filter: invert(90%) grayscale(80%); /* Dark mode for map */
}

/* 7. Footer */
footer {
    background: #111;
    padding-top: 3rem;
    border-top: 2px solid var(--primary-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #fff;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}
.footer-col ul a {
    color: #999;
    font-weight: 300;
    transition: color 0.3s ease;
}
.footer-col ul a:hover {
    color: var(--primary-color);
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
}
.newsletter-form input {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: 5px;
}
.newsletter-form .btn {
    padding: 0.5rem 1rem;
}

.footer-bottom {
    text-align: center;
    padding: 1rem 0;
    border-top: 1px solid #333;
    color: #888;
    font-size: 0.9rem;
}


/* --- RESPONSIVE DESIGN --- */
@media (max-width: 768px) {
    
    /* Show burger menu, hide desktop nav */
    .menu-toggle {
        display: flex;
    }
    .hero-slider{
        height: 70vh;
    }
    
    header nav {
        display: none; /* Hide nav by default */
        position: absolute;
        top: 60px; /* Height of header */
        left: 0;
        width: 100%;
        background: #111;
        border-top: 1px solid var(--primary-color);
    }

    /* This class is toggled by JS */
    header nav.active {
        display: block; 
    }

    header nav ul {
        flex-direction: column;
    }

    header nav li {
        margin: 0;
        text-align: center;
        border-bottom: 1px solid #333;
    }

    header nav a {
        display: block;
        padding: 1rem;
    }

    /* --- Increased side padding for mobile --- */
    .container {
        padding: 0 1.5rem;
    }

    /* --- UPDATED: Switched to explicit top/bottom padding --- */
    .page-section {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    /* Adjust font sizes */
    h2 {
        font-size: 2rem;
    }
    .slide-text h2 {
        font-size: 2.5rem;
    }
    .slide {
        padding: 2rem;
    }

    /* --- ADDED: Mobile background images (replace paths) --- */
    #slide-1 { background-image: url('media/mobile_LongLast.png'); }
    #slide-2 { background-image: url('media/mobile_ProPhone.png'); }
    #slide-3 { background-image: url('media/Shield_Tablet.jpg'); }
    /* ---------------------------------------------------- */

    /* Stack product grids */
    .product-grid {
        grid-template-columns: 1fr;
    }

    /* --- REMOVED: Redundant rule, now handled by the base class --- */
    /*
    .btn-mobile-read-more {
        display: inline-block;
        margin-top: 1rem;
    }
    */

    /* Stack address section */
    .address-container {
        flex-direction: column;
    }
    .address-text {
        padding: 2rem;
    }

    /* Stack footer */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .newsletter-form {
        justify-content: center;
    }
}