/* components.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #f04e37;
    --dark: #1f2937;
    --light: #f3f4f6;
    --gray: #6b7280;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #F9FAFB;
}

/* --- HEADER CONTAINER --- */
header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100;
    /* RESTORED YOUR ORANGE TINT COLOR */
    background: rgba(254, 215, 170, 0.85);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* --- SPACER (The Gap Logic) --- */
.header-spacer {
    /* MOBILE: Header is 65px. Spacer is 85px. 
       Result = 20px VISIBLE GAP between header and content */
    height: 65px;
    display: block;
}

/* --- HEADER CONTENT --- */
.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 65px;
    /* Mobile Height */
    width: 100%;
    gap: 1rem;
}

/* 1. Main Logo (Hidden on Mobile) */
.logo-wrapper {
    display: none;
}

#logo {
    height: 2.5rem;
    width: auto;
}

/* 2. Desktop Search (Hidden on Mobile) */
.desktop-search-wrapper {
    display: none;
}

/* 3. Mobile Search (Visible on Mobile) */
.mobile-search-wrapper {
    display: block;
    flex-grow: 1;
    position: relative;
}

.search-input {
    width: 100%;
    background: #f3f4f6;
    /* Light gray background */
    border: none;
    padding: 0.6rem 3rem 0.6rem 1.25rem;
    border-radius: 99px;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s;
    /* Ensure text is readable against input background */
    color: #374151;
}

.search-input:focus {
    background: white;
    box-shadow: 0 0 0 2px rgba(240, 78, 55, 0.2);
}

.search-icon-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    color: var(--primary);
    height: 32px;
    width: 32px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* 4. Desktop Icons (Hidden on Mobile) */
.header-actions {
    display: none;
}

.icon-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #4b5563;
    /* Darker gray for contrast on orange */
    position: relative;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    color: var(--primary);
}

.icon-btn i {
    font-size: 1.25rem;
}

.badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--primary);
    color: white;
    font-size: 0.6rem;
    font-weight: bold;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.scale-0 {
    transform: scale(0);
}

.user-avatar {
    height: 32px;
    width: 32px;
    background: rgba(255, 255, 255, 0.5);
    /* Semi-transparent white */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 5. Hamburger Button (Mobile) */
.hamburger-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
}

.hamburger-line {
    width: 22px;
    height: 2px;
    background-color: #1f2937;
    /* Dark color for visibility */
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-btn.active .line-1 {
    transform: rotate(45deg) translate(4px, 4px);
}

.hamburger-btn.active .line-2 {
    opacity: 0;
}

.hamburger-btn.active .line-3 {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* 6. Sidebar (Drawer) */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 75%;
    max-width: 300px;
    height: 100vh;
    background: white;
    z-index: 200;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    padding: 0;
    transition: left 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.mobile-menu.active {
    left: 0;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
}

.sidebar-logo {
    height: 2rem;
    width: auto;
}

.sidebar-body {
    padding: 1rem 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-nav-link {
    font-size: 1rem;
    font-weight: 500;
    color: var(--dark);
    text-decoration: none;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--light);
    display: flex;
    align-items: center;
}

.mobile-nav-link i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    color: var(--gray);
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* --- DESKTOP MEDIA QUERY (min-width: 768px) --- */
@media (min-width: 768px) {

    /* DESKTOP: Header is 80px. Spacer is 80px.
       Result = 0px GAP (flush content) */
    .header-spacer {
        height: 80px;
    }

    .header-content {
        height: 80px;
    }

    .logo-wrapper {
        display: block;
        flex-shrink: 0;
    }

    .desktop-search-wrapper {
        display: block;
        flex: 1;
        max-width: 600px;
        position: relative;
        margin: 0 2rem;
    }

    .header-actions {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .mobile-search-wrapper {
        display: none;
    }

    .hamburger-btn {
        display: none;
    }
}

/* Footer */
footer {
    background: #111827;
    color: white;
    padding: 5rem 0 2.5rem;
    border-top: 1px solid #1f2937;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-brand img {
    height: 6em;
    width: auto;
    margin-bottom: 1.5rem;

}

.footer-brand p {
    color: #9ca3af;
    font-size: 0.875rem;
    line-height: 1.75;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: #1f2937;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    text-decoration: none;
    transition: all 0.3s;
}

.social-links a:hover {
    background: #f04e37;
    color: white;
    transform: scale(1.25);
}

.footer-column h6 {
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-column ul li a {
    color: #9ca3af;
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column ul li a:hover {
    color: #f04e37;
    text-decoration: underline;
}

.newsletter-form {
    position: relative;
}

.newsletter-form input {
    width: 100%;
    background: #1f2937;
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: white;
    outline: none;
}

.newsletter-form input::placeholder {
    color: #6b7280;
}

.newsletter-form input:focus {
    box-shadow: 0 0 0 2px #f04e37;
}

.newsletter-form button {
    position: absolute;
    right: 0.5rem;
    top: 0.5rem;
    background: #f04e37;
    color: white;
    padding: 0.375rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

.newsletter-form button:hover {
    background: #d63d26;
}

.footer-bottom {
    border-top: 1px solid #1f2937;
    padding-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-bottom p {
    font-size: 0.75rem;
    color: #6b7280;
}

.payment-icons {
    display: flex;
    gap: 1rem;
    font-size: 2rem;
    color: #4b5563;
}

.payment-icons i:hover {
    color: white;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    overflow-y: auto;
    display: none;
}

.modal-overlay.active {
    display: block;
}

.modal-bg {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.7);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    transition: opacity 0.3s;
}

.modal-container {
    display: flex;
    min-height: 100%;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;
    position: relative;
    /* Ensure it sits above bg */
    z-index: 101;
}

.modal-content {
    position: relative;
    transform: scale(1);
    overflow: hidden;
    border-radius: 1rem;
    background: white;
    text-align: left;
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s;
    width: 100%;
    max-width: 32rem;
    animation: fadeInUp 0.8s ease-out;
}

.modal-header {
    background: #f04e37;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.modal-header p {
    color: #fee2e2;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.modal-header button {
    color: rgba(255, 255, 255, 0.7);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-header button:hover {
    color: white;
}

.modal-body {
    padding: 2rem 1.5rem;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.5rem;
}

.select-wrapper {
    position: relative;
}

.select-wrapper select {
    display: block;
    width: 100%;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    padding: 0.75rem 1rem;
    color: #374151;
    outline: none;
    transition: all 0.3s;
}

.select-wrapper select:focus {
    border-color: #f04e37;
    background: white;
}

.select-wrapper i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    pointer-events: none;
    font-size: 0.75rem;
}

.submit-btn {
    width: 100%;
    background: #f04e37;
    color: white;
    font-weight: 700;
    padding: 0.875rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(240, 78, 55, 0.3);
    transition: all 0.3s;
}

.submit-btn:hover {
    box-shadow: 0 10px 25px rgba(240, 78, 55, 0.5);
    background: #d63d26;
}

.submit-btn:active {
    transform: scale(0.95);
}

.hidden {
    display: none !important;
}



/* Horizontal Scroll Grid (Mobile & Desktop) */
.category-grid {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.category-grid::-webkit-scrollbar {
    display: none;
}

.category-card {
    position: relative;
    background: #ffedd5;
    /* Compact padding for mobile */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid #fdba74;
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    /* Push text to bottom */
    cursor: pointer;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s, background-color 0.3s;
    flex: 0 0 auto;
    /* Don't shrink */
    width: 76px;
    height: 76px;
    /* Square proportions */
    /* Small width for mobile */
    overflow: hidden;
    /* Ensure image fits inside border */
}

.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 50%);
    /* Gradient to read white text */
    z-index: 1;
}

.category-card:hover {
    border-color: #f04e37;
    box-shadow: 0 4px 10px rgba(240, 78, 55, 0.1);
    transform: translateY(-2px);
}

.category-icon {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4b5563;
    transition: color 0.3s;
    z-index: 0;
}

.category-card:hover .category-icon {
    color: #f04e37;
}

.category-name {
    position: relative;
    z-index: 2;
    font-size: 0.55rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: white;
    /* White text looks better over images */
    transition: color 0.3s;
    text-align: center;
    line-height: 1.1;
    padding-bottom: 0.35rem;
    /* Give breathing room from bottom */
    text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.8);
    /* Readability */
}

.category-card:hover .category-name {
    color: #ffedd5;
}


/* Responsive */
@media (min-width: 768px) {
    .container {
        padding: 0 2rem;
    }

    .logo-wrapper {
        width: 16.666667%;
    }

    .search-wrapper {
        display: flex;
    }

    .mobile-search {
        display: none;
    }

    .header-actions {
        width: 16.666667%;
    }

    .hero-content {
        flex-direction: row;
        align-items: center;
    }

    .hero-text {
        width: 50%;
        text-align: left;
    }

    .hero-description {
        margin-left: 0;
        margin-right: 0;
    }

    .hero-cta {
        flex-direction: row;
    }

    .hero-features {
        justify-content: flex-start;
    }

    .hero-image {
        width: 50%;
    }



    .category-card {
        width: 100px;
        height: 100px;
        /* Larger on desktop */
    }

    .category-icon {
        width: 100%;
        height: 100%;
    }

    .category-name {
        font-size: 0.65rem;
    }

    .featured-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .brand-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }

    .deals-header {
        flex-direction: row;
        align-items: flex-end;
    }
}


@media (min-width: 1024px) {
    .hero-section {
        padding: 5rem 0;
    }

    .hero-title {
        font-size: 4rem;
    }



    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .brand-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .deals-header h2 {
        font-size: 3rem;
    }
}



.button {
    /* 1. Core Styles */
    background-color: var(--primary);
    color: white;
    /* Changed to white for better contrast with the blue background */
    border: none;
    padding: 0.75rem 1.5rem;
    /* Increased padding for a more generous, modern look */
    border-radius: 0.5rem;
    font-size: 1.1rem;
    /* Slightly larger font */
    font-weight: 600;
    /* Bolder text */
    cursor: pointer;
    text-align: center;
    display: inline-block;
    /* Essential for padding/margin */

    /* 2. Transitions for Smooth Effects */
    transition: background-color 0.3s ease,
        transform 0.15s ease,
        box-shadow 0.3s ease;

    /* 3. Initial Shadow */
    box-shadow: 0 4px 6px var(--shadow-color),
        0 1px 3px var(--shadow-color);
}

/* --- Hover State: The button reacts when the mouse is over it --- */
.button:hover {
    background-color: var(--primary-dark);
    /* Darken the background */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25),
        0 3px 6px rgba(0, 0, 0, 0.18);
    /* A stronger, more pronounced shadow */
    transform: translateY(-2px);
    /* Lift the button slightly */
}

/* --- Active State: The button is pressed down --- */
.button:active {
    background-color: var(--primary-dark);
    transform: translateY(0);
    /* Press the button back down */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    /* A subtle, inset shadow look */
}


/* --- Styling the internal link (if used as a button) --- */
.button a {
    color: var(--text-light);
    /* Consistent white text */
    text-decoration: none;
    /* This next part is **crucial** for making the whole button clickable
       if you are wrapping a link `a` inside the button. */
    display: block;
    padding: inherit;
    margin: -0.75rem -1.5rem;
    /* Negate the parent padding to fill the area */
}

/* Applying the original text color to the link as an alternative style */
.button-link-style a {
    color: var(--secondary-text);
}