﻿:root {
    --primary: #28a745;
    --secondary: #1c1c1e;
    --background: #f2f2f7;
    --white: #ffffff;
    --text: #1c1c1e;
    --accent: #ff9500;
    --gray: #d1d1d6;
}

/* Base Styling */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--background);
    color: var(--text);
    margin: 0;
    padding-top: 70px; /* Space for fixed header */
}

/* Fixed Header */
.header {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: var(--secondary);
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    z-index: 1000;
    flex-wrap: wrap;
}

/* Left-aligned Logo & Hamburger */
.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    width: 130px;
    height: auto;
}

/* Search Bar */
.search-bar {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

.search-input {
    width: 70%;
    padding: 10px;
    font-size: 1em;
    border-radius: 5px 0 0 5px;
    outline: none;
    border: 1px solid var(--gray);
}

.search-button {
    padding: 10px;
    border-radius: 0 5px 5px 0;
    background-color: var(--primary);
    color: var(--white);
    border: none;
    cursor: pointer;
}

/* Header Icons */
.header-icons {
    display: flex;
    align-items: center;
    gap: 25px;
}

    .header-icons a {
        color: var(--white);
        text-decoration: none;
        font-size: 18px;
    }

    .header-icons button {
        background: none;
        border: none;
        color: var(--white);
        font-size: 16px;
        cursor: pointer;
    }

/* Sidebar Navigation - Compact & Responsive */
.mobile-nav {
    position: fixed;
    top: 0;
    left: -75%;
    width: 75%;
    max-width: 220px;
    height: 100%;
    background-color: var(--secondary);
    padding: 15px;
    box-shadow: 3px 0px 12px rgba(0, 0, 0, 0.2);
    transition: left 0.3s ease-in-out;
    z-index: 999;
}

    /* Sidebar Appears When Toggled */
    .mobile-nav.show {
        left: 0;
    }

    /* Sidebar Links */
    .mobile-nav ul {
        list-style: none;
        padding: 0;
    }

    .mobile-nav li {
        padding: 12px 0;
    }

    .mobile-nav a {
        color: var(--white);
        text-decoration: none;
        font-size: 16px;
        display: block;
    }

        .mobile-nav a:hover {
            color: var(--accent);
        }

/* Sidebar Close Button */
.close-sidebar {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 22px;
    color: var(--white);
    cursor: pointer;
}

/* Sidebar Adjustments for Larger Screens */
@media screen and (min-width: 1024px) {
    .mobile-nav {
        width: 50%;
        max-width: 200px;
        left: -50%;
    }
}

/* Carousel Styling */
.carousel img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 10px;
}

/* Smaller Carousel Cards for Mobile */
@media screen and (max-width: 768px) {
    .carousel img {
        height: 220px;
    }
}

/* Featured Products - Clickable & Scrollable */
.featured-products-container {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    scroll-behavior: smooth;
    gap: 15px;
    padding: 15px 0;
}

.product-card {
    background-color: var(--white);
    border: 1px solid var(--gray);
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: block;
    text-decoration: none;
    color: var(--text);
}

    .product-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

.product-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
}

/* Category Section */
.categories-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
}

/* Uniform Spacing & Horizontal Placement on Mobile */
.category-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 140px;
    height: 110px;
    background: #ff9500;
    color: var(--white);
    border-radius: 10px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
}

    .category-btn:hover {
        transform: scale(1.05);
        box-shadow: 0 6px 12px rgba(0,0,0,0.2);
    }

    .category-btn i {
        font-size: 22px;
        margin-bottom: 6px;
    }

/* Mobile Adjustments */
@media screen and (max-width: 768px) {
    .header {
        flex-direction: column;
        padding: 15px;
        text-align: center;
    }

    .search-bar {
        width: 100%;
        margin-top: 10px;
    }

    .header-icons {
        flex-direction: row;
        justify-content: center;
        gap: 10px;
    }

    .categories-container {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        scroll-behavior: smooth;
    }

    .featured-products-container {
        display: flex;
        overflow-x: auto;
        scroll-behavior: smooth;
    }

    .product-card {
        width: 100%;
        margin-bottom: 15px;
    }

    .product-img {
        width: 100%;
        max-height: 250px;
        object-fit: cover;
    }
}

.shop-now-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.shop-now-btn {
    background: var(--accent);
    color: var(--white);
    padding: 12px 20px;
    font-size: 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease-in-out;
}

    .shop-now-btn:hover {
        background: var(--primary);
    }

.ad-brochure {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    background-color: var(--secondary);
    border-radius: 10px;
    padding: 20px;
    margin: 30px auto;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.5);
    text-align: center;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease-in-out;
}

    /* Dark overlay effect */
    .ad-brochure::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5); /* Dark overlay */
        z-index: 1;
        transition: background 0.3s ease-in-out;
    }

    .ad-brochure:hover::before {
        background: rgba(0, 0, 0, 0.2); /* Lightens overlay on hover */
    }

    /* Flash effect when hovered */
    .ad-brochure:hover {
        animation: flashEffect 0.5s ease-in-out;
    }

@keyframes flashEffect {
    0% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.5);
    }

    100% {
        filter: brightness(1);
    }
}

/* Ad Image */
.ad-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    z-index: 0;
}

/* Caption Content */
.ad-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--white);
    width: 90%;
    z-index: 2;
}

    .ad-content h2 {
        font-size: 28px;
        margin-bottom: 10px;
    }

    .ad-content p {
        font-size: 18px;
        margin-bottom: 15px;
    }

/* Mobile Adjustments */
@media screen and (max-width: 768px) {
    .ad-content h2 {
        font-size: 24px;
    }

    .ad-content p {
        font-size: 16px;
    }

    .ad-image {
        max-height: 250px;
    }
}

@media screen and (max-width: 480px) {
    .ad-image {
        max-height: 180px; /* Even smaller screens */
    }
}
