/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #5A3A22; /* Deep Rich Brown */
    --secondary: #7A8B66; /* Muted Earthy Green */
    --accent: #C36E4D; /* Warm Terracotta */
    --highlight: #D4AF37; /* Antique Gold */
    --background: #F9F6F0; /* Warm Off-White/Cream */
    --card-bg: #FFFFFF; /* Pure White */
    --text-color: #3E2723; /* Very Dark Brown */
    --shadow: 0 4px 12px rgba(62, 39, 35, 0.1);
    --border-radius: 6px;
    --transition: all 0.3s ease;
    --max-width: 1200px;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Poppins', sans-serif;
}

[data-theme="dark"] {
    --primary: #D4A373;
    --secondary: #9CAE86;
    --accent: #E28A69;
    --highlight: #F3E5AB;
    --background: #2D1E12;
    --card-bg: #3E2A1D;
    --text-color: #EFEBE2;
}

body {
    font-family: var(--font-body);
    background: var(--background);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    animation: fadeIn 0.5s ease;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

a {
    text-decoration: none;
    color: var(--accent);
    transition: var(--transition);
}

a:hover {
    color: var(--highlight);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.6rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--highlight);
    color: var(--text-color);
    transform: scale(1.05);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    font-size: 0.9rem;
    background: var(--background);
    color: var(--text-color);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Language Selector */
.language-selector {
    margin-left: 250px;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
}

.language-selector select {
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--secondary);
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.language-selector select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Navigation */
.main-nav {
    background: color-mix(in srgb, var(--card-bg) 85%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1.2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo a {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 1px;
}

.nav-links a {
    margin-left: 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    position: relative;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--highlight);
}

.nav-links .cart-count {
    background: var(--secondary);
    color: white;
    border-radius: 50%;
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    margin-left: 0.3rem;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
}

.mobile-menu {
    display: none;
    background: var(--card-bg);
    padding: 1rem;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    box-shadow: var(--shadow);
    flex-direction: column;
    gap: 1rem;
    animation: slideIn 0.3s ease;
}

.mobile-menu.active {
    display: flex;
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 1001;
}

.theme-toggle:hover {
    background: var(--highlight);
    transform: rotate(180deg);
}

/* Hero Section */
.hero {
    background: linear-gradient(color-mix(in srgb, var(--primary) 80%, transparent), color-mix(in srgb, var(--primary) 80%, transparent)), url('/assets/images/hero-bg.jpg') center/cover no-repeat;
    height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #F9F6F0;
    animation: fadeIn 1s ease;
}

.hero-content {
    max-width: 800px;
    padding: 0 2rem;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: #F9F6F0;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.5px;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    font-weight: 300;
    opacity: 0.9;
}

/* Featured Products */
.featured-products {
    padding: 5rem 5%;
    max-width: var(--max-width);
    margin: 0 auto;
}

.featured-products h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary);
    font-size: 2.5rem;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2.5rem;
}

.product-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
    height: 380px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(62, 39, 35, 0.15);
}

.product-card .card-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

.card-front {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 1.5rem 1rem;
    text-align: center;
    background: var(--card-bg);
    z-index: 1;
}

.card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary);
    color: #F9F6F0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s ease;
    z-index: 2;
}

.product-card:hover .card-back {
    opacity: 0.95;
    visibility: visible;
    transform: translateY(0);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    padding: 1rem;
    transition: transform 0.5s ease;
}

.product-card:hover img {
    transform: scale(1.08);
}

.product-card h3 {
    font-size: 1.25rem;
    margin: 1rem 0 0.5rem;
    font-family: var(--font-heading);
}

.product-card .price {
    font-size: 1.2rem;
    color: var(--accent);
    font-weight: 600;
}

.product-card .btn {
    margin-top: 1.5rem;
    width: 80%;
    border-radius: 4px;
}

.tag {
    background: var(--highlight);
    color: var(--text-color);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.9rem;
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

/* Products Section */
.products-section {
    padding: 3rem 5%;
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

.filters {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.filter-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    font-size: 0.9rem;
    background: var(--background);
    color: var(--text-color);
}

.filter-group select:focus {
    border-color: var(--primary);
    outline: none;
}

/* Product Details Section */
.product-details-section {
    padding: 3rem 5%;
    max-width: var(--max-width);
    margin: 0 auto;
}

.product-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.product-images #mainImage {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.thumbnails {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.thumbnails img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 6px;
    cursor: pointer;
    background: white;
    padding: 0.3rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.thumbnails img:hover {
    border: 2px solid var(--highlight);
    transform: scale(1.05);
}

.product-info h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--secondary);
}

.product-info .price {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.product-info p {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.quantity {
    display: flex;
    align-items: center;
     gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.quantity label {
    font-size: 1rem;
    font-weight: 500;
}

.quantity input {
    width: 60px;
    padding: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    font-size: 1rem;
    text-align: center;
}

.quantity input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Auth Section */
.auth-section {
    padding: 3rem 5%;
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    max-width: 500px;
    width: 100%;
    text-align: center;
    animation: slideUp 0.5s ease;
}

.auth-container h1 {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    font-size: 1rem;
    color: var(--text-color);
    opacity: 0.6;
    margin-bottom: 1.5rem;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.checkbox input {
    width: auto;
}

.forgot-password {
    font-size: 0.9rem;
    color: var(--accent);
}

.auth-footer {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--primary);
    font-weight: 500;
}

.auth-footer a:hover {
    color: var(--highlight);
}

/* Footer */
footer {
    background: var(--card-bg);
    padding: 3rem 5% 1.5rem;
    color: var(--text-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: var(--max-width);
    margin: 0 auto 1.5rem;
}

.footer-section h3 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.footer-section p, .footer-section li {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: var(--text-color);
}

.footer-section a:hover {
    color: var(--highlight);
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.social-icons a {
    font-size: 1.5rem;
    color: var(--secondary);
    transition: var(--transition);
}

.social-icons a:hover {
    color: var(--highlight);
}

.footer-bottom {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 1rem;
    text-align: center;
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-links a {
    margin: 0 0.5rem;
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .products-section {
        grid-template-columns: 1fr;
    }

    .filters {
        position: sticky;
        top: 60px;
        z-index: 999;
    }

    .product-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .language-selector {
        top: 0.5rem;
        left: 0.5rem;
    }

    .language-selector select {
        padding: 0.4rem;
        font-size: 0.9rem;
    }

    .theme-toggle {
        top: 0.5rem;
        right: 0.5rem;
        width: 36px;
        height: 36px;
    }

    .auth-container {
        padding: 1.5rem;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .product-card img {
        height: 150px;
    }

    .auth-container {
        padding: 1rem;
    }

    .main-nav {
        padding: 0.8rem 3%;
    }

    .logo a {
        font-size: 1.5rem;
    }

    .mobile-menu-toggle {
        font-size: 1.3rem;
    }

    .mobile-menu {
        top: 50px;
        padding: 0.8rem;
    }

    .form-group input {
        padding: 0.6rem;
        font-size: 0.8rem;
    }

    .auth-container h1 {
        font-size: 1.8rem;
    }

    .auth-subtitle {
        font-size: 0.9rem;
    }
}

/* Toast Notification Styles */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 280px;
    max-width: 400px;
    padding: 1rem 1.25rem;
    background: var(--card-bg);
    color: var(--text-color);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
    font-size: 0.95rem;
    font-weight: 500;
    border-left: 5px solid var(--primary);
    animation: slideInRight 0.3s ease;
    transition: all 0.3s ease;
}

.toast-success { border-left-color: #28a745; }
.toast-success i { color: #28a745; }

.toast-error { border-left-color: #dc3545; }
.toast-error i { color: #dc3545; }

.toast-warning { border-left-color: #ffc107; }
.toast-warning i { color: #ffc107; }

.toast-info { border-left-color: var(--primary); }
.toast-info i { color: var(--primary); }

.toast-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-color);
    opacity: 0.6;
    cursor: pointer;
    margin-left: auto;
}

.toast-close:hover { opacity: 1; }

.toast.fade-out {
    opacity: 0;
    transform: translateX(100%);
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

/* Hero Section Modern Styling */
.hero {
    background: linear-gradient(135deg, rgba(107, 70, 193, 0.92), rgba(49, 151, 149, 0.88)), url('/assets/images/hero-bg.jpg') center/cover no-repeat;
    min-height: 70vh;
    padding: 4rem 5%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.btn-highlight {
    background: var(--highlight);
    color: #1A202C;
    font-weight: 700;
    padding: 0.9rem 2rem;
    border-radius: 8px;
    display: inline-block;
}

.btn-highlight:hover {
    background: white;
    transform: translateY(-2px);
}

/* Value Propositions */
.value-props {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    padding: 2.5rem 5%;
    max-width: var(--max-width);
    margin: -3rem auto 2rem;
    position: relative;
    z-index: 10;
}

.prop-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease;
}

.prop-card:hover {
    transform: translateY(-5px);
}

.prop-card i {
    font-size: 2.2rem;
    color: var(--primary);
}

.prop-card h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.prop-card p {
    font-size: 0.85rem;
    opacity: 0.75;
}

/* Categories Section */
.featured-categories {
    padding: 3rem 5%;
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-title, .section-header h2 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.view-all-link {
    font-weight: 600;
    color: var(--secondary);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: var(--card-bg);
    padding: 2rem 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(107, 70, 193, 0.2);
    border-color: var(--primary);
}

.category-icon {
    width: 65px;
    height: 65px;
    background: rgba(107, 70, 193, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.8rem;
}

.category-card h3 {
    font-size: 1.15rem;
    color: var(--text-color);
    margin-bottom: 0.4rem;
}

.category-card p {
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.7;
}

/* Promo Banner */
.promo-banner {
    background: linear-gradient(135deg, #1A202C, #2D3748);
    color: white;
    padding: 4rem 5%;
    text-align: center;
    margin: 3rem 0;
}

.promo-tag {
    background: var(--accent);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 1rem;
}

.promo-content h2 {
    color: white;
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.promo-content p {
    font-size: 1.1rem;
    opacity: 0.85;
    margin-bottom: 2rem;
}

/* Skeleton Loaders */
.skeleton-card {
    height: 340px;
    background: linear-gradient(90deg, #edf2f7 25%, #e2e8f0 50%, #edf2f7 75%);
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s infinite;
    border-radius: var(--border-radius);
}

@keyframes skeletonLoading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Mobile Navigation Cart Button & Floating Quick-Cart */
.nav-right-controls {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.mobile-cart-btn {
    display: none;
    position: relative;
    font-size: 1.35rem;
    color: var(--primary);
    text-decoration: none;
    padding: 0.4rem;
    transition: var(--transition);
}

.mobile-cart-btn .cart-count {
    position: absolute;
    top: -4px;
    right: -6px;
    background: #E53E3E;
    color: white;
    border-radius: 50%;
    padding: 0.15rem 0.45rem;
    font-size: 0.72rem;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    line-height: 1;
}

.floating-mobile-cart {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 20px;
    background: var(--primary, #5A3A22);
    color: #ffffff;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    z-index: 1002;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s ease;
}

.floating-mobile-cart:active {
    transform: scale(0.9);
}

.floating-mobile-cart .cart-count {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #E53E3E;
    color: #ffffff;
    border-radius: 50%;
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 800;
    border: 2px solid white;
    line-height: 1;
}

@media (max-width: 768px) {
    .mobile-cart-btn {
        display: inline-flex;
    }
    .floating-mobile-cart {
        display: flex;
    }
}
