/* --- 1. Global Reset & Variables --- */
:root {
    --primary-color: #e00000;
    --primary-hover: #b00000;
    --dark-color: #222;
    --light-color: #ffffff;
    --grey-bg: #f9f9f9;
    --border-color: #eee;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    background-color: var(--grey-bg);
    color: var(--dark-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

img {
    max-width: 100%;
    display: block;
} 

/* --- 2. Navigation Bar --- */
nav {
    background-color: var(--light-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2rem;
}

nav ul a {
    color: #555;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav ul a:hover {
    color: var(--primary-color);
}

.nav-cta {
    background-color: var(--primary-color);
    color: var(--light-color);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.nav-cta:hover {
    background-color: var(--primary-hover);
    color: var(--light-color);
}

.nav-cta-secondary {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}
.nav-cta-secondary:hover {
    background-color: #555;
}

.user-welcome {
    font-weight: 500;
    color: #333;
}

/* Hamburger Button Styles */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 110;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--dark-color);
    margin: 5px 0;
    border-radius: 3px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hamburger "X" animation */
.nav-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    z-index: 110;
}

.logo img {
    height: 40px;
    width: 40px;
    border-radius: 5px;
}

.logo span {
    display: block;
}


/* --- 3. Hero Section --- */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('images/hero.jpg');
    background-size: cover;
    background-position: center;
    color: var(--light-color);
    padding: 6rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-btn {
    background-color: var(--primary-color);
    color: var(--light-color);
    padding: 12px 24px;
    border-radius: 5px;
    font-weight: 700;
    font-size: 1rem;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.cta-btn:hover {
    background-color: var(--primary-hover);
}

/* --- 4. Main Content Layout --- */
.main-layout {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 30px;
    padding-top: 3rem;
    padding-bottom: 3rem;
}

/* 4a. Shop Content */
.shop-content h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.shop-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.search-bar {
    display: flex;
    flex-grow: 1;
    max-width: 450px;
}

.search-bar input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 5px 0 0 5px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    background: var(--light-color);
}

.search-bar input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(224, 0, 0, 0.1);
    z-index: 2;
    position: relative;
}

.search-bar button {
    padding: 0 16px;
    border: 1px solid var(--border-color);
    border-left: none;
    background-color: var(--grey-bg);
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-size: 1.1rem;
    color: #555;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-bar button:hover {
    background-color: #ddd;
}

.filter-dropdown select {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: var(--light-color);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    cursor: pointer;
    min-width: 220px;
    height: 47px;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.product-card {
    background-color: var(--light-color);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-card img {
    height: 220px;
    width: 100%;
    object-fit: cover;
}

.product-card-content {
    padding: 1.5rem;
}

.product-card-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.product-card-content .price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.product-card-content button {
    width: 100%;
    padding: 12px;
    background-color: var(--dark-color);
    color: var(--light-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.product-card-content button:hover {
    background-color: #555;
}

/* 4b. Ads Bar */
.ads-bar {
    background-color: var(--light-color);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.07);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.ads-bar h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.ad-placeholder {
    background-color: var(--grey-bg);
    border: 2px dashed var(--border-color);
    min-height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #aaa;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

.ad-placeholder:last-child {
    margin-bottom: 0;
}

.ad-placeholder p {
    font-weight: 700;
    font-size: 1.2rem;
}

/* --- 5. Footer --- */
footer {
    text-align: center;
    padding: 2rem 0;
    background-color: var(--dark-color);
    color: #aaa;
    margin-top: 2rem;
}

/* --- 7. Product Modal Styles --- */
.modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-backdrop.active {
    display: flex;
}

.modal-content {
    display: flex;
    background-color: var(--light-color);
    border-radius: 10px;
    max-width: 900px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    position: relative;
    max-height: 90vh;
}

.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2.5rem;
    color: #888;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
}

.modal-close-btn:hover {
    color: var(--dark-color);
}

.modal-content img {
    flex: 1;
    min-width: 50%;
    object-fit: cover;
    height: auto;
}

.modal-details {
    flex: 1;
    padding: 2.5rem;
    overflow-y: auto;
}

.modal-details h2 {
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.modal-details .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.modal-details p {
    font-size: 1rem;
    line-height: 1.7;
    color: #555;
    margin-bottom: 2rem;
}

.modal-details .cta-btn {
    font-size: 1.1rem;
    background-color: var(--primary-color);
}

.modal-details .cta-btn:hover {
    background-color: var(--primary-hover);
}

/* --- 8. Disclaimer Modal Styles --- */
#disclaimer-modal .disclaimer-modal-content {
    background-color: var(--light-color);
    padding: 2.5rem;
    border-radius: 10px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
}

#disclaimer-modal h2 {
    font-size: 1.8rem;
    color: var(--primary-color); /* Use your theme's red */
    margin-bottom: 1rem;
}

#disclaimer-modal p {
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 1.5rem;
}

#disclaimer-modal .cta-btn {
    padding: 12px 30px;
    font-size: 1.1rem;
    margin-top: 1rem;
}


/* --- 6. Responsiveness --- */
@media (max-width: 992px) {
    .shop-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .main-layout {
        grid-template-columns: 2fr 1fr;
    }

    nav ul {
        gap: 1rem;
    }

    /* NEW styles for logged in/out buttons */
    .nav-cta-secondary {
        padding: 0.5rem 1rem;
    }
    .user-welcome {
        padding: 0.5rem 0;
        margin-right: -0.5rem; /* Adjust spacing */
    }
}

@media (max-width: 768px) {
    .main-layout {
        grid-template-columns: 1fr;
    }

    .shop-grid {
        grid-template-columns: 1fr;
    }

    .ads-bar {
        position: static;
        margin-top: 2rem;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .shop-controls {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .search-bar {
        max-width: 100%;
    }

    .filter-dropdown select {
        width: 100%;
        min-width: 0;
    }

    /* --- Mobile Nav Styles --- */
    .nav-container {
        flex-direction: row;
    }

    .nav-toggle {
        display: block;
    }

    nav ul {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        padding: 6rem 1rem 2rem;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--light-color);
        transform: translateY(-100%);
        transition: transform 0.3s ease-in-out;
        z-index: 105;
    }

    nav ul.active {
        transform: translateY(0);
    }

    /* UPDATED mobile nav links */
    nav ul li {
        width: 100%;
        text-align: center;
    }
    
    nav ul a {
        font-size: 1.2rem;
        display: block; /* Make links fill the li */
        padding: 0.5rem;
    }

    .nav-cta,
    .nav-cta-secondary {
        padding: 0.75rem 1.5rem;
        font-size: 1.2rem;
        /* Make buttons stack nicely */
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
    
    .nav-cta-secondary {
        background-color: var(--dark-color);
        color: var(--light-color);
    }
    .nav-cta-secondary:hover {
        background-color: #555;
    }

    .user-welcome {
        font-size: 1.2rem;
        font-weight: 600;
        color: var(--primary-color);
    }

    /* Modal responsive styles */
    .modal-content {
        flex-direction: column;
        max-height: 85vh;
        overflow-y: auto;
    }

    .modal-content img {
        width: 100%;
        height: 250px;
        min-width: 100%;
    }

    .modal-details {
        padding: 1.5rem;
    }

    .modal-details h2 {
        font-size: 1.5rem;
    }
    
    /* Disclaimer modal responsive styles */
    #disclaimer-modal .disclaimer-modal-content {
        padding: 2rem;
        max-width: 90%;
    }

    #disclaimer-modal h2 {
        font-size: 1.5rem;
    }

    #disclaimer-modal p {
        font-size: 0.95rem;
    }
}
/* Styles for the Ad Slideshow 
*/

.ad-slideshow-container {
    position: relative;
    width: 100%; /* Or a fixed width like 300px */
    min-height: 250px; /* Default height for block 1 & 2 */
    margin-bottom: 20px; /* Spacing between blocks */
    background-color: #f0f0f0; /* Background color while images load */
    overflow: hidden; /* Important */
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Style for a single, static ad (when there's only 1)
*/
.ad-slide-item-single {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Style for animated ad items (stacked on top of each other)
*/
/* Style for animated ad items (stacked on top of each other)
*/
.ad-slide-item-animated {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    
    /* Start hidden */
    opacity: 0; 
    
    /* Animation settings */
    /* animation-name, duration, and delay are now set INLINE by PHP */
    animation-timing-function: linear; /* Use linear for precise timing */
    animation-iteration-count: infinite;
}

/* The keyframes define the "life" of a single ad
  It lasts 5 seconds: 1s fade-in, 3s hold, 1s fade-out
*/
@keyframes ad-fade-effect {
    0%   { opacity: 0; }
    20%  { opacity: 1; } /* 1s / 5s = 20% (Fade-in complete) */
    80%  { opacity: 1; } /* 4s / 5s = 80% (Hold complete) */
    100% { opacity: 0; } /* 5s / 5s = 100% (Fade-out complete) */
}


/* Fallback placeholder (your original style)
*/
.ad-placeholder {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 2px dashed #ccc;
    background: #f9f9f9;
    min-height: 250px;
    width: 100%; /* Or 300px */
    margin-bottom: 20px;
    color: #999;
    border-radius: 8px;
    box-sizing: border-box; /* Good practice */
}

.ad-placeholder p {
    margin: 0;
    font-weight: bold;
    font-size: 1.2rem;
}
.ad-placeholder span {
    font-size: 0.9rem;
}
/* --- 9. Notification Badge --- */
.notification-badge {
    display: inline-block;
    background-color: #ff3b3b; /* A bright, attention-grabbing red */
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    
    /* Creates the circle shape */
    padding: 4px 7px;
    border-radius: 10px; 
    
    /* Positioning */
    margin-left: 8px; /* Space from the "Dashboard" text */
    vertical-align: super; /* Aligns it nicely with the text */
    
    /* A subtle "pop" animation */
    transform: scale(1);
    transition: transform 0.2s ease;
}

/* Make the badge pulse gently on hover */
a:hover .notification-badge {
    transform: scale(1.15);
}
/* Google Reviews Section Styles */
    .reviews-section {
        margin-top: 60px;
        margin-bottom: 40px;
        border-top: 1px solid #eee;
        padding-top: 40px;
    }

    .reviews-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
        margin-top: 20px;
    }

    .review-card {
        background: white;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 20px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
        display: flex;
        flex-direction: column;
    }

    .review-header {
        display: flex;
        align-items: center;
        margin-bottom: 12px;
    }

    .review-avatar {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        margin-right: 12px;
    }

    .review-author {
        font-weight: 700;
        font-size: 0.95rem;
        margin: 0;
    }

    .review-meta {
        font-size: 0.8rem;
        color: #777;
    }

    .review-stars {
        color: #ffc107; /* Gold color for stars */
        margin-bottom: 10px;
        font-size: 1.1rem;
    }

    .review-text {
        font-size: 0.9rem;
        color: #444;
        line-height: 1.5;
        /* Limit text length visually */
        display: -webkit-box;
        -webkit-line-clamp: 4;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
            @media (max-width: 768px) {
            .shop-grid {
                display: grid;
                /* This forces 2 columns of equal width */
                grid-template-columns: repeat(2, 1fr); 
                /* Smaller gap between items on mobile */
                gap: 10px; 
            }

            /* Adjust image height for consistency */
            .product-card img {
                height: 150px; /* Adjust this value based on your preference */
                object-fit: cover;
                width: 100%;
            }

            /* Make text smaller so it fits in the 2-column layout */
            .product-card h3 {
                font-size: 14px;
                margin: 5px 0;
            }

            .product-card .price {
                font-size: 14px;
            }

            /* Adjust the Buy Now button to fit smaller spaces */
            .product-card-content a {
                padding: 8px 12px !important;
                font-size: 0.8rem !important;
                width: 100% !important; /* Make button fill the width */
                box-sizing: border-box;
            }
        }