:root {
    --primary: #ff6b6b;
    --secondary: #4ecdc4;
    --accent: #ffe66d;
    --dark: #2c3e50;
    --light: #f7f9fa;
    --white: #ffffff;
    --shadow: 0 8px 30px rgba(0,0,0,0.05);
    --transition: all 0.3s ease;
}

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

body, html {
    font-family: 'Outfit', sans-serif;
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
    padding-top: 80px; /* Base padding for fixed header */
}

@media (max-width: 992px) {
    body, html {
        padding-top: 110px; /* Further reduced from 130px to eliminate white space */
    }
}

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

@media (max-width: 992px) {
    .container {
        padding: 0 15px;
    }
}

/* Modern Top Bar Header */
.header {
    background: #ffffff;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    padding: 10px 0;
}

.header-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

/* Redesigned Logo - Compact */
.logo {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s ease;
    border: 2px solid #fff;
    text-decoration: none;
}
.logo:hover {
    transform: scale(1.05);
}
.logo-img {
    height: 140%;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-grow: 0;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    font-size: 16px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}
.nav-links a:hover { color: var(--primary); }
.nav-links i { font-size: 18px; color: #a0aec0; }

.nav-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: 20px;
}

[dir="rtl"] .nav-controls {
    margin-left: 0;
    margin-right: 20px;
}

/* Header Search */
.header-search {
    flex-grow: 1;
    min-width: 200px;
    max-width: 500px;
    margin: 0 20px;
    position: relative;
}
.header-search form {
    display: flex;
    background: #f1f3f5;
    border-radius: 20px;
    padding: 2px 5px 2px 15px;
    align-items: center;
    transition: var(--transition);
    border: 1px solid transparent;
}
.header-search form:focus-within {
    background: white;
    border-color: var(--secondary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.header-search input {
    border: none;
    background: transparent;
    padding: 8px 0;
    width: 100%;
    font-family: inherit;
    font-size: 14px;
    outline: none;
}
.header-search button {
    background: var(--secondary);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.header-search button:hover {
    transform: scale(1.1);
    background: #2b9eb3;
}

/* Suggestion Dropdown */
.header-search {
    position: relative;
}
.search-suggestions-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: 1100;
    display: none;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #eee;
}
.suggestion-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--dark);
    transition: background 0.2s ease;
    border-bottom: 1px solid #f8f9fa;
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover { background: #f8f9fa; }
.suggestion-item img {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border-radius: 10px;
}
.suggestion-info {
    display: flex;
    flex-direction: column;
}
.suggestion-name {
    font-weight: 600;
    font-size: 14px;
}
.suggestion-price {
    font-size: 12px;
    color: var(--primary);
    font-weight: 700;
}

/* Premium Language Pills */
.lang-switcher {
    display: flex;
    background: #f1f3f5;
    border-radius: 20px;
    padding: 2px;
    z-index: 1001; /* Ensure visible */
}
.lang-switcher a {
    text-decoration: none;
    color: #868e96;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 18px;
    transition: all 0.2s ease;
}
.lang-switcher a.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.cart-btn {
    background: var(--primary);
    color: white !important;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
    transition: all 0.3s ease;
}
.cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 107, 107, 0.4);
}
.cart-badge {
    background: white;
    color: var(--primary);
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 800;
}

/* Mobile Tweaks for Single Row */
@media (max-width: 992px) {
    .header { padding: 8px 0; }
    .logo {
        width: 50px;
        height: 50px;
    }
    .hide-mobile { display: none !important; }
    .nav-links { gap: 12px; }
    .nav-controls { gap: 10px; }
    .lang-switcher a { padding: 5px 8px; font-size: 12px; }
    
    .cart-btn { 
        position: fixed;
        bottom: 25px;
        left: 25px;
        right: auto;
        z-index: 2000;
        padding: 12px 18px;
        border-radius: 50px;
        box-shadow: 0 5px 20px rgba(255, 107, 107, 0.5);
    }
    
    [dir="rtl"] .cart-btn {
        left: auto;
        right: 25px;
    }
    
    .lang-switcher {
        margin-right: 0 !important;
        margin-left: 0 !important;
    }
    
    .header-layout {
        display: flex;
        flex-direction: row; 
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
    }

    .logo {
        width: 45px;
        height: 45px;
        order: 1;
    }

    .nav {
        order: 2;
        flex-grow: 0;
    }

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

    .header-search {
        order: 3;
        width: 100%;
        max-width: none;
        margin: 10px 0 0 0;
        position: relative;
    }
    
    .search-suggestions-dropdown {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 1100;
    } 
    
    .lang-switcher {
        margin: 0 !important;
    }
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--secondary) 0%, #2b9eb3 100%);
    color: var(--white);
    padding: 100px 20px;
    text-align: center;
    border-radius: 0 0 50px 50px;
    margin-bottom: 60px;
}

.hero h2 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .hero {
        padding: 60px 20px;
        border-radius: 0 0 30px 30px;
    }
    .hero h2 {
        font-size: 32px;
    }
    .hero p {
        font-size: 16px;
    }
}

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.btn {
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: var(--dark);
    box-shadow: 0 4px 15px rgba(255, 230, 109, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 230, 109, 0.6);
}

/* Products */
.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
    color: var(--dark);
}

@media (max-width: 768px) {
    .section-title {
        font-size: 24px;
        margin-bottom: 25px;
    }
}

/* Homepage Layout with Sidebar */
.home-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
    align-items: flex-start;
}

.category-sidebar {
    background: white;
    padding: 25px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 100px;
}

.category-sidebar h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--dark);
    font-weight: 800;
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.category-list a {
    text-decoration: none;
    color: #7f8c8d;
    font-weight: 600;
    padding: 12px 15px;
    border-radius: 12px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-list a i {
    font-size: 1.1rem;
    color: #bdc3c7;
}

.category-list a:hover {
    background: #fff5f5;
    color: var(--primary);
    transform: translateX(5px);
}

.category-list a.active {
    background: var(--primary);
    color: white;
}

.category-list a.active i {
    color: white;
}

@media (max-width: 992px) {
    .home-layout {
        display: flex;
        flex-direction: column;
        gap: 20px;
        width: 100%;
        max-width: 100vw;
    }
    
    .category-sidebar {
        position: static;
        padding: 0;
        background: none;
        box-shadow: none;
        width: 100%;
    }

    .category-sidebar h3 {
        display: none;
    }

    .category-list {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }

    .category-list a {
        white-space: nowrap;
        border: 1px solid #eee;
        background: white;
    }
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .product-card {
        border-radius: 15px;
    }
    .product-img {
        height: 150px;
    }
    .product-info {
        padding: 12px;
    }
    .product-info h3 {
        font-size: 14px;
        margin-bottom: 5px;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        height: 2.8em;
    }
    .product-info .description {
        display: none;
    }
    .product-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .price {
        font-size: 18px;
    }
    .btn-add, .btn-whatsapp {
        width: 100%;
        padding: 8px 10px;
        font-size: 13px;
        justify-content: center;
    }
}

.product-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}



/* Landing Header Transition */
.header.transparent {
    background: transparent;
    box-shadow: none;
}

.header.transparent .logo {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
}

.header.transparent .nav-links a, 
.header.transparent .lang-switcher a,
.header.transparent .cart-btn {
    color: white;
}

/* 100vh Hero */
.hero.landing-hero {
    height: 100vh;
    border-radius: 0;
    margin-bottom: 80px;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    color: white;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateX(-50%) translateY(0);}
    40% {transform: translateX(-50%) translateY(-10px);}
    60% {transform: translateX(-50%) translateY(-5px);}
}

.hero {
    height: 70vh; /* Increased height */
    min-height: 500px;
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('../images/landing/hero.png') no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    margin-bottom: 50px;
    position: relative;
    border-radius: 0 0 50px 50px; /* Modern curved bottom */
}

.hero-content {
    background: rgba(255, 255, 255, 0.15); /* Glassmorphism */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 60px 40px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    max-width: 800px;
    animation: fadeInUp 1s ease;
}

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

.hero-content h2 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.2);
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 50px; /* Increased to move the button down */
    opacity: 0.95;
}

/* Features Section */
.features-section {
    padding: 60px 60px 160px 60px; /* Reduced top padding to move icons UP */
    background: #fff;
    border-radius: 40px;
    box-shadow: var(--shadow);
    margin-bottom: 100px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    text-align: center;
}

.feature-card {
    padding: 30px;
    transition: var(--transition);
}

.feature-card i,
.feature-card .nis-symbol {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
    background: #fff5f5;
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    transition: var(--transition);
    display: inline-block;
}

.feature-card:hover i,
.feature-card:hover .nis-symbol {
    transform: rotate(15deg) scale(1.1);
}

.feature-card h3 {
    margin-bottom: 12px;
    font-weight: 800;
}

.feature-card p {
    font-size: 0.9rem;
    color: #666;
}

/* Category Highlights */
.categories-preview {
    margin-bottom: 80px;
}

.cat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 30px;
}

.cat-card {
    position: relative;
    border-radius: 25px;
    overflow: hidden;
    height: 300px;
    box-shadow: var(--shadow);
    text-decoration: none;
    transition: var(--transition);
}

.cat-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.cat-card:hover img {
    transform: scale(1.1);
}

.cat-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
}

.cat-overlay h4 {
    font-size: 1.5rem;
    font-weight: 800;
}

@media (max-width: 992px) {
    .features-grid, .cat-grid {
        grid-template-columns: 1fr;
    }
    .hero {
        height: auto;
        padding: 60px 20px;
        border-radius: 0 0 30px 30px;
    }
    .hero-content h2 {
        font-size: 2.2rem;
    }
    .hero.landing-hero {
        height: auto;
        min-height: 100vh;
    }
}

.product-img {
    height: 400px; 
    min-height: 400px; /* Force height even if image is broken */
    background: #e9ecef; /* Neutral placeholder color */
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img img, .product-img video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.product-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-info h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.product-info .description {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.price {
    font-size: 22px;
    font-weight: 800;
    color: var(--secondary);
}

.btn-add, .btn-whatsapp {
    color: white !important;
    padding: 8px 16px;
    border-radius: 20px;
    border: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    text-decoration: none;
    justify-content: center;
}

.btn-add {
    background: var(--primary);
}

.btn-whatsapp {
    background: #25D366;
}

.btn-add:hover {
    background: var(--secondary);
    transform: scale(1.05);
}

.btn-whatsapp:hover {
    background: #128C7E;
    transform: scale(1.05);
}

.btn-add:hover {
    background: #fa5252;
}

/* WhatsApp Float Modern Style */
.whatsapp-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: #25D366;
    color: white;
    padding: 12px 28px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    border-radius: 50px;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: w_pulse 2s infinite;
}

.whatsapp-btn i {
    font-size: 24px;
}

.whatsapp-btn:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(37, 211, 102, 0.5);
    background: #128C7E;
    color: white;
}

@keyframes w_pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

@media (max-width: 768px) {
    .whatsapp-btn {
        padding: 10px 20px;
        bottom: 20px;
        right: 20px;
        font-size: 14px;
        gap: 8px;
    }
    .whatsapp-btn i {
        font-size: 20px;
    }
}
    .whatsapp-btn {
        padding: 10px 15px;
        font-size: 14px;
        bottom: 15px;
        right: 15px;
    }
}

.whatsapp-btn:hover {
    transform: scale(1.05);
    color: white;
}

/* Forms & Checkout */
.form-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 600px;
    margin: 0 auto 60px;
    box-shadow: var(--shadow);
}

@media (max-width: 768px) {
    .form-card {
        padding: 20px 15px;
        margin: 0 -15px 40px; /* Pull out to match container edge */
        width: calc(100% + 30px);
        max-width: none;
        border-radius: 0;
        box-shadow: none;
        border-left: none;
        border-right: none;
    }
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #edf2f7;
    border-radius: 10px;
    font-family: inherit;
    font-size: 16px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary);
}

/* Cart & Summary Redesign */
.cart-summary-list {
    margin-bottom: 25px;
}

.cart-item {
    padding: 15px 0;
    border-bottom: 1px solid #edf2f7;
}

.cart-item-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 15px;
}

.cart-item-name {
    font-weight: 700;
    color: var(--dark);
    flex-grow: 1;
}

.cart-item-price {
    font-weight: 600;
    color: #888;
}

.cart-item-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.qty-control {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #f1f3f5;
    padding: 5px 12px;
    border-radius: 50px;
}

.qty-control button {
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 800;
    color: var(--primary);
    font-size: 18px;
    padding: 0 5px;
}

.cart-item-total {
    font-weight: 800;
    color: var(--secondary);
    font-size: 16px;
}

.cart-totals {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.total-row.grand-total {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px dashed #e2e8f0;
    font-size: 20px;
    font-weight: 800;
    color: var(--dark);
}

.total-row.grand-total span:last-child {
    color: var(--secondary);
}

@media (max-width: 480px) {
    .cart-item-info {
        flex-direction: column;
        gap: 5px;
    }
    .cart-item-actions {
        margin-top: 10px;
    }
}

.cart-item-shipping-badge {
    background: #e8f5e9;
    color: #27ae60;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    font-weight: 800;
    margin-inline-start: 5px;
    display: inline-block;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #edf2f7;
}

th {
    font-weight: 600;
    color: #a0aec0;
}

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

/* Footer */
.footer {
    text-align: center;
    padding: 40px 20px;
    background: white;
    color: #666;
    border-top: 1px solid #eee;
}

.social-links {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-links a {
    color: var(--dark);
    font-size: 24px;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--primary);
    transform: translateY(-3px);
}

.social-links .fa-facebook:hover { color: #1877F2; }
.social-links .fa-instagram:hover { color: #E4405F; }
.social-links .fa-tiktok:hover { color: #000000; }
.social-links .fa-whatsapp:hover { color: #25D366; }

/* Media Scroller for Index */
.media-scroller-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.media-scroller {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    height: 100%;
}

.media-scroller::-webkit-scrollbar {
    display: none; /* Hide scrollbar for a cleaner look */
}

.scroller-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.media-scroller-wrapper:hover .scroller-arrow {
    opacity: 1;
    pointer-events: auto;
}

.scroller-arrow:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.scroller-arrow.prev {
    left: 10px;
}

.scroller-arrow.next {
    right: 10px;
}

.media-item {
    scroll-snap-align: start;
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
}
.media-item img, .media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Detail Page */
.product-detail-card {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 25px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
.product-detail-media {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.media-large {
    width: 100%;
    height: 550px; /* Increased for cinematic view */
    border-radius: 15px;
    background: #f1f3f5;
    overflow: hidden;
}
.media-large img, .media-large video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media (max-width: 768px) {
    .media-large {
        height: 400px;
    }
}
.media-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
}
.media-thumbnails img, .media-thumbnails video {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

/* Video Thumbnail Overlay */
.thumb-wrapper {
    position: relative;
    display: inline-block;
}

.thumb-wrapper i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 24px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    pointer-events: none;
    opacity: 0.8;
}

.media-thumbnails .active {
    border-color: var(--secondary);
    transform: scale(1.05);
}

@media (max-width: 992px) {
    .product-detail-card {
        padding: 20px;
        gap: 20px;
        display: flex;
        flex-direction: column;
    }
    .media-large {
        height: 300px;
    }
    .media-thumbnails img, .media-thumbnails video {
        width: 70px;
        height: 70px;
    }
}
@media (max-width: 480px) {
    .media-large {
        height: 250px;
    }
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
}
.lightbox-content {
    max-width: 80vw;
    max-height: 80vh;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    object-fit: contain;
}
.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}
.lightbox-close:hover {
    color: var(--primary);
    transform: scale(1.1);
}
.lightbox-prev, .lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 20px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 40px;
    background: rgba(0,0,0,0.3);
    border: none;
    border-radius: 5px;
    user-select: none;
    transition: 0.3s;
    z-index: 10000;
}
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-prev:hover, .lightbox-next:hover {
    background: rgba(0,0,0,0.8);
}

/* Toast Notification */
#toast {
    visibility: hidden;
    min-width: 250px;
    background-color: var(--primary);
    color: white;
    text-align: center;
    border-radius: 50px;
    padding: 16px;
    position: fixed;
    z-index: 10001;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0px 5px 20px rgba(0,0,0,0.3);
    transition: opacity 0.5s, bottom 0.5s;
    opacity: 0;
}
#toast.show {
    visibility: visible;
    bottom: 50px;
    opacity: 1;
}

/* Sold Out Styles */
.sold-out-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #e74c3c;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 14px;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.4);
}
.btn-disabled {
    background: #bdc3c7 !important;
    cursor: not-allowed;
    color: white;
}

.free-shipping-badge {
    position: absolute;
    top: 50px;
    left: 15px;
    background-color: #27ae60;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 11px;
    z-index: 10;
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.4);
    text-transform: uppercase;
}

[dir="rtl"] .free-shipping-badge {
    left: auto;
    right: 15px;
}


/* Custom Confirmation Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    z-index: 20000;
    justify-content: center;
    align-items: center;
}
.modal-overlay.show {
    display: flex;
}
.custom-modal {
    background: white;
    padding: 30px;
    border-radius: 20px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 15px 50px rgba(0,0,0,0.2);
    animation: modalSlide 0.3s ease;
}
@keyframes modalSlide {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.modal-icon {
    font-size: 50px;
    color: var(--primary);
    margin-bottom: 20px;
}
.modal-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 10px;
}
.modal-text {
    color: #666;
    margin-bottom: 25px;
}
.modal-btns {
    display: flex;
    gap: 15px;
    justify-content: center;
}
.modal-btn {
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}
.btn-confirm {
    background: var(--primary);
    color: white;
}
.btn-cancel {
    background: #edf2f7;
    color: #2d3748;
}
.modal-btn:hover {
    transform: translateY(-2px);
    filter: brightness(0.9);
}

/* RTL Support */
[dir="rtl"] {
    font-family: 'Outfit', 'Cairo', sans-serif; /* Fallback for better Arabic/Hebrew display */
}
/* --- Global Notification Popup (Glassmorphism) --- */
.notif-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: none; /* Controlled by logic */
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.4s ease;
}

.notif-modal {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 40px;
    border-radius: 25px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    position: relative;
    transform: scale(0.9);
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.notif-modal h2 {
    font-size: 28px;
    margin-bottom: 15px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.notif-modal p {
    font-size: 18px;
    color: #444;
    line-height: 1.6;
    margin-bottom: 25px;
}

.notif-close-btn {
    background: var(--dark);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.notif-close-btn:hover {
    background: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

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

@keyframes popIn {
    to { transform: scale(1); opacity: 1; }
}

@media (max-width: 768px) {
    .notif-modal {
        padding: 30px 20px;
    }
    .notif-modal h2 {
        font-size: 22px;
    }
    .notif-modal p {
        font-size: 16px;
    }
}

[dir="rtl"] .nav a {
    margin-left: 0;
    margin-right: 25px;
}

[dir="rtl"] .whatsapp-btn {
    right: auto;
    left: 30px;
}

[dir="rtl"] .sold-out-badge {
    left: auto;
    right: 15px;
}

[dir="rtl"] th, [dir="rtl"] td {
    text-align: right;
}

[dir="rtl"] .product-footer {
    flex-direction: row-reverse;
}

[dir="rtl"] .product-detail-info {
    text-align: right;
}

[dir="rtl"] .cart-btn {
    flex-direction: row-reverse;
}

[dir="rtl"] .lang-switcher {
    margin-right: 0 !important;
    margin-left: 15px !important;
}

/* Similar Products Section */
.similar-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 30px;
}

.similar-item-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.similar-item-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.similar-img-wrapper {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
}

.similar-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.similar-item-card:hover .similar-img-wrapper img {
    transform: scale(1.1);
}

.similar-info {
    padding: 20px;
    text-align: center;
}

.similar-info h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--dark);
    font-weight: 600;
}

.similar-info p {
    font-size: 18px;
    font-weight: 800;
    color: var(--secondary);
}

.btn-quick-purchase:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
}

@media (max-width: 768px) {
    .similar-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    .similar-info h3 { font-size: 14px; }
    .similar-info p { font-size: 16px; }
}

/* Rating & Review System */
.star-rating i {
    transition: transform 0.2s, color 0.2s;
}
.star-rating i:hover {
    transform: scale(1.2);
}

.review-card {
    transition: transform 0.3s ease;
}
.review-card:hover {
    transform: translateY(-5px);
}

.rating-display:hover {
    transform: scale(1.02);
}
.rating-display .stars i {
    font-size: 18px;
    margin-right: 2px;
    transition: transform 0.2s;
}
.rating-display .stars i:hover {
    transform: translateY(-3px) scale(1.2);
}

@media (max-width: 768px) {
    .reviews-section h2 { font-size: 24px; }
    .review-card { padding: 15px; }
}
