/* Panchtattva - css/style.css */
/* Target URL: panchtattva.life */
/* Brand: Panchtattva */
/* Tagline: elevate your soul */

/* Panchtattva - Redesigned Style
/* --- Variable Definitions --- */
:root {
    --primary-color: #D97706; /* A richer, warmer orange */
    --primary-dark: #B45309;
    --secondary-color: #047857; /* Deep spiritual teal */
    --dark-red: #881337;
    --text-dark: #1F2937;
    --text-light: #4B5563;
    --bg-light: #F9FAFB;
    --bg-white: #FFFFFF;
    --border-color: #E5E7EB;
    --font-primary: 'Montserrat', sans-serif;
    --font-secondary: 'Lora', serif;
    --error-color: #ff0000;
    --success-color: #006400;
}

/* --- Base & Typography --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: var(--font-primary);
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-size: 16px;
    line-height: 1.7;
}
.container { width: 95%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3, h4 { font-family: var(--font-secondary); line-height: 1.3; font-weight: 500; }
h1 { font-size: 2.5em; } h2 { font-size: 2em; } h3 { font-size: 1.5em; }
a { color: var(--primary-color); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* --- Header & Navigation --- */
.site-header {
    background-color: var(--bg-white);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-container { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.logo-area .logo-image { max-height: 55px; width: auto; }
.main-navigation ul { display: flex; gap: 5px; }
.main-navigation a {
    padding: 10px 16px;
    font-weight: 600;
    font-size: 1em;
    color: var(--text-light);
    border-radius: 6px;
    position: relative;
    display: block;
}
.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 16px;
    right: 16px;
    height: 2px;
    background-color: var(--primary-dark);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}
.main-navigation a:hover::after, .main-navigation a.active::after { transform: scaleX(1); }
.main-navigation a.active { color: var(--text-dark); }

/* --- Header Actions --- */
.header-actions { display: flex; align-items: center; gap: 1.2rem; }
.header-action-link {
    font-size: 1.1rem;
    color: var(--text-light);
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s, color 0.2s;
}
.header-action-link:hover { color: var(--primary-dark); background-color: var(--bg-light); }
.cart-icon-wrapper { position: relative; }
#cart-count {
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: var(--primary-color);
    color: white;
    font-size: 0.7em;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.menu-toggle { display: none; }

/* --- General Components --- */
.btn {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}
.btn-primary {
    background-image: linear-gradient(to right, var(--primary-color) 0%, var(--primary-dark) 51%, var(--primary-color) 100%);
    background-size: 200% auto;
    color: white;
    box-shadow: 0 4px 15px 0 rgba(217, 119, 6, 0.3);
}
.btn-primary:hover { background-position: right center; text-decoration: none; color: white; }
.btn-secondary { background-color: var(--bg-light); border-color: var(--border-color); color: var(--text-dark); }
.btn-secondary:hover { background-color: #F3F4F6; border-color: #D1D5DB; text-decoration: none; }
.btn-sm { padding: 8px 16px; font-size: 0.85em; }

/* --- Product Card --- */
.product-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.product-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.08); }
.product-card a { text-decoration: none; }
.product-card img.product-image { aspect-ratio: 1 / 1; object-fit: cover; }
.product-card h3 { font-size: 1.1em; padding: 12px 16px 4px; color: var(--text-dark); }
.product-card .price-container { padding: 0 16px 12px; display: flex; align-items: center; gap: 8px; }
.product-card .btn { margin: 0 16px 16px; width: calc(100% - 32px); }

/* --- Mobile Responsiveness --- */
@media (max-width: 992px) {
    .header-actions { gap: 0.5rem; }
    
    .menu-toggle {
        display: block;
        background: none; border: none; font-size: 1.5rem; color: var(--text-dark); cursor: pointer;
    }
}
/* ... other mobile styles from before ... */




/* Reset and Basic Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-size: 16px; /* Base font size */
}

.container {
    width: 95%; /* More fluid for smaller screens */
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Lora', serif;
    color: #2c3e50;
    margin-bottom: 0.75em;
    line-height: 1.3;
}
h1 { font-size: 2.2em; }
h2 { font-size: 1.8em; }
h3 { font-size: 1.5em; }

a {
    color: #e67e22;
    text-decoration: none;
}
a:hover {
    color: #d35400;
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

ul {
    list-style: none;
}

/* Header Styles */
.site-header {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: none;
    border-bottom: 1px solid var(--border-color);
    position: sticky; top: 0; z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping for mobile, main-nav will wrap */
}

.logo-area {
    display: flex; 
    align-items: center;
    gap: 10px;
    flex-shrink: 0; /* Prevent logo area from shrinking excessively if tagline is long */
}
.logo-area .logo-link {
    text-decoration: none;
}
.logo-area .logo-image {
    max-height: 50px; 
    width: auto;
}
.logo-area .tagline {
    font-size: 0.8em;
    color: #7f8c8d;
    margin: 0; 
    line-height: 1.2;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none; /* Hidden by default, shown on mobile */
    background: none;
    border: none;
    font-size: 1.8em;
    color: #34495e;
    cursor: pointer;
    padding: 5px;
}

.main-navigation {
    /* Desktop: will be part of the flex row */
    /* Mobile: will be controlled by JS and take full width below */
}
.main-navigation ul.main-menu-ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}
.main-navigation > .main-menu-ul { 
    display: flex; 
    gap: 5px; 
    list-style: none;
    padding: 0;
    margin: 0;
}
.main-navigation ul li {
    position: relative;
}
.main-navigation ul li a {
    display: block;
    padding: 10px 12px; 
    color: #34495e;
    font-weight: 500;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: 0.95em;
}
.main-navigation ul li a:hover,
.main-navigation ul li a.active {
    background-color: #e67e22;
    color: #fff;
}
/* Submenu styles */
.main-navigation ul.submenu-ul {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    background-color: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    list-style: none;
    padding: 0;
    margin: 0;
    min-width: 220px; 
    z-index: 1010;
}
.main-navigation ul li:hover > ul.submenu-ul {
    display: block;
}
.main-navigation ul.submenu-ul li {
    width: 100%;
}
.main-navigation ul.submenu-ul li a {
    padding: 10px 15px;
    white-space: nowrap;
    border-radius: 0;
}
.main-navigation ul.submenu-ul li a:hover,
.main-navigation ul.submenu-ul li a.active {
    background-color: #f0f0f0;
    color: #e67e22;
}
.main-navigation li.has-submenu > a::after {
    content: ' ▼';
    font-size: 0.7em;
    margin-left: 5px;
}
.main-navigation ul.submenu-ul li.has-submenu > a::after {
    content: ' ►';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}
.main-navigation ul.submenu-ul ul.submenu-ul {
    left: 100%;
    top: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px; 
}

.location-display {
    font-size: 0.85em;
    color: #555;
    display: flex; 
    align-items: center;
    gap: 5px;
}
.btn-link {
    background: none;
    border: none;
    color: #e67e22;
    cursor: pointer;
    padding: 0;
    font-size: 1em; 
}
.btn-link:hover {
    text-decoration: underline;
}
.cart-icon {
    font-size: 1.3em; 
    color: #34495e;
}
.cart-icon:hover {
    color: #e67e22;
}
.user-login, .user-register, .user-account, .user-logout {
    font-size: 0.9em;
    padding: 6px 10px;
    border: 1px solid transparent;
    border-radius: 4px;
}
.user-login:hover, .user-register:hover, .user-account:hover, .user-logout:hover {
    border-color: #e67e22;
    color: #d35400;
    text-decoration: none;
}


/* Main Content Area */
.site-main {
    flex-grow: 1;
    padding: 0.5em 0; 
}

.page-title {
    font-size: 2em; 
    color: #e67e22;
    text-align: center;
    margin-bottom: 1em;
    border-bottom: 2px solid #f39c12;
    padding-bottom: 0.5em;
}

/* Footer Styles */
.site-footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 2em 0 1em; 
    margin-top: auto;
}
.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
    gap: 25px;
    margin-bottom: 2em;
}
.widget h4 {
    color: #e67e22;
    margin-bottom: 1em;
    border-bottom: 1px solid #34495e;
    padding-bottom: 0.5em;
    font-size: 1.1em;
}
.widget ul li {
    margin-bottom: 0.6em;
}
.widget ul li a {
    color: #bdc3c7;
    font-size: 0.95em;
}
.widget ul li a:hover {
    color: #fff;
}
.widget p {
    font-size: 0.9em;
    line-height: 1.5;
}
.footer-bottom {
    text-align: center;
    padding-top: 1.5em;
    border-top: 1px solid #34495e;
}
.footer-bottom p {
    font-size: 0.85em;
    margin-bottom: 0.3em;
}

/* Modal Styles */
.modal {
    display: flex;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    align-items: center;
    justify-content: center;
    padding: 15px; 
}
.modal.hidden { display: none; }
.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 25px; 
    border: 1px solid #888;
    width: 100%; 
    max-width: 500px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    text-align: center;
}
.close-modal-btn {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 15px; 
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.close-modal-btn:hover, .close-modal-btn:focus { color: #333; text-decoration: none; }
.modal h2 { color: #e67e22; margin-top: 0; font-size: 1.5em; }
.modal p { margin-bottom: 1em; font-size: 1em; }
.modal .note { font-size: 0.85em; color: #777; margin-top: 1.5em; }

/* Form Styles - Responsive */
.form-group {
    margin-bottom: 15px;
    text-align: left;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
    font-size: 0.95em;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    background-color: #fff; 
    -webkit-appearance: none; 
    -moz-appearance: none;
    appearance: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #e67e22;
    outline: none;
    box-shadow: 0 0 5px rgba(230, 126, 34, 0.3);
}
.form-styled .error-text { color: red; font-size: 0.85em; margin-top: 0.3em; }
.form-styled small { display: block; font-size: 0.8em; color: #777; margin-top: 3px; }


/* Button Styles */
.btn {
    display: inline-block;
    padding: 10px 18px; 
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.95em; 
    font-weight: 500;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.1s ease;
    border: none;
    line-height: 1.4; 
}
.btn-primary { background-color: #e67e22; color: #fff; }
.btn-primary:hover { background-color: #d35400; color: #fff; text-decoration: none; }
.btn-primary:active { transform: translateY(1px); }
.btn-secondary { background-color: #3498db; color: #fff; }
.btn-secondary:hover { background-color: #2980b9; color: #fff; text-decoration: none; }
.btn-sm { padding: 6px 12px; font-size: 0.85em; } 

/* Message Styles */
.message { padding: 12px 15px; margin: 15px 0; border-radius: 5px; font-size: 0.95em; border: 1px solid transparent; }
.message.success { background-color: #d4edda; color: #155724; border-color: #c3e6cb; }
.message.error { background-color: #f8d7da; color: #721c24; border-color: #f5c6cb; }
.message.info { background-color: #d1ecf1; color: #0c5460; border-color: #bee5eb; }
.message.warning { background-color: #fff3cd; color: #856404; border-color: #ffeeba; }


/* Product Listing - Responsive */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 
    gap: 15px; 
    margin-top: 1.5em;
}
.product-card {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 12px; 
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex; 
    flex-direction: column;
    justify-content: space-between; 
}
.product-card:hover { transform: translateY(-5px); box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.product-card img.product-image {
    width: 100%;
    height: 180px; 
    object-fit: cover;
    margin-bottom: 10px;
    border-radius: 6px;
}
.product-card h3 { font-size: 1.1em; margin-bottom: 0.5em; color: #333; }
.product-card .category { font-size: 0.85em; color: #777; margin-bottom: 8px; }
.product-card .description { font-size: 0.85em; height: auto; min-height: 40px; overflow:hidden; margin-bottom: 8px; color: #555; }
.product-card .price { font-size: 1.05em; font-weight: bold; color: #e67e22; margin-bottom: 10px; }
.product-card .btn { width: 100%; margin-top: auto; } 


/* Homepage Specific Styles */
.homepage-slider-section {
    margin-bottom: 1rem; /* Add some space below the slider */
}
.slider-container {
    width: 100%;
    height: 50vh; /* Adjust height as needed */
    min-height: 100px;
    aspect-ratio: 21 / 9; 
    max-height: 450px;
    overflow: hidden;
    position: relative;
    border-radius: 12px; /* Rounded corners for the container */
    box-shadow: var(--shadow-lg);
}
@media (max-width: 767px) {
    .slider-container {
        /* On mobile, use a fixed percentage of the screen height instead of aspect-ratio */
        height: 20vh; 
        min-height: 200px; /* Ensure it's not too small on short devices */
        aspect-ratio: auto; /* Override the desktop aspect-ratio */
    }
}
.slider {
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform 0.5s ease-in-out;
}
.slide {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    /* The align-items and justify-content are removed from here */
}
.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Gradient overlay for text readability */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 60%);
}

/* ** NEW: Styles for Bottom-Left Content ** */
.slide-content.bottom-left {
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 2;
    color: white;
    padding: 2rem; /* Add padding */
    text-align: left; /* Align text to the left */
    max-width: 60%; /* Prevent text from spanning the whole width */
}
.slide-content.bottom-left h2 {
    font-size: 1.5rem; /* Smaller font size */
    font-weight: 600;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
    margin-bottom: 0.5rem;
    color: white;
}
.slide-content.bottom-left p {
    font-size: 1rem; /* Smaller font size */
    opacity: 0.9;
    margin-bottom: 1.5rem;
    color: white;
}
.slide-content.bottom-left .btn {
    padding: 10px 24px; /* Smaller button */
    font-size: 0.9em;
}

@media (min-width: 576px) {
    .slide-content.bottom-left p {
        display: block; /* Show paragraph on larger screens */
    }
}
.slider-nav {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}
.slider-nav button {
    background-color: rgba(255,255,255,0.7);
    border: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.slider-nav button.active, .slider-nav button:hover {
    background-color: #e67e22;
}
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.4);
    color: white;
    border: none;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 1.5em;
    z-index: 10;
    border-radius: 4px;
}
.slider-arrow.prev { left: 10px; }
.slider-arrow.next { right: 10px; }

@media (max-width: 767px) {
    .slider-arrow,
    .slider-nav {
        display: none !important;
    }
}

.homepage-section {
    padding: 2em 0;
    border-bottom: 1px solid #eee;
}
.homepage-section:last-child {
    border-bottom: none;
}
.section-title {
    text-align: center;
    font-size: 1.8em; 
    margin-bottom: 1.2em; 
    position: relative;
    padding-bottom: 0.5em;
}
.section-title::after { 
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background-color: #e67e22;
    margin: 0.3em auto 0;
    border-radius: 2px;
}
.testimonial-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.testimonial-card p.quote {
    font-style: italic;
    color: #555;
    margin-bottom: 10px;
    line-height: 1.5;
}
.testimonial-card p.author {
    text-align: right;
    font-weight: bold;
    color: #e67e22;
}
.testimonials-grid { 
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}


/* Responsive adjustments */
@media (max-width: 992px) { /* Tablet and below */
    .logo-area {
        order: 1; /* Logo first */
    }
    .header-actions {
        order: 2; /* Actions next */
        margin-left: auto; /* Push actions (and subsequent toggle) to the right, away from logo */
    }
    .menu-toggle {
        display: block; /* Show hamburger */
        order: 3; /* Toggle after actions */
        margin-left: 10px; /* Small gap from actions */
    }
    .main-navigation {
        width: 100%;
        order: 4; /* Navigation bar wraps below */
        max-height: 0; 
        overflow: hidden;
        transition: max-height 0.3s ease-out;
        background-color: #fff; 
        box-shadow: 0 2px 5px rgba(0,0,0,0.1) inset; 
    }
    .main-navigation.active { 
        max-height: 500px; 
        padding: 10px 0; 
    }
    .main-navigation ul.main-menu-ul {
        flex-direction: column;
        width: 100%;
    }
    .main-navigation ul li {
        margin-left: 0;
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }
    .main-navigation ul li:last-child {
        border-bottom: none;
    }
    .main-navigation ul li a {
        text-align: left; 
        padding: 12px 15px;
    }
    .main-navigation ul.submenu-ul { 
        position: static; 
        display: none; 
        border: none;
        box-shadow: none;
        padding-left: 15px; 
        background-color: #f9f9f9; 
    }
    .main-navigation li.has-submenu.open > ul.submenu-ul { 
        display: block;
    }
    .main-navigation li.has-submenu > a::after {
        float: right; 
        margin-right: 10px;
    }
    .location-display { /* Hide location display on tablets and below to save space */
        display: none;
    }
    .slider { height: 300px; } 
    .slide-content h2 { font-size: 1.3em; }
    .slide-content p { font-size: 0.9em; }
}

/* Responsive adjustments */
@media (max-width: 992px) { /* Tablet and below */
    .logo-area { order: 1; }
    .header-actions { order: 2; margin-left: auto; }
    .menu-toggle { display: block; order: 3; margin-left: 10px; }
    .main-navigation { width: 100%; order: 4; max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; background-color: #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.1) inset; }
    .main-navigation.active { max-height: 500px; padding: 10px 0; }
    .main-navigation ul.main-menu-ul { flex-direction: column; width: 100%; }
    .main-navigation ul li { margin-left: 0; width: 100%; border-bottom: 1px solid #f0f0f0; }
    .main-navigation ul li:last-child { border-bottom: none; }
    .main-navigation ul li a { text-align: left; padding: 12px 15px; }
    .main-navigation ul.submenu-ul { position: static; display: none; border: none; box-shadow: none; padding-left: 15px; background-color: #f9f9f9; }
    .main-navigation li.has-submenu.open > ul.submenu-ul { display: block; }
    .main-navigation li.has-submenu > a::after { float: right; margin-right: 10px; }
    .location-display { display: none; }
    .slider { height: 300px; }
    .slide-content h2 { font-size: 1.3em; }
    .slide-content p { font-size: 0.9em; }
}

@media (max-width: 767px) { /* Mobile */
    .user-login, .user-register, .user-account, .user-logout { font-size: 0.85em; padding: 5px 8px; }
    .cart-icon { font-size: 1.2em; }
    .page-title { font-size: 1.8em; }
    .section-title { font-size: 1.5em; }
    .slider { height: 250px; }
    .slide-content { padding: 10px; bottom: 10px; left: 10px; }
    .slide-content h2 { font-size: 1.1em; }
    .slide-content p { display: none; }
    .slider-arrow { padding: 8px; font-size: 1.2em; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
    .product-card img.product-image { height: 140px; }
    .product-card h3 { font-size: 1em; }
    .product-card .price { font-size: 1em; }
    .product-card .btn { font-size: 0.9em; padding: 8px 10px; }
    .cart-page .cart-table, .cart-page .cart-table tbody, .cart-page .cart-table tr, .cart-page .cart-table td { display: block; width: 100% !important; }
    .cart-page .cart-table thead { display: none; }
    .cart-page .cart-table tr { margin-bottom: 15px; border: 1px solid #eee; padding: 10px; border-radius: 5px; }
    .cart-page .cart-table td { text-align: right; padding: 8px 0; border-bottom: 1px dotted #f0f0f0; }
    .cart-page .cart-table td:last-child { border-bottom: none; }
    .cart-page .cart-table td::before { content: attr(data-label); float: left; font-weight: bold; margin-right: 10px; }
    .cart-page .cart-table td.product-image-cell, .cart-page .cart-table td.product-name-cell { text-align: left; }
    .cart-page .cart-table td.product-image-cell::before, .cart-page .cart-table td.product-name-cell::before { display: none; }
    .cart-page .cart-item-image { width: 60px; height: 60px; margin-right: 10px; float: left;}
    .cart-page .product-name-cell { clear: both; padding-top: 10px; }
    .cart-page .quantity-input { width: 60px !important; display: inline-block; float: right; }
    .cart-summary { flex-direction: column; }
    .cart-totals p span, .cart-totals p strong { float: none; display: block; text-align: right; }
    
    /* --- FIX FOR DROPDOWN CART ON MOBILE --- */
    .cart-dropdown {
        position: fixed; /* Position relative to the viewport */
        top: 65px;       /* Adjust distance from top of screen */
        right: 10px;
        width: 320px;
        max-width: calc(100vw - 20px); /* Ensure it has padding on both sides */
        left: 40%; /* Ensure left is not set */
        transform: translateX(-65%);
    }
}

@media (max-width: 480px) {
    body { font-size: 15px; }
    .container { width: 100%; padding: 0 10px; }
    .logo-area .logo-image { max-height: 40px; }
    .logo-area .tagline { display: none; } 
    h1 { font-size: 1.8em; } h2 { font-size: 1.5em; }
    .page-title { font-size: 1.6em; }
    .section-title { font-size: 1.3em; }
    .modal-content { padding: 20px 15px; }
    .btn { padding: 8px 15px; font-size: 0.9em; }
    .slider { height: 200px; }
    .product-grid { grid-template-columns: 1fr 1fr; }
    /* The rule for cart-dropdown is now in the 767px breakpoint, so no extra rule is needed here. */
}

/* Cart table data-label attributes for mobile view */
.cart-page .cart-table td[data-label="Price"]::before { content: "Price: "; }
.cart-page .cart-table td[data-label="Quantity"]::before { content: "Quantity: "; }
.cart-page .cart-table td[data-label="Subtotal"]::before { content: "Subtotal: "; }
.cart-page .cart-table td[data-label="Remove"]::before { content: "Remove: "; }



/* --- Dropdown Cart Styles --- */
.cart-icon-wrapper {
    position: relative;
}

.cart-dropdown {
    display: none; /* Hidden by default */
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    z-index: 1020;
    margin-top: 10px;
}
.cart-dropdown.show {
    display: block;
}

#cart-dropdown-items-container {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
}
.cart-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}
.cart-dropdown-item:last-child {
    border-bottom: none;
}
.cart-dropdown-item .item-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}
.cart-dropdown-item .item-details {
    flex-grow: 1;
}
.cart-dropdown-item .item-details .item-name {
    font-size: 0.9em;
    font-weight: 500;
    color: #333;
    display: block;
}
.cart-dropdown-item .item-details .item-qty-price {
    font-size: 0.85em;
    color: #777;
}
.cart-dropdown-item .item-remove {
    font-size: 1.2em;
    color: #e74c3c;
    text-decoration: none;
    padding: 5px;
}

.cart-dropdown-footer {
    padding: 15px;
    border-top: 1px solid #ddd;
    background-color: #f8f9fa;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.cart-dropdown-total {
    flex-grow: 1;
    font-size: 0.95em;
}
.cart-dropdown-total strong {
    font-weight: bold;
    color: #e67e22;
}
.cart-dropdown-footer .btn {
    width: 48%; /* Adjust based on gap */
    flex-grow: 1;
    text-align: center;
    padding: 8px 5px;
}
.cart-dropdown .empty-cart-msg {
    text-align: center;
    color: #888;
    padding: 20px 10px;
}

/* --- Styles for Mobile Product Filters (Add/Replace in style.css) --- */
#showFiltersBtn {
    display: none; /* Hidden by default on desktop */
}

.products-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}
@media (min-width: 768px) {
    .products-layout {
        grid-template-columns: 240px 1fr; /* Fixed sidebar width on desktop */
    }
}

.products-sidebar .filter-widget {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: sticky; 
    top: 80px; 
}
.filter-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}
.filter-widget-header h3 {
    margin: 0;
}
.close-filters-btn {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    font-size: 1.8em;
    cursor: pointer;
    line-height: 1;
}

.category-filter-list {
    list-style: none;
    padding: 0;
}
.category-filter-list li a {
    display: block;
    padding: 8px 10px;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.category-filter-list li a:hover {
    background-color: #f0f0f0;
    color: #e67e22;
}
.category-filter-list li.active a {
    background-color: #e67e22;
    color: #fff;
    font-weight: 500;
}

.filter-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1030;
}

/* Mobile-specific filter styles */
@media (max-width: 767px) {
    #showFiltersBtn {
        display: block; /* Show the button on mobile */
    }

    .products-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100%;
        background-color: #fff;
        z-index: 1040; /* Highest z-index */
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        overflow-y: auto;
    }

    .products-sidebar.active {
        transform: translateX(0);
        box-shadow: 3px 0 15px rgba(0,0,0,0.2);
    }
    
    .filter-overlay.active {
        display: block;
    }

    .close-filters-btn {
        display: block; /* Show the close button inside the panel on mobile */
    }
}



/* --- Homepage Tab Styles --- */
.homepage-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 0.5em;
    /* Add the full-width line below the tabs */
    border-bottom: 1px solid var(--border-color);
}

.tab-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 15px;
    cursor: pointer;
    background-color: transparent; /* Changed from white for a flatter look */
    /* Add a transparent border to prevent content from shifting on hover/active */
    border: 1px solid transparent; 
    border-bottom: 3px solid transparent; /* The indicator line, transparent by default */
    border-radius: 8px 8px 0 0; /* Rounded top corners */
    font-size: 1em;
    font-weight: 600;
    color: var(--text-light);
    transition: all 0.3s ease;
    margin-bottom: -1px; /* Overlaps the bottom border of the container */
}

.tab-link i {
    font-size: 1.1em;
}

.tab-link:hover {
    background-color: var(--bg-light);
    color: var(--primary-dark);
}

.tab-link.active {
    background-color: var(--bg-white);
    color: var(--primary-dark);
    /* Make the bottom border visible and colored for the active indicator */
    border-color: var(--border-color);
    border-bottom-color: var(--primary-dark);
}
.tab-link.active:hover {
    color: var(--primary-dark);
}

.tab-content {
    display: none;
    padding-top: 2rem;
}
.tab-content.active {
    display: block;
}

.homepage-section {
    padding: 2em 0;
    border-bottom: 1px solid #f0f0f0;
}
.homepage-section:last-child {
    border-bottom: none;
}

/* --- Marquee Styles --- */
.marquee-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 10px 0;
}

.marquee-container:before,
.marquee-container:after {
    content: '';
    position: absolute;
    top: 0;
    width: 50px; /* Width of the fade effect */
    height: 100%;
    z-index: 2;
}

.marquee-container:before {
    left: 0;
    background: linear-gradient(to right, var(--bg-light), transparent);
}

.marquee-container:after {
    right: 0;
    background: linear-gradient(to left, var(--bg-light), transparent);
}

.marquee-content {
    display: flex;
    gap: 20px; /* Space between items */
    width: fit-content;
    animation: marquee-scroll 60s linear infinite;
}

.marquee-container:hover .marquee-content {
    animation-play-state: paused;
}

/* Make cards inside marquee have a fixed base width */
.marquee-content .product-card,
.marquee-content .testimonial-card {
    flex-shrink: 0;
    width: 300px;
}

.marquee-content.testimonial-marquee .testimonial-card {
    height: 100%; /* Ensure all testimonial cards have the same height */
    display: flex;
    flex-direction: column;
    justify-content: center;
}


@keyframes marquee-scroll {
    from {
        transform: translateX(0%);
    }
    to {
        transform: translateX(-50%);
    }
}

/* --- Header Search Bar Styles --- */
.header-search-container {
    flex-grow: 1;
    max-width: 450px;
    margin: 0 1.5rem;
}
.header-search-form {
    position: relative;
    width: 100%;
}
.header-search-form .search-input {
    width: 100%;
    height: 40px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    padding: 0 45px 0 20px;
    font-size: 0.9em;
    background-color: var(--bg-light);
    transition: all 0.3s ease;
}
.header-search-form .search-input:focus {
    background-color: var(--bg-white);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.2);
    outline: none;
}
.header-search-form .search-button {
    position: absolute;
    top: 0;
    right: 0;
    height: 40px;
    width: 45px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1em;
    color: var(--text-light);
}

/* Responsive adjustments for search */
@media (max-width: 992px) {
    .header-search-container {
        order: 5; /* Place search bar below everything else on mobile */
        width: 100%;
        max-width: none;
        margin: 15px 0 5px;
    }
}

/* --- App Install Banner Styles --- */
.app-install-banner {
    display: none; /* Hidden by default, shown by JS */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-light);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 15px rgba(0,0,0,0.1);
    padding: 12px 20px;
    z-index: 1050;
    display: flex;
    align-items: center;
    gap: 15px;
    transform: translateY(100%);
    transition: transform 0.4s ease-in-out;
}

.app-install-banner.show {
    transform: translateY(0);
}

.app-banner-close {
    position: absolute;
    top: 5px;
    right: 5px;
    background: none;
    border: none;
    font-size: 1.5em;
    color: #999;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
}

.app-banner-icon img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
}

.app-banner-text {
    flex-grow: 1;
}
.app-banner-text strong {
    display: block;
    font-size: 1em;
    color: var(--text-dark);
}
.app-banner-text span {
    font-size: 0.9em;
    color: var(--text-light);
}

.app-install-banner .btn {
    flex-shrink: 0; /* Prevent button from shrinking */
}

/* --- Redesigned Product Details Page --- */
.product-details-container {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.product-details-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
}
@media (min-width: 768px) {
    .product-details-grid {
        grid-template-columns: 2fr 3fr;
        align-items: flex-start;
    }
}
.main-product-image {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}
.product-info .product-title {
    font-size: 2.2em;
    margin-top: 0;
    margin-bottom: 0.5em;
    line-height: 1.2;
}
.product-info .rating-summary {
    margin-bottom: 1rem;
}
.product-info .product-vendor {
    font-size: 0.9em;
    margin-bottom: 1rem;
}
.product-price-section {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}
.product-price-section .price {
    font-size: 2em;
    font-weight: 700;
    color: var(--text-dark);
}
.product-price-section .offer-price {
    color: var(--primary-dark);
}
.product-price-section .original-price {
    font-size: 1rem;
    color: var(--text-light);
}

.product-actions {
    margin-top: 1.5rem;
}
.product-full-description {
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}
/* --- Styles for Custom Variation & Slot Selectors --- */
.variation-selector-group {
    margin-bottom: 1.5rem;
}
.variation-selector-group label {
    font-weight: 600;
    font-size: 0.9em;
    color: var(--text-light);
    display: block;
    margin-bottom: 8px;
}

/* This targets all select elements within styled forms for a consistent look */
.form-styled select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.service-slots-section { 
    margin-top: 20px; 
    padding-top: 20px; 
    border-top: 1px solid var(--border-color); 
}
.service-slots-section h4 {
    font-size: 1.2em;
    margin-bottom: 15px;
    font-family: var(--font-secondary);
}
.slot-container { 
    max-height: 250px; 
    overflow-y: auto; 
    border: 1px solid var(--border-color); 
    padding: 15px; 
    border-radius: 8px; 
    background-color: var(--bg-main); 
}
.slot-date-group { 
    margin-bottom: 15px; 
}
.slot-date-group:last-child {
    margin-bottom: 0;
}
.slot-date-group strong {
    display: block;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border-color);
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--text-dark);
}
.slot-times { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 10px; 
}
.slot-label { 
    display: block; 
}
.slot-label input[type="radio"] { 
    opacity: 0; 
    position: fixed; 
    width: 0; 
}
.slot-label span {
    display: block;
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    background-color: var(--bg-white);
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.9em;
}
.slot-label span:hover {
    border-color: var(--primary-dark);
    color: var(--primary-dark);
}
.slot-label input[type="radio"]:checked + span {
    border-color: var(--secondary-dark);
    background-color: var(--secondary-color);
    color: #fff;
    box-shadow: 0 0 8px rgba(67, 56, 202, 0.3);
}
/* --- NEW: Custom Material Dropdown Styles --- */
.custom-select-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
}
.custom-select-wrapper label {
    font-weight: 600;
    font-size: 0.9em;
    color: var(--text-light);
    display: block;
    margin-bottom: 8px;
}
.custom-select {
    position: relative;
    font-size: 1em;
}
.custom-select-trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.custom-select-trigger:hover {
    border-color: #B0B0B0;
}
.custom-select.open .custom-select-trigger {
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}
.custom-select-trigger::after {
    content: '';
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--text-light);
    border-bottom: 2px solid var(--text-light);
    transform: rotate(45deg) translateY(-50%);
    transition: transform 0.3s ease;
    position: absolute;
    right: 15px;
    top: 45%;
}
.custom-select.open .custom-select-trigger::after {
    transform: rotate(-135deg) translateY(0%);
}

.custom-options {
    position: absolute;
    display: block;
    top: 100%;
    left: 0;
    right: 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-white);
    margin-top: 5px;
    transition: all 0.3s ease-in-out;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    z-index: 10;
    max-height: 200px;
    overflow-y: auto;
}
.custom-select.open .custom-options {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateY(0);
}
.custom-option {
    position: relative;
    display: block;
    padding: 12px 15px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.custom-option:hover {
    background-color: var(--bg-light);
}
.custom-option.selected {
    background-color: var(--primary-color);
    color: white;
    font-weight: 500;
}

/* --- Information Marquee Styles --- */
.info-marquee-container {
    background-color: var(--dark-red);
    color: white;
    padding: 12px 0;
    overflow: hidden;
    white-space: nowrap;
    margin-bottom: 2em; /* Space between marquee and tabs */
}

.info-marquee-content {
    display: inline-block;
    padding-left: 100%; /* Start off-screen */
    animation: marquee-info-scroll 45s linear infinite;
}

.info-item {
    display: inline-block;
    margin-right: 50px; /* Space between items */
    font-size: 1em;
    font-weight: 500;
}

.info-type-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    margin-right: 10px;
    text-transform: uppercase;
    color: #fff;
}

.type-festival { background-color: #F59E0B; }
.type-vrat { background-color: #10B981; }
.type-panchang { background-color: #3B82F6; }
.type-quote { background-color: #6366F1; }
.type-information { background-color: #8D5A9E; }
.type-other { background-color: #6B7280; }


@keyframes marquee-info-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}
/* --- Interactive Calendar Styles (with Mobile Icons) --- */
.calendar-container {
    background-color: var(--bg-white);
    padding: clamp(15px, 4vw, 25px);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    max-width: 1100px;
    margin: 2em auto;
}
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.calendar-header h2 {
    margin: 0;
    font-size: clamp(1.2rem, 5vw, 1.8rem);
    color: var(--text-dark);
    text-align: center;
    flex-grow: 1;
}
.calendar-grid-header, .calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}
.calendar-grid-header div {
    font-weight: 600;
    text-align: center;
    padding-bottom: 10px;
    color: var(--text-light);
    font-size: 0.9em;
}
.calendar-grid .day {
    padding: 8px;
    min-height: 90px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-light);
    transition: background-color 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
}
.calendar-grid .day.other-month {
    background-color: transparent;
    border-color: transparent;
    pointer-events: none;
}
.calendar-grid .day.other-month .day-number {
    color: #ccc;
}
.calendar-grid .day.has-events {
    background-color: #FFFBEB;
    border-color: #FBBF24;
    cursor: pointer;
}
.day-number {
    font-weight: 600;
    font-size: 0.85em;
    text-align: right;
    margin-bottom: auto; /* Pushes number to top */
}
.day-events-text {
    display: none; /* Hidden by default, shown on desktop */
}
.day-event {
    font-size: 0.75em;
    padding: 3px 6px;
    border-radius: 4px;
    margin-top: 4px;
    background-color: var(--secondary-color);
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ** NEW/UPDATED STYLES FOR ICONS ** */
.day-events-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    height: 16px; /* Reserve space for icons */
    flex-wrap: wrap; /* Allow icons to wrap if more than 3 */
}
.event-icon {
    font-size: 0.8em;
    color: var(--primary-dark);
}

/* On larger screens, show text and hide icons */
@media (min-width: 768px) {
    .day-events-text {
        display: block;
    }
    .day-events-icons {
        display: none;
    }
    .calendar-grid .day {
        min-height: 120px;
    }
}

/* Event Modal Styles */
#event-modal .modal-content {
    max-width: 600px;
}
#modal-date-header {
    font-size: 1.6em;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}
#modal-events-list .modal-event-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed var(--border-color);
}
#modal-events-list .modal-event-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}
#modal-events-list h4 {
    font-size: 1.2em;
    margin: 0 0 5px;
}
#modal-events-list .info-type-badge {
    margin-bottom: 10px;
}

.mobile-only-actions {
  display: none !important;
}
@media (max-width: 767px) {
  .mobile-only-actions {
    display: block !important;
  }
}
.mobile-only-actions {
    display: none; /* ** FIX: Hidden by default on ALL screen sizes ** */
    padding: 15px;
    border-top: 1px solid var(--border-color);
    margin-top: 15px;
}
.location-display-mobile {
    text-align: center;
}
.location-display-mobile .location-label {
    display: block;
    font-size: 0.9em;
    color: var(--text-light);
    margin-bottom: 8px;
}
.location-display-mobile .location-text {
    font-weight: 600;
    color: var(--primary-dark);
}
.location-display-mobile .btn-link {
    margin-left: 10px;
}

/* This is the original location display in the header for desktop */
.location-display-desktop {
    display: flex; /* ** FIX: Shown by default on ALL screen sizes ** */
    align-items: center;
    gap: 5px;
    font-size: 0.85em;
}

/* --- Styles for Sub-category List --- */
.sub-category-list {
    list-style: none;
    padding-left: 20px; /* Indent sub-categories */
    margin-top: 5px;
    margin-bottom: 10px;
}

.sub-category-list li a {
    font-size: 0.9em;
    color: var(--text-light);
    font-weight: 400;
}

.sub-category-list li.active a {
    color: var(--primary-dark);
    font-weight: 600;
}

/* --- Styles for Dropdown Sub-category List --- */
.parent-category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.parent-category-link a {
    flex-grow: 1; /* Allow link to take up most of the space */
}

.submenu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    color: var(--text-light);
    transition: transform 0.3s ease;
}

.sub-category-list {
    list-style: none;
    padding-left: 20px; /* Indent sub-categories */
    margin-top: 5px;
    margin-bottom: 10px;
    max-height: 0; /* Hidden by default */
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
}

.has-submenu.open > .sub-category-list {
    max-height: 500px; /* Or a sufficiently large value to show all items */
}

.has-submenu.open .submenu-toggle {
    transform: rotate(180deg);
}

.sub-category-list li a {
    font-size: 0.9em;
    color: var(--text-light);
    font-weight: 400;
}

.sub-category-list li.active a {
    color: var(--primary-dark);
    font-weight: 600;
}

/* --- Styles for Rating Stars (Global) --- */
.rating-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}
.stars {
    --percent: calc(var(--rating) / 5 * 100%);
    display: inline-block;
    font-size: 20px;
    font-family: Times; /* A common font that supports stars */
    line-height: 1;
}
.stars::before {
    content: '★★★★★';
    letter-spacing: 3px;
    background: linear-gradient(90deg, #ffc107 var(--percent), #e0e0e0 var(--percent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.rating-count {
    font-size: 0.9em;
    color: var(--text-light);
}

/* --- Styles for Review Display --- */
.reviews-section .review {
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
}
.reviews-section .review:first-child {
    padding-top: 0;
}
.reviews-section .review:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.review .rating-summary {
    margin-top: 0;
    margin-bottom: 8px;
}
.review .review-author {
    font-size: 0.9em;
    color: var(--text-light);
}
.review .review-text {
    color: var(--text-dark);
    line-height: 1.7;
}
/* --- Redesigned Account Page Styles --- */
.account-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}
@media (min-width: 992px) {
    .account-layout {
        grid-template-columns: 260px 1fr; /* Fixed sidebar width */
    }
}

.account-nav {
    background-color: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 15px;
}

.account-nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    border-radius: 8px;
    color: var(--text-light);
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 5px;
    transition: all 0.2s ease;
}
.account-nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1.1em;
}
.account-nav-link:hover {
    background-color: var(--bg-main);
    color: var(--text-dark);
}
.account-nav-link.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}
.account-nav-link.vendor-link {
    background-color: var(--secondary-color);
    color: white;
}
.account-nav-link.logout-link {
    color: var(--error-color);
}
.account-nav-link.logout-link:hover {
    background-color: #FEF2F2;
}

.account-nav hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 10px 0;
}

.account-welcome-card {
    background: linear-gradient(to right, #FFFBEB, #FEF3C7);
    border: 1px solid #FBBF24;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
}
.account-welcome-card h3 {
    margin-top: 0;
    color: var(--primary-dark);
}
.account-content-card {
    background-color: var(--bg-white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}
.account-content-card h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}
/* --- New Order Card Styles --- */
.order-list-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.order-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    position: relative;
}
.order-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}
.order-card-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}
.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}
.order-id {
    font-weight: 600;
    font-size: 1.1em;
    color: var(--text-dark);
}
.order-date {
    font-size: 0.9em;
    color: var(--text-light);
    display: block;
}
.order-card-body {
    padding: 20px;
    color: var(--text-light);
}
.order-card-footer {
    padding: 15px 20px;
    background-color: var(--bg-light);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
}
.order-card-footer strong {
    font-size: 1.2em;
    color: var(--primary-dark);
}
.order-card-footer i {
    color: var(--text-light);
    transition: transform 0.2s ease;
}
.order-card:hover .order-card-footer i {
    transform: translateX(5px);
}


/* This container in your header holds the dropdown */
#google_translate_element {
    display: flex;
    align-items: center;
}

/* Hide the original, ugly dropdown from Google */
.goog-te-gadget-simple {
    display: none !important;
}

/* --- Custom Language Switcher Styles --- */
.custom-language-switcher {
    font-size: 1em;
    position: relative;
}

.translate-button {
    background: none;
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--text-light);
    font-size: 1.2em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.translate-button:hover, .translate-button.active {
    background-color: var(--bg-light);
    color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.language-dropdown {
    display: none; /* Hidden by default */
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background-color: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    width: 200px;
    z-index: 1100;
    overflow: hidden;
}

.language-dropdown.show {
    display: block;
}

.language-option {
    display: block;
    padding: 10px 15px;
    color: var(--text-dark);
    font-size: 0.9em;
    text-decoration: none;
}

.language-option:hover {
    background-color: var(--bg-light);
    color: var(--primary-dark);
}

/* ** THIS IS THE FIX for the dropdown on mobile ** */
@media (max-width: 480px) {
    .language-dropdown {
        left: auto;
        right: -55px; /* Position from the right edge of the screen */
    }
}
/* --- THIS IS THE NEW, AGGRESSIVE FIX for the top bar --- */

/* Hide the banner frame itself */
.goog-te-banner-frame.skiptranslate {
    display: none !important;
} 

/* This is the most important part. Google adds a `top` style to the body.
   We must override it to prevent the white space at the top. */
body {
    top: 0px !important; 
    position: static !important; /* Prevents Google from changing the body's position */
}

/* This class is added to the body by Google, we remove its padding */
body.translated-ltr {
    padding-top: 0px !important;
}
body.translated-rtl {
    padding-right: 0px !important;
}

/* This class is sometimes added by the script, hide it as well */
.skiptranslate {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}


/* --- Style for the Logged-In User Account Icon --- */

.header-actions .user-account {
    font-size: 1.3em; /* Increases the size of the icon */
    color: var(--text-light);
    transition: all 0.2s ease;
    display: inline-block;
    padding: 0 5px;
}

.header-actions .user-account:hover {
    color: var(--primary-dark);
    transform: scale(1.1); /* Adds a subtle zoom effect on hover */
}

.header-actions .user-logout {
    font-size: 1.3em; /* Increases the size of the icon */
    color: var(--text-light);
    transition: all 0.2s ease;
    display: inline-block;
    padding: 0 5px;
}

.header-actions .user-logout:hover {
    color: var(--primary-dark);
    transform: scale(1.1); /* Adds a subtle zoom effect on hover */
}

.header-actions .user-register {
    font-size: 1.3em; /* Increases the size of the icon */
    color: var(--text-light);
    transition: all 0.2s ease;
    display: inline-block;
    padding: 0 5px;
}

.header-actions .user-register:hover {
    color: var(--primary-dark);
    transform: scale(1.1); /* Adds a subtle zoom effect on hover */
}

.header-actions .user-login {
    font-size: 1.3em; /* Increases the size of the icon */
    color: var(--text-light);
    transition: all 0.2s ease;
    display: inline-block;
    padding: 0 5px;
}

.header-actions .user-login:hover {
    color: var(--primary-dark);
    transform: scale(1.1); /* Adds a subtle zoom effect on hover */
}

/* This hides the main tooltip container */
.goog-tooltip {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* This hides the small arrow that points to the text */
.goog-tooltip-pos {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}
/* --- Final Fix to Hide Google Translate Hover Highlight --- */
.goog-text-highlight {
    background-color: transparent !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
    box-shadow: none !important;
    border: none !important;
}

/* --- New Styles for Auth Pages (Login/Register) --- */
.auth-page {
    background-color: var(--bg-light);
    width: 100%;
    min-height: 100vh; /* Ensure the background covers the full screen height */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem; /* Add padding for small screens */
}
.auth-container {
    display: flex;
    width: 100%;
    max-width: 1100px;
    /* ** FIX: Let content define height, but limit it to screen height ** */
    height: auto; 
    max-height: calc(100vh - 4rem); /* Ensure it fits within the viewport padding */
    min-height: 500px;
    background-color: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* Image Panel (Left Side) */
.auth-image-panel {
    flex: 1;
    background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../assets/images/auth-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem;
}
.register-image-panel {
    background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../assets/images/auth-bg-2.jpg');
}
.auth-logo-link .auth-logo {
    max-height: 50px;
    filter: brightness(0) invert(1); /* Makes logo white */
}
.auth-image-content h2 {
    font-size: 2.5em;
    font-weight: 700;
}
.auth-image-content p {
    font-size: 1.1em;
    opacity: 0.9;
    max-width: 400px;
}

/* Form Panel (Right Side) */
.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    /* ** FIX: This panel will scroll if its content is too tall ** */
    overflow-y: auto;
}
.auth-form-container {
    width: 100%;
    max-width: 400px;
    padding-top: 80px;
    padding-bottom: 50px;
}
.auth-form-container h1 {
    font-size: 2em;
    margin-bottom: 0.2em;
}
.auth-form-container > p {
    color: var(--text-light);
    margin-bottom: 2em;
}
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
}
.form-link {
    font-size: 0.9em;
}
.auth-switch-link {
    text-align: center;
    margin-top: 2em;
    font-size: 0.95em;
}

@media (max-width: 900px) {
    .auth-image-panel {
        display: none; /* Hide image panel on smaller screens */
    }
    .auth-container {
        height: auto;
        max-height: none;
    }
}

/* --- Product Media Gallery Styles --- */
.product-image-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    
    top: 80px;
}

/* ** THIS IS THE FIX: Apply sticky positioning ONLY on larger screens ** */
@media (min-width: 768px) {
    .product-image-gallery {
        position: sticky;
        top: 80px; /* Adjust this value based on your header height */
    }
}
.main-image-container {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.main-product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block; /* Ensures no extra space below image */
}

/* ** THIS IS THE FIX ** */
.thumbnail-strip {
    display: flex; /* Makes thumbnails appear in a row */
    gap: 10px;
    flex-wrap: wrap; /* Allows thumbnails to wrap to the next line if needed */
}

.thumb-item {
    width: 70px;
    height: 70px;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s ease;
    position: relative;
    flex-shrink: 0; /* Prevents thumbnails from shrinking */
}
.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.thumb-item:hover {
    border-color: var(--primary-color);
}
.thumb-item.active {
    border-color: var(--primary-dark);
    box-shadow: 0 0 8px rgba(217, 119, 6, 0.5);
}
.video-thumb i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    color: white;
    background-color: rgba(0,0,0,0.5);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    border-radius: 12px;
}
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* --- Improved Variation Management UI Styles --- */

.variation-manager {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}
.variation-manager h4 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.variation-group {
    background-color: var(--bg-white);
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}
.variation-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.variation-group-header h5 {
    margin: 0;
    color: var(--text-dark);
}
.remove-variation-btn {
    background: none;
    border: 1px solid #ddd;
    color: var(--error-color);
    font-size: 1em;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    transition: all 0.2s ease;
}
.remove-variation-btn:hover {
    background-color: #FEF2F2;
    border-color: #F87171;
}

.tags-input-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: white;
}
.tags-input-container input {
    border: none;
    outline: none;
    flex-grow: 1;
    padding: 5px;
    font-size: 1em;
}

#generate-skus-btn {
    width: 100%;
    padding: 12px;
    font-size: 1.1em;
}

.variant-sku-item {
    border: 1px solid #e0e0e0;
    border-left: 4px solid var(--secondary-color);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    background: #fafcff;
}
.variant-sku-header {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 15px;
    color: var(--text-dark);
}

/* --- New Styles for Admin Structure Page --- */
.admin-structure-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}
@media (min-width: 1024px) {
    .admin-structure-grid {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}

.structure-column .admin-section {
    margin-bottom: 30px;
}

.structure-table .parent-row td {
    background-color: #f8f9fa;
    font-size: 1.05em;
    border-top: 2px solid #dee2e6;
}

.structure-table .child-row td {
    padding-left: 30px;
    border-top: 1px dashed #e9ecef;
}
.structure-table .child-row td::before {
    content: "↳ ";
    color: #6c757d;
}

/* Add-on Description */
.addon-details { flex-grow: 1; }
.addon-name { font-weight: 500; display: block; }
.addon-description {
    font-size: 0.85em;
    color: var(--text-light);
    display: block;
}

/* New Layout for Description & Features */
.product-full-details-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
}
@media (min-width: 768px) {
    .product-full-details-section {
        grid-template-columns: 2fr 1fr; /* Description on left, features on right */
    }
}

.product-full-description p {
    line-height: 1.7;
    color: var(--text-light);
}

.product-key-features ul {
    list-style: none;
    padding: 0;
}
.product-key-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    font-weight: 500;
}
.product-key-features li i {
    color: var(--success-color);
    margin-top: 4px;
}

/* --- Styles for Product Info Tabs --- */
.product-info-tabs {
    margin-top: 3rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background-color: var(--bg-white);
    box-shadow: var(--shadow-sm);
}

.tab-nav {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    border-bottom: 1px solid var(--border-color);
}

.tab-nav-link {
    background: none;
    border: none;
    padding: 15px 25px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 500;
    color: var(--text-light);
    border-bottom: 3px solid transparent;
    margin-bottom: -1px; /* Align with bottom border */
    transition: all 0.2s ease;
}

.tab-nav-link:hover {
    color: var(--text-dark);
}

.tab-nav-link.active {
    color: var(--primary-dark);
    border-bottom-color: var(--primary-dark);
}

.tab-content-panels {
    padding: 2rem;
}

.tab-panel {
    display: none; /* Hidden by default */
    animation: fadeIn 0.5s;
}

.tab-panel.active {
    display: block; /* Show the active panel */
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Key features list style from previous step */
.product-key-features {
    /* ... ensure styles from previous step are here ... */
}

/* --- Button Loader Styles --- */
.btn.loading {
    cursor: not-allowed;
    opacity: 0.8;
}

.btn .btn-loader {
    display: none; /* Hidden by default */
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.btn.loading .btn-text {
    display: none; /* Hide text when loading */
}

.btn.loading .btn-loader {
    display: inline-block; /* Show loader when loading */
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- New Styles for Admin Content Page --- */
.content-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.content-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: var(--bg-light);
    padding: 10px;
    border-radius: 8px;
}
.content-item-thumb {
    width: 100px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}
.content-item-details {
    flex-grow: 1;
}
.content-item-details strong {
    display: block;
}
.content-item-details small {
    color: var(--text-light);
    font-size: 0.85em;
}
.content-item-actions {
    display: flex;
    gap: 5px;
}

/* --- Desktop Navigation & Mega Menu Styles --- */
.desktop-navigation { display: none; }
@media (min-width: 993px) {
    .desktop-navigation { display: flex; }
}
/* ... all other mega menu styles from previous step ... */


/* --- Mobile Responsiveness (FINAL FIX) --- */
@media (max-width: 992px) {
    .desktop-navigation { display: none; }
    .desktop-navigation,
    .location-display-desktop,
    .header-search-container {
        display: none;
    }
    .menu-toggle { display: block; }
    
    .mobile-nav-panel {
        display: block; position: fixed; top: 0; left: 0;
        width: 300px; max-width: 80%; height: 100%;
        background-color: var(--bg-white);
        box-shadow: 0 0 25px rgba(0,0,0,0.2);
        padding: 70px 0 20px;
        transform: translateX(-100%);
        transition: transform 0.35s ease;
        z-index: 1200;
        overflow-y: auto;
    }
    .mobile-nav-panel.active { transform: translateX(0); }
    
    .mobile-nav-panel .mobile-menu-ul a { display: block; padding: 12px 20px; }
    .mobile-nav-panel .has-submenu-mobile .mobile-menu-link-wrapper { display: flex; justify-content: space-between; align-items: center; }
    .submenu-toggle-mobile {
        background: none;
        border: none;
        padding: 12px 20px;
        cursor: pointer;
        color: var(--text-light);
        transition: transform 0.3s ease;
    }
    .has-submenu-mobile.open > .mobile-menu-link-wrapper .submenu-toggle-mobile {
        transform: rotate(180deg);
    }
    .sub-menu-mobile {
        list-style: none;
        padding: 0;
        margin: 0;
        max-height: 0; /* Hidden by default */
        overflow: hidden;
        transition: max-height 0.4s ease-in-out;
        background-color: #f7f8fa; /* Slight background color for distinction */
    }
    .has-submenu-mobile.open > .sub-menu-mobile {
        max-height: 500px; /* Animate open */
    }
    .sub-menu-mobile li a {
        padding-left: 40px; /* Indent the sub-menu items */
        font-size: 0.9em;
        font-weight: 500;
        color: var(--text-light);
    }
    .sub-menu-mobile li a:hover {
        color: var(--primary-dark);
    }
}

/* --- Desktop Navigation & Mega Menu (Corrected Hover Fix) --- */
.desktop-navigation { display: none; }
@media (min-width: 993px) {
    .desktop-navigation { display: block; }
}
.main-menu-ul { display: flex; gap: 5px; list-style: none; padding: 0; margin: 0; align-items: stretch; }

.main-menu-ul > li {
    display: flex;
    align-items: center;
}

.main-menu-ul a { display: block; padding: 20px 16px; font-weight: 600; text-decoration: none; }
.main-menu-ul .has-submenu > a { display: flex; align-items: center; gap: 8px; }
.main-menu-ul .dropdown-icon { font-size: 0.7em; transition: transform 0.3s ease; }

.has-submenu {
    position: relative;
}

/* Make the sub-menu appear when hovering the PARENT LI, not just the link. This solves the gap issue. */
.has-submenu:hover > .sub-menu, 
.has-submenu:hover > .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.has-submenu:hover > a .dropdown-icon {
    transform: rotate(180deg);
}

.sub-menu, .mega-menu {
    position: absolute;
    top: 100%; /* Position it right below the parent li */
    left: 0;
    background-color: var(--bg-white);
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 12px 12px;
    border-top: 3px solid var(--primary-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease-in-out;
    z-index: 1000;
}

.sub-menu {
    min-width: 230px;
    padding: 10px 0;
}
.sub-menu a {
    white-space: nowrap;
    padding: 10px 20px;
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: -300%;
    width: 100vw;
    max-width: 900px;
    background-color: var(--bg-white);
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 12px 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}
.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}
.mega-menu-column h5 {
    font-size: 1em;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}
.mega-menu-column ul { list-style: none; padding: 0; }
.mega-menu-column ul li a {
    padding: 6px 0;
    font-size: 0.9em;
    font-weight: 500;
    color: var(--text-light);
}
.mega-menu-column ul li a:hover {
    color: var(--primary-color);
}

/* --- Mobile Navigation --- */
.menu-toggle { display: none; }
.mobile-nav-panel {
    display: block; position: fixed; top: 0; left: 0;
    width: 300px; max-width: 80%; height: 100%;
    background-color: var(--bg-white);
    box-shadow: 0 0 25px rgba(0,0,0,0.2);
    padding: 70px 0 20px;
    transform: translateX(-100%);
    transition: transform 0.35s ease-in-out;
    z-index: 1200;
    overflow-y: auto;
}
.menu-overlay {
    display: none; position: fixed; top: 0; left: 0;
    width: 100%; height: 100%; background-color: rgba(0,0,0,0.6);
    z-index: 1100; opacity: 0; visibility: hidden;
    transition: opacity 0.35s ease;
}

@media (max-width: 992px) {
    .desktop-navigation { display: none; }
    .menu-toggle { display: block; z-index: 1300; }
    .mobile-nav-panel.active { transform: translateX(0); }
    .menu-overlay.active { display: block; opacity: 1; visibility: visible; }
    body.no-scroll { overflow: hidden; }
}

/* Mobile Menu Specific Styles */
.mobile-menu-ul a { display: block; padding: 12px 20px; font-weight: 600; }
.mobile-menu-link-wrapper { display: flex; justify-content: space-between; align-items: center; }
.submenu-toggle-mobile { background: none; border: none; padding: 12px 20px; cursor: pointer; }
.sub-menu-mobile { display: none; padding-left: 20px; background: #f7f7f7; }
.has-submenu-mobile.open > .sub-menu-mobile { display: block; }
.has-submenu-mobile.open .submenu-toggle-mobile i { transform: rotate(180deg); }
.mobile-child-cat { padding-left: 30px !important; }
.sub-menu-mobile .sub-menu-mobile {
    padding-left: 15px; /* Add extra indentation for the 3rd level */
    background-color: #e9ecef; /* A slightly darker grey to distinguish it */
}
.sub-menu-mobile .sub-menu-mobile a {
    color: #495057;
    font-weight: 400;
}

/* Adjust the main panel to be a flex column */
.mobile-nav-panel {
    padding: 0; /* Remove old padding */
    display: flex;
    flex-direction: column;
}

/* Style the new header block */
.mobile-nav-header {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0; /* Prevent this section from shrinking */
}
.mobile-menu-logo {
    max-height: 40px;
    margin: 0 auto 15px;
    display: block;
}
.header-search-container-mobile .header-search-form {
    position: relative;
}
.header-search-container-mobile .search-input {
    height: 40px;
    border-radius: 8px;
    background-color: var(--bg-light);
    width: 100%;
    border: 1px solid var(--border-color);
    padding: 0 40px 0 15px;
    font-size: 0.9em;
}
.header-search-container-mobile .search-button {
    position: absolute;
    right: 0;
    top: 0;
    height: 40px;
    width: 40px;
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
}

/* Make the main menu list scrollable */
.mobile-nav-panel .mobile-menu-ul {
    flex-grow: 1; /* Allow this section to take up remaining space */
    overflow-y: auto; /* Add scrollbar if content is long */
    padding: 10px 0;
}

/* Keep the location actions at the very bottom */
.mobile-nav-panel .mobile-only-actions {
    margin-top: auto; /* Push to the bottom */
    flex-shrink: 0;
}

.order-totals-list p { display: flex; justify-content: space-between; margin-bottom: 10px; }
    .order-totals-list .grand-total { font-size: 1.2em; }
    .text-success { color: var(--success-color); }
    .payment-details { margin-top: 20px; padding-top: 20px; border-top: 1px solid #eee; }
    .payment-details h4 { margin-bottom: 10px; }
    
/* --- Styles for Redesigned Vendor Pages --- */

/* Earnings Page Transaction List */
.transaction-list { display: flex; flex-direction: column; gap: 15px; }
.transaction-item { display: flex; align-items: center; gap: 15px; padding: 15px; background: var(--bg-light); border-radius: 8px; border: 1px solid var(--border-color); }
.tx-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.tx-icon.tx-credit { background-color: var(--success-color); }
.tx-icon.tx-debit { background-color: var(--error-color); }
.tx-details { flex-grow: 1; }
.tx-description { font-weight: 600; }
.tx-date { font-size: 0.85em; color: var(--text-light); }
.tx-amount-section { text-align: right; }
.tx-amount { font-size: 1.1em; font-weight: 700; }

/* Manage Services Page Card Layout */
.service-card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
.service-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}
.service-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.service-card-icon {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
}
.service-card-details {
    flex-grow: 1;
}
.service-card-details h4 {
    margin: 0 0 5px;
    font-size: 1.2em;
}
.service-card-details p {
    margin: 0;
    color: var(--text-light);
}
.service-card .btn {
    flex-shrink: 0;
}

/* --- Wallet Summary Grid (Mobile Optimized) --- */
.wallet-summary-grid {
    display: grid;
    grid-template-columns: 1fr; /* This is the default: one column for mobile */
    gap: 20px;
    margin-bottom: 30px;
}

/* This media query will only apply to screens wider than 500px */
@media (min-width: 500px) {
    .wallet-summary-grid {
        /* On larger screens, switch to two columns */
        grid-template-columns: 1fr 1fr;
    }
}

/* --- "Why Choose Us" (USP) Section Styles --- */
.why-choose-us { 
    text-align: center; 
    background-color: #FFFBF5; /* A warmer, more inviting off-white */
    padding: 4rem 2rem; /* More vertical space */
    margin-top: 3rem;
    border-radius: 12px;
    border: 1px solid #FBEADC; /* A subtle border */
}
.why-choose-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Better for 4 items */
    gap: 2rem;
    margin-top: 2rem;
}
.feature-item {
    padding: 2rem;
    background-color: var(--bg-white); /* Give cards a background */
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
.feature-item i { 
    font-size: 2rem; 
    color: white;
    background-color: var(--primary-color);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: inline-flex; /* Use flex to center the icon */
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem; 
}
.feature-item h3 { 
    font-size: 1.3em; 
    margin-bottom: 0.5rem; 
    color: var(--text-dark);
}
.feature-item p {
    color: var(--text-light);
    line-height: 1.6;
    font-size: 0.95em;
}
/* --- Special Attractions Section Styles --- */
.attractions-section {
    background-color: #FFFBF5;
    padding: 2rem 1rem;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    border: 1px solid #FBEADC;
}
.attractions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}
.attraction-item {
    display: flex;
    align-items: center;
    gap: 15px;
}
.attraction-item i {
    font-size: 1.8rem;
    color: var(--primary-dark);
    width: 50px;
    text-align: center;
}
.attraction-item h4 {
    margin: 0 0 2px;
    font-size: 1.1em;
    color: var(--text-dark);
}
.attraction-item p {
    margin: 0;
    font-size: 0.9em;
    color: var(--text-light);
}

/* --- Styles for Redesigned Franchisee Pages --- */
.admin-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.admin-vendor-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}
.admin-vendor-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}
.admin-vendor-card .card-header h4 {
    margin: 0;
    font-size: 1.2em;
}
.admin-vendor-card .card-body {
    padding: 20px;
    flex-grow: 1;
}
.admin-vendor-card .card-footer {
    padding: 15px 20px;
    background-color: var(--bg-light);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
    border-radius: 0 0 12px 12px;
}

/* --- Styles for Redesigned Franchisee Dashboard --- */
.franchisee-welcome-header {
    background: linear-gradient(to right, #FFFBF5, #FEF3C7);
    border: 1px solid #FBEADC;
    padding: 2rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}
.franchisee-welcome-header h1 {
    margin: 0 0 0.25em;
    color: var(--primary-dark);
}
.franchisee-welcome-header p {
    margin: 0;
    color: var(--text-light);
    font-size: 1.1em;
}

.stat-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 2rem;
}
.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background-color: var(--bg-white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}
.stat-card i {
    font-size: 2.5em;
    color: var(--primary-color);
}
.stat-card .stat-info {
    line-height: 1.2;
}
.stat-card .stat-number {
    font-size: 2em;
    font-weight: 700;
    color: var(--text-dark);
    display: block;
}
.stat-card .stat-label {
    font-size: 1em;
    color: var(--text-light);
}

.checkbox-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 10px;
        background-color: #f8f9fa;
        padding: 15px;
        border-radius: 8px;
        border: 1px solid var(--border-color);
    }

/* --- Styles for New Sidebar Filters --- */
.filter-widget {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}
.filter-widget:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.filter-widget h3 {
    font-size: 1.2em;
    margin-bottom: 15px;
}
.checkbox-list {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    padding: 10px;
    border-radius: 8px;
}
.checkbox-list .checkbox-label {
    display: block;
    margin-bottom: 8px;
}

/* --- Breadcrumbs --- */
.breadcrumbs-container {
    background-color: #f8f9fa;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
}

.breadcrumbs-list {
    list-style: none;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    /* This should match your site's main container */
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item a {
    color: var(--primary-color, #3498db);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-item a:hover {
    color: var(--primary-dark, #2980b9);
}

.breadcrumb-item.active {
    color: #6c757d;
    font-weight: 500;
}

/* Separator */
.breadcrumb-item + .breadcrumb-item::before {
    content: '>';
    margin: 0 10px;
    color: #adb5bd;
}

/* ================================================================== */
/* NEW: Common Table Styles                                           */
/* ================================================================== */

/* Main container for the table to allow for responsive scrolling */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e5e7eb; /* Light border around the container */
    border-radius: 0.75rem; /* Rounded corners */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    background-color: #ffffff;
}

.admin-table {
    width: 100%;
    border-collapse: collapse; /* Removes space between cells */
    font-family: 'Inter', sans-serif;
}

/* Table Header Styling */
.admin-table thead {
    background-color: #f9fafb; /* A very light gray for the header */
}

.admin-table th {
    padding: 12px 15px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #44403c; /* Dark, warm gray */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #e5e7eb;
}

/* Table Body Styling */
.admin-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s ease-in-out;
}

.admin-table tbody tr:last-child {
    border-bottom: none; /* Remove border from the last row */
}

.admin-table tbody tr:hover {
    background-color: #fffaf5; /* Light cream on hover */
}

.admin-table td {
    padding: 15px;
    vertical-align: middle;
    font-size: 14px;
    color: #57534e; /* Slightly lighter warm gray */
}

/* Styling for specific cell types */
.admin-table td strong, .admin-table td a {
    color: #881337; /* Deep Maroon for important text and links */
    font-weight: 600;
    text-decoration: none;
}
.admin-table td a:hover {
    text-decoration: underline;
    color: #f97316; /* Vibrant orange on hover */
}

.admin-table .actions-cell {
    white-space: nowrap;
    text-align: right;
}

/* Styling for buttons inside tables */
.admin-table .btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}
