:root {
    --primary: #00b207;
    /* Bright Green */
    --primary-dark: #2c742f;
    /* Darker Green */
    --secondary: #ff8a00;
    /* Orange Accent */
    --dark: #1a1a1a;
    --gray: #666666;
    --gray-light: #cccccc;
    --gray-lighter: #f2f2f2;
    --white: #ffffff;
    --bg-soft: #edf2ee;

    --font-main: 'Outfit', sans-serif;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 24px;
    --shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--dark);
    line-height: 1.6;
    background-color: var(--white);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark);
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--white);
}

/* Header */
header {
    background: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    color: var(--gray);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.icon-link {
    position: relative;
    font-size: 1.25rem;
}

.badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background: var(--primary);
    color: var(--white);
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 2rem;
    background-color: #f7f9f8;
    /* Soft Green tint */
    padding: 4rem 1rem 0;
    max-width: 1320px;
    margin: 2rem auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
}

.hero-content {
    padding: 3rem;
}

.hero-title {
    font-size: 3.5rem;
    color: var(--dark);
    margin-bottom: 1.5rem;
}

.hero-title span {
    color: var(--primary);
}

.hero-search {
    background: var(--white);
    padding: 0.5rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow);
    max-width: 450px;
    margin-top: 2rem;
}

.hero-search input {
    border: none;
    outline: none;
    padding: 0 1.5rem;
    flex: 1;
    font-size: 1rem;
}

.hero-search button {
    background: var(--primary);
    color: var(--white);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.hero-image img {
    max-width: 100%;
    height: auto;
}

/* Features */
.features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 4rem auto;
    max-width: 1320px;
    padding: 0 1rem;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    flex: 1;
    min-width: 250px;
}

.feature-icon-box {
    width: 50px;
    height: 50px;
    background: var(--bg-soft);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
}

/* Product Section */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1320px;
    margin: 0 auto 4rem;
    padding: 0 1rem;
}

.product-card {
    background: var(--white);
    border: 1px solid #f0f0f0;
    border-radius: var(--radius-md);
    padding: 1rem;
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.product-img-wrapper {
    position: relative;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9f9f9;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    overflow: hidden;
}

.product-img-wrapper img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card:hover .product-img-wrapper img {
    transform: scale(1.05);
}

.product-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.price {
    font-weight: 700;
    color: var(--dark);
}

.add-btn {
    background: var(--bg-soft);
    color: var(--primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-btn:hover {
    background: var(--primary);
    color: var(--white);
}

/* Reviews */
.reviews-section {
    background: var(--bg-soft);
    padding: 6rem 1rem;
    margin-top: 4rem;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1320px;
    margin: 3rem auto 0;
}

.review-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

/* Footer */
footer {
    background: #1a1a1a;
    /* Dark background for better contrast */
    color: #b3b3b3;
    padding: 4rem 1rem 1rem;
    margin-top: 6rem;
}

.footer-columns {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2rem;
    max-width: 1320px;
    margin: 0 auto 3rem;
}

.credits {
    margin-top: 1.5rem;
}

.footer-col h3 {
    color: var(--white);
    margin-bottom: 1.5rem;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-col p {
    color: #b3b3b3;
    /* Standard footer text color */
    margin-bottom: 0.5rem;
}

.copyright {
    text-align: center;
    border-top: 1px solid #333;
    padding-top: 2rem;
    font-size: 0.9rem;
}

.copyright p {
    margin-bottom: 0.5rem;
    color: #b3b3b3;
}

.copyright a {
    color: #b3b3b3;
    text-decoration: none;
}

.copyright a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-search {
        margin: 2rem auto;
    }

    .hero-title {
        font-size: 2.5rem;
    }
}

/* Utilities needed for existing scripts */
.add-to-cart-btn {
    /* Using new btn styles but keeping class for JS hook if specific class needed, 
       though in the new HTML I'll use onclick matching */
    cursor: pointer;
}

.luxury-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    background-color: var(--primary);
    color: var(--white);
    border-radius: 50px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.admin-btn:hover {
    background-color: var(--primary-dark);
}

/* Responsive Mobile & Tablet Styles */
@media (max-width: 1024px) {
    .header-container {
        padding: 0 1.5rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .hero {
        grid-template-columns: 1fr;
        padding: 3rem 1.5rem 0;
        text-align: center;
    }

    .hero-content {
        padding: 1rem;
    }

    .hero-search {
        margin: 2rem auto;
    }

    .hero-image img {
        max-width: 80%;
    }

    /* Tablet Product Grid - 3 columns for better browsing */
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.2rem;
        padding: 0 1rem;
    }

    .product-card {
        padding: 1rem;
    }

    .product-img-wrapper {
        height: 220px;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: row;
        flex-wrap: nowrap;
        padding: 1rem;
    }

    .logo {
        flex: 1;
    }

    .header-icons {
        gap: 1rem;
        display: flex !important;
        /* Show only wishlist */
    }

    /* Hide cart and login/profile buttons on mobile - they're in bottom nav */
    .header-icons .icon-link:not([href*="wishlist"]) {
        display: none;
    }

    .header-icons .btn {
        display: none;
    }

    /* Hide navigation links completely on mobile */
    .nav-links {
        display: none !important;
    }

    /* Cart Page Mobile View */
    .cart-header {
        display: none !important;
    }

    .cart-item {
        grid-template-columns: 80px 1fr !important;
        grid-template-areas: "img info" "img controls" "img total";
        gap: 0.5rem !important;
        position: relative;
        padding: 1rem 0 !important;
    }

    .cart-item>div:first-child {
        grid-area: img;
    }

    .cart-item>div:nth-child(2) {
        display: none;
    }

    /* Hide Price col */
    .cart-item h4 {
        font-size: 0.95rem !important;
        margin-bottom: 0.2rem !important;
        grid-area: info;
    }

    .cart-item>div:nth-child(3) {
        grid-area: controls;
        justify-self: start;
    }

    .cart-item>div:nth-child(4) {
        grid-area: total;
        justify-self: start;
        font-size: 1.1rem;
        color: var(--primary);
    }

    .cart-item>button:last-child {
        position: absolute;
        top: 1rem;
        right: 0;
    }

    /* Reviews Horizontal Scroll */
    .reviews-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 2rem;
        gap: 1rem;
    }

    .review-card {
        min-width: 280px;
        scroll-snap-align: center;
        flex: 0 0 auto;
    }

    /* Footer - Mobile Stacked */
    footer {
        padding: 3rem 1rem 6rem;
        margin-top: 3rem;
    }

    .footer-columns {
        grid-template-columns: 1fr !important;
        /* Responsive 1 column layout */
        gap: 2rem;
        text-align: center !important;
    }
    
    footer {
        padding: 20px !important;
        overflow-x: hidden !important;
    }
    
    .footer-col {
        max-width: 100% !important;
    }
    
    .social-icons {
        justify-content: center !important;
    }
    
    .copyright {
        margin-top: 20px;
        font-size: 14px;
    }

    .footer-col {
        border-bottom: 1px solid #333;
        padding-bottom: 1.5rem;
    }

    .footer-col:last-child {
        border-bottom: none;
    }

    .footer-col h3 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    /* Product Grid Mobile - Myntra/Flipkart Style */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        padding: 0 0.5rem;
    }

    .product-card {
        padding: 0.6rem;
        border-radius: 8px;
    }

    .product-card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }

    .product-img-wrapper {
        height: 180px;
        border-radius: 6px;
    }

    .product-info h3 {
        font-size: 0.9rem;
        line-height: 1.3;
        margin-bottom: 0.3rem;
    }

    .price {
        font-size: 1rem;
        font-weight: 700;
    }

    .add-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    /* Responsive Layout Helpers */
    .details-grid,
    .checkout-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    .auth-card {
        padding: 2rem 1.5rem !important;
    }

    /* Filters on Shop Page */
    .filters-container {
        flex-direction: column;
        align-items: stretch !important;
        gap: 1rem !important;
    }

    .filters-container form {
        width: 100% !important;
        max-width: none !important;
    }

    /* Checkout Page Mobile Improvements */
    .checkout-grid input[type="text"],
    .checkout-grid input[type="email"],
    .checkout-grid input[type="tel"] {
        font-size: 16px !important;
        /* Prevents zoom on iOS */
        padding: 0.9rem 1rem !important;
    }

    .checkout-grid h3 {
        font-size: 1.3rem !important;
    }

    /* Order Summary Mobile */
    .checkout-grid>div:last-child {
        position: sticky;
        bottom: 75px;
        background: white;
        z-index: 10;
        margin: 0 -1rem;
        padding: 1.5rem 1rem !important;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    }
}

/* Page Layout Classes (Desktop Default) */
.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: start;
}

.filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
    justify-content: space-between;
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 4rem;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 3rem;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 450px;
    /* Default for login */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.auth-wrapper {
    background-image: url('https://images.unsplash.com/photo-1615811361523-864a6381504d?ixlib=rb-4.0.3&auto=format&fit=crop&w=1600&q=80');
    background-size: cover;
    background-position: center;
    padding: 4rem 1rem;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Fixed Bottom Navigation (Myntra/Flipkart Style) */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.08);
    z-index: 1001;
    justify-content: space-around;
    padding: 0.6rem 0;
    padding-bottom: max(0.6rem, env(safe-area-inset-bottom));
    border-top: 1px solid #f0f0f0;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #666;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.4rem 0.5rem;
    flex: 1;
    position: relative;
    transition: all 0.2s ease;
    min-width: 0;
    /* Allow flex items to shrink */
}

.mobile-nav-item i {
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
}

.mobile-nav-item span {
    font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.mobile-nav-item.active {
    color: var(--primary);
}

.mobile-nav-item.active i {
    transform: scale(1.1);
}

/* Badge positioning for mobile nav */
.mobile-nav-item .badge {
    position: absolute;
    top: 0.2rem;
    right: calc(50% - 1rem);
    font-size: 0.65rem;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
}

/* Mobile Visibility */
@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
    }

    /* Ensure content isn't hidden behind bottom nav */
    body {
        padding-bottom: 75px;
    }



    /* Hero Section Mobile Optimization */
    .hero {
        margin: 1rem 0.5rem;
        padding: 2rem 1rem 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    /* Section Headers */
    .section-header h2 {
        font-size: 1.5rem;
    }

    /* Features Mobile */
    .features {
        margin: 2rem auto;
        padding: 0 0.5rem;
    }

    .feature-item {
        min-width: 100%;
        padding: 1rem;
    }

    /* Horizontal Scroll for Home Products - Myntra/Flipkart Style */
    .home-product-grid {
        display: flex !important;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 0.75rem !important;
        padding: 0 1rem 1.5rem !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        /* Firefox */
    }

    .home-product-grid::-webkit-scrollbar {
        display: none;
        /* Chrome, Safari */
    }

    .home-product-grid .product-card {
        flex: 0 0 160px;
        scroll-snap-align: start;
        min-width: 160px;
    }

    .home-product-grid .product-img-wrapper {
        height: 160px;
    }

    /* Horizontal Scroll for Quality Cards on About Page */
    .quality-cards-container {
        display: flex !important;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 1rem !important;
        padding: 0 1rem 1.5rem !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .quality-cards-container::-webkit-scrollbar {
        display: none;
    }

    .quality-cards-container>div {
        flex: 0 0 280px;
        scroll-snap-align: start;
        min-width: 280px;
    }

    /* Prevent horizontal overflow on zoom */
    body,
    html {
        overflow-x: hidden;
        width: 100%;
    }
}
/* Product Actions Mobile Override */
@media (max-width: 768px) {
    .product-actions-container {
        flex-direction: column;
        align-items: stretch !important;
        gap: 1rem !important;
    }

    .product-actions-container > div:first-child {
        justify-content: center;
        margin-right: 0 !important;
        margin-bottom: 0.5rem;
    }

    .product-actions-container > button, 
    .product-actions-container > div > button {
        width: 100%;
        margin-left: 0 !important;
    }
}


/* Shop Page Buy Now Button Styling */
.buy-now-btn {
    flex: 1;
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.buy-now-btn:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 10px rgba(21, 128, 61, 0.2);
}

