/* Frontend Styles for Public Pages */

/* Theme CSS Variables - Default values */
:root {
    --theme-primary: #125439;
    --theme-secondary: #406757;
    --theme-accent: #abbdb5;
    --theme-dark: #0a3628;
    --theme-background: #ffffff;
    --theme-text: #1a1a1a;
    --theme-text-secondary: #666666;
    --theme-header: #125439;
    --theme-footer: #125439;
    --theme-button: #125439;
    --theme-button-text: #ffffff;
    --theme-button-hover: #0a3628;
    --theme-link: #125439;
    --theme-link-hover: #0a3628;
    --theme-border: #e5e7eb;
    --theme-card-background: #ffffff;
    --theme-card-border: #e5e7eb;
    --theme-success: #10b981;
    --theme-warning: #f59e0b;
    --theme-error: #ef4444;
    --theme-info: #3b82f6;
    --theme-discount: #ef4444;
    --theme-discount-gradient: rgba(239, 68, 68, 0.9);
    /* RGB values for rgba() usage */
    --theme-primary-rgb: 18 84 57;
    --theme-secondary-rgb: 64 103 87;
    --theme-accent-rgb: 171 189 181;
    --theme-dark-rgb: 10 54 40;
}

/* Import Cairo Font */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&display=swap');

/* Apply Cairo Font to All Elements */
* {
    font-family: 'Cairo', sans-serif;
}

/* Fixed Background for Entire Page */
html {
    height: 100%;
    overflow-x: hidden;
    /* Soft site background gradient (shows through glass) */
    background:
        radial-gradient(1200px circle at 12% 10%, rgba(var(--theme-primary-rgb, 18 84 57), 0.10), transparent 60%),
        radial-gradient(900px circle at 88% 18%, rgba(var(--theme-secondary-rgb, 64 103 87), 0.08), transparent 55%),
        radial-gradient(800px circle at 70% 92%, rgba(var(--theme-accent-rgb, 171 189 181), 0.06), transparent 60%),
        linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(248, 250, 252, 1) 100%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
}

body {
    position: relative;
    min-height: 100vh;
    /* Let html background be visible (needed for glass effect) */
    background: transparent;
}

/* Home page: extra-soft fixed gradient backdrop for glass effect */
body:has(#homeSectionsContainer)::before {
    content: '';
    position: fixed;
    inset: -20vh;
    background:
        radial-gradient(1200px circle at 14% 8%, rgba(18, 84, 57, 0.16), transparent 58%),
        radial-gradient(900px circle at 88% 18%, rgba(64, 103, 87, 0.13), transparent 56%),
        radial-gradient(800px circle at 70% 92%, rgba(171, 189, 181, 0.10), transparent 58%),
        linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(244, 247, 250, 1) 100%);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 50% 50%;
    transform: translate3d(var(--bg-float-x, 0px), var(--bg-float-y, 0px), 0);
    transition: transform 160ms ease-out;
    will-change: transform;
    filter: saturate(1.12) contrast(1.04);
    pointer-events: none;
    z-index: 0;
    animation: siteBgDrift 16s ease-in-out infinite alternate;
}

/* Fallback for browsers that don't support :has() */
body.has-home-sections::before {
    content: '';
    position: fixed;
    inset: -20vh;
    background:
        radial-gradient(1200px circle at 14% 8%, rgba(18, 84, 57, 0.16), transparent 58%),
        radial-gradient(900px circle at 88% 18%, rgba(64, 103, 87, 0.13), transparent 56%),
        radial-gradient(800px circle at 70% 92%, rgba(171, 189, 181, 0.10), transparent 58%),
        linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(244, 247, 250, 1) 100%);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 50% 50%;
    transform: translate3d(var(--bg-float-x, 0px), var(--bg-float-y, 0px), 0);
    transition: transform 160ms ease-out;
    will-change: transform;
    filter: saturate(1.12) contrast(1.04);
    pointer-events: none;
    z-index: 0;
    animation: siteBgDrift 16s ease-in-out infinite alternate;
}

body:has(#homeSectionsContainer) #headerPlaceholder,
body:has(#homeSectionsContainer) #homeSectionsContainer,
body:has(#homeSectionsContainer) #footerPlaceholder {
    position: relative;
    z-index: 1;
}

body.has-home-sections #headerPlaceholder,
body.has-home-sections #homeSectionsContainer,
body.has-home-sections #footerPlaceholder {
    position: relative;
    z-index: 1;
}

@keyframes siteBgDrift {
    0% {
        background-position: 48% 52%;
    }

    100% {
        background-position: 52% 48%;
    }
}

@media (prefers-reduced-motion: reduce) {

    body:has(#homeSectionsContainer)::before,
    body.has-home-sections::before {
        transition: none;
        animation: none;
        transform: none;
    }
}

/* Header and Footer Placeholders */
#headerPlaceholder,
#footerPlaceholder {
    min-height: 1px;
    width: 100%;
    position: relative;
    z-index: 1;
}

#headerPlaceholder:empty,
#footerPlaceholder:empty {
    min-height: 60px;
    /* Minimum height to prevent layout shift */
}

/* Home Sections Container */
#homeSectionsContainer {
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

/* Header Styles */
.site-header {
    /* Force green gradient header (even if theme header is white) */
    background: linear-gradient(135deg,
            rgba(var(--theme-primary-rgb, 18 84 57), 0.98) 0%,
            rgba(var(--theme-secondary-rgb, 64 103 87), 0.95) 100%);
    box-shadow: 0 2px 10px rgba(18, 84, 57, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1.2rem 0;
    border-bottom: 2px solid rgba(239, 233, 216, 0.1);
    width: 100%;
    color: #fff;
}


@media (max-width: 768px) {
    .site-header:has(.header-nav.active) {
        /* Keep header above overlay so the toggle stays clickable */
        z-index: 999998;
    }


    .site-header.menu-open {
        /* JS toggles .menu-open on the header when the sidebar is open */
        z-index: 999998;
    }
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--theme-button-text, #fff);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 0;
    /* allow text truncation on small screens */
}

.header-logo:hover {
    color: #fff;
    transform: translateY(-2px);
    opacity: 0.9;
}

.header-logo i {
    font-size: 2.2rem;
    color: #fff;
    transition: all 0.3s ease;
}

.header-logo:hover i {
    color: #fff;
    transform: rotate(-10deg);
}

.header-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* إخفاء عناصر التنقل والبحث الافتراضية في النسخة المصغرة */
.mobile-nav-actions {
    display: none;
}

/* Footer content injected into the mobile side menu */
.mobile-side-footer {
    display: none;
}

/* Hide mobile sidebar sections on desktop */
.mobile-side-platform-info,
.mobile-side-platform-title,
.mobile-side-platform-description,
.mobile-side-contact-buttons,
.mobile-side-contact-title,
.mobile-side-contact-buttons-wrapper {
    display: none !important;
}

:root {
    --mobile-bottom-nav-height: 72px;
}

/* Mobile Bottom Navigation (Public Pages) */
.mobile-bottom-nav {
    display: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--theme-button-text, #fff);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    padding: 0.6rem 1rem;
    position: relative;
    border-radius: 8px;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #fff;
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 80%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 0 0 auto;
}

.search-btn,
.cart-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    font-size: 1.1rem;
}

.search-btn:hover,
.cart-btn:hover {
    background: var(--theme-button-text, #fff);
    color: var(--theme-primary, #125439);
    border-color: #fff;
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #efe9d8;
    color: var(--theme-secondary, #406757);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    border: 2px solid var(--theme-secondary, #406757);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.login-btn,
.account-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    white-space: nowrap;
}

.login-btn i,
.account-btn i {
    font-size: 0.9rem;
}

.login-btn:hover,
.account-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: 2px solid var(--theme-button-text, #fff);
    color: var(--theme-button-text, #fff);
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    background: var(--theme-button-text, #fff);
    color: var(--theme-primary, #125439);
}

.mobile-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: var(--theme-button-text, #fff);
    color: var(--theme-primary, #125439);
    border-color: var(--theme-button-text, #fff);
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    /* Keep above bottom nav, below the search container itself */
    z-index: 999996 !important;
    animation: fadeIn 0.3s ease-out;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);

    pointer-events: auto;
}


@media (max-width: 768px) {
    .search-overlay {
        top: auto !important;

    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Search Container */
.search-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: var(--theme-header, #125439);
    padding: 1rem;
    z-index: 1000000 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s ease-out;
    padding-bottom: 0;

    isolation: isolate;
    contain: layout style paint;

    transform: translateZ(0);
    -webkit-transform: translateZ(0);

    pointer-events: auto;

    will-change: transform;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

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

.search-container-inner {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1rem;
    font-family: 'Cairo', sans-serif;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-input:focus {
    outline: none;
    border-color: #fff;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.search-submit-btn,
.search-close-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.search-submit-btn:hover,
.search-close-btn:hover {
    background: var(--theme-button-text, #fff);
    color: var(--theme-primary, #125439);
    border-color: var(--theme-button-text, #fff);
    transform: scale(1.1);
}

/* Search Results */
.search-results {
    position: relative;
    background: var(--theme-background, #fff);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 999999 !important;
    max-width: 1200px;
    margin: 0.5rem auto 0;
}

.search-results-content {
    padding: 0.5rem 0;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.25rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    text-decoration: none;
    color: var(--theme-text, #1a1a1a);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: #f5f5f5;
}

.search-result-item-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    background: #f0f0f0;
    flex-shrink: 0;
}

.search-result-item-info {
    flex: 1;
    min-width: 0;
}

.search-result-item-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--theme-primary, #125439);
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-result-item-category {
    font-size: 0.85rem;
    color: var(--theme-text-secondary, #666);
    margin-bottom: 0.25rem;
}

.search-result-item-price {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--theme-secondary, #406757);
}

.search-result-empty {
    padding: 2rem 1.25rem;
    text-align: center;
    color: var(--theme-text-secondary, #666);
    font-size: 0.95rem;
}

.search-result-loading {
    padding: 1.5rem 1.25rem;
    text-align: center;
    color: var(--theme-text-secondary, #666);
    font-size: 0.95rem;
}

.search-result-loading i {
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.search-results-header {
    padding: 0.75rem 1.25rem;
    background: #f8f8f8;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--theme-primary, #125439);
}

.search-result-item-name mark {
    background: #efe9d8;
    color: var(--theme-primary, #125439);
    padding: 0 2px;
    border-radius: 3px;
    font-weight: 700;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.7) 0%, rgba(139, 92, 246, 0.7) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    padding: 4rem 2rem;
    display: flex;
    align-items: center;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 0 0 2rem 2rem;
    margin-bottom: 4rem;
    position: relative;
    z-index: 1;
}

.hero-content {
    flex: 1;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-placeholder {
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    backdrop-filter: blur(10px);
}

/* Buttons */
.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all var(--transition-base);
    font-size: 1rem;
}

.btn-primary {
    background: white;
    color: var(--accent-blue);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--accent-blue);
}

.btn-sm {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Sections */
.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--text-primary);
}

.categories-section,
.products-section {
    padding: 4rem 0;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.category-card-front {
    background: rgba(255, 255, 255, 0.7);
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(18, 84, 57, 0.1);
}

.category-card-front:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
}

.category-icon.blue {
    background: var(--accent-blue);
}

.category-icon.green {
    background: var(--accent-green);
}

.category-icon.orange {
    background: var(--accent-orange);
}

.category-icon.purple {
    background: var(--accent-purple);
}

.category-card-front h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.category-card-front p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.category-link {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-base);
}

.category-link:hover {
    color: var(--accent-purple);
}

/* Products Grid */
.products-grid-front {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    width: 100%;
}

.product-card-front {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(18, 84, 57, 0.1);
}

.product-card-front:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.product-image-front {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
}

.product-image-front.blue {
    background: var(--theme-primary, #125439);
}

.product-image-front.green {
    background: var(--theme-primary, #125439);
}

.product-image-front.orange {
    background: var(--theme-primary, #125439);
}

.product-info-front {
    padding: 1rem;
}

.product-info-front h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.4;
}

.product-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.product-meta-front {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.product-price-front {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin: 0.75rem 0;
}

.product-price-front .price-amount {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--theme-primary, #125439);
}

.product-price-front .price-amount.price-free {
    color: var(--saudi-gold) !important;
}

.product-price-front .price-currency {
    font-size: 0.75rem;
    color: var(--theme-primary, #125439);
    opacity: 0.8;
}

.product-add-btn {
    background: var(--theme-button, #125439) !important;
    color: var(--theme-button-text, #fff) !important;
    border: none !important;
    padding: 0.6rem 1rem !important;
    font-size: 0.9rem !important;
    transition: all 0.3s ease !important;
}

.product-add-btn:hover {
    background: var(--theme-button-hover, #0a3628) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(18, 84, 57, 0.3) !important;
}

.product-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-blue);
}

.product-rating {
    color: var(--accent-orange);
}

/* Footer */
.site-footer {
    /* Force green gradient footer (even if theme footer is white) */
    background: linear-gradient(180deg,
            rgba(var(--theme-primary-rgb, 18 84 57), 0.98) 0%,
            rgba(var(--theme-secondary-rgb, 64 103 87), 0.95) 100%);
    margin-top: 5rem;
    padding: 4rem 0 1.5rem;
    border-top: 4px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.footer-container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 0 3rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(1.5rem, 4vw, 4rem);
    position: relative;
    z-index: 1;
}

@media (max-width: 1200px) {
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
        gap: clamp(1.5rem, 3vw, 3rem);
        padding: 0 2.5rem;
    }
}

.footer-section {
    position: relative;
}

.footer-section h3 {
    margin-bottom: 1.5rem;
    color: #fff;
    font-weight: 700;
    font-size: 1.3rem;
    position: relative;
    padding-bottom: 1rem;
    letter-spacing: 0.5px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 3px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 2px;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 0.95rem;
    text-align: justify;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.3s ease;
    font-size: 1.15rem;
    position: relative;
    overflow: hidden;
}

.social-links a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.social-links a:hover::before {
    width: 100%;
    height: 100%;
}

.social-links a:hover {
    background: var(--theme-button-text, #fff);
    color: var(--theme-primary, #125439);
    border-color: var(--theme-button-text, #fff);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4);
}

.social-links a i {
    position: relative;
    z-index: 1;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
    position: relative;
    padding-right: 1.5rem;
}

.footer-links li::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    transition: all 0.3s ease;
    font-weight: bold;
}

.footer-links li:hover::before {
    right: -3px;
    color: #fff;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 0.4rem 0;
    font-size: 0.95rem;
    position: relative;
    font-weight: 500;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: #fff;
    transition: width 0.3s ease;
}

.footer-links a:hover {
    color: #fff;
    padding-right: 0.5rem;
}

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

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    border-right: 3px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    font-weight: 500;
}

.footer-contact li:hover {
    background: rgba(255, 255, 255, 0.12);
    border-right-color: rgba(255, 255, 255, 0.6);
    transform: translateX(-3px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.footer-contact li i {
    color: #fff;
    width: 26px;
    text-align: center;
    font-size: 1.15rem;
    flex-shrink: 0;
    opacity: 0.9;
}

.footer-bottom {
    text-align: center;
    padding-top: 2.5rem;
    margin-top: 3rem;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    position: relative;
}

.footer-bottom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.footer-bottom p {
    margin: 0;
    font-size: 0.95rem;
    letter-spacing: 0.8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.footer-bottom p::before,
.footer-bottom p::after {
    content: '';
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    font-weight: bold;
}

/* Page Content */
.page-content {
    min-height: 60vh;
    padding: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-title {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.page-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

/* Static Content Pages (Policies, About, Contact) */
.static-page .page-content {
    padding: 2.5rem 0 4rem;
}

.static-page .page-header {
    margin-bottom: 2.5rem;
}

.static-page .page-title {
    font-size: clamp(2rem, 4.2vw, 3rem);
    line-height: 1.2;
}

.static-page .page-subtitle {
    font-size: clamp(1rem, 2.6vw, 1.25rem);
    max-width: 720px;
    margin: 0.75rem auto 0;
    line-height: 1.7;
}

.static-page .page-meta {
    max-width: 760px;
    margin: 1.25rem auto 0;
    row-gap: 0.5rem;
}

.static-page .content-section {
    max-width: 980px;
    margin: 0 auto;
}

.content-section {
    background: rgba(var(--theme-background-rgb, 255 255 255), 0.70);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.page-meta {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.page-meta .meta-pill {
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(var(--theme-primary-rgb, 18 84 57), 0.08);
    border: 1px solid rgba(var(--theme-primary-rgb, 18 84 57), 0.2);
    color: var(--text-primary);
    font-weight: 600;
}

.section-stack {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.section-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.section-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.section-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.section-card h2,
.section-card h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.section-card p {
    margin: 0 0 0.75rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.section-card p:last-child {
    margin-bottom: 0;
}

.section-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.section-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.section-list li {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    color: var(--text-secondary);
    line-height: 1.8;
}

.section-list li i {
    color: var(--accent-green);
    margin-top: 0.2rem;
    font-size: 1rem;
}

.section-highlight {
    background: rgba(var(--theme-primary-rgb, 18 84 57), 0.08);
    border: 1px solid rgba(var(--theme-primary-rgb, 18 84 57), 0.2);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.section-highlight strong {
    color: var(--text-primary);
}

.about-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.about-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.values-list {
    list-style: none;
    padding: 0;
}

.values-list li {
    padding: 0.75rem 0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.values-list i {
    color: var(--accent-green);
}

/* Contact Section */
.contact-section {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: white;
}

.contact-icon.blue {
    background: var(--accent-blue);
}

.contact-icon.green {
    background: var(--accent-green);
}

.contact-icon.orange {
    background: var(--accent-orange);
}

.contact-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.contact-card p {
    color: var(--text-secondary);
}

.contact-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.contact-form-container {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
}

.contact-form-container h2 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.contact-form-container .section-highlight {
    margin-top: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-base);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Responsive */
@media (max-width: 768px) {

    /* Prevent background scroll when mobile side menu is open */
    body.menu-open {
        overflow: hidden;
        overscroll-behavior: contain;
    }

    .mobile-menu-toggle {
        display: block;
    }

    /* ISOLATE: Hide desktop buttons on mobile - ensure they don't interfere */
    .header-actions .cart-btn,
    .header-actions .login-btn,
    .header-actions #desktopLoginBtn,
    .header-actions .account-btn,
    .header-actions #desktopAccountBtn,
    .site-header .header-actions .account-btn,
    .site-header .header-actions #desktopAccountBtn {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        width: 0 !important;
        height: 0 !important;
        min-width: 0 !important;
        min-height: 0 !important;
        max-width: 0 !important;
        max-height: 0 !important;
        margin: 0 !important;
        margin-inline-start: 0 !important;
        margin-inline-end: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -9999px !important;
        flex: 0 0 0 !important;
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
        flex-basis: 0 !important;
        order: 999 !important;
        /* Move to end of flex order to not affect other elements */
        /* Completely remove from flexbox flow */
        pointer-events: none !important;
    }


    .header-actions .user-menu {
        display: none !important;
    }


    .header-actions .search-btn {
        display: flex !important;
    }


    .header-actions {
        gap: 0.5rem;
    }

    /* Hide nav in header on mobile (it becomes sidebar when moved to body) */
    .site-header .header-nav {
        display: none !important;
    }

    /* ISOLATE header container for mobile - clean layout, all elements on one line */
    .header-container {
        padding: 0.875rem 1rem !important;
        gap: 0.75rem !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        align-content: center !important;
        justify-content: space-between !important;
        min-height: 60px !important;
        height: auto !important;
        display: flex !important;
        flex-direction: row !important;
        position: relative !important;
        width: 100% !important;
        box-sizing: border-box !important;
        vertical-align: middle !important;
    }

    /* Force all header container children to be vertically centered */
    .header-container>* {
        align-self: center !important;
        vertical-align: middle !important;
    }

    /* Logo: right side (RTL), limited width, no overlap, aligned on same line */
    .header-logo {
        font-size: 1.3rem !important;
        flex: 0 1 auto !important;
        min-width: 0 !important;
        max-width: calc(100% - 120px) !important;
        margin: 0 !important;
        margin-inline-end: auto !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        order: 1 !important;
        display: flex !important;
        align-items: center !important;
        align-self: center !important;
        gap: 0.75rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        height: 44px !important;
        min-height: 44px !important;
        line-height: 1 !important;
        vertical-align: middle !important;
        box-sizing: border-box !important;
    }

    .header-logo i {
        font-size: 1.6rem !important;
        flex-shrink: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        vertical-align: middle !important;
        line-height: 1 !important;
    }

    /* Prevent the logo text from being covered by header buttons */
    .header-logo span {
        display: inline-block !important;
        max-width: 100% !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        min-width: 0 !important;
    }

    /* Actions: left side (RTL), fixed width, no overlap, aligned on same line */
    .header-actions {
        flex: 0 0 auto !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        align-content: center !important;
        align-self: center !important;
        justify-content: flex-start !important;
        justify-items: center !important;
        gap: 0 !important;
        /* Remove gap to prevent hidden buttons from affecting layout */
        margin: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        margin-inline-start: 0 !important;
        order: 2 !important;
        min-width: 100px !important;
        max-width: none !important;
        width: auto !important;
        height: 44px !important;
        min-height: 44px !important;
        position: relative !important;
        z-index: 10 !important;
        vertical-align: middle !important;
        box-sizing: border-box !important;
    }

    /* Force all visible buttons in header-actions to be perfectly aligned */
    .header-actions>button.search-btn,
    .header-actions>button.mobile-menu-toggle {
        align-self: center !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    /* Ensure hidden desktop buttons don't affect flexbox layout */
    .header-actions>button[style*="display: none"],
    .header-actions>button:not(.search-btn):not(.mobile-menu-toggle) {
        flex: 0 0 0 !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
    }

    /* ISOLATE search button for mobile */
    .header-actions .search-btn {
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
        flex-basis: auto !important;
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        max-width: 44px !important;
        max-height: 44px !important;
        margin: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        margin-inline-start: 0 !important;
        margin-inline-end: 0.5rem !important;
        /* Add margin instead of gap to control spacing */
        padding: 0 !important;
        order: 1 !important;
        display: flex !important;
        align-items: center !important;
        align-self: center !important;
        align-content: center !important;
        justify-content: center !important;
        justify-items: center !important;
        position: relative !important;
        font-size: 1.1rem !important;
        line-height: 1 !important;
        vertical-align: middle !important;
        box-sizing: border-box !important;
        border: 2px solid rgba(255, 255, 255, 0.3) !important;
        border-radius: 50% !important;
        background: rgba(255, 255, 255, 0.1) !important;
        color: #fff !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
    }

    /* Ensure icon inside search button is properly aligned */
    .header-actions .search-btn i {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        align-self: center !important;
        line-height: 1 !important;
        font-size: 1.1rem !important;
        /* Explicit font-size to ensure consistency */
        margin: 0 !important;
        padding: 0 !important;
        vertical-align: middle !important;
        width: auto !important;
        height: auto !important;
        min-width: 0 !important;
        min-height: 0 !important;
        max-width: none !important;
        max-height: none !important;
        box-sizing: border-box !important;
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
    }

    /* ISOLATE mobile menu toggle button - override all other rules */
    .header-actions .mobile-menu-toggle,
    .site-header .mobile-menu-toggle,
    #mobileMenuToggle.mobile-menu-toggle,
    button.mobile-menu-toggle#mobileMenuToggle {
        /* Display and positioning */
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;

        /* Layout */
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
        flex-basis: auto !important;
        order: 2 !important;
        /* Menu toggle appears second (left of search, next to it) */

        /* Size - EXACTLY match search button */
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        max-width: 44px !important;
        max-height: 44px !important;

        /* Spacing - EXACTLY match search button */
        margin: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        margin-inline-start: 0 !important;
        margin-inline-end: 0 !important;
        padding: 0 !important;

        /* Visual */
        border: 2px solid rgba(255, 255, 255, 0.3) !important;
        background: rgba(255, 255, 255, 0.1) !important;
        border-radius: 8px !important;
        color: #fff !important;
        font-size: 1.1rem !important;
        /* Match search button font size for proper alignment */

        /* Interaction */
        cursor: pointer !important;
        pointer-events: auto !important;
        user-select: none !important;
        -webkit-user-select: none !important;

        /* Alignment - EXACTLY match search button */
        align-items: center !important;
        align-self: center !important;
        align-content: center !important;
        justify-content: center !important;
        justify-items: center !important;
        vertical-align: middle !important;
        line-height: 1 !important;
        box-sizing: border-box !important;

        /* Position adjustment - centered like other elements */
        transform: none !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;

        /* Transition */
        transition: all 0.3s ease !important;

        /* Z-index */
        z-index: 1001 !important;
    }

    /* Ensure icon inside mobile menu toggle button is properly aligned - EXACTLY match search icon */
    .header-actions .mobile-menu-toggle i,
    .site-header .mobile-menu-toggle i,
    #mobileMenuToggle.mobile-menu-toggle i,
    button.mobile-menu-toggle#mobileMenuToggle i {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        align-self: center !important;
        line-height: 1 !important;
        font-size: 1.1rem !important;
        /* Explicit font-size to match search icon */
        margin: 0 !important;
        padding: 0 !important;
        vertical-align: middle !important;
        width: auto !important;
        height: auto !important;
        min-width: 0 !important;
        min-height: 0 !important;
        max-width: none !important;
        max-height: none !important;
        box-sizing: border-box !important;
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
    }

    .header-actions .mobile-menu-toggle:hover,
    .site-header .mobile-menu-toggle:hover,
    #mobileMenuToggle.mobile-menu-toggle:hover {
        background: var(--theme-button-text, #fff) !important;
        color: var(--theme-primary, #125439) !important;
        border-color: var(--theme-button-text, #fff) !important;
        transform: none !important;
        /* Maintain alignment on hover */
    }

    /* Override glass theme variant rules for mobile menu toggle */
    html[data-theme-variant="glass"] .header-actions .mobile-menu-toggle,
    html[data-theme-variant="glass"] .site-header .mobile-menu-toggle,
    html[data-theme-variant="glass"] #mobileMenuToggle.mobile-menu-toggle {
        background: rgba(255, 255, 255, 0.1) !important;
        border: 2px solid rgba(255, 255, 255, 0.3) !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    html[data-theme-variant="glass"] .header-actions .mobile-menu-toggle:hover,
    html[data-theme-variant="glass"] .site-header .mobile-menu-toggle:hover,
    html[data-theme-variant="glass"] #mobileMenuToggle.mobile-menu-toggle:hover {
        background: var(--theme-button-text, #fff) !important;
        color: var(--theme-primary, #125439) !important;
        border-color: var(--theme-button-text, #fff) !important;
        transform: none !important;
        /* Maintain alignment on hover */
    }


    /* Extra small screens: further optimize spacing */
    @media (max-width: 480px) {
        .header-container {
            padding: 0.75rem 0.875rem;
            gap: 0.375rem;
        }

        .header-logo {
            font-size: 1.15rem;
            max-width: calc(100% - 110px);
            /* Smaller reserve for buttons */
        }

        .header-logo i {
            font-size: 1.4rem;
        }

        .header-logo span {
            max-width: 100%;
        }

        .header-actions {
            gap: 0.375rem;
            min-width: 90px;
        }

        .header-actions .search-btn {
            width: 40px;
            height: 40px;
            font-size: 1rem;
        }

        /* ISOLATE mobile menu toggle for extra small screens */
        .header-actions .mobile-menu-toggle,
        .site-header .mobile-menu-toggle,
        #mobileMenuToggle.mobile-menu-toggle {
            width: 40px !important;
            height: 40px !important;
            min-width: 40px !important;
            min-height: 40px !important;
            max-width: 40px !important;
            max-height: 40px !important;
            font-size: 1rem !important;
        }

        /* Match search button font size on extra small screens */
        .header-actions .search-btn {
            font-size: 1rem !important;
        }
    }

    /* Very small screens: hide logo text if needed */
    @media (max-width: 360px) {
        .header-logo span {
            display: none;
            /* Hide text on very small screens, keep icon only */
        }

        .header-logo {
            max-width: calc(100% - 90px);
        }
    }

    .header-nav {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        width: 300px;
        max-width: 85vw;
        height: 100vh;
        background: linear-gradient(180deg,
                rgba(var(--theme-primary-rgb, 18 84 57), 0.98) 0%,
                rgba(var(--theme-secondary-rgb, 64 103 87), 0.95) 100%);
        box-shadow: -2px 0 15px rgba(0, 0, 0, 0.3);
        display: flex;
        flex-direction: column;
        padding: 0;
        z-index: 999999 !important;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        pointer-events: auto;

        isolation: isolate;

        opacity: 1;
        visibility: visible;
        will-change: transform;

        contain: layout style paint;
    }

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

    /* Mobile sidebar should show footer-only content; hide top nav links */
    #headerNav .nav-menu,
    .header-nav .nav-menu,
    .header-nav .nav-link,
    .header-nav .nav-menu li {
        display: none !important;
        visibility: hidden !important;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0;
        align-items: stretch;
        padding: 0;
        margin: 0;
        flex: 0 0 auto;
        list-style: none;
    }

    .nav-link {
        padding: 1.25rem 1.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        display: flex;
        align-items: center;
        justify-content: space-between;
        text-align: right;
        font-size: 1.05rem;
        pointer-events: auto;
        cursor: pointer;
        position: relative;
        z-index: 10;
    }

    .nav-link::after {
        content: '';
        font-size: 0.9rem;
        opacity: 0.6;
        transition: all 0.3s ease;
    }

    .nav-link:hover::after,
    .nav-link.active::after {
        opacity: 1;
        transform: translateX(5px);
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .nav-link:hover,
    .nav-link.active {
        background: rgba(255, 255, 255, 0.1);
        padding-right: 1.75rem;
    }

    /* Mobile Sidebar Platform Info Section - Top of sidebar */
    .mobile-side-platform-info {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
        padding: 1.5rem 1.5rem 1rem !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
        margin: 0 !important;
        margin-top: 0.5rem !important;
        margin-bottom: 0 !important;
        order: 0 !important;
        /* Show first, before contact buttons */
    }

    .mobile-side-platform-title {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        color: rgba(255, 255, 255, 0.95) !important;
        font-weight: 700 !important;
        font-size: 1.1rem !important;
        margin: 0 !important;
        margin-bottom: 0.5rem !important;
        text-align: right !important;
        width: 100% !important;
    }

    .mobile-side-platform-description {
        display: block !important;
        visibility: visible !important;
        opacity: 0.9 !important;
        color: rgba(255, 255, 255, 0.85) !important;
        font-weight: 400 !important;
        font-size: 0.85rem !important;
        line-height: 1.6 !important;
        margin: 0 !important;
        text-align: right !important;
        width: 100% !important;
    }

    /* Mobile Sidebar Contact Buttons (WhatsApp & Telegram) - After platform info */
    .mobile-side-contact-buttons {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
        padding: 1.25rem 1.5rem 1rem !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
        margin: 0 !important;
        margin-bottom: 0 !important;
        order: 1 !important;
        /* Show after platform info but before footer */
    }


    .mobile-side-contact-title {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        color: rgba(255, 255, 255, 0.95) !important;
        font-weight: 700 !important;
        font-size: 0.95rem !important;
        margin: 0 !important;
        margin-bottom: 0.5rem !important;
        text-align: right !important;
        width: 100% !important;
    }

    /* Wrapper for contact buttons - horizontal layout, same as social links */
    .mobile-side-contact-buttons-wrapper {
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-start !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 0.6rem !important;
        margin: 0 !important;
    }


    .mobile-contact-btn {
        width: 42px !important;
        height: 42px !important;
        border-radius: 10px !important;
        background: rgba(255, 255, 255, 0.1) !important;
        border: 2px solid rgba(255, 255, 255, 0.2) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: #fff !important;
        text-decoration: none !important;
        transition: all 0.3s ease !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .mobile-contact-btn i {
        font-size: 1.15rem !important;
        width: auto !important;
        text-align: center !important;
        margin: 0 !important;
        color: inherit !important;
    }

    .mobile-contact-btn span {
        display: none !important;
    }

    .mobile-contact-btn:hover {
        background: rgba(255, 255, 255, 0.2) !important;
        border-color: rgba(255, 255, 255, 0.4) !important;
        transform: scale(1.05) !important;
    }

    /* Remove specific WhatsApp/Telegram colors to match social links style */
    .mobile-contact-whatsapp,
    .mobile-contact-telegram {
        background: rgba(255, 255, 255, 0.1) !important;
        border-color: rgba(255, 255, 255, 0.2) !important;
    }

    .mobile-contact-whatsapp:hover,
    .mobile-contact-telegram:hover {
        background: rgba(255, 255, 255, 0.2) !important;
        border-color: rgba(255, 255, 255, 0.4) !important;
    }

    .mobile-contact-whatsapp i,
    .mobile-contact-telegram i {
        color: #fff !important;
    }

    /* Hide mobile sidebar sections on desktop */
    @media (min-width: 769px) {

        .mobile-side-platform-info,
        .mobile-side-platform-title,
        .mobile-side-platform-description,
        .mobile-side-contact-buttons,
        .mobile-side-contact-title,
        .mobile-side-contact-buttons-wrapper {
            display: none !important;
            visibility: hidden !important;
        }
    }

    /* Mobile footer moved into the side menu (to avoid conflicts with bottom navigation) */
    .mobile-side-footer {
        display: block !important;
        visibility: visible !important;
        margin-top: 0 !important;
        padding: 1rem 1.5rem 1.25rem !important;
        border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
        order: 2 !important;
        /* Show after contact buttons */
    }

    .mobile-side-footer-inner {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .mobile-side-footer-title {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        color: rgba(255, 255, 255, 0.95) !important;
        font-weight: 700 !important;
        font-size: 0.95rem !important;
        margin: 0 !important;
        margin-bottom: 0.5rem !important;
        text-align: right !important;
    }

    .mobile-side-footer .footer-links,
    .mobile-side-footer .footer-contact {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .mobile-side-footer .footer-links a {
        display: block;
        padding: 0.6rem 0;
        color: rgba(255, 255, 255, 0.9);
        text-decoration: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        font-weight: 600;
    }

    .mobile-side-footer .footer-contact li {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        padding: 0.55rem 0;
        margin: 0;
        color: rgba(255, 255, 255, 0.9);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        background: transparent;
    }

    .mobile-side-footer .social-links {
        margin-top: 0.25rem;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 0.6rem;
    }

    .mobile-side-footer .social-links a {
        width: 42px;
        height: 42px;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.1);
        border: 2px solid rgba(255, 255, 255, 0.2);
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
    }

    /* Show bottom nav on mobile */
    .mobile-bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        height: var(--mobile-bottom-nav-height);
        padding-bottom: env(safe-area-inset-bottom);
        background: linear-gradient(180deg,
                rgba(var(--theme-primary-rgb, 18 84 57), 0.98) 0%,
                rgba(var(--theme-secondary-rgb, 64 103 87), 0.95) 100%);
        border-top: 1px solid rgba(255, 255, 255, 0.15);
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        align-items: center;
        z-index: 999990;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .mobile-bottom-nav-item {
        appearance: none;
        border: 0;
        background: transparent;
        color: rgba(255, 255, 255, 0.9);
        text-decoration: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.25rem;
        height: 100%;
        font-family: inherit;
        cursor: pointer;
        padding: 0.25rem 0.25rem;
        min-height: 44px;
        position: relative;
    }

    .mobile-bottom-nav-item i {
        font-size: 1.15rem;
        line-height: 1;
    }

    .mobile-bottom-nav-item span {
        font-size: 0.72rem;
        font-weight: 700;
        line-height: 1.1;
        opacity: 0.95;
    }

    .mobile-bottom-nav-item.active {
        color: #fff;
    }

    .mobile-bottom-nav-item.active i {
        transform: translateY(-1px);
    }

    .mobile-bottom-nav-item.active::before {
        content: '';
        position: absolute;
        top: 0;
        width: 34px;
        height: 3px;
        background: rgba(255, 255, 255, 0.85);
        border-radius: 0 0 8px 8px;
    }

    /* Reserve space for bottom nav so it doesn't cover content */
    body {
        padding-bottom: calc(var(--mobile-bottom-nav-height) + env(safe-area-inset-bottom));
    }

    /* Move floating icons above bottom nav */
    .floating-social-icons {
        bottom: calc(var(--mobile-bottom-nav-height) + 16px) !important;
    }

    .floating-icon,
    .whatsapp-icon,
    .telegram-icon {
        bottom: calc(var(--mobile-bottom-nav-height) + 20px) !important;
    }

    .mobile-nav-actions .search-btn,
    .mobile-nav-actions .cart-btn {
        display: flex;
        width: 100%;
        height: 48px;
        border-radius: 10px;
        justify-content: center;
        align-items: center;
        gap: 0.75rem;
        font-size: 1rem;
        font-weight: 600;
        border: 2px solid rgba(255, 255, 255, 0.3);
        background: rgba(255, 255, 255, 0.1);
        pointer-events: auto;
        cursor: pointer;
        position: relative;
        z-index: 11;
    }

    .mobile-nav-actions .search-btn i,
    .mobile-nav-actions .cart-btn i {
        font-size: 1.1rem;
    }

    .mobile-nav-actions .search-btn:hover,
    .mobile-nav-actions .cart-btn:hover {
        background: var(--theme-button-text, #fff);
        color: var(--theme-primary, #125439);
        border-color: var(--theme-button-text, #fff);
    }

    .mobile-nav-actions .login-btn,
    .mobile-nav-actions .account-btn {
        display: flex;
        width: 100%;
        height: 44px;
        justify-content: center;
        align-items: center;
        margin-top: 0.5rem;
        background: rgba(255, 255, 255, 0.15);
        color: #fff;
        border: 1px solid rgba(255, 255, 255, 0.3);
        pointer-events: auto;
        cursor: pointer;
        position: relative;
        z-index: 2;
        font-size: 0.85rem;
        border-radius: 8px;
    }

    .mobile-nav-actions .login-btn:hover,
    .mobile-nav-actions .account-btn:hover {
        background: rgba(255, 255, 255, 0.25);
        border-color: rgba(255, 255, 255, 0.5);
    }

    .mobile-nav-actions .logout-btn {
        display: flex;
        width: 100%;
        height: 44px;
        justify-content: center;
        align-items: center;
        margin-top: 0.5rem;
        background: rgba(220, 53, 69, 0.9);
        color: #fff;
        border: 1px solid rgba(220, 53, 69, 0.5);
        pointer-events: auto;
        cursor: pointer;
        position: relative;
        z-index: 2;
        font-size: 0.85rem;
        border-radius: 8px;
        font-weight: 600;
    }

    .mobile-nav-actions .logout-btn:hover {
        background: rgba(200, 35, 51, 0.95);
        border-color: rgba(220, 53, 69, 0.7);
    }

    .mobile-nav-actions .logout-btn i {
        font-size: 1rem;
        margin-left: 0.5rem;
    }


    .header-nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        /*
          Keep overlay above other fixed UI (e.g. mobile bottom nav),
          but below the actual sidebar menu.
        */
        z-index: 999995 !important;
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
    }

    .header-nav-overlay.active {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }


    .header-nav-overlay.active {
        /* Match the actual sidebar width to avoid "dead" non-clickable strip */
        right: min(300px, 85vw);
    }


    .header-nav.active {
        z-index: 999999 !important;
        pointer-events: auto !important;

        isolation: isolate;

        opacity: 1 !important;
        visibility: visible !important;

        transform: translateX(0) translateZ(0) !important;

        position: fixed !important;

        contain: layout style paint;
        will-change: transform;
    }

    .header-nav.active * {
        pointer-events: auto !important;
    }


    .header-nav.active .nav-link,
    .header-nav.active .mobile-nav-actions button,
    .header-nav.active .mobile-nav-actions a {
        pointer-events: auto !important;
        cursor: pointer;
    }


    body.menu-open .modal,
    body.menu-open .auth-modal,
    body.menu-open .reviews-modal {
        z-index: 2147483647 !important;
    }


    .auth-modal,
    .auth-modal.active {
        z-index: 2147483647 !important;
        position: fixed !important;
    }

    .auth-modal-overlay {
        z-index: 2147483646 !important;
        position: fixed !important;
    }

    .auth-modal-content {
        z-index: 2147483647 !important;
    }


    body:has(.header-nav.active) #homeSectionsContainer,
    body:has(.header-nav.active) .section,
    body:has(.header-nav.active) .container,
    body:has(.header-nav.active) .hero-section,
    body:has(.header-nav.active) .hero-banner-section,
    body:has(.header-nav.active) .category-card-front,
    body:has(.header-nav.active) .product-card-front,
    body:has(.header-nav.active) .product-card,
    body:has(.header-nav.active) .category-card,
    body:has(.header-nav.active) main,
    body:has(.header-nav.active) article,
    body:has(.header-nav.active) div[class*="section"],
    body:has(.header-nav.active) div[class*="container"],
    body:has(.header-nav.active) div[class*="card"],
    body.menu-open #homeSectionsContainer,
    body.menu-open .section,
    body.menu-open .container,
    body.menu-open .hero-section,
    body.menu-open .hero-banner-section,
    body.menu-open .category-card-front,
    body.menu-open .product-card-front,
    body.menu-open .product-card,
    body.menu-open .category-card,
    body.menu-open main,
    body.menu-open article,
    body.menu-open div[class*="section"],
    body.menu-open div[class*="container"],
    body.menu-open div[class*="card"] {
        position: relative;
        z-index: 1 !important;
    }


    body:has(.header-nav.active) .floating-social-icons,
    body:has(.header-nav.active) .floating-icon,
    body.menu-open .floating-social-icons,
    body.menu-open .floating-icon {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }


    .header-nav {
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
    }

    .header-nav::-webkit-scrollbar {
        width: 6px;
    }

    .header-nav::-webkit-scrollbar-track {
        background: transparent;
    }

    .header-nav::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.3);
        border-radius: 3px;
    }

    .header-nav::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.5);
    }


    .mobile-nav-actions .search-btn span,
    .mobile-nav-actions .cart-btn span {
        display: inline-block;
    }

    /* Search Container Mobile */
    .search-container {
        padding: 0.75rem;
    }

    .search-container-inner {
        gap: 0.5rem;
    }

    .search-input {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

    .search-input:focus {
        border-color: var(--theme-primary, #125439);
    }

    .search-submit-btn,
    .search-close-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .mobile-nav-actions .cart-count {
        position: static;
        margin-right: 0.5rem;
        width: 20px;
        height: 20px;
        border: 2px solid var(--theme-primary, #125439);
    }

    .hero-section {
        flex-direction: column;
        text-align: center;
    }

    .hero-title {
        font-size: 2rem;
    }

    .contact-section {
        grid-template-columns: 1fr;
    }

    .section-grid,
    .section-grid.three {
        grid-template-columns: 1fr;
    }

    .static-page .page-content {
        padding: 1.75rem 0 3rem;
    }

    .static-page .content-section {
        padding: 1.5rem;
    }

    .section-card {
        padding: 1.25rem;
    }

    .page-meta .meta-pill {
        font-size: 0.9rem;
    }

    .footer-container {
        display: none !important;
    }

    .footer-section::before {
        display: none;
    }

    .footer-section h3 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
        padding-bottom: 0.625rem;
    }

    .footer-section p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
        line-height: 1.7;
    }

    .social-links {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 0.75rem;
        margin-top: 1rem;
    }

    .footer-links li {
        margin-bottom: 0.5rem;
        padding-right: 1rem;
    }

    .footer-contact li {
        padding: 0.5rem 0.625rem;
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
        gap: 0.75rem;
    }

    .site-footer {
        /* Keep footer minimal on mobile (content is inside side menu) */
        padding: 1.25rem 0 calc(1rem + env(safe-area-inset-bottom));
        margin-top: 2rem;
    }

    .footer-bottom {
        padding-top: 0.75rem;
        margin-top: 0;
    }
}

/* ============================================
   Modern Home Page Sections - Hybrid UI Design
   ============================================ */

/* Hero Banner Carousel */
.hero-banner-section {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 0;
    padding-bottom: var(--hero-banner-ratio-desktop, 30%);

    overflow: hidden;
    margin-bottom: 1rem;
    border-radius: 0 0 var(--hero-banner-radius, 32px) var(--hero-banner-radius, 32px);
    z-index: 1;

    isolation: auto;
    transform: none;
    box-sizing: border-box;
}


.hero-banner-section,
.hero-carousel,
.hero-slide,
.hero-slide.active {
    z-index: 1 !important;
}

.auth-modal,
.auth-modal.active {
    z-index: 2147483647 !important;
    position: fixed !important;
}


@media (max-width: 768px) {


    body.menu-open .hero-banner-section,
    body:has(.header-nav.active) .hero-banner-section {
        z-index: -1 !important;
        position: relative !important;
        transform: none !important;
        isolation: auto !important;
        contain: none !important;
    }


    body.menu-open .hero-banner-section *,
    body:has(.header-nav.active) .hero-banner-section * {
        z-index: auto !important;
        transform: none !important;
        isolation: auto !important;
    }

    /* hero-slide */
    body.menu-open .hero-slide,
    body:has(.header-nav.active) .hero-slide {
        z-index: auto !important;
        position: absolute !important;
    }

    body.menu-open .hero-slide.active,
    body:has(.header-nav.active) .hero-slide.active {
        z-index: auto !important;
        position: absolute !important;
    }

    /* hero-controls */
    body.menu-open .hero-controls,
    body:has(.header-nav.active) .hero-controls {
        z-index: auto !important;
        position: absolute !important;
    }

    /* hero-carousel */
    body.menu-open .hero-carousel,
    body:has(.header-nav.active) .hero-carousel {
        position: relative !important;
        z-index: auto !important;
    }


    body.menu-open #homeSectionsContainer .hero-banner-section,
    body:has(.header-nav.active) #homeSectionsContainer .hero-banner-section {
        z-index: -1 !important;
    }
}

.hero-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    opacity: 0;
    transition: opacity var(--hero-banner-transition, 1000ms) ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    box-sizing: border-box;
    object-fit: cover;
}

.hero-slide-link {
    position: absolute;
    inset: 0;
    display: block;
    z-index: 3;
    background: transparent;
    cursor: pointer;
}

.hero-slide.active {
    opacity: 1;
    z-index: 2;
}


@media (max-width: 768px) {

    body.menu-open .hero-slide,
    body:has(.header-nav.active) .hero-slide {
        z-index: 1 !important;
    }

    body.menu-open .hero-slide.active,
    body:has(.header-nav.active) .hero-slide.active {
        z-index: 1 !important;
    }
}

.hero-overlay {
    display: none;
}

.hero-content {
    display: none;
}

.hero-banner-section .hero-title {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.8s ease-out;
}

.hero-banner-section .hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s ease-out;
}

.hero-banner-section .hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-glass {
    background: #0d5d2e;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid #0d5d2e;
    color: white;
    transition: all 0.3s ease;
}

.btn-glass:hover {
    background: #0a4a24;
    border-color: #0a4a24;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(13, 93, 46, 0.4);
}

.hero-controls {
    /* Default: hidden unless enabled via .hero-controls-enabled on section */
    display: none;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

/* Enable controls when requested (admin setting) */
.hero-banner-section.hero-controls-enabled .hero-controls,
.hero-banner-section.hero-indicators-enabled .hero-controls {
    position: absolute;
    inset: 0;
    display: flex;
    visibility: visible;
    opacity: 1;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    pointer-events: none;
    z-index: 10;
}

.hero-banner-section.hero-controls-enabled .hero-controls .hero-prev,
.hero-banner-section.hero-controls-enabled .hero-controls .hero-next,
.hero-banner-section.hero-controls-enabled .hero-controls .hero-indicators {
    pointer-events: auto;
}

/* If indicators are enabled but controls are not, hide prev/next buttons */
.hero-banner-section.hero-indicators-enabled:not(.hero-controls-enabled) .hero-prev,
.hero-banner-section.hero-indicators-enabled:not(.hero-controls-enabled) .hero-next {
    display: none;
}

/* Make indicators clickable when they are enabled */
.hero-banner-section.hero-indicators-enabled .hero-controls .hero-indicators {
    pointer-events: auto;
}

/* Indicators can be hidden separately */
.hero-banner-section:not(.hero-indicators-enabled) .hero-indicators {
    display: none !important;
}


@media (max-width: 768px) {

    body.menu-open .hero-controls,
    body:has(.header-nav.active) .hero-controls {
        z-index: 1 !important;
    }
}

.hero-prev,
.hero-next {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #0d5d2e;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid #0d5d2e;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.hero-prev:hover,
.hero-next:hover {
    background: #0a4a24;
    border-color: #0a4a24;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(13, 93, 46, 0.4);
}

.hero-indicators {
    display: flex;
    gap: 0.5rem;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(13, 93, 46, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: #0d5d2e;
    width: 30px;
    border-radius: 6px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
    margin-top: 0;
    padding-top: 0;
}

/* ============================================================
   Glass sections (home + content pages)
   ============================================================ */

/* Glass wrapper for most home sections (keep hero intact) */
#homeSectionsContainer>section:not(.hero-banner-section):not(.hero-section)>.container,
#homeSectionsContainer>section.tags-section>.tags-container,
#homeSectionsContainer>section.custom-section:not(.hero-section)>.container {
    background: rgba(var(--theme-background-rgb, 255 255 255), 0.58);
    border: 1px solid rgba(255, 255, 255, 0.30);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.10);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 24px;
    padding: clamp(1.25rem, 2.5vw, 2rem);
}

@media (max-width: 768px) {

    #homeSectionsContainer>section:not(.hero-banner-section):not(.hero-section)>.container,
    #homeSectionsContainer>section.tags-section>.tags-container,
    #homeSectionsContainer>section.custom-section:not(.hero-section)>.container {
        border-radius: 18px;
        padding: 1.1rem;
    }
}

/* FAQ Section Header - Remove top spacing */
.faq-section-modern .section-header {
    margin-top: 0;
    padding-top: 0;
    margin-bottom: 3rem;
}

/* Categories Header - Right Aligned */
.categories-header-right {
    text-align: right;
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

.categories-header-right .section-title {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 1rem;
    position: relative;
    display: block;
    text-align: right;
    font-family: 'Cairo', sans-serif;
    width: 100%;
}

.categories-header-right .section-title::after {
    left: auto;
    right: 0;
    transform: none;
}

.section-title {
    font-size: clamp(1.25rem, 3.5vw, 2rem);
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 4px;
    background: linear-gradient(90deg, #0d5d2e, #bda404);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-top: 1.5rem;
}

/* Modern Categories Section */
.categories-section-modern {
    padding: 0.5rem 0 5rem 0;
    background: transparent;
    width: 100%;
    max-width: 100%;
    position: relative;
    z-index: 1;
}

.categories-grid-modern {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Category Section - Matching Untitled-1.html */
.category-section {
    margin-bottom: 30px;
    padding: 25px 60px;
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(18, 72, 52, 0.1);
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    display: block;
    clear: both;
    border: 2px solid rgba(18, 72, 52, 0.1);
    transition: all 0.3s ease;
}

/* Products page category sections (with sidebar) */
.products-page-container .category-section {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding: 1.25rem 1.5rem;
}

.products-sections-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.products-page-container .tags-filter-section {
    display: none;
}

.products-page-container .view-all-link {
    display: none !important;
}

.products-search-bar {
    margin: 1rem 0 1.5rem;
}

.products-search-inner {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 252, 0.98));
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(20, 83, 75, 0.14);
    border: 1px solid rgba(20, 83, 75, 0.12);
}

.products-search-inner i {
    color: #0f3d3e;
    font-size: 1.05rem;
}

.products-search-inner input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    color: var(--text-primary, #222);
    outline: none;
}

.products-search-clear {
    border: none;
    background: rgba(15, 61, 62, 0.12);
    color: #0f3d3e;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.products-search-clear:hover {
    background: rgba(15, 61, 62, 0.2);
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .products-search-bar {
        position: sticky;
        top: var(--mobile-sticky-start, 120px);
        z-index: 999979;
    }
}

.products-page-container .category-section+.category-section {
    margin-top: 1.5rem;
}

.category-tags-row {
    margin: 0.75rem 0 1rem;
}

.category-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
}

.category-tags-container .tag-filter-btn {
    flex: 0 0 auto;
}

.category-expand-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0.75rem 0 0.25rem;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    border: 2px dashed rgba(18, 72, 52, 0.3);
    background: transparent;
    color: rgb(18, 72, 52);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-expand-toggle i {
    transition: transform 0.3s ease;
}

.category-expand-toggle.expanded i {
    transform: rotate(180deg);
}

.category-expand-toggle:hover:not(.disabled) {
    background: rgba(18, 72, 52, 0.08);
    border-color: rgba(18, 72, 52, 0.5);
    transform: translateY(-1px);
}

.category-expand-toggle.disabled,
.category-expand-toggle:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.products-container.expanded .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    overflow: visible;
    padding: 1rem 0;
}

.products-container.expanded .scroll-btn {
    display: none !important;
}

.products-container.expanded .carousel-product-card {
    min-width: 0;
    max-width: none;
}

@media (max-width: 768px) {
    .products-container.expanded .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }
}

.category-tags-container .no-tags-message {
    color: var(--text-secondary, #666);
    font-weight: 600;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(18, 72, 52, 0.2);
}

.category-info {
    flex: 1;
}

.category-header .category-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: rgb(18, 72, 52);
    margin-bottom: 10px;
    margin: 0 0 10px 0;
}

.category-count {
    font-size: 1.1rem;
    color: #666;
    font-weight: 600;
    margin: 0;
}

.category-image {
    width: 100%;
    height: calc(100% / 3);
    aspect-ratio: 3/1;
    object-fit: cover;
    border-radius: 10px;
    margin: 0 auto 15px auto;
    display: block;
    box-shadow: 0 4px 12px rgba(18, 72, 52, 0.15);
    transition: all 0.3s ease;
}

.category-image:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(18, 72, 52, 0.25);
}

.subcategory-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0 20px 0;
    justify-content: center;
    align-items: center;
    scrollbar-width: thin;
    scrollbar-color: rgba(18, 72, 52, 0.3) transparent;
}

.subcategory-filters::-webkit-scrollbar {
    height: 3px;
}

.subcategory-filters::-webkit-scrollbar-track {
    background: rgba(18, 72, 52, 0.1);
    border-radius: 2px;
}

.subcategory-filters::-webkit-scrollbar-thumb {
    background: rgba(18, 72, 52, 0.3);
    border-radius: 2px;
}

.subcategory-filters::-webkit-scrollbar-thumb:hover {
    background: rgba(18, 72, 52, 0.5);
}

.filter-btn {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    color: rgb(18, 72, 52);
    border: 2px solid rgba(18, 72, 52, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.filter-btn:hover {
    background: linear-gradient(135deg, var(--theme-primary, #125439), rgba(18, 84, 57, 0.8));
    color: var(--theme-button-text, white);
    border-color: var(--theme-primary, #125439);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(18, 72, 52, 0.3);
}

.filter-btn.active {
    background: linear-gradient(135deg, rgb(18, 72, 52), rgba(18, 72, 52, 0.8));
    color: white;
    border-color: rgb(18, 72, 52);
    box-shadow: 0 4px 12px rgba(18, 72, 52, 0.3);
}

.products-category-section .category-tags-container .tag-filter-btn {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    color: rgb(18, 72, 52);
    border: 2px solid rgba(18, 72, 52, 0.2);
    padding: 8px 16px !important;
    border-radius: 20px;
    font-size: 0.9rem !important;
    font-weight: 600;
    line-height: 1.2;
    min-height: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: none;
}

.products-category-section .category-tags-container .tag-filter-btn span {
    display: inline;
}

.products-category-section .category-tags-container .tag-filter-btn:hover {
    background: linear-gradient(135deg, var(--theme-primary, #125439), rgba(18, 84, 57, 0.8));
    color: var(--theme-button-text, white);
    border-color: var(--theme-primary, #125439);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(18, 72, 52, 0.3);
}

.products-category-section .category-tags-container .tag-filter-btn.active {
    background: linear-gradient(135deg, rgb(18, 72, 52), rgba(18, 72, 52, 0.8));
    color: white;
    border-color: rgb(18, 72, 52);
    box-shadow: 0 4px 12px rgba(18, 72, 52, 0.3);
}

@media (max-width: 768px) {
    .products-category-section .category-tags-container .tag-filter-btn {
        padding: 8px 16px !important;
        font-size: 0.9rem !important;
        border-radius: 20px;
        font-weight: 600;
        width: auto;
        box-shadow: none;
        line-height: 1.2;
    }
}

@media (max-width: 450px) {
    .products-category-section .category-tags-container .tag-filter-btn {
        padding: 6px 12px !important;
        font-size: 0.85rem !important;
    }
}

.view-all-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--theme-primary, #125439);
    color: var(--theme-button-text, white);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(18, 84, 57, 0.2);
    border: none;
    cursor: pointer;
}

.view-all-link i {
    font-size: 0.85rem;
    transition: transform 0.3s ease;
}

.view-all-link:hover {
    background: #0a3628;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(18, 84, 57, 0.3);
}

.view-all-link:hover i {
    transform: translateX(-5px);
}

.view-all-link:active {
    transform: translateY(0);
}

.products-container {
    position: relative;
}

.products-grid {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 20px 0;
    scrollbar-width: thin;
    scrollbar-color: rgb(18, 72, 52) rgb(247, 246, 242);
    scroll-behavior: smooth;
    position: relative;
    -webkit-overflow-scrolling: touch;
    will-change: scroll-position;
    transform: translateZ(0);
}

.products-grid::-webkit-scrollbar {
    height: 6px;
}

.products-grid::-webkit-scrollbar-track {
    background: rgb(247, 246, 242);
    border-radius: 3px;
}

.products-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgb(18, 72, 52), rgba(18, 72, 52, 0.7));
    border-radius: 3px;
}

.products-grid::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, rgba(18, 72, 52, 0.7), rgb(18, 72, 52));
}

.products-grid .carousel-product-card {
    min-width: 200px;
    max-width: 200px;
    flex-shrink: 0;
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, rgb(18, 72, 52), rgba(18, 72, 52, 0.8));
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(18, 72, 52, 0.3);
}

.scroll-btn:hover {
    background: linear-gradient(135deg, rgba(18, 72, 52, 0.8), rgb(18, 72, 52));
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(18, 72, 52, 0.4);
}

.scroll-btn.left {
    left: -20px;
}

.scroll-btn.right {
    right: -20px;
}

.scroll-btn.hidden {
    display: none;
}

.product-item {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-radius: 15px;
    overflow: visible;
    transition: all 0.3s ease;
    border: 2px solid rgba(18, 72, 52, 0.1);
    width: 220px;
    height: 300px;
    flex-shrink: 0;
    box-shadow: 0 5px 15px rgba(18, 72, 52, 0.1);
    position: relative;
    margin-bottom: 70px;
    will-change: transform;
    backface-visibility: hidden;
}

.product-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(18, 72, 52, 0.2);
    border-color: rgb(18, 72, 52);
    background: linear-gradient(135deg, #ffffff, #f0f8f5);
}

.product-image {
    height: 70%;
    overflow: hidden;
    position: relative;
    border-radius: 15px 15px 0 0;
    background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 15px 15px 0 0;
}

.product-item:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 4px;
    height: 30%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 6px;
    line-height: 1.3;
    height: 2.6em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    text-align: center;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-price {
    font-size: 0.9rem;
    font-weight: 800;
    color: rgb(18, 72, 52);
    margin-bottom: 6px;
    text-align: center;
    background: linear-gradient(135deg, rgb(18, 72, 52), rgb(34, 102, 72));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 1px 2px rgba(18, 72, 52, 0.1);
}

.product-link {
    display: block;
    background: linear-gradient(135deg, rgb(18, 72, 52), rgba(18, 72, 52, 0.8));
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 4px 15px rgba(18, 72, 52, 0.3);
    position: absolute;
    bottom: -55px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 20px);
    z-index: 10;
}

.product-link:hover {
    background: linear-gradient(135deg, rgba(18, 72, 52, 0.9), rgba(18, 72, 52, 0.7));
    transform: translateX(-50%) translateY(-3px);
    box-shadow: 0 8px 25px rgba(18, 72, 52, 0.4);
}

.no-products {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px;
}

.loading-products {
    text-align: center;
    padding: 30px;
    color: #666;
}

.loading-products .loading-spinner {
    width: 20px;
    height: 20px;
    border-width: 2px;
    border-color: rgb(247, 246, 242);
    border-top-color: rgb(18, 72, 52);
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

/* Category Section Modern - New Design (keeping for backward compatibility) */
.category-section-modern {
    margin-bottom: 2rem;
    padding: 2rem 4rem;
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(18, 72, 52, 0.1);
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    display: block;
    clear: both;
    border: 2px solid rgba(18, 72, 52, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.category-section-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, rgb(18, 72, 52), rgba(18, 72, 52, 0.5));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.category-section-modern:hover::before {
    transform: scaleX(1);
}

.category-image-modern {
    width: 100%;
    height: auto;
    aspect-ratio: 3/1;
    object-fit: cover;
    border-radius: 10px;
    margin: 0 auto 1rem auto;
    display: block;
    box-shadow: 0 4px 12px rgba(18, 72, 52, 0.15);
    transition: all 0.3s ease;
}

.category-image-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(18, 72, 52, 0.25);
}

.category-header-modern {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(18, 72, 52, 0.2);
}

.category-info-modern {
    flex: 1;
}

.category-name-modern {
    font-size: 1.5rem;
    font-weight: 700;
    color: rgb(18, 72, 52);
    margin-bottom: 0.625rem;
    margin: 0 0 0.625rem 0;
}

.category-count-modern {
    font-size: 1.1rem;
    color: #666;
    font-weight: 600;
    margin: 0;
}

.view-all-link-modern {
    background: linear-gradient(135deg, rgb(18, 72, 52), rgba(18, 72, 52, 0.8));
    color: #ffd700;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(18, 72, 52, 0.3);
    flex-shrink: 0;
}

.view-all-link-modern:hover {
    background: linear-gradient(135deg, rgba(18, 72, 52, 0.8), rgb(18, 72, 52));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(18, 72, 52, 0.4);
}

.subcategory-filters-modern {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin: 1rem 0 1.25rem 0;
    justify-content: center;
    align-items: center;
    scrollbar-width: thin;
    scrollbar-color: rgba(18, 72, 52, 0.3) transparent;
}

.subcategory-filters-modern::-webkit-scrollbar {
    height: 3px;
}

.subcategory-filters-modern::-webkit-scrollbar-track {
    background: rgba(18, 72, 52, 0.1);
    border-radius: 2px;
}

.subcategory-filters-modern::-webkit-scrollbar-thumb {
    background: rgba(18, 72, 52, 0.3);
    border-radius: 2px;
}

.subcategory-filters-modern::-webkit-scrollbar-thumb:hover {
    background: rgba(18, 72, 52, 0.5);
}

.filter-btn-modern {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    color: rgb(18, 72, 52);
    border: 2px solid rgba(18, 72, 52, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.filter-btn-modern:hover {
    background: linear-gradient(135deg, rgb(18, 72, 52), rgba(18, 72, 52, 0.8));
    color: white;
    border-color: rgb(18, 72, 52);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(18, 72, 52, 0.3);
}

.filter-btn-modern.active {
    background: linear-gradient(135deg, rgb(18, 72, 52), rgba(18, 72, 52, 0.8));
    color: white;
    border-color: rgb(18, 72, 52);
    box-shadow: 0 4px 12px rgba(18, 72, 52, 0.3);
}

.products-container-modern {
    position: relative;
}

.products-grid-modern {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1.25rem 0;
    scrollbar-width: thin;
    scrollbar-color: rgb(18, 72, 52) rgb(247, 246, 242);
    scroll-behavior: smooth;
    position: relative;
    -webkit-overflow-scrolling: touch;
    /* Optimize for smooth scrolling */
    will-change: scroll-position;
    transform: translateZ(0);
}

.products-grid-modern::-webkit-scrollbar {
    height: 6px;
}

.products-grid-modern::-webkit-scrollbar-track {
    background: rgb(247, 246, 242);
    border-radius: 3px;
}

.products-grid-modern::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgb(18, 72, 52), rgba(18, 72, 52, 0.7));
    border-radius: 3px;
}

.products-grid-modern::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, rgba(18, 72, 52, 0.7), rgb(18, 72, 52));
}

.scroll-btn-modern {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, rgb(18, 72, 52), rgba(18, 72, 52, 0.8));
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(18, 72, 52, 0.3);
}

.scroll-btn-modern:hover {
    background: linear-gradient(135deg, rgba(18, 72, 52, 0.8), rgb(18, 72, 52));
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(18, 72, 52, 0.4);
}

.scroll-btn-modern.left {
    left: -20px;
}

.scroll-btn-modern.right {
    right: -20px;
}

.product-item-modern {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-radius: 15px;
    overflow: visible;
    transition: all 0.3s ease;
    border: 2px solid rgba(18, 72, 52, 0.1);
    width: 220px;
    height: 300px;
    flex-shrink: 0;
    box-shadow: 0 5px 15px rgba(18, 72, 52, 0.1);
    position: relative;
    margin-bottom: 70px;
    /* Optimize for performance */
    will-change: transform;
    backface-visibility: hidden;
}

.product-item-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(18, 72, 52, 0.2);
    border-color: rgb(18, 72, 52);
    background: linear-gradient(135deg, #ffffff, #f0f8f5);
}

.product-image-modern {
    height: 70%;
    overflow: hidden;
    position: relative;
    border-radius: 15px 15px 0 0;
    background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
}

.product-image-modern img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.product-image-modern img.loaded {
    opacity: 1;
}

.product-image-modern img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 15px 15px 0 0;
}

.product-item-modern:hover .product-image-modern img {
    transform: scale(1.05);
}

.product-info-modern {
    padding: 0.25rem;
    height: 30%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-name-modern {
    font-size: 0.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.375rem;
    line-height: 1.3;
    height: 2.6em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    text-align: center;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-price-modern {
    font-size: 0.9rem;
    font-weight: 800;
    color: rgb(18, 72, 52);
    margin-bottom: 0.375rem;
    text-align: center;
    background: linear-gradient(135deg, rgb(18, 72, 52), rgb(34, 102, 72));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 1px 2px rgba(18, 72, 52, 0.1);
}

.product-link-modern {
    display: block;
    background: linear-gradient(135deg, rgb(18, 72, 52), rgba(18, 72, 52, 0.8));
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 4px 15px rgba(18, 72, 52, 0.3);
    position: absolute;
    bottom: -55px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 20px);
    z-index: 10;
}

.product-link-modern:hover {
    background: linear-gradient(135deg, rgba(18, 72, 52, 0.9), rgba(18, 72, 52, 0.7));
    transform: translateX(-50%) translateY(-3px);
    box-shadow: 0 8px 25px rgba(18, 72, 52, 0.4);
}

.no-products-modern {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 2.5rem;
}

.loading-products-modern {
    text-align: center;
    padding: 1.875rem;
    color: #666;
}

.loading-products-modern .loading-spinner {
    width: 20px;
    height: 20px;
    border-width: 2px;
    border-color: rgb(247, 246, 242);
    border-top-color: rgb(18, 72, 52);
    margin: 0 auto 0.625rem;
    animation: spin 1s linear infinite;
}

.category-card-modern {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    position: relative;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(18, 84, 57, 0.1);
}

.category-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.category-card-modern:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.category-card-modern:hover::before {
    opacity: 1;
}

.category-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.category-card-modern:hover .category-image img {
    transform: scale(1.1);
}

.category-icon-modern {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem auto 1.5rem;
    font-size: 2.5rem;
    color: white;
    position: relative;
    z-index: 1;
    box-shadow: var(--neu-shadow-light);
}

.category-icon-modern.blue {
    background: linear-gradient(135deg, var(--accent-blue), #2563eb);
}

.category-icon-modern.green {
    background: linear-gradient(135deg, var(--accent-green), #059669);
}

.category-icon-modern.orange {
    background: linear-gradient(135deg, var(--accent-orange), #d97706);
}

.category-icon-modern.purple {
    background: linear-gradient(135deg, var(--accent-purple), #7c3aed);
}

.category-content {
    padding: 1.5rem;
    position: relative;
    z-index: 1;
}

.category-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    text-align: center;
}

.category-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-align: center;
    line-height: 1.6;
    min-height: 3.2rem;
}

.category-meta {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.product-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.category-link-modern {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.category-link-modern:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.category-icon-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem auto 1.5rem;
    font-size: 2.5rem;
    color: white;
    position: relative;
    z-index: 1;
    box-shadow: var(--shadow-md);
}

.category-icon-large.blue {
    background: linear-gradient(135deg, var(--accent-blue), #2563eb);
}

.category-icon-large.green {
    background: linear-gradient(135deg, var(--accent-green), #059669);
}

.category-icon-large.orange {
    background: linear-gradient(135deg, var(--accent-orange), #d97706);
}

.category-icon-large.purple {
    background: linear-gradient(135deg, var(--accent-purple), #7c3aed);
}

.category-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.category-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.category-arrow {
    color: var(--accent-blue);
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.category-card-modern:hover .category-arrow {
    transform: translateX(-5px);
}

/* Products by Category Section */
.products-by-category-section {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

.category-products-group {
    margin-bottom: 5rem;
}

/* Customizable Files Banner - Saudi Identity Colors */
:root {
    --saudi-green: #006C35;
    --saudi-green-dark: #004d26;
    --saudi-green-light: #008045;
    --saudi-gold: #C9A961;
    --saudi-gold-dark: #A68B4F;
    --saudi-gold-light: #E5C97A;
    --saudi-gold-gradient: linear-gradient(135deg, #C9A961, #E5C97A);
    --saudi-green-gradient: linear-gradient(135deg, #006C35, #008045);
}

/* Products Carousel Section - Saudi Design with Geometric Shapes Background - Full Width */
.products-carousel-section {
    margin: 0;
    padding: 0;
    background: transparent;
    position: relative;
    overflow: hidden;
    min-height: 500px;
    width: 100%;
    box-shadow: none;
}


.carousel-header-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 0 2rem 1.5rem 2rem;
    position: relative;
    z-index: 3;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.carousel-title {
    font-size: 2rem;
    font-weight: 700;
    color: #4a4a4a;
    margin: 0;
    position: relative;
    padding-right: 1.5rem;
    text-shadow: none;
    font-family: 'Cairo', sans-serif;
}

.carousel-title::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: var(--saudi-gold-gradient);
    border-radius: 2px;
}

.carousel-controls {
    display: flex;
    gap: 1rem;
}

.carousel-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--saudi-gold);
    background: rgba(255, 255, 255, 0.95);
    color: var(--saudi-green);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.carousel-btn:hover:not(:disabled) {
    background: var(--saudi-gold);
    color: white;
    border-color: var(--saudi-gold);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(201, 169, 97, 0.5);
}

.carousel-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.carousel-container-fullwidth {
    position: relative;
    overflow: hidden;
    padding: 2rem 0 1.5rem 0;
    z-index: 3;
    width: 100%;
    min-height: 100%;
    background: transparent;
}


.carousel-track {
    display: flex;
    gap: 1.25rem;
    will-change: transform;
    padding: 0.5rem 2rem;
    align-items: stretch;
    width: max-content;
    /* Optimize for smooth scrolling on mobile */
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

.carousel-slide {
    flex: 0 0 auto;
    width: 220px;
    min-width: 200px;
    max-width: 240px;
}

.carousel-product-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    border: 1px solid rgba(18, 84, 57, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
    min-height: 240px;
}

.carousel-product-image {
    width: 100%;
    aspect-ratio: 1 / 0.66;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
    flex-shrink: 0;
}

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

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(18, 84, 57, 0.85);
    /* Note: Using rgba with theme color would require CSS calc or JS */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.carousel-product-image:hover .product-overlay {
    opacity: 1;
}

.view-product-btn {
    background: var(--theme-button-text, white);
    color: var(--theme-primary, #125439);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.view-product-btn:hover {
    background: var(--theme-primary, #125439);
    color: var(--theme-button-text, white);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.carousel-product-placeholder {
    width: 100%;
    aspect-ratio: 1 / 0.66;
    background: var(--theme-primary, #125439);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--theme-button-text, white);
    flex-shrink: 0;
}

.carousel-product-info {
    padding: 0.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    z-index: 2;
    min-height: 100px;
}

.carousel-product-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--theme-primary, #125439);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4rem;
    text-align: right;
}

.carousel-product-description {
    display: none;

}

.carousel-product-footer {
    display: none;

}

.carousel-product-price {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    margin: 0;
    padding: 0.5rem 0;
    border-top: 1px solid rgba(0, 108, 53, 0.15);
}

/* Old price (strikethrough) on product cards */
.carousel-product-price .price-old {
    display: inline-flex;
    align-items: baseline;
    gap: 0.2rem;
    margin-inline-start: 0.35rem;
    font-size: 0.85rem;
    color: rgba(0, 0, 0, 0.55);
    text-decoration: line-through;
}

body.dark-mode .carousel-product-price .price-old {
    color: rgba(255, 255, 255, 0.65);
}

.price-amount {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--theme-primary, #125439);
    line-height: 1;
}

/* Gold color for free products */
.price-amount.price-free,
.price-free {
    color: var(--saudi-gold) !important;
    font-weight: 700;
}

.price-currency {
    font-size: 0.85rem;
    color: var(--saudi-gold-dark);
    font-weight: 600;
}

.carousel-product-rating {
    display: none;

}

.carousel-product-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--theme-primary, #125439);
    color: var(--theme-button-text, white);
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.8rem;
    margin-top: auto;
    box-shadow: 0 2px 8px rgba(18, 84, 57, 0.2);
    border: none;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

.carousel-product-link:hover {
    background: #0a3628;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(18, 84, 57, 0.3);
}

.carousel-product-link i {
    font-size: 0.85rem;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0 2rem;
    position: relative;
    z-index: 3;
}

.carousel-indicators .indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--saudi-gold);
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.carousel-indicators .indicator.active {
    background: var(--saudi-gold);
    border-color: var(--saudi-gold);
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(201, 169, 97, 0.6);
}

.carousel-indicators .indicator:hover {
    background: white;
    border-color: var(--saudi-gold);
    transform: scale(1.2);
}

/* Responsive Design for Carousel */
@media (max-width: 1400px) {
    .carousel-slide {
        flex: 0 0 calc(25% - 0.875rem);
    }

    .products-carousel-section {
        background-attachment: scroll;
    }
}

@media (max-width: 1200px) {
    .carousel-slide {
        flex: 0 0 calc(33.333% - 0.875rem);
    }
}

@media (max-width: 768px) {
    .carousel-slide {
        flex: 0 0 calc(50% - 0.75rem);
    }

    .carousel-title {
        font-size: 1.5rem;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .carousel-product-image,
    .carousel-product-placeholder {
        height: 140px;
    }

    .carousel-product-info {
        padding: 0.875rem;
    }

    .carousel-product-name {
        font-size: 0.9rem;
        min-height: 2.52rem;
    }

    .price-amount {
        font-size: 1.15rem;
    }

    .carousel-product-link {
        padding: 0.6rem 0.875rem;
        font-size: 0.85rem;
    }

    /* Optimize carousel track for mobile performance */
    .carousel-track {
        padding: 0.5rem 1rem;
        gap: 1rem;
        /* Ensure smooth scrolling on mobile */
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
    }
}

@media (max-width: 480px) {
    .carousel-slide {
        flex: 0 0 calc(100% - 0.5rem);
    }

    .carousel-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .carousel-controls {
        align-self: flex-end;
    }

    .carousel-product-image,
    .carousel-product-placeholder {
        height: 180px;
    }
}

.category-header-products {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.category-title-products {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-primary);
    margin: 0;
}

.view-all-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.view-all-link:hover {
    color: white;
    gap: 0.75rem;
}

.products-grid-by-category {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card-by-category {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    display: flex;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(18, 84, 57, 0.1);
    flex-direction: column;
}

.product-card-by-category:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.product-image-by-category {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.product-image-by-category img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.product-image-placeholder {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
}

.product-info-by-category {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.product-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    flex: 1;
    line-height: 1.6;
}

.product-footer-by-category {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-blue);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--accent-orange);
}

.product-link-btn {
    display: block;
    text-align: center;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: auto;
}

.product-link-btn:hover {
    background: var(--accent-blue);
    color: white;
    transform: translateY(-2px);
}

/* FAQ Section */
.faq-section-modern {
    padding: 2rem 0 5rem 0;
    background: transparent;
    position: relative;
    z-index: 1;
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(18, 84, 57, 0.1);
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
}

.faq-question {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.faq-question h3 {
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

.faq-question i {
    color: var(--accent-blue);
    transition: transform 0.3s ease;
    font-size: 1rem;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 1.5rem;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 1.5rem 1.5rem;
}

.faq-answer p {
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 0;
}

/* Features Section */
.features-section-modern {
    padding: 5rem 0 2rem 0;
    background: transparent;
    position: relative;
}

.features-grid-modern {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card-modern {
    background: rgba(255, 255, 255, 0.7);
    padding: 1.5rem 1.25rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(18, 84, 57, 0.1);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.feature-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--theme-primary, #125439), var(--theme-secondary, #406757));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.feature-card-modern:hover::before {
    transform: scaleX(1);
}

.feature-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(18, 84, 57, 0.2);
    border-color: var(--theme-primary, #125439);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--theme-primary, #125439), var(--theme-secondary, #406757));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: #efe9d8;
    box-shadow: 0 4px 15px rgba(18, 84, 57, 0.3);
    transition: all 0.3s ease;
}

.feature-card-modern:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, var(--theme-secondary, #406757), var(--theme-primary, #125439));
    box-shadow: 0 6px 20px rgba(18, 84, 57, 0.4);
}

.feature-card-modern h3 {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    font-weight: 700;
    color: var(--theme-primary, #125439);
    margin-bottom: 0.5rem;
}

.feature-card-modern p {
    color: var(--theme-secondary, #406757);
    line-height: 1.6;
    margin: 0;
    font-size: clamp(0.8rem, 1.8vw, 0.85rem);
}

/* Testimonials Section */
.testimonials-section-modern {
    padding: 2rem 0 5rem 0;
    background: transparent;
    position: relative;
    z-index: 1;
}

.testimonials-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Testimonials Carousel */
.testimonials-carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding: 0 2rem;
}

.testimonials-carousel-title {
    font-size: clamp(1.25rem, 3.5vw, 2rem);
    font-weight: 700;
    color: var(--theme-primary, #125439);
    margin: 0;
    position: relative;
    padding-right: 1.5rem;
}

.testimonials-carousel-title::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: linear-gradient(135deg, #125439, #406757);
    border-radius: 2px;
}

.testimonials-carousel-controls {
    display: flex;
    gap: 1rem;
}

.testimonials-carousel-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--theme-primary, #125439);
    background: rgba(255, 255, 255, 0.7);
    color: var(--theme-primary, #125439);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(18, 84, 57, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.testimonials-carousel-btn:hover:not(:disabled) {
    background: var(--theme-primary, #125439);
    color: #efe9d8;
    border-color: var(--theme-primary, #125439);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(18, 84, 57, 0.4);
}

.testimonials-carousel-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.testimonials-carousel-container {
    position: relative;
    overflow: hidden;
    padding: 1rem 0;
}

.testimonials-carousel-track {
    display: flex;
    gap: 1.5rem;
    will-change: transform;
    padding: 0.5rem 1.5rem;
    align-items: stretch;
    width: max-content;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    direction: rtl;
}

.testimonials-carousel-slide {
    flex: 0 0 auto;
    width: 280px;
    min-width: 250px;
    max-width: 320px;
}

.testimonials-carousel-slide .testimonial-card-modern {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.testimonial-card-modern {
    background: rgba(255, 255, 255, 0.85);
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 8px 25px rgba(18, 84, 57, 0.15);
    position: relative;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 2px solid rgba(18, 84, 57, 0.08);
    transition: all 0.3s ease;
}

.testimonial-card-modern::before {
    content: '"';
    position: absolute;
    top: -5px;
    right: 15px;
    font-size: 4rem;
    color: var(--accent-blue);
    opacity: 0.1;
    font-family: serif;
}

.testimonial-card-modern:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.testimonial-rating {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
    color: #f59e0b;
    direction: rtl;
    font-size: 0.9rem;
}

.testimonial-text {
    color: #406757;
    line-height: 1.7;
    margin-bottom: 1rem;
    font-style: italic;
    position: relative;
    z-index: 1;
    font-size: clamp(0.8rem, 1.8vw, 0.85rem);
    direction: rtl;
    text-align: right;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 2px solid rgba(18, 84, 57, 0.1);
    margin-top: auto;
    direction: rtl;
}

.author-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #125439, #406757);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #efe9d8;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(18, 84, 57, 0.3);
    flex-shrink: 0;
}

.author-info {
    flex: 1;
    direction: rtl;
    text-align: right;
}

.author-info h4 {
    font-size: clamp(0.9rem, 2.2vw, 1rem);
    font-weight: 700;
    color: var(--theme-primary, #125439);
    margin: 0 0 0.5rem 0;
}

.author-info p {
    font-size: clamp(0.8rem, 1.8vw, 0.85rem);
    color: var(--theme-secondary, #406757);
    margin: 0;
    font-weight: 500;
}

/* Loading and Error States */
.loading-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.no-data,
.error-message {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.error-message {
    color: var(--accent-red);
}

/* Responsive Design for New Sections */

@media (min-width: 1025px) {
    .hero-banner-section {
        padding-bottom: var(--hero-banner-ratio-desktop, 28%);

        max-height: 600px;
    }

    .hero-slide {
        background-size: cover;
        background-position: center center;
    }
}

/* Tablet and Medium Screens */
@media (max-width: 1024px) and (min-width: 769px) {
    .hero-banner-section {
        padding-bottom: var(--hero-banner-ratio-tablet, 35%);

    }
}

/* Mobile and Small Screens */
@media (max-width: 768px) {
    .hero-banner-section {
        padding-bottom: var(--hero-banner-ratio-mobile, 40%);

        border-radius: 0 0 var(--hero-banner-radius, 32px) var(--hero-banner-radius, 32px);
    }

    .hero-slide {
        background-size: 100% 100%;
        background-position: center center;
    }
}

/* Small Mobile Screens */
@media (max-width: 480px) {
    .hero-banner-section {
        padding-bottom: var(--hero-banner-ratio-small-mobile, 45%);

        border-radius: 0 0 var(--hero-banner-radius, 32px) var(--hero-banner-radius, 32px);
        margin-bottom: 0.75rem;
    }

    .hero-slide {
        background-size: 100% 100%;
        background-position: center center;
    }
}

/* Extra Small Mobile Screens */
@media (max-width: 360px) {
    .hero-banner-section {
        padding-bottom: var(--hero-banner-ratio-small-mobile, 50%);

    }
}

@media (max-width: 768px) {

    .hero-banner-section .hero-title {
        font-size: 2rem;
    }

    .hero-banner-section .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: clamp(1.25rem, 4vw, 1.75rem);
    }

    /* FAQ Section Mobile */
    .faq-section-modern {
        padding: 1.5rem 0 3rem 0;
    }

    .faq-section-modern .section-header {
        margin-bottom: 2rem;
    }

    .faq-question {
        padding: 0.875rem 1.25rem;
    }

    .faq-question h3 {
        font-size: clamp(0.9rem, 3vw, 1rem);
    }

    .faq-answer p {
        font-size: clamp(0.8rem, 2.5vw, 0.9rem);
    }

    .faq-item.active .faq-answer {
        padding: 0 1.25rem 1.25rem;
    }

    /* Testimonials Section Mobile */
    .testimonials-section-modern {
        padding: 1.5rem 0 3rem 0;
    }

    /* Features Section Mobile */
    .features-section-modern {
        padding: 3rem 0 1.5rem 0;
    }

    .categories-grid-modern,
    .products-grid-by-category,
    .testimonials-grid-modern {
        grid-template-columns: 1fr;
    }

    /* Category Section Modern - Mobile */
    .category-section-modern {
        padding: 1.25rem 1.875rem;
        margin-bottom: 1.5rem;
    }

    .category-header-modern {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        text-align: right;
    }

    .category-info-modern {
        flex: 1;
    }

    .view-all-link-modern {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        border-radius: 20px;
        flex-shrink: 0;
    }

    .category-image-modern {
        width: 100%;
        aspect-ratio: 3/1;
        margin: 0 auto 0.75rem auto;
    }

    .subcategory-filters-modern {
        gap: 0.375rem;
        margin: 0.75rem 0 0.9375rem 0;
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 0 0.3125rem;
    }

    .filter-btn-modern {
        padding: 0.1875rem 0.375rem;
        font-size: 0.65rem;
        border-radius: 10px;
    }

    .products-grid-modern {
        gap: 0.9375rem;
    }

    .product-item-modern {
        width: 190px;
        height: 250px;
        margin-bottom: 65px;
    }

    .product-name-modern {
        font-size: 0.75rem;
        height: 2.8em;
        line-height: 1.3;
    }

    .product-link-modern {
        padding: 0.625rem 1rem;
        font-size: 0.8rem;
        bottom: -50px;
        width: calc(100% - 15px);
    }

    .scroll-btn-modern {
        display: none;
    }

    .testimonials-carousel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .testimonials-carousel-title {
        font-size: clamp(1.25rem, 4vw, 1.75rem);
    }

    .testimonial-text {
        font-size: clamp(0.8rem, 2.5vw, 0.9rem);
    }

    .author-info h4 {
        font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    }

    .author-info p {
        font-size: clamp(0.75rem, 2vw, 0.8rem);
    }

    .testimonial-card-modern {
        padding: 1.75rem 1.5rem;
    }

    .testimonials-carousel-slide {
        width: 240px;
        min-width: 220px;
        max-width: 280px;
    }

    .testimonial-card-modern {
        padding: 1.25rem 1rem;
    }

    .testimonial-rating {
        margin-bottom: 0.75rem;
        font-size: 0.8rem;
    }

    .testimonial-text {
        margin-bottom: 0.75rem;
        font-size: clamp(0.75rem, 2vw, 0.8rem);
    }

    .testimonial-author {
        padding-top: 0.75rem;
        gap: 0.5rem;
    }

    .author-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .features-grid-modern {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .category-header-products {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

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

    .feature-card-modern {
        padding: 1.25rem 1rem;
    }

    .feature-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }

    .feature-card-modern h3 {
        font-size: clamp(0.9rem, 2.5vw, 1rem);
        margin-bottom: 0.5rem;
    }

    .feature-card-modern p {
        font-size: clamp(0.75rem, 2vw, 0.8rem);
    }
}

@media (max-width: 480px) {
    .features-grid-modern {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .feature-card-modern {
        padding: 1rem 0.75rem;
    }

    .feature-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .feature-card-modern h3 {
        font-size: clamp(0.85rem, 2.5vw, 0.95rem);
        margin-bottom: 0.25rem;
    }

    /* Category Section - Small Mobile (matching Untitled-1.html) */
    .category-section {
        padding: 15px 20px;
        margin-bottom: 20px;
    }

    .category-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        text-align: right;
    }

    .category-info {
        flex: 1;
    }

    .category-header .category-name {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }

    .category-count {
        font-size: 0.9rem;
    }

    .view-all-link {
        padding: 6px 12px;
        font-size: 0.75rem;
        border-radius: 15px;
        flex-shrink: 0;
    }

    .category-image {
        width: 100%;
        aspect-ratio: 3/1;
        margin: 0 auto 10px auto;
    }

    .subcategory-filters {
        gap: 3px;
        margin: 10px 0 12px 0;
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 0 5px;
    }

    .filter-btn {
        padding: 2px 4px;
        font-size: 0.6rem;
        border-radius: 8px;
    }

    .products-grid {
        gap: 10px;
    }

    .product-item {
        width: 160px;
        height: 240px;
        margin-bottom: 80px;
    }

    .product-link {
        padding: 10px 16px;
        font-size: 0.8rem;
        bottom: -65px;
        width: calc(100% - 10px);
    }

    .product-image {
        height: 55%;
        border-radius: 15px 15px 0 0;
    }

    .product-info {
        padding: 10px;
        height: 45%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .product-name {
        font-size: 0.75rem;
        height: 4.5em;
        margin-bottom: 8px;
        line-height: 1.2;
    }

    .product-price {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }

    /* Category Section Modern - Small Mobile (backward compatibility) */
    .category-section-modern {
        padding: 0.9375rem 1.25rem;
        margin-bottom: 1.25rem;
    }

    .category-header-modern {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        text-align: right;
    }

    .category-info-modern {
        flex: 1;
    }

    .category-name-modern {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .category-count-modern {
        font-size: 0.9rem;
    }

    .view-all-link-modern {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
        border-radius: 15px;
        flex-shrink: 0;
    }

    .category-image-modern {
        width: 100%;
        aspect-ratio: 3/1;
        margin: 0 auto 0.625rem auto;
    }

    .subcategory-filters-modern {
        gap: 0.1875rem;
        margin: 0.625rem 0 0.75rem 0;
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 0 0.3125rem;
    }

    .filter-btn-modern {
        padding: 0.125rem 0.25rem;
        font-size: 0.6rem;
        border-radius: 8px;
    }

    .products-grid-modern {
        gap: 0.625rem;
    }

    .product-item-modern {
        width: 160px;
        height: 240px;
        margin-bottom: 80px;
    }

    .product-link-modern {
        padding: 0.625rem 1rem;
        font-size: 0.8rem;
        bottom: -65px;
        width: calc(100% - 10px);
    }

    .product-image-modern {
        height: 55%;
        border-radius: 15px 15px 0 0;
    }

    .product-info-modern {
        padding: 0.625rem;
        height: 45%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .product-name-modern {
        font-size: 0.75rem;
        height: 4.5em;
        margin-bottom: 0.5rem;
        line-height: 1.2;
    }

    .product-price-modern {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    .feature-card-modern p {
        font-size: 0.85rem;
        line-height: 1.6;
    }
}

/* Products Page with Sidebar Layout */
.products-page-container {
    display: flex;
    gap: 1.5rem;
    width: 100%;
    margin: 0;
    padding: 1rem;
    align-items: flex-start;
}

/* Sidebar Styles */
.products-sidebar {
    width: 300px;
    flex-shrink: 0;
    background: var(--bg-secondary);
    border-radius: 1rem;
    padding: 0.5rem 0.25rem 0.5rem 0.5rem;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    scrollbar-gutter: stable;
}

/* Custom Scrollbar for Sidebar */
.products-sidebar::-webkit-scrollbar {
    width: 8px;
}

.products-sidebar::-webkit-scrollbar-track {
    background: transparent;
    margin: 1.5rem 0;
}

.products-sidebar::-webkit-scrollbar-thumb {
    background: var(--theme-primary, #125439);
    border-radius: 4px;
}

.products-sidebar::-webkit-scrollbar-thumb:hover {
    background: #0a3628;
}

.sidebar-section {
    margin-bottom: 1rem;
    flex-shrink: 0;
    padding: 0 0.1rem;
}

.sidebar-section:last-child {
    margin-bottom: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0 0.1rem;
}

#categoriesSection {
    display: flex;
    flex-direction: column;
}

#filtersSection {
    display: none;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.1rem 0.5rem 0.1rem;
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    z-index: 10;
    margin-top: 0;
}

.sidebar-title i {
    color: var(--theme-primary, #125439);
}

/* Filters Styles */
.filters-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.filter-input,
.filter-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--theme-primary, #125439);
    box-shadow: 0 0 0 3px rgba(18, 84, 57, 0.1);
}

/* Categories Sidebar List */
.categories-sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    overflow: visible;
    min-height: 0;
}

.category-sidebar-item {
    padding: 0.5rem;
    background: var(--bg-primary);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.category-sidebar-item:hover {
    background: var(--theme-primary, #125439);
    color: var(--theme-button-text, white);
    transform: translateX(-3px);
    box-shadow: var(--shadow-md);
}

.category-sidebar-item.active {
    background: var(--theme-primary, #125439);
    color: var(--theme-button-text, white);
    border-color: var(--theme-primary, #125439);
}

.category-sidebar-icon {
    width: 35px;
    height: 40px;
    border-radius: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.category-sidebar-icon::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 8px 8px 0;
    border-color: transparent rgba(255, 255, 255, 0.3) transparent transparent;
}

.category-sidebar-icon.blue {
    background: var(--theme-primary, #125439);
}

.category-sidebar-icon.green {
    background: var(--theme-primary, #125439);
}

.category-sidebar-icon.orange {
    background: var(--theme-primary, #125439);
}

.category-sidebar-icon.purple {
    background: var(--theme-primary, #125439);
}

.category-sidebar-item:hover .category-sidebar-icon {
    background: rgba(255, 255, 255, 0.2);
}

.category-sidebar-info {
    flex: 1;
    min-width: 0;
}

.category-sidebar-name {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
    line-height: 1.3;
}

.category-sidebar-count {
    font-size: 0.75rem;
    opacity: 0.8;
}

.category-sidebar-item:hover .category-sidebar-count {
    opacity: 1;
}

/* Main Content Area */
.products-main-content {
    flex: 1;
    min-width: 0;
    position: relative;
    width: 100%;
}

.products-page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1.5rem 0;
    text-align: right;
    padding: 0;
}

/* Filters Bar at Top */
.filters-bar-top {
    background: var(--bg-secondary);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    width: 100%;
}

.filters-row {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-width: 150px;
}

.filter-label-inline {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.filter-input-inline,
.filter-select-inline {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.filter-input-inline:focus,
.filter-select-inline:focus {
    outline: none;
    border-color: var(--theme-primary, #125439);
    box-shadow: 0 0 0 3px rgba(18, 84, 57, 0.1);
}

.filter-clear-btn {
    padding: 0.75rem 1.5rem;
    white-space: nowrap;
    height: fit-content;
}

/* Tags Filter Section */
.tags-filter-section {
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    width: 100%;
}

.tags-filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: flex-start;
    min-height: 50px;
    position: relative;
}

/* Mobile Carousel Styles */
@media (max-width: 768px) {
    .tags-filter-section {
        padding: 1rem;
        overflow: hidden;
    }

    .tags-filter-container {
        display: flex;
        flex-wrap: nowrap;
        gap: 0.5rem;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-behavior: auto;
        -webkit-overflow-scrolling: touch;
        position: relative;
        padding: 0.5rem 0;
        min-height: 50px;
        width: 100%;
        scrollbar-width: none;
        -ms-overflow-style: none;
        direction: ltr;
        /* Force LTR for scrollLeft to work correctly */
    }

    /* Maintain RTL appearance for content */
    .tags-filter-container .tag-filter-btn {
        direction: rtl;
    }

    .tags-filter-container::-webkit-scrollbar {
        display: none;
        /* Chrome, Safari, Opera */
    }

    .tags-filter-container::before,
    .tags-filter-container::after {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        width: 30px;
        z-index: 2;
        pointer-events: none;
    }

    .tags-filter-container::before {
        right: 0;
        background: linear-gradient(to left, var(--bg-secondary, #f8f9fa), transparent);
    }

    .tags-filter-container::after {
        left: 0;
        background: linear-gradient(to right, var(--bg-secondary, #f8f9fa), transparent);
    }

    .tag-filter-btn {
        flex: 0 0 auto;
        min-width: fit-content;
    }
}

.tag-filter-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1.2rem;
    background: var(--bg-primary, #ffffff);
    border: 2px solid var(--theme-primary, #125439);
    border-radius: 8px;
    color: var(--theme-primary, #125439);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tag-filter-btn span {
    display: block;
}

.tag-filter-btn:hover {
    background: var(--theme-primary, #125439);
    color: var(--theme-button-text, #ffffff);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(18, 84, 57, 0.2);
    border-color: var(--theme-primary, #125439);
}

.tag-filter-btn.active {
    background: var(--theme-primary, #125439);
    color: var(--theme-button-text, #ffffff);
    box-shadow: 0 4px 12px rgba(18, 84, 57, 0.3);
    border-color: var(--theme-primary, #125439);
}

.tag-filter-btn.active:hover {
    background: var(--theme-primary, #125439);
    opacity: 0.9;
    transform: translateY(-2px);
}

.clear-tag-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    margin-top: 1rem;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

.clear-tag-filter-btn:hover {
    background: #d32f2f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
}

.tags-filter-container .no-tags-message {
    color: #666;
    font-size: 0.9rem;
    text-align: center;
    padding: 1rem;
    width: 100%;
}

.tags-filter-container .loading-state {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 0.75rem;
}

.tags-filter-container .loading-state .loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #e0e0e0;
    border-top-color: var(--theme-primary, #0d5d2e);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.tags-filter-container .loading-state p {
    color: #666;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .tags-filter-section {
        padding: 1rem;
        overflow: hidden;
    }

    .tags-filter-container {
        gap: 0.5rem;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        /* Firefox */
        -ms-overflow-style: none;
        /* IE and Edge */
    }

    .tags-filter-container::-webkit-scrollbar {
        display: none;
        /* Chrome, Safari, Opera */
    }

    .tag-filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        scroll-snap-align: start;
    }

    .clear-tag-filter-btn {
        width: 100%;
        justify-content: center;
    }
}

.products-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 0.75rem;
    flex-wrap: wrap;
    gap: 1rem;
    width: 100%;
}

.products-count {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.products-sort {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.products-sort label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.sort-select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sort-select:focus {
    outline: none;
    border-color: var(--theme-primary, #125439);
    box-shadow: 0 0 0 3px rgba(18, 84, 57, 0.1);
}

/* Responsive Design for Products Page */
@media (max-width: 1024px) {
    .products-page-container {
        flex-direction: column;
        padding: 1rem;
    }

    .products-sidebar {
        width: 100%;
        position: static;
        max-height: none;
    }

    .categories-sidebar-list {
        max-height: 400px;
    }

    .filters-row {
        gap: 0.75rem;
    }

    .filter-item {
        min-width: 120px;
    }
}

/* Mobile Sidebar Controls */
.mobile-sidebar-controls {
    display: none;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.mobile-sidebar-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--theme-primary, #125439);
    color: var(--theme-button-text, white);
    border: none;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    justify-content: center;
}

.mobile-sidebar-btn:hover {
    background: #0a3628;
    transform: translateY(-2px);
}

.mobile-sidebar-btn i {
    font-size: 1rem;
}

/* Fixed Categories Button for Mobile */
.mobile-categories-fixed-btn {
    display: none;
    position: fixed;
    right: 10px;
    top: 65%;
    transform: translateY(-50%);
    z-index: 999;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--theme-primary, #125439);
    color: var(--theme-button-text, white);
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    padding: 0;
}

.mobile-categories-fixed-btn:hover,
.mobile-categories-fixed-btn.active {
    background: #0a3628;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.mobile-categories-fixed-btn i {
    font-size: 1.5rem;
}

/* Categories Dropdown for Mobile */
.mobile-categories-dropdown {
    display: none;
    position: fixed;
    right: 76px;
    top: 65%;
    transform: translateY(-50%);
    z-index: 998;
    width: 280px;
    max-width: calc(100vw - 100px);
    max-height: 70vh;
    background: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

@media (max-width: 480px) {
    .mobile-categories-dropdown {
        right: 10px;
        width: calc(100vw - 90px);
        max-width: calc(100vw - 90px);
    }
}

.mobile-categories-dropdown.active {
    display: block;
    opacity: 1;
    pointer-events: all;
}

.mobile-categories-dropdown-header {
    padding: 1rem;
    background: var(--theme-primary, #125439);
    color: var(--theme-button-text, white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.mobile-categories-dropdown-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mobile-categories-dropdown-close {
    background: transparent;
    border: none;
    color: var(--theme-button-text, white);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.mobile-categories-dropdown-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.mobile-categories-dropdown-content {
    max-height: calc(70vh - 60px);
    overflow-y: auto;
    padding: 0.5rem;
}

.mobile-categories-dropdown-content .categories-sidebar-list {
    gap: 0.5rem;
}

.mobile-categories-dropdown-content .category-sidebar-item {
    padding: 0.75rem;
    margin-bottom: 0;
}

/* Mobile Floating Filters (Products Page) */
.mobile-floating-search,
.mobile-floating-filters,
.mobile-filter-dropdown,
.mobile-filter-overlay {
    display: none;
}

.mobile-floating-search {
    position: fixed;
    top: 86px;
    left: 12px;
    right: 12px;
    z-index: 999992;
}

.mobile-floating-search-inner {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 252, 0.98));
    border-radius: 16px;
    box-shadow: 0 14px 30px rgba(20, 83, 75, 0.18);
    border: 1px solid rgba(20, 83, 75, 0.16);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.mobile-floating-search-inner i {
    color: #0f3d3e;
    font-size: 1.05rem;
}

.mobile-floating-search-inner input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    color: var(--text-primary, #222);
    outline: none;
}

.mobile-floating-search-clear {
    border: none;
    background: rgba(15, 61, 62, 0.12);
    color: #0f3d3e;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.mobile-floating-search-clear:hover {
    background: rgba(15, 61, 62, 0.2);
    transform: scale(1.05);
}

.mobile-floating-filters {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(var(--mobile-bottom-nav-height) + 12px + env(safe-area-inset-bottom));
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    z-index: 999993;
}

.mobile-floating-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 1.25rem;
    border-radius: 14px;
    border: 1px solid rgba(15, 61, 62, 0.18);
    background: linear-gradient(135deg, #f7fbf9, #e8f3f0);
    color: #0f3d3e;
    font-size: 0.92rem;
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(12, 52, 53, 0.2);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.mobile-floating-filter-btn i {
    font-size: 1.05rem;
    background: rgba(15, 61, 62, 0.12);
    width: 28px;
    height: 28px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mobile-floating-filter-btn.active {
    background: linear-gradient(135deg, #0f3d3e, #1f6a60);
    color: #fff;
    box-shadow: 0 14px 28px rgba(15, 61, 62, 0.35);
    border-color: rgba(15, 61, 62, 0.5);
}

.mobile-filter-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 24, 0.45);
    z-index: 999991;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.mobile-filter-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-filter-dropdown {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(var(--mobile-bottom-nav-height) + 64px + env(safe-area-inset-bottom));
    max-height: 62vh;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 18px;
    box-shadow: 0 20px 40px rgba(15, 61, 62, 0.25);
    border: 1px solid rgba(15, 61, 62, 0.12);
    overflow: hidden;
    opacity: 0;
    transform: translateY(16px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 999992;
}

.mobile-filter-dropdown.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.mobile-filter-dropdown-header {
    padding: 1rem 1.1rem;
    background: linear-gradient(135deg, #0f3d3e, #1f6a60);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.mobile-filter-dropdown-header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.mobile-filter-dropdown-close {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 1.1rem;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.mobile-filter-dropdown-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.mobile-filter-dropdown-content {
    max-height: calc(62vh - 60px);
    overflow-y: auto;
    padding: 0.9rem;
}

.mobile-filter-dropdown-content .categories-sidebar-list {
    gap: 0.65rem;
}

.mobile-filter-dropdown-content .category-sidebar-item {
    padding: 0.85rem 0.9rem;
    margin-bottom: 0;
    border-radius: 12px;
    background: #f7fbfa;
    border: 1px solid rgba(15, 61, 62, 0.08);
    box-shadow: 0 8px 16px rgba(15, 61, 62, 0.06);
}

.mobile-filter-dropdown .tags-filter-container {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    overflow: visible;
    direction: rtl;
    padding: 0.35rem 0;
}

.mobile-filter-dropdown .tags-filter-container .tag-filter-btn {
    width: 100%;
    justify-content: space-between;
    border-radius: 12px;
    border: 1px solid rgba(15, 61, 62, 0.08);
    background: #f7fbfa;
    color: #0f3d3e;
    box-shadow: 0 8px 16px rgba(15, 61, 62, 0.06);
    padding: 0.85rem 0.9rem;
    font-weight: 700;
    position: relative;
}

.mobile-filter-dropdown .tags-filter-container .tag-filter-btn::before {
    content: '\f02c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: rgba(15, 61, 62, 0.7);
    margin-left: 0.5rem;
}

.mobile-filter-dropdown .tags-filter-container .tag-filter-btn::after {
    content: '\f104';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: rgba(15, 61, 62, 0.45);
}

.mobile-filter-dropdown .tags-filter-container .tag-filter-btn.active {
    background: linear-gradient(135deg, #0f3d3e, #1f6a60);
    color: #fff;
    border-color: rgba(15, 61, 62, 0.5);
    box-shadow: 0 12px 22px rgba(15, 61, 62, 0.25);
}

.mobile-filter-dropdown .tags-filter-container .tag-filter-btn.active::before,
.mobile-filter-dropdown .tags-filter-container .tag-filter-btn.active::after {
    color: rgba(255, 255, 255, 0.8);
}

.mobile-tags-clear-btn {
    margin: 0.75rem;
    width: calc(100% - 1.5rem);
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: linear-gradient(135deg, #ff6b6b, #e63946);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(230, 57, 70, 0.35);
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 95px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 997;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* Sidebar Header for Mobile */
.sidebar-header-mobile {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 0;
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    z-index: 10;
}

.sidebar-close-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.sidebar-close-btn:hover {
    color: var(--theme-primary, #125439);
    transform: rotate(90deg);
}

.filters-container-mobile {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (max-width: 768px) {
    :root {
        --mobile-sticky-start: 120px;
        --mobile-search-height: 56px;
        --mobile-sticky-gap: 8px;
    }

    .products-page-container {
        padding: 0.5rem;
        padding-top: 4.5rem;
        gap: 1rem;
    }

    .mobile-sidebar-controls {
        display: none;
    }

    .mobile-categories-fixed-btn {
        display: flex;
    }

    .tags-filter-section {
        position: sticky;
        top: calc(var(--mobile-sticky-start) + var(--mobile-search-height) + var(--mobile-sticky-gap));
        z-index: 999980;
        margin-top: 0.75rem;
        margin-bottom: 1rem;
        background: var(--bg-secondary, #f8f9fa);
        box-shadow: var(--shadow-sm);
    }

    .mobile-floating-search {
        position: sticky;
        top: var(--mobile-sticky-start);
        margin-top: 0.5rem;
        margin-bottom: 0.75rem;
        left: auto;
        right: auto;
        z-index: 999979;
    }

    .mobile-floating-search-inner {
        min-height: var(--mobile-search-height);
    }

    .tags-filter-container {
        display: flex;
        flex-wrap: nowrap;
        gap: 0.6rem;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        padding: 0.5rem 0.25rem;
        scrollbar-width: none;
        -ms-overflow-style: none;
        direction: ltr;
    }

    .category-tags-container {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        padding: 0.25rem 0.1rem;
        scrollbar-width: none;
        -ms-overflow-style: none;
        direction: ltr;
    }

    .category-tags-container::-webkit-scrollbar {
        display: none;
    }

    .tags-filter-container::-webkit-scrollbar {
        display: none;
    }

    .tags-filter-container .tag-filter-btn {
        direction: rtl;
        flex: 0 0 auto;
        padding: 0.6rem 1.1rem;
        border-radius: 10px;
        font-weight: 600;
        box-shadow: 0 2px 6px rgba(18, 84, 57, 0.12);
        flex: 0 0 auto;
    }

    .mobile-floating-search,
    .mobile-floating-filters,
    .mobile-filter-dropdown,
    .mobile-filter-overlay {
        display: block;
    }

    .products-sidebar {
        position: fixed;
        top: 95px;
        right: -100%;
        width: 280px;
        max-width: 85vw;
        height: calc(100vh - 95px);
        max-height: calc(100vh - 95px);
        z-index: 998;
        transition: right 0.3s ease;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
        padding: 0;
        overflow-y: auto;
        scrollbar-width: none;
        /* Firefox */
        -ms-overflow-style: none;
        /* IE and Edge */
    }

    .products-sidebar::-webkit-scrollbar {
        display: none;
        /* Chrome, Safari, Opera */
    }

    .products-sidebar.active {
        right: 0;
    }

    .sidebar-header-mobile {
        display: flex;
        position: sticky;
        top: 0;
        background: var(--bg-secondary);
        z-index: 10;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        margin-bottom: 0;
    }

    .sidebar-title {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }

    .products-sidebar .sidebar-section:first-of-type {
        padding-top: 1rem;
    }

    .products-sidebar .sidebar-section:first-of-type {
        padding-top: 1rem;
    }

    .filters-bar-top {
        display: none;
    }

    /* Hide search filter in mobile sidebar - use header search button instead */
    .filters-container-mobile .mobile-search-hidden,
    .filters-container-mobile .filter-group.mobile-search-hidden,
    #searchFilterMobile {
        display: none !important;
    }

    /* Hide the label for search filter too */
    .filters-container-mobile .mobile-search-hidden .filter-label {
        display: none !important;
    }

    .filters-row {
        flex-direction: column;
        gap: 1rem;
    }

    .filter-item {
        width: 100%;
        min-width: 100%;
    }

    .filter-clear-btn {
        width: 100%;
    }

    .products-header-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .products-sort {
        width: 100%;
    }

    .sort-select {
        width: 100%;
    }

    .products-grid-front {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    @media (min-width: 480px) {
        .products-grid-front {
            grid-template-columns: repeat(3, 1fr);
        }
    }

    .carousel-product-card {
        min-height: 200px;
    }

    .carousel-product-image,
    .carousel-product-placeholder {
        aspect-ratio: 1 / 0.66;
    }

    .carousel-product-info {
        padding: 0.5rem;
        min-height: 80px;
    }

    .carousel-product-name {
        font-size: 0.75rem;
        min-height: 2rem;
    }

    .carousel-product-link {
        padding: 0.4rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Product Details Page */
.product-details-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background: #fafafa;
    min-height: calc(100vh - 200px);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.breadcrumb a {
    color: var(--theme-link, #125439);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #0a3628;
}

.breadcrumb i {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.breadcrumb span {
    color: var(--text-primary);
    font-weight: 600;
}

/* Loading and Error States */
.loading-state,
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    min-height: 400px;
}

.error-state i {
    font-size: 4rem;
    color: var(--accent-orange);
    margin-bottom: 1rem;
}

.error-state h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.error-state p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Product Details Content */
.product-details-content {
    animation: fadeIn 0.5s ease;
    background: white;
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

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

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

.product-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
    align-items: start;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Product Image Section */
.product-image-section {
    position: sticky;
    top: 100px;
    height: fit-content;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.product-main-image {
    width: 100%;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    background: var(--bg-tertiary);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-main-image:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.product-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


.product-image-section .product-gallery-container~.product-main-image,
.product-image-section:has(.product-gallery-container) .product-main-image {
    display: none !important;
}


.product-image-section .product-gallery-container {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

.product-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    color: white;
    background: linear-gradient(135deg, #125439, #0a3628);
}

/* Product Info Section */
.product-info-section {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.product-header {
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.product-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--theme-primary, #125439);
    margin-bottom: 1rem;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
    display: block !important;
    white-space: normal !important;
    text-overflow: clip !important;
}

.product-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.product-category,
.product-type {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: rgba(18, 84, 57, 0.08);
    color: var(--theme-primary, #125439);
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.product-category:hover,
.product-type:hover {
    background: rgba(18, 84, 57, 0.12);
    transform: translateY(-1px);
}

.product-type {
    background: rgba(18, 84, 57, 0.12);
    color: #0a3628;
}

.product-rating-sales {
    display: flex;
    gap: 2rem;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    flex-wrap: wrap;
}

.product-rating-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.product-rating .stars {
    display: flex;
    gap: 0.25rem;
    color: var(--accent-orange);
}

.product-rating .stars i {
    font-size: 1rem;
}

.product-rating span {
    font-weight: 600;
    color: var(--text-primary);
}

.rating-count {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 0.9rem;
}

.product-sales {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.product-sales i {
    color: var(--accent-green);
}

/* Price Section */
.product-price-section {
    padding: 0;
    background: transparent;
    border-radius: 0;
    border: none;
    margin: 1rem 0;
}

.product-price-wrapper {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.product-price .price-amount {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--theme-primary, #125439);
}

.product-price .price-currency {
    font-size: 1rem;
    color: #0a3628;
    opacity: 1;
    font-weight: 600;
}

.product-original-price {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    position: relative;
}

.product-original-price .original-price-amount {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: line-through;
    opacity: 0.7;
}

.product-original-price .price-currency {
    font-size: 0.875rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Social Actions */
.product-social-actions {
    display: flex;
    gap: 0.75rem;
    margin: 0 0 1.25rem 0;
    padding: 0;
    justify-content: flex-end;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 1.5px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: fit-content;
}

.btn-social:hover {
    background: rgba(18, 84, 57, 0.05);
    border-color: var(--theme-primary, #125439);
    color: var(--theme-primary, #125439);
    transform: translateY(-1px);
}

.btn-social i {
    font-size: 1rem;
}

#favoriteProductBtn.active,
#favoriteProductBtn.favorited {
    background: rgba(220, 38, 38, 0.1);
    border-color: #dc2626;
    color: #dc2626;
}

#favoriteProductBtn.active i,
#favoriteProductBtn.favorited i {
    color: #dc2626;
}

#favoriteProductBtn.active .far.fa-heart,
#favoriteProductBtn.favorited .far.fa-heart {
    display: none !important;
}

#favoriteProductBtn.active .fas.fa-heart,
#favoriteProductBtn.favorited .fas.fa-heart {
    display: inline-block !important;
}

#favoriteProductBtn:not(.active):not(.favorited) .fas.fa-heart {
    display: none !important;
}

#favoriteProductBtn:not(.active):not(.favorited) .far.fa-heart {
    display: inline-block !important;
}

/* Description */
.product-description {
    padding: 1.5rem 0;
}

.product-description h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.product-description p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1rem;
    white-space: pre-wrap;
}

/* Product Actions */
.product-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.product-actions .btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.product-actions #orderViaWhatsappBtn,
.product-actions #buyViaPaymentBtn {
    border: 1px solid rgba(255, 255, 255, 0.14);
    letter-spacing: 0.2px;
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.18),
        0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

/* Official, high-contrast, glowing WhatsApp CTA */
.product-actions #orderViaWhatsappBtn {
    background: linear-gradient(135deg, #1db954 0%, #16a34a 55%, #0f7a37 100%) !important;
    color: #ffffff !important;
    border-color: rgba(29, 185, 84, 0.55) !important;
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.18),
        0 0 18px rgba(29, 185, 84, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.product-actions #orderViaWhatsappBtn:hover {
    transform: translateY(-1px);
    box-shadow:
        0 14px 30px rgba(0, 0, 0, 0.22),
        0 0 28px rgba(29, 185, 84, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.product-actions #orderViaWhatsappBtn:active {
    transform: translateY(0);
}

/* Official, high-contrast, glowing Payment CTA */
.product-actions #buyViaPaymentBtn {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #0ea5e9 100%) !important;
    color: #ffffff !important;
    border-color: rgba(37, 99, 235, 0.6) !important;
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.18),
        0 0 18px rgba(37, 99, 235, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.product-actions #buyViaPaymentBtn:hover {
    transform: translateY(-1px);
    box-shadow:
        0 14px 30px rgba(0, 0, 0, 0.22),
        0 0 28px rgba(37, 99, 235, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.product-actions #buyViaPaymentBtn:active {
    transform: translateY(0);
}

.product-actions #orderViaWhatsappBtn:focus-visible,
.product-actions #buyViaPaymentBtn:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.75);
    outline-offset: 3px;
}

.product-actions .btn-primary {
    background: var(--theme-button, #125439);
    color: var(--theme-button-text, white);
    border: none;
    box-shadow: 0 2px 8px rgba(18, 84, 57, 0.2);
}

.product-actions .btn-primary:hover {
    background: #0a3628;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(18, 84, 57, 0.3);
}

.product-actions .btn-primary:active {
    transform: translateY(0);
}

.product-actions .btn-secondary {
    background: var(--theme-button-text, white);
    color: var(--theme-primary, #125439);
    border: 1.5px solid var(--theme-primary, #125439);
}

.product-actions .btn-secondary:hover {
    background: rgba(18, 84, 57, 0.05);
    border-color: #0a3628;
    color: #0a3628;
}

.product-actions .btn-info,
.product-actions #viewTemplateBtn {
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 55%, #22d3ee 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(8, 145, 178, 0.55) !important;
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.18),
        0 0 18px rgba(6, 182, 212, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    letter-spacing: 0.2px;
}

.product-actions .btn-info:hover,
.product-actions #viewTemplateBtn:hover {
    transform: translateY(-1px);
    box-shadow:
        0 14px 30px rgba(0, 0, 0, 0.22),
        0 0 28px rgba(6, 182, 212, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.product-actions .btn-info:active,
.product-actions #viewTemplateBtn:active {
    transform: translateY(0);
}

.product-actions .btn-info:focus-visible,
.product-actions #viewTemplateBtn:focus-visible {
    outline: 3px solid rgba(6, 182, 212, 0.75);
    outline-offset: 3px;
}

.product-actions .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Additional Product Info */
.product-additional-info {
    margin-top: 4rem;
    background: white;
    border-radius: 1.25rem;
    padding: 2.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Related Articles */
.related-articles-section {
    margin-top: 3rem;
    background: white;
    border-radius: 1.25rem;
    padding: 2.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.related-articles-section .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.related-articles-section .section-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.related-articles-section .section-link {
    color: var(--theme-primary, #125439);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.related-articles-section .section-link:hover {
    color: #0a3628;
}

.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.related-article-card {
    background: #fafafa;
    border-radius: 1rem;
    border: 1px solid rgba(18, 84, 57, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.related-article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.related-article-image img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.related-article-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    height: 100%;
}

.related-article-title {
    margin: 0;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.related-article-title a {
    color: inherit;
    text-decoration: none;
}

.related-article-excerpt {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.related-article-link {
    margin-top: auto;
    color: var(--theme-primary, #125439);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.related-article-link i {
    font-size: 0.85rem;
}

.related-articles-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 2rem;
    color: var(--text-secondary);
}

.related-articles-empty i {
    font-size: 2.5rem;
    color: var(--theme-primary, #125439);
}

.info-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
    padding-bottom: 0;
}

.tab-btn {
    padding: 0.875rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: var(--theme-primary, #125439);
    background: rgba(18, 84, 57, 0.03);
}

.tab-btn.active {
    color: var(--theme-primary, #125439);
    border-bottom-color: var(--theme-primary, #125439);
    background: rgba(18, 84, 57, 0.05);
}

.tab-content {
    min-height: 200px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.product-details-table {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: rgba(18, 84, 57, 0.02);
    border-radius: 0.75rem;
    border: 1px solid rgba(18, 84, 57, 0.08);
    transition: all 0.2s ease;
}

.detail-row:hover {
    background: rgba(18, 84, 57, 0.04);
    border-color: rgba(18, 84, 57, 0.15);
}

.detail-label {
    font-weight: 600;
    color: var(--text-primary);
}

.detail-value {
    color: var(--text-secondary);
}

.no-reviews {
    text-align: center;
    color: var(--text-secondary);
    padding: 3rem;
}

/* Notifications Container */
.notification-container {
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 400px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .notification-container {
        left: auto;
        right: 20px;
        top: 20px;
    }
}

/* Notifications */
.notification {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    pointer-events: auto;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 100%;
    position: relative;
    border-right: 4px solid transparent;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.hide {
    transform: translateX(100%);
    opacity: 0;
}

.notification-success {
    border-right-color: #10b981;
    background: #f0fdf4;
}

.notification-error {
    border-right-color: #ef4444;
    background: #fef2f2;
}

.notification-warning {
    border-right-color: #f59e0b;
    background: #fffbeb;
}

.notification-info {
    border-right-color: var(--theme-primary, #125439);
    background: #f0f9ff;
}

.notification i {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.notification-success i {
    color: #10b981;
}

.notification-error i {
    color: #ef4444;
}

.notification-warning i {
    color: #f59e0b;
}

.notification-info i {
    color: var(--theme-primary, #125439);
}

.notification span {
    flex: 1;
    color: #333;
    font-weight: 500;
}

.notification-close {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.notification-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

.notification-close i {
    font-size: 0.875rem;
}

.notification-action {
    background: var(--theme-primary, #125439);
    color: var(--theme-button-text, white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
    margin-right: 0.5rem;
}

.notification-action:hover {
    background: #0a3628;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .notification-container {
        left: 10px;
        right: 10px;
        top: 10px;
        max-width: none;
    }

    .notification {
        padding: 0.875rem 1.25rem;
        font-size: 0.9rem;
    }
}

/* Confirm Modal */
.confirm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 1rem;
}

.confirm-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.confirm-modal {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.confirm-modal-overlay.active .confirm-modal {
    transform: scale(1) translateY(0);
}

.confirm-modal-content {
    padding: 2rem;
}

.confirm-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
    text-align: right;
}

.confirm-modal-message {
    font-size: 1rem;
    color: #666;
    margin-bottom: 2rem;
    text-align: right;
    line-height: 1.6;
}

.confirm-modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    flex-direction: row-reverse;
}

.confirm-modal-actions .btn {
    min-width: 120px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s;
}

.confirm-modal-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.confirm-modal-actions .btn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .confirm-modal-content {
        padding: 1.5rem;
    }

    .confirm-modal-title {
        font-size: 1.25rem;
    }

    .confirm-modal-message {
        font-size: 0.9rem;
    }

    .confirm-modal-actions {
        flex-direction: column;
    }

    .confirm-modal-actions .btn {
        width: 100%;
    }
}

/* Pagination */
.pagination-container {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.pagination-btn {
    background: white;
    border: 1px solid #e5e7eb;
    color: #333;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
}

.pagination-btn:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: var(--theme-primary, #125439);
    color: var(--theme-primary, #125439);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination-page {
    background: white;
    border: 1px solid #e5e7eb;
    color: #333;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.pagination-page:hover {
    background: #f3f4f6;
    border-color: var(--theme-primary, #125439);
    color: var(--theme-primary, #125439);
}

.pagination-page.active {
    background: var(--theme-primary, #125439);
    border-color: var(--theme-primary, #125439);
    color: var(--theme-button-text, white);
}

.pagination-ellipsis {
    padding: 0.5rem;
    color: #666;
}

.pagination-info {
    text-align: center;
    color: #666;
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .pagination {
        gap: 0.25rem;
    }

    .pagination-btn,
    .pagination-page {
        min-width: 36px;
        height: 36px;
        padding: 0.375rem 0.5rem;
        font-size: 0.875rem;
    }

    .pagination-info {
        font-size: 0.8rem;
    }
}

/* Reviews Modal */
.reviews-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 1rem;
}

.reviews-modal.active {
    opacity: 1;
    visibility: visible;
}

.reviews-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.reviews-modal-content {
    position: relative;
    background: white;
    border-radius: 1.25rem;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    z-index: 1;
}

.reviews-modal.active .reviews-modal-content {
    transform: scale(1) translateY(0);
}

.reviews-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    border-radius: 1.25rem 1.25rem 0 0;
}

.reviews-modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--theme-primary, #125439);
    margin: 0;
}

.reviews-modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.reviews-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: rotate(90deg);
}

.reviews-modal-body {
    padding: 2rem;
}

.reviews-summary {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.08);
}

.reviews-summary-rating {
    text-align: center;
}

.reviews-average-rating {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--theme-primary, #125439);
    margin-bottom: 0.5rem;
}

.reviews-stars-display {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.reviews-stars-display i {
    font-size: 1.5rem;
    color: #ffc107;
}

.reviews-stars-display i.far {
    color: #e0e0e0;
}

.reviews-total-count {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.review-item {
    padding: 1.5rem;
    background: rgba(18, 84, 57, 0.02);
    border-radius: 0.75rem;
    border: 1px solid rgba(18, 84, 57, 0.08);
    transition: all 0.3s ease;
}

.review-item:hover {
    background: rgba(18, 84, 57, 0.04);
    border-color: rgba(18, 84, 57, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.review-rating {
    display: flex;
    gap: 0.25rem;
}

.review-rating i {
    font-size: 1rem;
    color: #ffc107;
}

.review-rating i.far {
    color: #e0e0e0;
}

.review-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.review-comment {
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.no-reviews-message {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
}

.no-reviews-message i {
    font-size: 4rem;
    color: #e0e0e0;
    margin-bottom: 1rem;
}

.no-reviews-message p {
    font-size: 1.1rem;
    margin: 0.5rem 0;
    color: var(--text-primary);
    font-weight: 600;
}

.no-reviews-subtitle {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-secondary);
}

/* Reviews Tab Content */
.reviews-tab-content {
    padding: 1rem 0;
}

.reviews-tab-summary {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.08);
}

.reviews-tab-rating {
    text-align: center;
}

.reviews-tab-average {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--theme-primary, #125439);
    margin-bottom: 0.5rem;
}

.reviews-tab-stars {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.reviews-tab-stars i {
    font-size: 1.25rem;
    color: #ffc107;
}

.reviews-tab-stars i.far {
    color: #e0e0e0;
}

.reviews-tab-count {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.reviews-tab-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.review-tab-item {
    padding: 1.25rem;
    background: rgba(18, 84, 57, 0.02);
    border-radius: 0.75rem;
    border: 1px solid rgba(18, 84, 57, 0.08);
    transition: all 0.3s ease;
}

.review-tab-item:hover {
    background: rgba(18, 84, 57, 0.04);
    border-color: rgba(18, 84, 57, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.review-tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.review-tab-rating {
    display: flex;
    gap: 0.25rem;
}

.review-tab-rating i {
    font-size: 0.9rem;
    color: #ffc107;
}

.review-tab-rating i.far {
    color: #e0e0e0;
}

.review-tab-date {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.review-tab-comment {
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 0.95rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.no-reviews-tab-message {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
}

.no-reviews-tab-message i {
    font-size: 3rem;
    color: #e0e0e0;
    margin-bottom: 1rem;
}

.no-reviews-tab-message p {
    font-size: 1rem;
    margin: 0.5rem 0;
    color: var(--text-primary);
    font-weight: 600;
}

.no-reviews-tab-subtitle {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-secondary);
}

/* Add Review Section */
.add-review-section {
    margin: 2rem 0;
    padding: 2rem;
    background: rgba(18, 84, 57, 0.02);
    border-radius: 1rem;
    border: 1px solid rgba(18, 84, 57, 0.1);
}

.add-review-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--theme-primary, #125439);
    margin-bottom: 1.5rem;
    text-align: center;
}

.add-review-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.add-review-stars-container {
    text-align: center;
}

.add-review-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.add-review-stars {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
}

.add-review-stars i {
    font-size: 2rem;
    color: #e0e0e0;
    transition: all 0.2s ease;
    cursor: pointer;
}

.add-review-stars i:hover {
    transform: scale(1.1);
    color: #ffc107;
}

.add-review-stars i.fas {
    color: #ffc107;
}

.add-review-stars i.far {
    color: #e0e0e0;
}

.add-review-rating-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--theme-primary, #125439);
}

.add-review-rating-value span:first-child {
    color: #ffc107;
    font-size: 1.5rem;
}

.add-review-comment-container {
    width: 100%;
}

.add-review-comment {
    width: 100%;
    padding: 0.875rem;
    border: 1.5px solid var(--border-color);
    border-radius: 0.75rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-primary);
    background: white;
    resize: vertical;
    transition: all 0.3s ease;
    line-height: 1.6;
    box-sizing: border-box;
    min-height: 100px;
}

.add-review-comment:focus {
    outline: none;
    border-color: var(--theme-primary, #125439);
    box-shadow: 0 0 0 3px rgba(18, 84, 57, 0.1);
}

.add-review-comment::placeholder {
    color: var(--text-tertiary);
}

.add-review-section .btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.add-review-section .btn-primary {
    background: var(--theme-primary, #125439);
    color: var(--theme-button-text, white);
    border: none;
}

.add-review-section .btn-primary:hover:not(:disabled) {
    background: #0a3628;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(18, 84, 57, 0.3);
}

.add-review-section .btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Responsive Design */
@media (max-width: 768px) {

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

    .page-content {
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .product-details-container {
        padding: 0.5rem !important;
        background: #fafafa;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        overflow-x: hidden !important;
        position: relative !important;
    }

    .product-details-content {
        padding: 0.75rem !important;
        border-radius: 0.75rem;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        margin: 0 !important;
        position: relative !important;
    }

    .product-details-content * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .product-details-content *:not(img) {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    .product-details-content img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .product-details-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        margin-bottom: 1.5rem !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .product-image-section {
        position: static !important;
        margin-bottom: 1rem !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
        padding: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .product-main-image {
        border-radius: 0.75rem;
        aspect-ratio: 1;
    }

    .product-gallery-container {
        margin-bottom: 0.75rem !important;
        max-width: 100% !important;
        width: 100% !important;
        overflow: hidden !important;
        padding: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .product-gallery-main {
        max-width: 100% !important;
        width: 100% !important;
        overflow: hidden !important;
        padding: 0 !important;
        margin: 0 0 0.75rem 0 !important;
    }

    .product-main-image-wrapper {
        border-radius: 0.75rem;
        max-width: 100% !important;
        width: 100% !important;
        overflow: hidden !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .product-gallery-main-image,
    #productMainGalleryImage {
        max-width: 100% !important;
        max-height: 100% !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        display: block !important;
    }

    .product-gallery-thumbnails {
        gap: 0.5rem;
        margin-top: 0.75rem;
    }

    .product-gallery-thumbnail {
        width: 60px;
        height: 60px;
        border-radius: 0.5rem;
    }

    /* Breadcrumb */
    .breadcrumb {
        font-size: 0.8rem;
        margin-bottom: 1rem;
        gap: 0.375rem;
        flex-wrap: wrap;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .breadcrumb i {
        font-size: 0.65rem;
    }

    /* Product Header */
    .product-header {
        padding-bottom: 1rem;
        margin-bottom: 0.75rem;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .product-name {
        font-size: 1.15rem;
        line-height: 1.5;
        margin-bottom: 0.75rem;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        overflow: visible !important;
        height: auto !important;
        max-height: none !important;
        display: block !important;
        white-space: normal !important;
        text-overflow: clip !important;
    }

    .product-meta {
        gap: 0.5rem;
        margin-top: 0.5rem;
        flex-wrap: wrap;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .product-category,
    .product-type {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
        border-radius: 15px;
    }

    /* Rating and Sales */
    .product-rating-sales {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }

    .product-rating-wrapper {
        width: 100%;
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .product-rating {
        gap: 0.375rem;
    }

    .product-rating .stars i {
        font-size: 0.9rem;
    }

    .product-rating span {
        font-size: 0.85rem;
    }

    .rating-count {
        font-size: 0.8rem;
    }

    .product-sales {
        font-size: 0.85rem;
    }

    /* Social Actions */
    .product-social-actions {
        flex-direction: row;
        gap: 0.5rem;
        margin: 0 0 1rem 0;
        justify-content: flex-start;
        flex-wrap: wrap;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .btn-social {
        flex: 1;
        min-width: calc(50% - 0.25rem);
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .btn-social i {
        font-size: 0.9rem;
    }

    .btn-social span {
        display: inline;
    }

    /* Price Section */
    .product-price-section {
        padding: 0 !important;
        margin: 0.75rem 0 !important;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
    }

    .product-price-wrapper {
        flex-direction: row;
        align-items: baseline;
        gap: 0.75rem;
        flex-wrap: wrap;
    }

    .product-price .price-amount {
        font-size: 1.4rem;
    }

    .product-price .price-currency {
        font-size: 0.85rem;
        color: #0a3628 !important;
        opacity: 1 !important;
        font-weight: 600 !important;
    }

    .product-original-price .original-price-amount {
        font-size: 1.1rem;
    }

    .product-original-price .price-currency {
        font-size: 0.8rem;
    }

    /* Stock Status */
    .product-stock-status {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
        margin: 0.5rem 0;
    }

    .product-stock-status i {
        font-size: 0.9rem;
    }

    /* Product Actions */
    .product-actions {
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 1rem;
        padding-top: 1rem;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .product-actions .btn {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0.875rem 1.25rem;
        font-size: 0.9rem;
        box-sizing: border-box !important;
    }

    /* Additional Info */
    .product-additional-info {
        margin-top: 1.5rem !important;
        padding: 1rem !important;
        border-radius: 0.75rem;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    .related-articles-section {
        margin-top: 1.5rem !important;
        padding: 1rem !important;
        border-radius: 0.75rem;
    }

    .related-articles-section .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .related-articles-grid {
        grid-template-columns: 1fr;
    }

    .info-tabs {
        flex-direction: row;
        gap: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        border-bottom: 2px solid rgba(0, 0, 0, 0.08);
        margin-bottom: 1.5rem;
        padding-bottom: 0;
    }

    .info-tabs::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        white-space: nowrap;
        min-width: fit-content;
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        border-bottom: 3px solid transparent;
        border-left: none;
        border-right: none;
        margin-bottom: -2px;
    }

    .tab-btn.active {
        border-bottom-color: var(--theme-primary, #125439);
        border-left-color: transparent;
    }

    .tab-btn i {
        font-size: 0.9rem;
    }

    .tab-content {
        min-height: 150px;
    }

    .product-description {
        padding: 1rem 0;
    }

    .product-description p {
        font-size: 0.9rem;
        line-height: 1.7;
    }

    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }

    .detail-label {
        font-size: 0.85rem;
    }

    .detail-value {
        font-size: 0.9rem;
    }

    /* Reviews Modal Responsive */
    .reviews-modal-content {
        max-width: calc(100% - 1rem);
        border-radius: 1rem;
        margin: 0.5rem;
        max-height: 95vh;
    }

    .reviews-modal-header {
        padding: 1.25rem;
    }

    .reviews-modal-header h2 {
        font-size: 1.25rem;
    }

    .reviews-modal-body {
        padding: 1.5rem 1.25rem;
    }

    .reviews-average-rating {
        font-size: 2.5rem;
    }

    .reviews-stars-display i {
        font-size: 1.25rem;
    }

    .review-item {
        padding: 1.25rem;
    }

    .review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    /* Reviews Tab Responsive */
    .reviews-tab-average {
        font-size: 2rem;
    }

    .reviews-tab-stars i {
        font-size: 1.1rem;
    }

    .review-tab-item {
        padding: 1rem;
    }

    .review-tab-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    /* Add Review Section Responsive */
    .add-review-section {
        margin: 1.5rem 0;
        padding: 1.5rem;
    }

    .add-review-title {
        font-size: 1.1rem;
    }

    .add-review-stars i {
        font-size: 1.75rem;
    }

    .add-review-rating-value {
        font-size: 1.1rem;
    }

    .add-review-rating-value span:first-child {
        font-size: 1.25rem;
    }

    .add-review-comment {
        min-height: 90px;
        font-size: 0.9rem;
    }

    /* Loading and Error States */
    .loading-state,
    .error-state {
        padding: 2rem 1rem;
        min-height: 300px;
    }

    .error-state i {
        font-size: 3rem;
    }

    .error-state h3 {
        font-size: 1.25rem;
    }

    .error-state p {
        font-size: 0.9rem;
    }

    /* Product Lightbox Mobile */
    .product-lightbox-content {
        max-width: 95%;
        max-height: 85vh;
        padding: 0.5rem;
    }

    .product-lightbox-image {
        max-height: 85vh;
        border-radius: 0.5rem;
    }

    .product-lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .product-lightbox-prev {
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .product-lightbox-next {
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .product-lightbox-counter {
        bottom: 10px;
        font-size: 0.9rem;
    }

    /* Social Share Dropdown Mobile */
    .social-share-dropdown {
        right: auto;
        left: 0;
        min-width: 160px;
        padding: 0.5rem;
    }

    .social-share-link {
        padding: 0.625rem 0.75rem;
        font-size: 0.85rem;
    }

    .social-share-link i {
        font-size: 1rem;
    }

    /* Customization Modal Mobile - will be in customization-modal.css */
    /* Related Products */
    .related-products-section {
        margin-top: 2rem;
        padding: 1rem 0;
    }

    .related-products-header {
        margin-bottom: 1.25rem;
    }

    .related-products-title {
        font-size: 1rem !important;
        margin-bottom: 1rem;
        font-weight: 700 !important;
    }

    .related-products-title i {
        font-size: 1.1rem !important;
    }

    .related-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    /* Product Gallery Zoom Button Mobile */
    .product-gallery-zoom-btn {
        width: 40px;
        height: 40px;
        top: 0.75rem;
        left: 0.75rem;
    }

    .product-gallery-zoom-btn i {
        font-size: 1rem;
    }

    /* Product Info Section Spacing */
    .product-info-section {
        gap: 1rem !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
    }

    .product-header {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 !important;
        margin: 0 0 0.75rem 0 !important;
        overflow: visible !important;
    }

    .product-name {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        padding: 0 !important;
        margin: 0 0 0.75rem 0 !important;
        overflow: visible !important;
        height: auto !important;
        max-height: none !important;
        display: block !important;
        white-space: normal !important;
        text-overflow: clip !important;
        line-height: 1.5 !important;
    }

    .product-meta {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        flex-wrap: wrap !important;
        padding: 0 !important;
        margin: 0.5rem 0 0 0 !important;
    }

    .product-price-section {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 !important;
        margin: 0.75rem 0 !important;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
    }

    .product-actions {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 !important;
        margin: 1rem 0 0 0 !important;
    }

    .product-social-actions {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 !important;
        margin: 0 0 1rem 0 !important;
    }

    /* Step Header Mobile */
    .step-header h3 {
        font-size: 1.25rem;
    }

    .step-header p {
        font-size: 0.9rem;
    }
}

/* Account Page Styles */
.account-content {
    margin-top: 2rem;
}

.account-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e0e0e0;
    overflow-x: auto;
}

.account-tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: #666;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.account-tab-btn:hover {
    color: var(--theme-primary, #125439);
}

.account-tab-btn.active {
    color: var(--theme-primary, #125439);
    border-bottom-color: var(--theme-primary, #125439);
}

.account-tab-btn i {
    font-size: 1.1rem;
}

.account-tab-content {
    min-height: 400px;
}

.account-tab-pane {
    display: none;
}

.account-tab-pane.active {
    display: block;
}

.account-section {
    margin-bottom: 2.5rem;
}

.account-section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    color: var(--theme-primary, #125439);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e0e0e0;
}

.account-section-title i {
    font-size: 1.75rem;
}

/* Account Form Card */
.account-form-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.account-form-card .form-group {
    margin-bottom: 1.5rem;
}

.account-form-card label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.account-form-card input[type="text"],
.account-form-card input[type="email"],
.account-form-card input[type="tel"],
.account-form-card input[type="password"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.account-form-card input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.account-form-card .btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.account-form-card .btn-primary {
    background: var(--accent-primary);
    color: white;
}

.account-form-card .btn-primary:hover {
    background: var(--accent-primary-dark, #2563eb);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.account-info-card {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.account-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.account-info-item:last-child {
    border-bottom: none;
}

.account-info-item label {
    font-weight: 600;
    color: #333;
}

.account-info-value {
    color: #666;
    text-align: left;
}

.account-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.account-status.active {
    background: #d4edda;
    color: #155724;
}

.account-status.inactive {
    background: #f8d7da;
    color: #721c24;
}

.account-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.account-stat-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.account-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.account-stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.75rem;
}

.account-stat-info {
    flex: 1;
}

.account-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--theme-primary, #125439);
    margin-bottom: 0.25rem;
}

.account-stat-label {
    font-size: 0.9rem;
    color: #666;
}

/* Orders List */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.order-item {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.order-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.order-number {
    font-size: 1.25rem;
    color: var(--theme-primary, #125439);
    margin: 0;
}

.order-date {
    font-size: 0.9rem;
    color: #666;
}

.order-status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.order-status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.order-status-badge.processing {
    background: #d1ecf1;
    color: #0c5460;
}

.order-status-badge.completed {
    background: #d4edda;
    color: #155724;
}

.order-status-badge.cancelled {
    background: #f8d7da;
    color: #721c24;
}

.order-items {
    margin-bottom: 1rem;
}

.order-item-product {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.order-item-product:last-child {
    border-bottom: none;
}

.order-item-name {
    flex: 1;
    color: #333;
}

.order-item-quantity {
    color: #666;
    margin: 0 1rem;
}

.order-item-price {
    font-weight: 600;
    color: var(--theme-primary, #125439);
}

.order-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 2px solid #f0f0f0;
}

.order-total {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.25rem;
}

.order-total strong {
    color: var(--theme-primary, #125439);
    font-size: 1.5rem;
}

/* Favorites List */
.favorites-list {
    margin-top: 1.5rem;
}

.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.favorite-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.favorite-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.favorite-item-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
}

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

.favorite-item-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 3rem;
}

.favorite-item-info {
    padding: 1.5rem;
}

.favorite-item-name {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 0.75rem;
}

.favorite-item-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--theme-primary, #125439);
    margin-bottom: 1rem;
}

.favorite-item-price:contains(""),
.favorite-item-price.price-free {
    color: var(--saudi-gold) !important;
}

.favorite-item-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Cart List */
.cart-list {
    margin-top: 1.5rem;
}

.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.cart-item-account {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

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

.cart-item-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 2rem;
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.cart-item-meta {
    display: flex;
    gap: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.cart-item-price {
    font-weight: 600;
    color: var(--theme-primary, #125439);
}

.cart-item-price:contains(""),
.cart-item-price.price-free {
    color: var(--saudi-gold) !important;
}

.cart-item-actions {
    display: flex;
    gap: 0.75rem;
}

.cart-summary {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
    font-size: 1.25rem;
}

.cart-total strong {
    font-size: 1.75rem;
    color: var(--theme-primary, #125439);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #999;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

/* User Menu Updates */
.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.account-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--theme-link, #125439);
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background 0.3s;
}

.account-link:hover {
    background: rgba(18, 84, 57, 0.1);
}

.account-link i {
    font-size: 1.25rem;
}

@media (max-width: 768px) {
    .account-tabs {
        gap: 0.5rem;
    }

    .account-tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .account-tab-btn span {
        display: none;
    }

    .account-stats-grid {
        grid-template-columns: 1fr;
    }

    .account-stat-card {
        padding: 1.25rem;
    }

    .account-stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .account-stat-value {
        font-size: 1.75rem;
    }

    .favorites-grid {
        grid-template-columns: 1fr;
    }

    .cart-item-account {
        flex-direction: column;
        align-items: flex-start;
    }

    .cart-item-image {
        width: 100%;
        height: 200px;
    }

    .cart-item-actions {
        width: 100%;
        justify-content: space-between;
    }

    .order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .user-menu {
        flex-direction: column;
        gap: 0.5rem;
    }

    .account-link span {
        display: none;
    }
}

/* Auth Modal Styles */
.auth-modal {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 2147483647 !important;
    /* Maximum z-index value */
    align-items: center;
    justify-content: center;
    isolation: isolate;
    pointer-events: none;

    transform: translateZ(0);
    will-change: transform;

    contain: layout style paint;
}

.auth-modal.active {
    display: flex !important;
    pointer-events: auto;
}

.auth-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2147483646 !important;
    pointer-events: auto;
}

.auth-modal-content {
    position: relative !important;
    background: #fff !important;
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 2147483647 !important;
    animation: modalSlideIn 0.3s ease-out;
    pointer-events: auto;
    transform: translateZ(0);
    /* Force hardware acceleration */
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

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


#homeSectionsContainer .auth-modal,
#homeSectionsContainer~.auth-modal,
body .auth-modal,
html .auth-modal {
    z-index: 2147483647 !important;
    position: fixed !important;
}


.hero-banner-section,
.hero-carousel,
.hero-slide,
.hero-slide.active {
    z-index: 1 !important;
}


.auth-modal,
.auth-modal * {
    z-index: inherit !important;
}

.auth-modal-overlay {
    z-index: 2147483646 !important;
}

.auth-modal-content {
    z-index: 2147483647 !important;
}

.auth-modal-close {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s;
}

.auth-modal-close:hover {
    color: var(--theme-primary, #125439);
}

.auth-form h2 {
    margin: 0 0 1.5rem 0;
    color: var(--theme-primary, #125439);
    font-size: 1.75rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--theme-primary, #125439);
    box-shadow: 0 0 0 3px rgba(18, 84, 57, 0.1);
}

/* Screen reader only class for accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Enhanced focus styles for accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid #125439;
    outline-offset: 2px;
}

/* Smooth transitions for auth modal */
.auth-modal-content {
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.auth-modal.active .auth-modal-content {
    animation: modalSlideIn 0.3s ease-out;
}

.btn-block {
    width: 100%;
    margin-top: 1rem;
}

.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    color: #666;
}

.auth-switch a {
    color: var(--theme-link, #125439);
    text-decoration: none;
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.auth-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    text-align: center;
    display: none;
}

.auth-message.success {
    background: #d4edda;
    color: #155724;
    display: block;
}

.auth-message.error {
    background: #f8d7da;
    color: #721c24;
    display: block;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    color: var(--theme-primary, #125439);
    font-weight: 600;
}

.logout-btn {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: #c82333;
}

@media (max-width: 768px) {
    .auth-modal-content {
        padding: 1.5rem;
        max-width: 95%;
    }

    .auth-form h2 {
        font-size: 1.5rem;
    }
}

/* ============================================
   Product Gallery Styles
   ============================================ */
.product-gallery-container {
    width: 100%;
    display: block;
    max-width: 100%;
    overflow: hidden;
}

.product-gallery-main {
    position: relative;
    margin-bottom: 1rem;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.product-main-image-wrapper {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 1.25rem;
    overflow: hidden !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    background: var(--bg-tertiary);
    aspect-ratio: 1;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}

.product-main-image-wrapper:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.product-gallery-main-image,
#productMainGalleryImage {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.product-gallery-zoom-btn {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.product-gallery-zoom-btn:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.product-gallery-zoom-btn i {
    color: var(--theme-primary, #125439);
    font-size: 1.1rem;
}

.product-gallery-thumbnails {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.product-gallery-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 0.75rem;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.product-gallery-thumbnail:hover {
    opacity: 1;
    transform: scale(1.05);
}

.product-gallery-thumbnail.active {
    border-color: var(--theme-primary, #125439);
    opacity: 1;
    box-shadow: 0 4px 12px rgba(18, 84, 57, 0.3);
}

.product-gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Lightbox Styles */
.product-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.product-lightbox.active {
    display: flex;
}

.product-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.product-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.product-lightbox-close,
.product-lightbox-prev,
.product-lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10002;
    color: var(--theme-primary, #125439);
    font-size: 1.2rem;
}

.product-lightbox-close {
    top: -60px;
    right: 0;
}

.product-lightbox-prev {
    right: -60px;
    top: 50%;
    transform: translateY(-50%);
}

.product-lightbox-next {
    left: -60px;
    top: 50%;
    transform: translateY(-50%);
}

.product-lightbox-close:hover,
.product-lightbox-prev:hover,
.product-lightbox-next:hover {
    background: white;
    transform: scale(1.1);
}

.product-lightbox-counter {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1rem;
    font-weight: 600;
}

/* ============================================
   Social Share Dropdown
   ============================================ */
.product-social-actions {
    position: relative;
}

.social-share-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 0.5rem;
    min-width: 180px;
    z-index: 1000;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

.social-share-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: right;
    cursor: pointer;
    font-size: 0.9rem;
}

.social-share-link:hover {
    background: #f5f5f5;
    color: var(--theme-primary, #125439);
}

.social-share-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.social-share-link[data-platform="facebook"] i {
    color: #1877f2;
}

.social-share-link[data-platform="twitter"] i {
    color: #1da1f2;
}

.social-share-link[data-platform="whatsapp"] i {
    color: #25d366;
}

/* ============================================
   Stock Status
   ============================================ */
.product-stock-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.product-stock-status.in-stock {
    background: #d4edda;
    color: #155724;
}

.product-stock-status.out-of-stock {
    background: #f8d7da;
    color: #721c24;
}

.product-stock-status i {
    font-size: 1.1rem;
}

/* Product Statistics */
.product-statistics {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 0.75rem;
    border: 2px solid rgba(18, 84, 57, 0.1);
    flex-wrap: wrap;
}

.product-statistics .stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 150px;
    padding: 0.5rem;
    background: white;
    border-radius: 0.5rem;
    border: 1px solid rgba(18, 84, 57, 0.1);
    transition: all 0.3s ease;
}

.product-statistics .stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(18, 84, 57, 0.15);
    border-color: rgba(18, 84, 57, 0.3);
}

.product-statistics .stat-item i {
    font-size: 1.2rem;
    color: #125439;
    width: 24px;
    text-align: center;
}

.product-statistics .stat-item .stat-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
}

.product-statistics .stat-item .stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #125439;
    margin-right: auto;
}

.product-statistics .stat-item .stat-unit {
    font-size: 0.85rem;
    color: #999;
}

@media (max-width: 768px) {
    .product-statistics {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .product-statistics .stat-item {
        width: 100%;
        min-width: auto;
        justify-content: space-between;
    }
}

/* ============================================
   Related Products Section
   ============================================ */
.related-products-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid rgba(0, 0, 0, 0.08);
}

.related-products-header {
    margin-bottom: 2rem;
}

.related-products-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--theme-primary, #125439);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.related-products-title i {
    font-size: 1.5rem;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}


.related-product-card {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border-radius: 0.75rem !important;
    overflow: hidden !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
    cursor: pointer !important;
    border: 1px solid rgba(18, 84, 57, 0.1) !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    width: 100% !important;
    min-height: 240px !important;
    transition: all 0.3s ease !important;
}

.related-product-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2) !important;
}

.related-product-card,
.related-product-card * {
    box-sizing: border-box;
}

.related-product-image {
    width: 100%;
    aspect-ratio: 1 / 0.66;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
    flex-shrink: 0;
}

.related-product-image a {
    width: 100%;
    height: 100%;
    display: block;
    text-decoration: none;
}

.related-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.related-product-card:hover .related-product-image img {
    transform: scale(1.05);
}

.related-product-image.blue {
    background: var(--theme-primary, #125439);
}

.related-product-image.green {
    background: var(--theme-primary, #125439);
}

.related-product-image.orange {
    background: var(--theme-primary, #125439);
}

.related-product-placeholder {
    width: 100%;
    aspect-ratio: 1 / 0.66;
    background: var(--theme-primary, #125439);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    flex-shrink: 0;
}

.related-product-info {
    padding: 0.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    z-index: 2;
    min-height: 100px;
}

.related-product-name,
.related-product-name h3 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--theme-primary, #125439);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4rem;
    text-align: right;
}

.related-product-name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.related-product-name a:hover {
    color: var(--theme-link-hover, #125439);
}

.related-product-rating {
    display: none;

}

.related-product-rating .stars {
    display: flex;
    gap: 0.2rem;
    font-size: 0.85rem;
}

.related-product-rating .stars i {
    color: #ffc107;
}

.related-product-rating-value {
    font-size: 0.85rem;
    color: #666;
}

.related-product-price {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    margin: 0;
    padding: 0.5rem 0;
    border-top: 1px solid rgba(0, 108, 53, 0.15);
}

.related-product-price .price-amount {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--theme-primary, #125439);
    line-height: 1;
}

.related-product-price .price-amount.price-free {
    color: var(--saudi-gold) !important;
}

.related-product-price .price-currency {
    font-size: 0.85rem;
    color: var(--saudi-gold-dark);
    font-weight: 600;
}

.related-product-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--theme-primary, #125439);
    color: var(--theme-button-text, white);
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.8rem;
    margin-top: auto;
    box-shadow: 0 2px 8px rgba(18, 84, 57, 0.2);
    border: none;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

.related-product-link:hover {
    background: #0a3628;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(18, 84, 57, 0.3);
}

.related-product-link i {
    font-size: 0.85rem;
}

.no-related-products {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

.no-related-products i {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 1rem;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .product-gallery-thumbnails {
        gap: 0.5rem;
    }

    .product-gallery-thumbnail {
        width: 60px;
        height: 60px;
    }

    .product-lightbox-prev {
        right: 10px;
    }

    .product-lightbox-next {
        left: 10px;
    }

    .product-lightbox-close {
        top: 10px;
        right: 10px;
    }

    .related-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .social-share-dropdown {
        right: auto;
        left: 0;
    }
}

/* Floating Social Icons */
.floating-social-icons {
    position: fixed;
    bottom: 30px;
    z-index: 999;
    width: 100%;
    pointer-events: none;
}


@media (max-width: 768px) {

    body.menu-open .floating-social-icons,
    body.menu-open .floating-icon {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        z-index: 1 !important;
    }
}

.floating-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    pointer-events: auto;
    position: fixed;
    animation: float 3s ease-in-out infinite;
}

.floating-icon:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.floating-icon:active {
    transform: translateY(-2px) scale(1.05);
}

.whatsapp-icon {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    right: 30px;
    bottom: 30px;
    animation-delay: 0s;
}

.telegram-icon {
    background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
    left: 30px;
    bottom: 30px;
    animation-delay: 1.5s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Responsive Styles for Floating Icons */
@media (max-width: 768px) {
    .floating-icon {
        width: 55px;
        height: 55px;
        font-size: 24px;
    }

    .whatsapp-icon {
        right: 20px;
        bottom: calc(var(--mobile-bottom-nav-height, 72px) + 20px) !important;
    }

    .telegram-icon {
        left: 20px;
        bottom: calc(var(--mobile-bottom-nav-height, 72px) + 20px) !important;
    }
}

@media (max-width: 480px) {
    .floating-icon {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }

    .whatsapp-icon {
        right: 15px;
        bottom: calc(var(--mobile-bottom-nav-height, 72px) + 20px) !important;
    }

    .telegram-icon {
        left: 15px;
        bottom: calc(var(--mobile-bottom-nav-height, 72px) + 20px) !important;
    }
}

@media (max-width: 768px) {
    .floating-icon {
        width: 55px;
        height: 55px;
        font-size: 24px;
    }

    .whatsapp-icon {
        right: 20px;
        bottom: calc(var(--mobile-bottom-nav-height, 72px) + 20px) !important;
    }

    .telegram-icon {
        left: 20px;
        bottom: calc(var(--mobile-bottom-nav-height, 72px) + 20px) !important;
    }
}

@media (max-width: 480px) {
    .floating-icon {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }

    .whatsapp-icon {
        right: 15px;
        bottom: calc(var(--mobile-bottom-nav-height, 72px) + 20px) !important;
    }

    .telegram-icon {
        left: 15px;
        bottom: calc(var(--mobile-bottom-nav-height, 72px) + 20px) !important;
    }
}

@media (max-width: 360px) {
    .floating-icon {
        width: 40px;
        height: 40px;
        font-size: 18;
    }

    .whatsapp-icon {
        right: 12px;
        bottom: calc(var(--mobile-bottom-nav-height, 72px) + 20px) !important;
    }

    .telegram-icon {
        left: 12px;
        bottom: calc(var(--mobile-bottom-nav-height, 72px) + 20px) !important;
    }
}

@media (max-width: 240px) {
    .floating-icon {
        width: 30px;
        height: 30px;
        font-size: 14;
    }

    .whatsapp-icon {
        right: 9px;
        bottom: calc(var(--mobile-bottom-nav-height, 72px) + 20px) !important;

    }

    .telegram-icon {
        left: 9px;
        bottom: calc(var(--mobile-bottom-nav-height, 72px) + 20px) !important;
    }
}

/* ============================================
   Tags Section - Below Hero Banner
   ============================================ */

.tags-section {
    padding: 1.5rem 2rem;
    background: transparent;
    margin-bottom: 0.5rem;
    display: block;
}

.tags-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tags-section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--theme-primary, #125439);
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.tags-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #0d5d2e, #1a7a4a);
    border-radius: 2px;
}

/* Tags Header */
.tags-header {
    margin-bottom: 2rem;
    width: 100%;
}

/* Tags Carousel Container */
.tags-carousel-container {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Tags Grid - Carousel Style */
.tags-grid,
.tags-carousel-grid {
    display: flex;
    flex-direction: row;
    gap: 15px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 20px 50px;
    scrollbar-width: thin;
    scrollbar-color: rgb(18, 72, 52) rgb(247, 246, 242);
    scroll-behavior: smooth;
    position: relative;
    -webkit-overflow-scrolling: touch;
    will-change: scroll-position;
    transform: translateZ(0);
    justify-content: flex-start;
    align-items: center;
    max-width: 100%;
    margin: 0 auto;
    flex-wrap: nowrap;
}

.tags-grid::-webkit-scrollbar,
.tags-carousel-grid::-webkit-scrollbar {
    height: 6px;
}

.tags-grid::-webkit-scrollbar-track,
.tags-carousel-grid::-webkit-scrollbar-track {
    background: rgb(247, 246, 242);
    border-radius: 3px;
}

.tags-grid::-webkit-scrollbar-thumb,
.tags-carousel-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgb(18, 72, 52), rgba(18, 72, 52, 0.7));
    border-radius: 3px;
}

.tags-grid::-webkit-scrollbar-thumb:hover,
.tags-carousel-grid::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, rgba(18, 72, 52, 0.7), rgb(18, 72, 52));
}

/* Tag Card */
.tag-card {
    min-width: 160px;
    max-width: 160px;
    flex-shrink: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    align-items: center;
}

.tag-card:hover {
    transform: translateY(-3px);
}

/* Tag Card Image */
.tag-card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    position: relative;
    overflow: hidden;

    background: transparent;
    flex-shrink: 0;
    border-radius: 0.5rem;
}

.tag-card-image img {
    width: 100%;
    height: 100%;

    object-fit: contain;
    background: transparent;
    transition: transform 0.3s ease;
    border-radius: 0.5rem;
    display: block;
}

.tag-card:hover .tag-card-image img {
    transform: scale(1.05);
}

.tag-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;

    color: var(--theme-primary, #125439);
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 0.5rem;
}

.tag-card:hover .tag-card-placeholder {
    background: transparent;
}

/* Tag Card Name */
.tag-card-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--theme-primary, #125439);
    margin: 0.5rem 0 0 0;
    line-height: 1.3;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    width: 100%;
}

/* Loading Tags */
.loading-tags {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
}

.loading-tags .loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: #0d5d2e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-tags p {
    color: #666;
    font-size: 1rem;
}

/* Tags Scroll Buttons */
.tags-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, rgb(18, 72, 52), rgba(18, 72, 52, 0.8));
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(18, 72, 52, 0.3);
}

.tags-scroll-btn:hover {
    background: linear-gradient(135deg, rgba(18, 72, 52, 0.8), rgb(18, 72, 52));
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(18, 72, 52, 0.4);
}

.tags-scroll-btn.left {
    left: -20px;
}

.tags-scroll-btn.right {
    right: -20px;
}

.tags-scroll-btn.hidden {
    display: none;
}

/* Tag No Content */
.tag-no-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
    color: #666;
}

.tag-no-content i {
    font-size: 3rem;
    color: #999;
}

.tag-no-content p {
    font-size: 1rem;
    margin: 0;
}

/* Legacy tag-icon styles (keeping for backward compatibility) */
.tag-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.tag-icon:hover {
    transform: translateY(-3px);
}

.tag-icon-icon {
    width: auto;
    height: auto;
    border-radius: 0;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    color: inherit;
    transition: all 0.3s ease;
}

.tag-icon:hover .tag-icon-icon {
    transform: scale(1.15);
}

.tag-icon-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    text-align: center;
    line-height: 1.4;
    margin-top: 0;
}

.tag-icon-count {
    display: none;
}

/* Tag Modal */
.tag-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.tag-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tag-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.tag-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    display: flex;
    flex-direction: column;
}

.tag-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid #e0e0e0;
    background: linear-gradient(135deg, #0d5d2e 0%, #1a7a4a 100%);
    color: #ffffff;
}

.tag-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
}

.tag-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.tag-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.tag-modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

.loading-tag-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
}

.loading-tag-content .loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #e0e0e0;
    border-top-color: #0d5d2e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-tag-content p {
    color: #666;
    font-size: 1.1rem;
}

.tag-categories {
    margin-bottom: 2rem;
}

.tag-categories-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--theme-primary, #125439);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e0e0e0;
}

.tag-categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.tag-category-item {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #0d5d2e 0%, #1a7a4a 100%);
    color: #ffffff;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(13, 93, 46, 0.2);
    transition: all 0.3s ease;
}

.tag-category-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(13, 93, 46, 0.3);
}

.tag-products {
    margin-top: 2rem;
}

.tag-products-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--theme-primary, #125439);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e0e0e0;
}

.tag-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.tag-product-card {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.tag-product-card:hover {
    transform: translateY(-5px);
    border-color: #0d5d2e;
    box-shadow: 0 8px 20px rgba(13, 93, 46, 0.15);
}

.tag-product-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    background: #f5f5f5;
}

.tag-product-info {
    padding: 1rem;
}

.tag-product-name {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-product-category {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.tag-product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0d5d2e;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.tag-product-price:contains(""),
.tag-product-price.price-free {
    color: var(--saudi-gold) !important;
}

.tag-product-price .currency {
    font-size: 0.9rem;
}

.tag-no-content {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.tag-no-content i {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 1rem;
}

.tag-no-content p {
    font-size: 1.1rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

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

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .tags-section {
        padding: 0.75rem 0.75rem 1rem;
    }

    .tags-section-title {
        font-size: 1.5rem;
    }

    .tags-grid,
    .tags-carousel-grid {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 0.6rem;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 8px 12px;
    }

    .tag-card {
        min-width: 78px;
        max-width: 78px;
    }

    .tag-card-name {
        font-size: 0.7rem;
        margin-top: 0.25rem;
    }

    .tag-icon {
        padding: 0.75rem;
    }

    .tag-icon-icon {
        width: auto;
        height: auto;
        font-size: 2rem;
    }

    .tag-icon-name {
        font-size: 0.85rem;
    }

    .tag-modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .tag-modal-header {
        padding: 1rem 1.5rem;
    }

    .tag-modal-title {
        font-size: 1.2rem;
    }

    .tag-modal-body {
        padding: 1.5rem;
    }

    .tag-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 480px) {

    .tags-grid,
    .tags-carousel-grid {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 0.5rem;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 6px 10px;
    }

    .tag-card {
        min-width: 72px;
        max-width: 72px;
    }

    .tag-card-name {
        font-size: 0.68rem;
        margin-top: 0.2rem;
    }

    .tag-icon {
        padding: 0.5rem;
    }

    .tag-icon-icon {
        width: auto;
        height: auto;
        font-size: 1.8rem;
    }

    .tag-icon-name {
        font-size: 0.8rem;
    }

    .tag-products-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Tag Page Styles
   ============================================ */

.tag-page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.tag-page-content {
    margin-top: 2rem;
}

.tag-page-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.tag-icon-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #ffffff;
    background-color: #0d5d2e;
    flex-shrink: 0;
}

.tag-header-info {
    flex: 1;
}

.tag-page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--theme-primary, #125439);
    margin-bottom: 0.5rem;
}

.tag-page-description {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.6;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--theme-primary, #125439);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid #0d5d2e;
}

.tag-categories-section {
    margin-bottom: 3rem;
}

.tag-categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.tag-category-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #0d5d2e 0%, #1a7a4a 100%);
    color: #ffffff;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(13, 93, 46, 0.2);
    transition: all 0.3s ease;
}

.tag-category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(13, 93, 46, 0.3);
    color: #ffffff;
}

.tag-category-card i {
    font-size: 1.2rem;
}

.tag-products-section {
    margin-top: 2rem;
}

.tag-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.tag-product-card {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.tag-product-card:hover {
    transform: translateY(-5px);
    border-color: #0d5d2e;
    box-shadow: 0 8px 20px rgba(13, 93, 46, 0.15);
    color: inherit;
}

.tag-product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f5f5f5;
}

.tag-product-info {
    padding: 1.25rem;
}

.tag-product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-product-category {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tag-product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0d5d2e;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.tag-product-price .currency {
    font-size: 1rem;
}

/* Products by Category */
.tag-products-by-category {
    margin-top: 2rem;
}

.tag-category-group {
    margin-bottom: 3rem;
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.tag-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #0d5d2e;
}

.tag-category-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--theme-primary, #125439);
    margin: 0;
}

.tag-category-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--theme-link, #125439);
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag-category-link:hover {
    color: #0d5d2e;
    transform: translateX(-5px);
}

.tag-category-link i {
    font-size: 1.5rem;
    color: #0d5d2e;
}

.tag-category-count {
    font-size: 1rem;
    color: #666;
    background: #f0f0f0;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
}

.tag-category-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* Responsive Design for Tag Page */
@media (max-width: 768px) {
    .tag-page-container {
        padding: 1rem;
    }

    .tag-page-header {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .tag-page-title {
        font-size: 1.8rem;
    }

    .tag-category-group {
        padding: 1.5rem;
    }

    .tag-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .tag-category-title {
        font-size: 1.5rem;
    }

    .tag-category-products {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .tag-category-products {
        grid-template-columns: 1fr;
    }

    .tag-page-title {
        font-size: 1.5rem;
    }

    .tag-category-title {
        font-size: 1.3rem;
    }
}

/* Product Discount Badge Styles */
.product-discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, var(--theme-discount, var(--theme-error, #ef4444)) 0%, var(--theme-discount-gradient, rgba(239, 68, 68, 0.9)) 100%);
    color: var(--theme-button-text, white);
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    animation: pulse 2s ease-in-out infinite;
    transition: all 0.3s ease;
}

.product-discount-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.5);
}

.product-discount-badge .discount-percent,
.product-discount-badge .discount-amount {
    display: inline-block;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    .product-discount-badge {
        animation: none !important;
        transition: none !important;
    }

    .product-discount-badge:hover {
        transform: none !important;
    }
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    }

    50% {
        box-shadow: 0 4px 20px rgba(239, 68, 68, 0.6);
    }
}

/* Discount badge on carousel product cards */
.carousel-product-image .product-discount-badge,
.carousel-product-placeholder .product-discount-badge {
    top: 8px;
    right: 8px;
    padding: 6px 10px;
    font-size: 0.85rem;
    min-width: 50px;
}

/* Discount badge on admin product cards */
.product-card-image .product-discount-badge {
    top: 8px;
    right: 8px;
    padding: 6px 10px;
    font-size: 0.85rem;
    min-width: 50px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .product-discount-badge {
        padding: 6px 10px;
        font-size: 0.8rem;
        min-width: 50px;
        top: 8px;
        right: 8px;
    }

    .carousel-product-image .product-discount-badge,
    .carousel-product-placeholder .product-discount-badge {
        padding: 5px 8px;
        font-size: 0.75rem;
        min-width: 45px;
    }
}

@media (max-width: 480px) {
    .product-discount-badge {
        padding: 5px 8px;
        font-size: 0.75rem;
        min-width: 45px;
        top: 6px;
        right: 6px;
    }
}

/* ============================================================
   Glassmorphism Theme Variant (Public Pages Only)
   Activated when: html[data-theme-variant="glass"]
   ============================================================ */

html[data-theme-variant="glass"] {
    background: radial-gradient(1200px circle at 10% 10%, rgba(var(--theme-primary-rgb, 18 84 57), 0.12), transparent 60%),
        radial-gradient(900px circle at 90% 15%, rgba(var(--theme-secondary-rgb, 64 103 87), 0.10), transparent 55%),
        radial-gradient(800px circle at 70% 90%, rgba(var(--theme-primary-rgb, 18 84 57), 0.08), transparent 60%),
        linear-gradient(135deg, var(--theme-background, #ffffff) 0%, var(--theme-background, #ffffff) 100%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
}

html[data-theme-variant="glass"] body {
    background: transparent;
    color: var(--theme-text, #1a1a1a);
}

html[data-theme-variant="glass"] body,
html[data-theme-variant="glass"] #homeSectionsContainer {
    background-attachment: fixed;
}

/* Glass tokens */
html[data-theme-variant="glass"] {
    --glass-blur: 14px;
    --glass-surface: rgba(var(--theme-background-rgb, 255 255 255), 0.62);
    --glass-surface-strong: rgba(var(--theme-background-rgb, 255 255 255), 0.78);
    --glass-border: rgba(255, 255, 255, 0.26);
    --glass-shadow: 0 18px 45px rgba(0, 0, 0, 0.16);
    --glass-shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.12);
}

/* Header & footer as frosted glass */
html[data-theme-variant="glass"] .site-header {
    /* Force visible green even if theme colors are white */
    background-color: #125439;
    background-image: linear-gradient(135deg,
            rgba(18, 84, 57, 0.98) 0%,
            rgba(64, 103, 87, 0.92) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.20);
    box-shadow: var(--glass-shadow-soft);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    position: sticky;
    isolation: isolate;
    color: #fff;
}

html[data-theme-variant="glass"] #footerPlaceholder .site-footer,
html[data-theme-variant="glass"] .site-footer {
    /* Force visible green even if theme colors are white */
    background-color: #125439;
    background-image: linear-gradient(180deg,
            rgba(18, 84, 57, 0.96) 0%,
            rgba(64, 103, 87, 0.90) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    isolation: isolate;
    color: #fff;
}

/* Subtle light sheen for the glass surfaces */
html[data-theme-variant="glass"] .site-header::before,
html[data-theme-variant="glass"] .site-footer::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.18) 0%,
            rgba(255, 255, 255, 0.08) 40%,
            rgba(0, 0, 0, 0.06) 100%);
    pointer-events: none;
    z-index: 0;
}

html[data-theme-variant="glass"] .site-header>*,
html[data-theme-variant="glass"] .site-footer>* {
    position: relative;
    z-index: 1;
}

/* Header elements (logo / links / actions) as proper glass */
html[data-theme-variant="glass"] .site-header .header-logo,
html[data-theme-variant="glass"] .site-header .nav-link {
    color: rgba(255, 255, 255, 0.94);
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.22);
}

html[data-theme-variant="glass"] .site-header .nav-link {
    border: 1px solid transparent;
}

html[data-theme-variant="glass"] .site-header .nav-link:hover,
html[data-theme-variant="glass"] .site-header .nav-link.active {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

html[data-theme-variant="glass"] .site-header .nav-link::before {
    background: rgba(255, 255, 255, 0.88);
}

html[data-theme-variant="glass"] .site-header .search-btn,
html[data-theme-variant="glass"] .site-header .cart-btn,
html[data-theme-variant="glass"] .site-header .mobile-menu-toggle,
html[data-theme-variant="glass"] .site-header .login-btn,
html[data-theme-variant="glass"] .site-header .account-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

html[data-theme-variant="glass"] .site-header .search-btn:hover,
html[data-theme-variant="glass"] .site-header .cart-btn:hover,
html[data-theme-variant="glass"] .site-header .mobile-menu-toggle:hover,
html[data-theme-variant="glass"] .site-header .login-btn:hover,
html[data-theme-variant="glass"] .site-header .account-btn:hover {
    background: rgba(255, 255, 255, 0.92);
    color: rgba(var(--theme-primary-rgb, 18 84 57), 0.95);
    border-color: rgba(255, 255, 255, 0.95);
}

/* Footer elements */
html[data-theme-variant="glass"] .site-footer .footer-section p,
html[data-theme-variant="glass"] .site-footer .footer-links a,
html[data-theme-variant="glass"] .site-footer .footer-contact li {
    color: rgba(255, 255, 255, 0.92);
}

html[data-theme-variant="glass"] .site-footer .social-links a,
html[data-theme-variant="glass"] .site-footer .footer-contact li {
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

html[data-theme-variant="glass"] .site-footer .social-links a:hover {
    background: rgba(255, 255, 255, 0.92);
    color: rgba(var(--theme-primary-rgb, 18 84 57), 0.95);
    border-color: rgba(255, 255, 255, 0.95);
}

/* Mobile bottom nav: frosted glass */
html[data-theme-variant="glass"] .mobile-bottom-nav {
    background-color: #125439;
    background-image: linear-gradient(180deg,
            rgba(18, 84, 57, 0.96) 0%,
            rgba(64, 103, 87, 0.90) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 -14px 36px rgba(0, 0, 0, 0.20);
    backdrop-filter: blur(calc(var(--glass-blur) - 2px));
    -webkit-backdrop-filter: blur(calc(var(--glass-blur) - 2px));
}

@media (max-width: 768px) {

    /* Mobile side menu (header nav) as frosted glass */
    html[data-theme-variant="glass"] .header-nav {
        background-color: #125439;
        background-image: linear-gradient(180deg,
                rgba(18, 84, 57, 0.96) 0%,
                rgba(64, 103, 87, 0.90) 100%);
        border-left: 1px solid rgba(255, 255, 255, 0.18);
        backdrop-filter: blur(var(--glass-blur));
        -webkit-backdrop-filter: blur(var(--glass-blur));
    }
}

/* Fallback when backdrop-filter isn't supported */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    html[data-theme-variant="glass"] .site-header {
        background: linear-gradient(135deg, #125439 0%, #406757 100%);
    }

    html[data-theme-variant="glass"] #footerPlaceholder .site-footer,
    html[data-theme-variant="glass"] .site-footer {
        background: linear-gradient(180deg, #125439 0%, #406757 100%);
    }

    html[data-theme-variant="glass"] .mobile-bottom-nav {
        background: linear-gradient(180deg, #125439 0%, #406757 100%);
    }
}

/* Core cards / sections */
html[data-theme-variant="glass"] .category-card-front,
html[data-theme-variant="glass"] -front,
html[data-theme-variant="glass"] .category-section,
html[data-theme-variant="glass"] .products-page-container .category-section,
html[data-theme-variant="glass"] .page-header,
html[data-theme-variant="glass"] .products-search-inner {
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow-soft);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}

/* Search bar refinement */
html[data-theme-variant="glass"] .products-search-inner {
    background: linear-gradient(135deg,
            rgba(var(--theme-background-rgb, 255 255 255), 0.72),
            rgba(var(--theme-background-rgb, 255 255 255), 0.52));
    border: 1px solid rgba(var(--theme-primary-rgb, 18 84 57), 0.16);
}

html[data-theme-variant="glass"] .products-search-inner i {
    color: rgba(var(--theme-text-rgb, 26 26 26), 0.82);
}

html[data-theme-variant="glass"] .products-search-clear {
    background: rgba(var(--theme-primary-rgb, 18 84 57), 0.12);
    color: rgba(var(--theme-text-rgb, 26 26 26), 0.86);
}

/* Buttons: luxurious, soft highlights */
html[data-theme-variant="glass"] .btn,
html[data-theme-variant="glass"] button.btn,
html[data-theme-variant="glass"] .product-add-btn {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

html[data-theme-variant="glass"] .btn-primary,
html[data-theme-variant="glass"] .product-add-btn {
    /* Avoid "white button + white text" when theme primary is light */
    background-color: #125439 !important;
    background-image: linear-gradient(135deg,
            rgba(18, 84, 57, 0.98),
            rgba(64, 103, 87, 0.92)) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.20) !important;
}

html[data-theme-variant="glass"] .btn-primary:hover,
html[data-theme-variant="glass"] .product-add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18) !important;
}

/* Ensure text/icons inside buttons follow the button color */
html[data-theme-variant="glass"] .btn-primary *,
html[data-theme-variant="glass"] .product-add-btn * {
    color: inherit !important;
}

/* Header action buttons: prevent white-on-white on hover */
html[data-theme-variant="glass"] .site-header .login-btn:hover,
html[data-theme-variant="glass"] .site-header .account-btn:hover {
    text-shadow: none;
}

html[data-theme-variant="glass"] .site-header .login-btn:hover *,
html[data-theme-variant="glass"] .site-header .account-btn:hover * {
    color: rgba(var(--theme-primary-rgb, 18 84 57), 0.95) !important;
}

/* Overlays: softer and consistent */
html[data-theme-variant="glass"] .search-overlay,
html[data-theme-variant="glass"] .header-nav-overlay,
html[data-theme-variant="glass"] .auth-modal-overlay,
html[data-theme-variant="glass"] .reviews-modal-overlay,
html[data-theme-variant="glass"] .confirm-modal-overlay,
html[data-theme-variant="glass"] .mobile-filter-overlay,
html[data-theme-variant="glass"] .sidebar-overlay {
    background: rgba(0, 0, 0, 0.36);
}

/* Modal content as glass */
html[data-theme-variant="glass"] .auth-modal-content,
html[data-theme-variant="glass"] .reviews-modal-content,
html[data-theme-variant="glass"] .confirm-modal {
    background: var(--glass-surface-strong);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(calc(var(--glass-blur) + 2px));
    -webkit-backdrop-filter: blur(calc(var(--glass-blur) + 2px));
}