@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #22c55e;
    /* Vibrant Green (Tailwind-like) */
    --secondary: #86efac;
    /* Light Green */
    --accent: #15803d;
    /* Darker Green */
    --dark: #14532d;
    /* Deep Forest Green */
    --light: #f8fafc;
    /* Very Pale Blue/White */
    --white: #ffffff;
    --gray: #64748b;
    --glass: rgba(255, 255, 255, 0.9);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --radius: 12px;
}

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

html,
body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
    background-color: #f0fdf4;
    background-image:
        radial-gradient(at 0% 0%, hsla(158, 82%, 90%, 1) 0, transparent 50%),
        radial-gradient(at 50% 0%, hsla(142, 70%, 93%, 1) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(120, 90%, 95%, 1) 0, transparent 50%);
    background-size: 200% 200%;
    animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Subtle texture overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2314532d' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    z-index: -1;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* Utils */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(67, 160, 71, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(67, 160, 71, 0.4);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--dark), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Announcement Bar */
.announcement-bar {
    background: var(--dark);
    color: var(--white);
    text-align: center;
    padding: 8px 0;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Header */
header {
    background: var(--glass);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    padding: 20px 0;
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--primary);
    bottom: -5px;
    left: 0;
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

.header-search {
    flex: 1;
    max-width: 400px;
    margin: 0 30px;
    position: relative;
}

.header-search input {
    width: 100%;
    padding: 10px 20px;
    padding-right: 45px;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
    background: #f1f5f9;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.header-search input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.header-search button {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
}

.header-icons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.icon-btn {
    font-size: 1.2rem;
    position: relative;
}

.badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}

/* Hero Slider */
.slider-container {
    width: 90%;
    max-width: 1400px;
    margin: 20px auto;
    overflow: hidden;
    position: relative;
    height: 600px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.slides {
    display: flex;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}

.slide {
    min-width: 100%;
    height: 100%;
    position: relative;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    width: 90%;
    max-width: 1200px;
    z-index: 30;
    text-align: center;
}

.slide-content h2 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 25px;
    text-shadow: 0 4px 25px rgba(0, 0, 0, 0.9);
    color: #ffffff !important;
    display: block !important;
    visibility: visible !important;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    /* Darken the whole slide slightly */
    z-index: 10;
}

.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 3;
}

.dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background: var(--white);
    transform: scale(1.2);
}

.hero {
    padding-top: 100px;
    padding-bottom: 60px;
}

.hero-text {
    flex: 1;
    padding-right: 50px;
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1;
    margin-bottom: 25px;
    font-weight: 800;
    letter-spacing: -2px;
}

.hero p {
    font-size: 1.25rem;
    color: var(--gray);
    margin-bottom: 35px;
    max-width: 500px;
}

.hero-image {
    flex: 1;
    position: relative;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.1));
}

/* Feature Cards */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.feature-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: var(--radius);
    transition: all 0.3s;
    border: 1px solid #f1f5f9;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--secondary);
}

.feature-card i {
    font-size: 2.5rem;
    margin-bottom: 25px;
    display: inline-block;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--gray);
    font-size: 0.95rem;
}

/* Product Cards (Premium Redesign) */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--white);
    border-radius: 20px;
    padding: 15px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    border-color: var(--secondary);
}

.product-image-container {
    background-color: #f8fafc;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image-container img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.badge-best-seller {
    background: #fef3c7;
    color: #92400e;
}

.product-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8rem;
    line-height: 1.4;
}

.product-title a:hover {
    color: var(--primary);
}

.product-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    margin: 10px 0 20px;
    display: block;
}

.add-to-cart {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--dark), var(--accent));
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s;
    margin-top: auto;
    box-shadow: 0 4px 10px rgba(20, 83, 45, 0.2);
}

.add-to-cart:hover {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    transform: scale(1.02);
    box-shadow: 0 6px 15px rgba(34, 197, 94, 0.3);
}

.add-to-cart i {
    margin-right: 8px;
}

/* Footer */
footer {
    background: var(--white);
    padding: 60px 0 20px;
    margin-top: 80px;
    border-top: 1px solid #eee;
}

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

.footer-col h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-col ul li {
    margin-bottom: 12px;
    color: var(--gray);
    font-size: 0.95rem;
}

.footer-col ul li a:hover {
    color: var(--primary);
}

.newsletter-form {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.newsletter-form input {
    flex: 1;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 0.9rem;
}

.newsletter-form button {
    padding: 10px 20px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 35px;
    height: 35px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--gray);
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--primary);
    color: white;
}

.payment-methods {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
    font-size: 1.5rem;
    color: var(--gray);
}

.copyright {
    text-align: center;
    color: #999;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Responsive */
.mobile-toggle,
.mobile-nav {
    display: none;
}

/* Responsive Utils */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}

.responsive-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .container {
        padding: 0 15px;
    }

    .responsive-grid {
        grid-template-columns: 1fr !important;
    }

    .section {
        padding: 60px 0 !important;
    }

    .section-title {
        font-size: 2rem !important;
        margin-bottom: 2rem !important;
    }

    /* Flex Stacking Utils */
    .mobile-stack,
    .hero .container>div,
    .footer-content,
    .checkout-container,
    .cart-summary-bar {
        flex-direction: column !important;
        text-align: center !important;
        gap: 30px !important;
    }

    .mobile-stack>*,
    .cart-summary-bar>* {
        width: 100% !important;
    }

    /* Header Mobile Adjustments */
    .header-search {
        display: none !important;
    }

    header .container {
        gap: 15px;
    }

    /* Handling min-width breaks */
    [style*="min-width"] {
        min-width: 0 !important;
        flex: 1 1 100% !important;
    }

    .hero {
        text-align: center;
        padding-top: 120px !important;
    }

    .hero-text h1 {
        font-size: 2.2rem !important;
    }

    .hero img {
        max-width: 250px !important;
        margin-top: 30px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
        gap: 15px !important;
    }

    .product-card {
        padding: 10px !important;
    }

    .product-title {
        font-size: 0.9rem !important;
        height: 2.5rem !important;
    }

    .product-price {
        font-size: 1.1rem !important;
        margin: 5px 0 10px !important;
    }

    .add-to-cart {
        font-size: 0.8rem !important;
        padding: 10px !important;
    }

    .mobile-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 1.5rem;
        cursor: pointer;
    }

    .nav-links {
        display: none !important;
    }

    /* Mobile Nav Overlay */
    .mobile-nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1999;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .mobile-nav-overlay.active {
        display: block;
        opacity: 1;
    }

    /* Mobile Nav Drawer */
    .mobile-nav {
        display: block;
        position: fixed;
        top: 0;
        right: 0;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
        z-index: 2000;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.2);
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 0;
        overflow-y: auto;
    }

    .mobile-nav.active {
        transform: translateX(0);
    }

    .mobile-nav-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 25px 20px;
        background: var(--primary);
        color: white;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .mobile-nav-header .logo {
        color: white;
        font-size: 1.5rem;
        font-weight: 800;
    }

    #mobile-close {
        background: rgba(255, 255, 255, 0.2);
        border: none;
        width: 36px;
        height: 36px;


        border-radius: 50%;
        font-size: 1.2rem;
        color: white;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s;
    }

    #mobile-close:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: rotate(90deg);
    }

    .mobile-links {
        list-style: none;
        padding: 20px 0;
        margin: 0;
    }

    .mobile-links li {
        margin: 0;
        border-bottom: 1px solid #f1f5f9;
    }

    .mobile-links a {
        display: block;
        padding: 18px 25px;
        font-size: 1.05rem;
        font-weight: 600;
        color: var(--dark);
        transition: all 0.3s;
        position: relative;
    }

    .mobile-links a::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        height: 100%;
        width: 4px;
        background: var(--primary);
        transform: scaleY(0);
        transition: transform 0.3s;
    }

    .mobile-links a:hover {
        background: #f8fafc;
        padding-left: 30px;
        color: var(--primary);
    }

    .mobile-links a:hover::before {
        transform: scaleY(1);
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 1.8rem !important;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* User Dropdown */
.user-dropdown {
    position: relative !important;
    display: inline-block;
}

.dropdown-trigger {
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.dropdown-content {
    position: absolute;
    right: 0;
    top: 100%;
    width: 260px;
    background: #ffffff !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15) !important;
    border-radius: 12px;
    padding: 0;
    display: none;
    z-index: 9999 !important;
    border: 1px solid #f1f5f9;
    overflow: hidden;
}

/* Hover Bridge: Fills the gap between trigger and menu */
.dropdown-content::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 25px;
    background: transparent;
    z-index: -1;
}

.user-dropdown:hover .dropdown-content {
    display: block !important;
}

.dropdown-header {
    padding: 20px;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
}

.dropdown-header strong {
    display: block;
    font-size: 0.95rem;
    color: #1e293b;
    margin-bottom: 4px;
}

.dropdown-header span {
    display: block;
    font-size: 0.8rem;
    color: #64748b;
    word-break: break-all;
}

.dropdown-links {
    list-style: none !important;
    padding: 8px 0 !important;
    margin: 0 !important;
}

.dropdown-links li {
    padding: 0 !important;
    margin: 0 !important;
}

.dropdown-links li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    font-size: 0.9rem;
    color: #475569;
    transition: all 0.2s;
    font-weight: 500;
}

.dropdown-links li a:hover {
    background: #f1f5f9;
    color: var(--primary);
    padding-left: 25px;
}

.dropdown-links li a i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    color: #94a3b8;
}

.logout-item {
    border-top: 1px solid #f1f5f9;
    margin-top: 5px !important;
}

.logout-item a {
    color: #ef4444 !important;
}

.logout-item a:hover {
    background: #fef2f2 !important;
    color: #dc2626 !important;
}

/* Order Status Badges */
.badge-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-paid,
.status-completed {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-pending {
    background: #fff3e0;
    color: #ef6c00;
}

.status-processing {
    background: #e3f2fd;
    color: #1976d2;
}

.status-dispatched {
    background: #f3e5f5;
    color: #7b1fa2;
}

.status-out_for_delivery {
    background: #fff8e1;
    color: #ffa000;
}

.status-cancelled {
    background: #ffebee;
    color: #c62828;
}

/* Mobile App Redesign Styles */

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    padding: 10px 0 25px;
    /* Extra padding for iOS home indicator */
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid #f1f5f9;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--gray);
    font-size: 0.7rem;
    gap: 5px;
    flex: 1;
}

.nav-item i {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.nav-item.active {
    color: var(--primary);
    font-weight: 600;
}

.nav-item .icon-container {
    position: relative;
}

.nav-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background: #ef4444;
    color: white;
    width: 16px;
    height: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.6rem;
    border-radius: 50%;
    font-weight: 700;
}

/* Mobile Search Overlay */
.mobile-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 2000;
    display: none;
    padding: 20px;
}

.mobile-search-overlay.active {
    display: block;
}

.search-input-group {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    padding: 15px;
    border-radius: 12px;
    gap: 10px;
}

.search-input-group input {
    border: none;
    background: transparent;
    font-size: 1.1rem;
    flex: 1;
    outline: none;
}

/* App Header Specifics */
.mobile-header-top {
    display: none;
    /* Desktop default */
}

/* Product Card App Style */
.product-card-app {
    border: none;
    box-shadow: none;
    padding: 0;
    text-align: left;
    background: transparent;
}

.product-card-app .product-image-container {
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 10px;
    position: relative;
}

.product-card-app .product-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0;
    height: auto;
    -webkit-line-clamp: 1;
}

.product-card-app .product-price {
    font-size: 1rem;
    color: var(--dark);
    font-weight: 700;
    margin: 2px 0 10px;
}

.btn-quick-add {
    background: black;
    color: white;
    width: 100%;
    padding: 10px 0;
    border-radius: 0;
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    display: block;
}

/* Filter Toolbar */
.filter-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin-bottom: 20px;
    background: white;
    position: sticky;
    top: 60px;
    /* Below header */
    z-index: 90;
}

.filter-btn {
    border: 1px solid #e2e8f0;
    background: white;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.view-toggles {
    display: flex;
    gap: 10px;
}

.view-toggle-btn {
    color: var(--gray);
    font-size: 1.2rem;
    cursor: pointer;
}

.view-toggle-btn.active {
    color: black;
}

/* Free Shipping Bar */
.shipping-bar {
    background: black;
    color: white;
    text-align: center;
    font-size: 0.75rem;
    padding: 8px 30px;
    /* Space for close button */
    position: relative;
    display: none;
    /* Only mobile */
}

.shipping-bar .close-bar {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
    }

    footer {
        margin-bottom: 70px;
        /* Space for bottom nav */
    }

    .shipping-bar {
        display: block;
    }

    /* Redesign Header for Mobile */
    header .container {
        padding: 0 15px;
    }

    /* Hide desktop nav elements on mobile if not already handled */

    .mobile-logo-center {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* Shopping Cart Drawer */
/* Generic Drawer Styles */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}

.app-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 450px;
    height: 100vh;
    background: #ffffff;
    z-index: 2001;
    /* Above header */
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
}

.app-drawer.open {
    transform: translateX(0);
}

.app-drawer.left-drawer {
    left: 0;
    right: auto;
    transform: translateX(-100%);
}

.app-drawer.left-drawer.open {
    transform: translateX(0);
}

/* Shopping Cart Drawer Specifics - Mapping to Generic */
.cart-drawer-overlay {
    /* Legacy mapping if we want to keep specific class, or we replace usage */
    position: fixed;
}

/* We can replace usage in HTML or duplicate styles. Let's duplicate essential logic to avoid breaking validation */
.cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.cart-drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}

.cart-drawer {
    /* Keeping original styles but could use .app-drawer logic */
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 450px;
    height: 100vh;
    background: #ffffff;
    z-index: 2001;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
}

.cart-drawer.open {
    transform: translateX(0);
}


.cart-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #f1f5f9;
}

.cart-drawer-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--dark);
}

.close-drawer {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
    transition: color 0.3s;
}

.close-drawer:hover {
    color: var(--dark);
}

.cart-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
    /* Center content vertically for empty state */
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Center content for empty state */
}

/* Empty State Styling */
.empty-cart-state {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.empty-cart-state h3 {
    font-size: 1.8rem;
    font-weight: 400;
    /* Lighter weight as per screenshot style often seen */
    margin-bottom: 20px;
    color: var(--dark);
}

.empty-cart-state p {
    color: var(--gray);
    margin-bottom: 30px;
    line-height: 1.6;
    font-size: 0.95rem;
    max-width: 300px;
    margin: 0 auto 30px;
}

.btn-return-shop {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #000000;
    color: #ffffff;
    padding: 12px 30px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    transition: background 0.3s;
    border-radius: 4px;
    /* Slight radius or 0 for sharp corners */
}

.btn-return-shop:hover {
    background: #333333;
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-return-shop i {
    font-size: 0.8rem;
    color: #ffffff;
}

/* WhatsApp Float specific to Drawer if needed, or global style reused */
.whatsapp-float {
    position: absolute;
    bottom: 25px;
    right: 25px;
    background: #25D366;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}


/* Populated Cart Styles */
.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cart-drawer-item {
    display: flex;
    gap: 15px;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #f9f9f9;
    position: relative;
}

.item-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f1f5f9;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-details {
    flex: 1;
}

.item-details h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 5px;
    color: var(--dark);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* Limit to 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 5px;
}

.item-qty {
    font-size: 0.85rem;
    color: var(--gray);
}

.remove-item {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    padding: 5px;
    font-size: 0.9rem;
    position: absolute;
    right: 0;
    top: 0;
    transition: transform 0.2s;
}

.remove-item:hover {
    transform: scale(1.1);
}

/* Footer Styles */
.cart-drawer-footer {
    padding: 25px;
    border-top: 1px solid #f1f5f9;
    background: #fff;
}

.subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--dark);
}

.subtotal strong {
    font-weight: 800;
}

.shipping-note {
    font-size: 0.8rem;
    color: var(--gray);
    margin-bottom: 20px;
    text-align: center;
}

.btn-checkout,
.btn-view-cart {
    display: block;
    width: 100%;
    text-align: center;
    padding: 15px;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: opacity 0.3s;
}

.btn-checkout {
    background: var(--dark);
    color: #ffffff;
}

.btn-checkout:hover {
    opacity: 0.9;
    color: #ffffff;
}

.btn-view-cart {
    background: #f1f5f9;
    color: var(--dark);
}

.btn-view-cart:hover {
    background: #e2e8f0;
    color: var(--dark);
}

@media(max-width: 480px) {
    .cart-drawer {
        max-width: 100%;
    }
}

/* Wishlist Button Global Styles */
.btn-wishlist {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-wishlist:hover {
    transform: scale(1.1);
    background: white;
}

.btn-wishlist i {
    color: #cbd5e1;
    /* Gray */
    font-size: 1rem;
    transition: color 0.2s;
}

.btn-wishlist.active i {
    color: #ef4444;
    /* Red */
}

/* Quantity Controls */
.qty-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 4px;
    gap: 8px;
    width: auto;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: none;
    background: white;
    color: var(--dark);
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.qty-btn.plus {
    background: var(--dark);
    color: white;
}

.qty-val {
    font-weight: 700;
    font-size: 0.9rem;
    min-width: 20px;
    text-align: center;
}

/* Cart Page Specifics */
.cart-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 20px;
}

.cart-actions .btn {
    min-width: 200px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.coupon-group {
    display: flex;
    gap: 10px;
}

@media(max-width: 600px) {
    .coupon-group {
        flex-direction: column;
    }

    .cart-actions {
        flex-direction: column;
    }

    .cart-actions .btn {
        width: 100%;
    }
}

.qty-btn {
    display: flex !important;
}

/* Quick View Styles */
.btn-quick-view {
    position: absolute;
    top: 50px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateX(10px);
}

.product-image-container:hover .btn-quick-view {
    opacity: 1;
    transform: translateX(0);
}

.btn-quick-view:hover {
    background: var(--primary);
    color: white;
}

/* Mobile Quick View */
@media(max-width: 768px) {
    .btn-quick-view {
        opacity: 1;
        transform: none;
        top: auto;
        bottom: 10px;
        right: 10px;
        background: white;
        border: 1px solid #eee;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    position: relative;
    display: flex;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
    max-height: 90vh;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    color: #64748b;
}

.modal-body {
    display: flex;
    width: 100%;
}

.modal-image {
    flex: 1;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-height: 60vh;
}

.modal-details {
    flex: 1.2;
    padding: 30px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: relative;
}

.modal-details .badge-best-seller {
    display: inline-block !important;
    /* Force inline-block */
    width: fit-content;
    background: #fef3c7;
    color: #b45309;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.selling-fast {
    font-size: 0.9rem;
    color: #b45309;
    background: #fffbeb;
    padding: 8px 12px;
    border-radius: 6px;
    margin: 10px 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
}

.current-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ef4444;
}

.old-price {
    text-decoration: line-through;
    color: #94a3b8;
    margin-left: 10px;
}

.discount-badge {
    background: #166534;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-left: 10px;
}

.qv-actions {
    margin-top: 20px;
    margin-bottom: 20px;
}

.qv-footer-actions {
    margin-top: auto;
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.view-full-details {
    color: var(--dark);
    text-decoration: underline;
    font-weight: 600;
    font-size: 0.9rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media(max-width: 768px) {
    .modal-body {
        flex-direction: column;
    }

    .modal-image {
        height: 250px;
    }

    .modal-content {
        height: auto;
        max-height: 90vh;
        overflow-y: auto;
        display: block;
    }
}