/* Products List & Browsing Styles */

:root {
    --primary-color: #F58231;
    --primary-dark: #e06b12;
    --secondary-color: #2B6CB0;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-color: #111827;
    --light-color: #f9fafb;
    --border-color: #f1f5f9;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Hero & Ads Carousel */
.modern-ads-carousel {
    margin-bottom: 0;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    position: relative;
    background: #000;
}

.modern-ads-carousel .carousel-item {
    height: 400px;
    position: relative;
    overflow: hidden;
}

.modern-ads-carousel .carousel-item img {
    object-fit: cover;
    height: 100%;
    width: 100%;
    filter: brightness(0.6) contrast(1.1);
    transition: transform 8s cubic-bezier(0.16, 1, 0.3, 1);
}

.modern-ads-carousel .carousel-item.active img {
    transform: scale(1.15);
}

.modern-ads-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    /* Align to the right */
    padding: 0 5%;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.7) 0%, transparent 60%);
    z-index: 2;
}

.modern-ads-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 2.5rem;
    max-width: 500px;
    color: white;
    text-align: right;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(40px);
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.active.carousel-item .modern-ads-content {
    transform: translateY(0);
    opacity: 1;
}

.modern-ads-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    line-height: 1.1;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}

.active.carousel-item .modern-ads-title {
    transform: translateY(0);
    opacity: 1;
}

.modern-ads-description {
    font-size: 1.1rem;
    opacity: 0.85;
    margin-bottom: 2rem;
    line-height: 1.5;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.5s;
}

.active.carousel-item .modern-ads-description {
    transform: translateY(0);
    opacity: 1;
}

.modern-ads-cta {
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    color: #000;
    padding: 14px 36px;
    border-radius: 100px;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(20px);
    opacity: 0;
    position: relative;
    overflow: hidden;
}

.modern-ads-cta i {
    margin-right: 10px;
}

.modern-ads-cta::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -100%;
    width: 60%;
    height: 200%;
    background: rgba(255, 255, 255, 0.4);
    transform: rotate(25deg);
    transition: all 0.6s;
}

.modern-ads-cta:hover::after {
    left: 150%;
}

.active.carousel-item .modern-ads-cta {
    transform: translateY(0);
    opacity: 1;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.7s;
}

.modern-ads-cta:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.2);
    background: #f8fafc;
    color: var(--primary-color);
}

/* Decorative Elements */
.ads-decorative-element {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: 1;
    opacity: 0.4;
    pointer-events: none;
    animation: blob-float 15s infinite alternate;
}

.element-1 {
    width: 300px;
    height: 300px;
    background: var(--primary-color);
    top: -100px;
    left: -100px;
}

.element-2 {
    width: 250px;
    height: 250px;
    background: var(--accent-color);
    bottom: -80px;
    right: 20%;
    animation-delay: -5s;
}

@keyframes blob-float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, 50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

/* Indicators Overhaul */
.modern-carousel-indicators {
    bottom: 30px;
    gap: 10px;
    z-index: 15;
}

.modern-carousel-indicators button {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background-color: rgba(255, 255, 255, 0.4) !important;
    border: none !important;
    transition: all 0.3s ease !important;
    flex: 0 1 auto !important;
}

.modern-carousel-indicators button.active {
    width: 30px !important;
    border-radius: 10px !important;
    background-color: #ffffff !important;
}

/* Modern Hero Fallback */
.modern-hero {
    background: white;
    padding: 1rem 0;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #64748b;
}

/* Category Navigation v3.0 - Floating Pill Design */
.modern-category-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 0;
    padding: 0.75rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    position: sticky;
    top: 70px;
    /* Adjusted for standard navbar */
    z-index: 100;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
    margin: 0;
    will-change: transform;
    /* Performance Optimization */
}

.modern-category-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
    display: flex;
    align-items: center;
    white-space: nowrap;
    margin: 0;
    flex-shrink: 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Scrollable Categories */
.categories-scroll-container {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

.categories-scroll-container::-webkit-scrollbar {
    display: none;
}

.modern-category-title i {
    margin-left: 10px;
    color: var(--primary-color);
}

.modern-category-btn {
    padding: 6px 18px;
    border-radius: 100px;
    background: transparent;
    border: 1px solid transparent;
    color: #64748b;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

.modern-category-btn:hover {
    background: rgba(0, 0, 0, 0.03);
    color: var(--primary-color);
}

.modern-category-btn.active {
    background: var(--brand-slate);
    color: white;
    box-shadow: 0 10px 15px -3px rgba(43, 108, 176, 0.2);
    border-color: var(--brand-slate);
}

.modern-subcategory-panel {
    background: #f8fafc;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
    border: 1px solid var(--border-color);
}

.modern-subcategory-btn {
    padding: 8px 18px;
    border-radius: 12px;
    background: white;
    border: 1px solid var(--border-color);
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 500;
    margin: 4px;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.modern-subcategory-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

/* Product Card v3.0 - World Class Design */
.modern-product-card {
    background: #ffffff;
    border: none;
    border-radius: 32px;
    /* Smoother, Apple-style radius */
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    height: 100%;
    will-change: transform;
    /* Performance Optimization */
    display: flex;
    flex-direction: column;
    position: relative;
    /* Isolate stacking context but keep low */
    z-index: 1;
    box-shadow:
        0 1px 3px 0 rgba(0, 0, 0, 0.05),
        0 1px 2px 0 rgba(0, 0, 0, 0.03);
    cursor: pointer;
}

.modern-product-card:hover {
    transform: translateY(-12px);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    /* Ensure it doesn't jump above modal */
    z-index: 2;
}

.modern-product-image-container {
    height: 200px;
    position: relative;
    overflow: hidden;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.container-products {
    padding-bottom: 5rem;
}

.modern-product-image {
    max-height: 100%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.1));
}

.modern-product-card:hover .modern-product-image {
    transform: scale(1.1) rotate(2deg);
}

/* Glassmorphism Badges */
.modern-product-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(245, 130, 49, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: white;
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 800;
    z-index: 5;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.modern-product-badge.sale {
    background: rgba(239, 68, 68, 0.85);
}

.modern-product-badge.hot {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.modern-product-badge.out-of-stock {
    background: rgba(148, 163, 184, 0.9);
    filter: saturate(0.5);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.modern-product-badge.low-stock {
    background: rgba(245, 158, 11, 0.9);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.out-of-stock-btn {
    background: #94a3b8 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Wislist & Quick Add Overhaul */
.wishlist-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 100px;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.wishlist-btn:hover {
    transform: scale(1.15);
    background: white;
    color: #ef4444;
    box-shadow: 0 10px 15px -3px rgba(239, 68, 68, 0.2);
}

.wishlist-btn.active {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

.wishlist-btn.detail-mode {
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

/* Action Overlay */
.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.2);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 4;
}

.modern-product-card:hover .product-overlay {
    opacity: 1;
}

.overlay-actions {
    display: flex;
    gap: 12px;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.modern-product-card:hover .overlay-actions {
    transform: translateY(0);
}

.overlay-btn {
    width: 48px;
    height: 48px;
    background: white;
    color: var(--dark-color);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.overlay-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-5px);
}

/* Product Info & Typography */
.modern-product-info {
    padding: 1.25rem 1.75rem 1.75rem;
    /* More generous side/bottom padding */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: #ffffff;
}

.product-category-tag {
    font-size: 0.65rem;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modern-product-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    height: 2.8rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: all 0.3s ease;
}

.modern-product-card:hover .modern-product-name {
    color: var(--primary-color);
}

/* Pricing Layout */
.pricing-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.25rem;
}

.modern-product-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--dark-color);
}

.old-price {
    font-size: 0.85rem;
    color: #94a3b8;
    text-decoration: line-through;
    opacity: 0.7;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.75rem;
}

.stars {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #f59e0b;
    font-size: 0.85rem;
    font-weight: 700;
}

.rating-value {
    color: #1e293b;
    margin-left: 2px;
}

.rating-count {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
}

/* Modernized Actions - World Class Style */
.modern-product-actions {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.modern-cart-btn-long {
    flex-grow: 1;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--dark-color);
    color: #ffffff;
    border: none;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.modern-cart-btn-long:hover {
    background: #0f172a;
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.modern-quantity-controls {
    flex-grow: 1;
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 16px;
    height: 48px;
    padding: 6px;
}

.modern-qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 12px;
    background: white;
    color: #64748b;
    transition: all 0.2s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.modern-qty-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.modern-qty-display {
    flex-grow: 1;
    text-align: center;
    font-weight: 800;
    font-size: 1rem;
    color: var(--dark-color);
}

/* Floating Elements & Sidebar */
.pending-orders-floating {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: white;
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    z-index: 1000;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.pending-orders-floating:hover {
    transform: translateY(-5px);
}

.pending-count-badge {
    background: var(--danger-color);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.8rem;
}

/* --- Premium Pending Orders Sidebar --- */
.pending-orders-sidebar {
    position: fixed;
    top: 0;
    left: -420px;
    width: 420px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.1);
    z-index: 1040;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.pending-orders-sidebar.active {
    left: 0;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    background: linear-gradient(to bottom, rgba(248, 250, 252, 0.8), rgba(255, 255, 255, 0));
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
}

.sidebar-header .d-flex {
    justify-content: space-between;
    align-items: flex-start;
}

.sidebar-title-area h3 {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--dark-color);
    letter-spacing: -0.5px;
}

.sidebar-close {
    background: rgba(241, 245, 249, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sidebar-close:hover {
    background: var(--danger-color);
    color: white;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 10px 15px -3px rgba(239, 68, 68, 0.3);
}

/* Stats Dashboard Panel */
.order-stats-panel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 0 1.5rem 1.5rem;
}

.stat-card {
    background: white;
    padding: 1rem 0.75rem;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.05);
}

.stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.stat-icon.blue {
    background: #eff6ff;
    color: #3b82f6;
}

.stat-icon.green {
    background: #f0fdf4;
    color: #22c55e;
}

.stat-icon.orange {
    background: #fff7ed;
    color: #f97316;
}

.stat-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--dark-color);
}

.sidebar-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Premium Order Card */
.pending-order-card {
    background: white;
    border: 1px solid #f1f5f9;
    border-radius: 22px;
    padding: 1.5rem;
    position: relative;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03);
    overflow: hidden;
}

.pending-order-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: var(--warning-color);
    opacity: 0.8;
}

.pending-order-card:hover {
    transform: translateX(5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.05);
}

.order-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.status-badge {
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.3px;
}

.status-badge.pending {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fef3c7;
}

.order-actions-trigger {
    color: #cbd5e1;
    background: none;
    border: none;
    padding: 5px;
    transition: color 0.2s;
}

.order-actions-trigger:hover {
    color: var(--dark-color);
}

.order-main-info {
    margin-bottom: 1.5rem;
}

.order-id-label {
    display: block;
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.order-id-value {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--dark-color);
}

.order-price-box {
    margin-top: 0.75rem;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.order-total-price {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--primary-color);
}

.order-original-price {
    font-size: 0.9rem;
    text-decoration: line-through;
    color: #cbd5e1;
}

.order-details-mini {
    display: flex;
    gap: 15px;
    padding-top: 1.25rem;
    border-top: 1px solid #f8fafc;
}

.mini-detail {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
}

.mini-detail i {
    color: #cbd5e1;
}

/* Quick Payment Strip */
.payment-strip {
    display: flex;
    gap: 10px;
    margin-top: 1.5rem;
}

.btn-payment-action {
    flex: 1;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-payment-action.whatsapp {
    background: #22c55e;
    color: white;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

.btn-payment-action.whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.3);
}

.btn-payment-action.details {
    background: #f1f5f9;
    color: #475569;
}

.btn-payment-action.details:hover {
    background: #e2e8f0;
    color: var(--dark-color);
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    z-index: 1039;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .modern-ads-carousel .carousel-item {
        height: 240px;
    }

    .modern-ads-title {
        font-size: 1.75rem;
    }

    .modern-ads-overlay {
        padding: 0 2rem;
    }

    .pending-orders-sidebar {
        width: 100%;
        left: -100%;
    }

    /* Mobile 2-Column Product Card Optimization */
    .modern-product-image-container {
        height: 140px;
        padding: 0.5rem;
    }

    .modern-product-info {
        padding: 0.75rem;
    }

    .modern-product-name {
        font-size: 0.85rem;
        height: 2.4rem;
        margin-bottom: 0.25rem;
        line-height: 1.25;
    }

    .modern-product-price {
        font-size: 0.95rem;
    }

    .old-price {
        font-size: 0.75rem;
    }

    .rating-text {
        font-size: 0.7rem;
    }

    .product-category-tag {
        font-size: 0.65rem;
        margin-bottom: 0.25rem;
    }

    .modern-product-actions {
        flex-direction: column;
        gap: 6px;
    }

    .modern-cart-btn-long {
        height: 36px;
        font-size: 0.8rem;
        border-radius: 10px;
    }

    .modern-quantity-controls {
        height: 48px;
        border-radius: 10px;
        padding: 4px;
    }

    .modern-qty-btn {
        width: 28px;
        height: 28px;
        border-radius: 8px;
    }

    .modern-qty-display {
        font-size: 0.9rem;
    }

    .modern-product-badge {
        font-size: 0.6rem;
        padding: 4px 8px;
        top: 8px;
        left: 8px;
        border-radius: 8px;
    }

    .wishlist-btn {
        width: 28px;
        height: 28px;
        top: 8px;
        right: 8px;
        border-radius: 8px;
    }

    /* Mobile Cart Bar */
    .mobile-cart-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
        padding: 12px 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        z-index: 1050;
        animation: slideUp 0.3s ease-out;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
    }

    .cart-info {
        display: flex;
        flex-direction: column;
    }

    .cart-count {
        font-weight: 800;
        color: var(--primary-color);
        font-size: 0.9rem;
    }

    .cart-total {
        font-weight: 700;
        font-size: 1.1rem;
        color: var(--dark-color);
    }

    .cart-action-btn {
        background: var(--dark-color);
        color: white;
        padding: 10px 24px;
        border-radius: 12px;
        font-weight: 700;
        text-decoration: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        transition: transform 0.2s;
        font-size: 0.9rem;
    }

    .cart-action-btn:active {
        transform: scale(0.95);
    }

    /* Detail Ads at Top (Mobile) - FIXED to Navbar */
    .detail-ads-wrapper {
        position: fixed;
        top: 60px;
        /* Default mobile navbar height */
        left: 0;
        right: 0;
        background: #fdf2f0;
        padding: 10px 15px;
        z-index: 10;
        /* Above regular content but below some dropdowns */
        display: flex;
        gap: 12px;
        overflow-x: auto;
        scrollbar-width: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    }

    /* Small mobile adjustment */
    @media (max-width: 576px) {
        .detail-ads-wrapper {
            top: 81px;
            /* Narrower navbar height */
            padding: 8px 12px;
        }

        /* Offset for content when ads are fixed at top */
        .container-products.has-fixed-mobile-ads {
            padding-top: 126px !important;
        }
    }

    /* Tablet adjustment */
    @media (min-width: 577px) and (max-width: 991px) {
        .container-products.has-fixed-mobile-ads {
            padding-top: 190px !important;
        }
    }

    .mini-ad-card {
        flex: 0 0 140px;
        background: white;
        border-radius: 12px;
        padding: 8px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        text-decoration: none !important;
        color: inherit !important;
        border: 1px solid rgba(0, 0, 0, 0.02);
        position: relative;
    }

    .mini-ad-badge {
        position: absolute;
        top: 8px;
        right: 8px;
        background: #ef4444;
        color: white;
        font-size: 10px;
        font-weight: 800;
        padding: 3px 8px;
        border-radius: 6px;
        z-index: 2;
        box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
    }

    .mini-ad-img {
        width: 100%;
        height: 56px;
        object-fit: cover;
        border-radius: 8px;
    }

    .mini-ad-info {
        flex: 1;
        width: 100%;
    }

    .mini-ad-name {
        font-size: 12px;
        font-weight: 700;
        margin: 0 0 4px 0 !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        color: var(--dark-color);
    }

    .mini-ad-price {
        font-size: 13px;
        font-weight: 800;
        color: var(--primary-color);
    }

    @keyframes slideUp {
        from {
            transform: translateY(100%);
        }

        to {
            transform: translateY(0);
        }
    }

    /* Category Tabs */
    .category-tabs {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0.5rem 0;
        margin-bottom: 1rem;
        gap: 8px;
        scrollbar-width: none;
        /* Firefox */
        -ms-overflow-style: none;
        /* IE and Edge */
    }

    .category-tabs::-webkit-scrollbar {
        display: none;
        /* Chrome, Safari, Opera */
    }

    .category-tab-item {
        flex-shrink: 0;
        padding: 8px 16px;
        border-radius: 20px;
        background: #f1f5f9;
        color: #64748b;
        font-size: 0.85rem;
        font-weight: 600;
        text-decoration: none;
        transition: all 0.2s ease;
        white-space: nowrap;
    }

    .category-tab-item.active,
    .category-tab-item:hover {
        background: var(--primary-color);
        color: white;
    }

    /* Minimalist Mobile Category Design */
    .modern-category-nav {
        padding: 0;
        background: transparent;
        border: none;
        box-shadow: none;
        border-radius: 0;
    }

    .modern-category-title {
        display: none;
        /* Hide title to save space as requested */
    }

    .categories-scroll-container {
        padding-bottom: 0;
        margin: 0 -0.5rem;
        /* Negative margin to scroll edge-to-edge */
        padding: 0 0.5rem;
    }

    .modern-category-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
        margin: 0;
        background: white;
        border: 1px solid var(--border-color);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
        border-radius: 100px;
        /* Pill shape */
        color: var(--dark-color);
    }

    .modern-category-btn.active {
        background: var(--dark-color);
        /* Dark active state for sophisticated look */
        color: white;
        border-color: var(--dark-color);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    }
}

/* Social Share Menu */
.social-share-menu {
    position: absolute;
    bottom: 80px;
    right: 20px;
    background: #ffffff;
    padding: 8px;
    border-radius: 100px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 20;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.social-share-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.share-item {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: #f8fafc;
    color: #64748b;
    transition: all 0.3s ease;
    cursor: pointer;
}

.share-item:hover {
    background: var(--dark-color);
    color: white;
    transform: scale(1.1);
}

.share-item.whatsapp {
    background: #22c55e;
}

.share-item.facebook {
    background: #3b5998;
}

.share-item.copy {
    background: #64748b;
}

/* --- Premium Modal Enhancements --- */
.modern-modal .modal-content {
    border: none;
    border-radius: 30px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modern-modal .modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 2rem;
    border: none;
    position: relative;
    overflow: hidden;
}

.modern-modal .modal-header::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.modern-modal .modal-title {
    color: white;
    font-weight: 900;
    font-size: 1.5rem;
    z-index: 1;
}

.modern-modal .btn-close-white {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 1rem;
    border-radius: 12px;
    opacity: 1;
    transition: all 0.3s ease;
}

.modern-modal .btn-close-white:hover {
    background-color: rgba(255, 255, 255, 0.4);
    transform: rotate(90deg);
}

.modal-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-bottom: 2rem;
}

.modal-info-card {
    background: white;
    padding: 1.25rem;
    border-radius: 20px;
    border: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 5px;
    transition: transform 0.3s ease;
}

.modal-info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.modal-info-card i {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.modal-info-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
}

.modal-info-value {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--dark-color);
}

.modern-order-item-strip {
    background: white;
    border-radius: 20px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.modern-order-item-strip:hover {
    border-color: var(--primary-color);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.item-strip-img {
    width: 70px;
    height: 70px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.item-strip-info {
    flex: 1;
}

.item-strip-name {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--dark-color);
    margin-bottom: 4px;
}

.item-strip-desc {
    font-size: 0.75rem;
    color: #94a3b8;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-strip-pricing {
    text-align: left;
}

.item-strip-qty {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
}

.item-strip-price {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--primary-color);
}

.modal-finance-summary {
    background: #f8fafc;
    border-radius: 24px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.finance-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.finance-row.total {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px dashed #e2e8f0;
}

.finance-row.total .label {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--dark-color);
}

.finance-row.total .value {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-color);
}

.modern-whatsapp-btn {
    width: 100%;
    height: 56px;
    border-radius: 18px;
    background: #22c55e;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 800;
    font-size: 1.1rem;
    text-decoration: none;
    box-shadow: 0 10px 15px -3px rgba(34, 197, 94, 0.3);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modern-whatsapp-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 25px -5px rgba(34, 197, 94, 0.4);
    background: #16a34a;
    color: white;
}

/* Horizontal Scroll for Product Sections */
.products-horizontal-scroll {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    /* Space between cards */
    padding: 10px 4px 30px 4px;
    /* Bottom padding for shadow/hover space */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling on iOS */
    scrollbar-width: none;
    /* Firefox */
}

.products-horizontal-scroll::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari/Blink */
}

.products-horizontal-scroll .col {
    flex: 0 0 auto;
    /* Don't shrink, don't grow */
    width: 280px;
    /* Fixed width for cards */
    scroll-snap-align: start;
}

/* Mobile Responsive Adjustments */
@media (max-width: 576px) {
    .products-horizontal-scroll .col {
        width: 200px;
        /* Slightly narrower on small phones if needed, or keep 280px */
    }

    /* Improve Quantity Control Spacing on Mobile */
    .modern-quantity-controls {
        gap: 15px !important;
        /* Increase gap between buttons and number */
        padding: 6px 4px !important;
        /* More padding inside the pill */
        justify-content: space-between !important;
        /* Push buttons to edges */
    }

    .modern-qty-display {
        font-size: 1.1rem !important;
        /* Slightly larger text */
        width: 30px !important;
        /* Ensure minimum width for the number */
        display: inline-block !important;
    }

    .modern-qty-btn {
        width: 25px !important;
        /* Larger touch target */
        height: 25px !important;
    }
}

/* --- Product Detail Page Styles --- */

.modern-detail-container {
    background: #ffffff;
    border-radius: 32px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.modern-detail-wrapper {
    display: flex;
    flex-direction: column;
}

@media (min-width: 992px) {
    .modern-detail-wrapper {
        flex-direction: row;
    }
}

/* Image Section */
.modern-detail-image-sec {
    flex: 1;
    background: #f8fafc;
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modern-detail-main-img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.15));
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* .modern-detail-main-img:hover {
    transform: scale(1.05);
} */

/* Info Section */
.modern-detail-info-sec {
    flex: 1.2;
    padding: 3rem;
    display: flex;
    flex-direction: column;
}

.detail-breadcrumbs {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.detail-breadcrumbs a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
}

.detail-breadcrumbs a:hover {
    color: var(--primary-color);
}

.detail-product-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--dark-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.detail-views-badge {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 6px 16px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.detail-description-preview {
    font-size: 1.1rem;
    color: #475569;
    line-height: 1.7;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Price & Meta */
.detail-price-box {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.detail-current-price {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary-color);
}

.detail-old-price {
    font-size: 1.5rem;
    color: #94a3b8;
    text-decoration: line-through;
}

/* Actions */
.detail-actions {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.detail-qty-control {
    width: 140px;
    height: 56px;
    background: #f1f5f9;
    border-radius: 16px;
    display: flex;
    align-items: center;
    padding: 6px;
}

.detail-add-btn {
    flex: 1;
    height: 56px;
    background: var(--dark-color);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.2);
}

.detail-add-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    background: #000;
}

/* Tabs */
.modern-tabs-container {
    margin-top: 2rem;
}

.modern-tabs-nav {
    display: flex;
    gap: 2rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.modern-tab-link {
    background: none;
    border: none;
    padding: 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #94a3b8;
    position: relative;
    transition: all 0.3s ease;
}

.modern-tab-link.active {
    color: var(--dark-color);
}

.modern-tab-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px 3px 0 0;
}

.modern-tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.modern-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* Mobile Tweaks Detail */
@media (max-width: 768px) {
    .modern-detail-container {
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
        border-radius: 16px;
    }

    .modern-detail-image-sec {
        min-height: 200px;
        padding: 0.5rem;
    }

    .modern-detail-main-img {
        max-height: 200px;
    }

    .wishlist-btn.detail-mode {
        top: 10px !important;
        left: 10px !important;
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .modern-product-badge {
        top: 10px !important;
        left: 10px !important;
        font-size: 0.7rem !important;
        padding: 4px 8px !important;
    }

    .modern-detail-info-sec {
        padding: 1rem;
    }

    .detail-breadcrumbs {
        font-size: 0.7rem;
        margin-bottom: 0.5rem;
    }

    .detail-product-title {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }

    .detail-description-preview {
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
        line-height: 1.4;
    }

    .product-rating {
        margin-bottom: 0.75rem !important;
        font-size: 0.8rem;
    }

    .detail-price-box {
        margin-bottom: 1rem;
        padding-bottom: 1rem;
        gap: 8px;
    }

    .detail-current-price {
        font-size: 1.5rem;
    }

    .detail-old-price {
        font-size: 0.9rem;
    }

    .detail-actions {
        flex-direction: column-reverse;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .detail-qty-control {
        width: 100%;
        height: 42px;
        padding: 4px;
    }

    .detail-add-btn {
        width: 100%;
        height: 42px;
        font-size: 0.95rem;
        padding: 10px;
    }

    .modern-detail-info-sec .grid {
        gap: 0.5rem !important;
        margin-top: 0.75rem !important;
    }

    .modern-detail-info-sec .grid div {
        gap: 0.25rem !important;
        font-size: 0.65rem !important;
    }
}

/* Review System */
.star-rating-input:hover label {
    color: #fbbf24;
    /* yellow-400 */
}

.star-rating-input input:checked~label,
.star-rating-input label:hover,
.star-rating-input label:hover~label {
    color: #fbbf24;
}

.star-rating-input input:checked+label:hover,
.star-rating-input input:checked~label:hover,
.star-rating-input label:hover~input:checked~label,
.star-rating-input input:checked~label:hover~label {
    color: #fbbf24;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 20px, 0);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease-out forwards;
}

/* Back Button Styles */
.back-to-store-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    margin-bottom: 1rem;
    border-radius: 50px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.back-to-store-btn:hover {
    color: var(--primary-color);
    transform: translateX(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    /* Aggressive Miniaturization for Mobile */

    .modern-product-card {
        border-radius: 16px;
    }

    .modern-product-image-container {
        height: 120px;
        /* Reduced from 200px */
        padding: 0.5rem;
    }

    .modern-product-badge {
        top: 8px;
        left: 8px;
        padding: 2px 6px;
        font-size: 0.65rem;
        border-radius: 8px;
        display: flex;
        align-items: center;
        gap: 4px;
        direction: ltr;
        /* Ensure numbers display correctly */
    }

    .wishlist-btn {
        top: 8px;
        right: 8px;
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    .modern-product-info {
        padding: 0.5rem 0.5rem 0.5rem;
        /* Highly reduced padding */
    }

    .product-category-tag {
        font-size: 0.55rem;
        margin-bottom: 0.2rem;
    }

    .modern-product-name {
        font-size: 0.8rem;
        /* Small font */
        margin-bottom: 0.25rem;
        height: 2rem;
        line-height: 1.1;
        overflow: hidden;
    }

    .pricing-wrapper {
        margin-bottom: 0.5rem;
        gap: 6px;
        flex-wrap: wrap;
    }

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

    .old-price {
        font-size: 0.7rem;
    }

    .product-rating {
        margin-bottom: 0.5rem;
    }

    .stars {
        font-size: 0.7rem;
    }

    /* Optimize Cart Button - Icon Only on Mobile */
    .modern-cart-btn-long {
        height: 32px;
        font-size: 0.8rem;
        padding: 0;
        width: 100%;
        justify-content: center;
    }

    .modern-cart-btn-long span {
        display: none;
        /* Hide text, show icon only */
    }

    .modern-quantity-controls {
        height: 32px;
        padding: 2px;
    }

    .modern-qty-btn {
        width: 28px;
        height: 28px;
        border-radius: 8px;
    }

    .modern-qty-display {
        font-size: 0.85rem;
    }

    /* Horizontal Scroll spacing */
    .products-horizontal-scroll {
        gap: 10px;
        padding-bottom: 15px;
        padding-right: 8px;
        /* Start padding */
    }

    .products-horizontal-scroll .col {
        width: 150px;
        /* Even smaller width */
    }

    .container-products {
        padding-bottom: 3rem;
    }

    /* Section Headers */
    .section-title {
        font-size: 1rem;
    }

    /* Enhanced Category Nav for Mobile */
    .modern-category-nav {
        top: 70px;
        padding: 0.5rem 1rem;
        margin-bottom: 0 !important;
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        background: transparent;
        /* No color */
        border: none;
        /* No border */
        box-shadow: none;
        /* No shadow */
        display: flex;
        justify-content: flex-start;
        gap: 0.5rem;
    }

    .modern-category-nav .categories-scroll-container {
        padding: 0;
        /* Remove inner padding */
    }

    .modern-category-btn {
        padding: 8px 18px;
        font-size: 0.8rem;
        font-weight: 600;
        background: #f3f4f6;
        border: 1px solid transparent;
        color: #111827;
        border-radius: 100px;
        transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }

    /* Remove hover on mobile */
    .modern-category-btn:hover {
        background: #f3f4f6;
        color: #111827;
        transform: none;
    }

    .modern-category-btn:active {
        transform: scale(0.95);
    }

    .modern-category-btn.active {
        background: #000000;
        color: white;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        border-color: #000000;
    }

    .modern-category-title {
        display: none;
    }

    /* Modern Store Header - SaaS Style */
    .modern-store-header {
        background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, var(--bg-soft) 100%);
        padding: 3rem 0 2rem;
        text-align: center;
        position: relative;
        overflow: hidden;
    }

    .modern-store-header::before {
        content: '';
        position: absolute;
        top: -50%;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        height: 100%;
        background: radial-gradient(circle at center, rgba(43, 88, 118, 0.03) 0%, transparent 70%);
        z-index: 0;
    }

    .store-brand-container {
        position: relative;
        z-index: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .store-logo-wrapper {
        width: 80px;
        height: 80px;
        border-radius: 20px;
        background: #fff;
        box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.08);
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid var(--border-soft);
        margin-bottom: 0.5rem;
    }

    .store-logo-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 20px;
    }

    .store-title-large {
        font-size: 2rem;
        font-weight: 800;
        color: var(--brand-primary);
        margin: 0;
        letter-spacing: -0.5px;
    }

    .store-verified-badge {
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
        background: rgba(139, 184, 209, 0.1);
        /* brand-accent tint */
        color: var(--brand-primary);
        padding: 0.25rem 0.75rem;
        border-radius: 100px;
        font-size: 0.75rem;
        font-weight: 700;
    }

    /* Updated Nav for SaaS Look */
    @media (max-width: 768px) {
        .modern-store-header {
            padding: 2rem 0;
        }

        .store-title-large {
            font-size: 1.5rem;
        }

        .store-logo-wrapper {
            width: 60px;
            height: 60px;
            border-radius: 16px;
        }
    }

    .modern-hero {
        padding: 1.5rem 0;
        margin-bottom: 1rem;
    }

    .hero-title {
        font-size: 1.2rem;
        margin-bottom: 0.25rem;
    }

    .hero-subtitle {
        font-size: 0.75rem;
    }

    /* Disable Hovers on Mobile */
    .modern-product-card:hover {
        transform: none;
        box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    }

    .modern-product-card:hover .modern-product-image {
        transform: none;
    }

    .modern-cart-btn-long:hover {
        transform: none;
        background: var(--dark-color);
        filter: none;
    }

    .modern-qty-btn:hover {
        transform: none;
        background: white;
        color: #64748b;
    }

    .overlay-btn:hover {
        transform: none;
        background: white;
        color: var(--dark-color);
    }
}

/* --- Premium Offers Section Enhancements --- */
.offers-premium-section {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(245, 158, 11, 0.05) 100%);
    border-radius: 28px;
    padding: 1.5rem 1rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(239, 68, 68, 0.1);
}

.offers-premium-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.fire-pulse {
    animation: fire-pulse 1.5s infinite;
}

@keyframes fire-pulse {
    0% {
        transform: scale(1);
        text-shadow: 0 0 0 rgba(239, 68, 68, 0);
    }

    50% {
        transform: scale(1.2);
        text-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
    }

    100% {
        transform: scale(1);
        text-shadow: 0 0 0 rgba(239, 68, 68, 0);
    }
}

.premium-scroll-wrapper {
    position: relative;
    z-index: 1;
}

.offers-premium-section .section-title {
    background: linear-gradient(135deg, #ef4444, #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.25rem !important;
    font-weight: 800 !important;
}

.premium-badge-count {
    background: linear-gradient(135deg, #ef4444, #f59e0b);
    color: white;
    border: none;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
}

@media (max-width: 768px) {
    .offers-premium-section {
        padding: 1rem 0.75rem;
        border-radius: 20px;
    }

    .offers-premium-section .section-title {
        font-size: 1.1rem !important;
    }
}

/* Product Detail Gallery Styles */
.media-thumbnails-container {
    max-width: 100%;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #f1f5f9;
}

.media-thumbnails-container::-webkit-scrollbar {
    height: 4px;
}

.media-thumbnails-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.media-thumbnails-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.thumb-item {
    min-width: 80px;
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background: #f8fafc;
    position: relative;
    flex-shrink: 0;
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.thumb-item:hover img {
    opacity: 1;
}

.thumb-item.active {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.thumb-item.active img {
    opacity: 1;
}

.video-thumb .video-icon-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    background: rgba(37, 99, 235, 0.9);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.main-media-container {
    background: #f8fafc;
    border-radius: 24px;
    overflow: hidden;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.main-media-container video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    background: #000;
}

@media (max-width: 768px) {
    .thumb-item {
        min-width: 60px;
        width: 60px;
        height: 60px;
    }

    .main-media-container {
        border-radius: 16px;
    }
}

/* --- Elite Product Gallery Refinements --- */
.modern-detail-image-sec {
    display: flex;
    flex-direction: column;
}

.gallery-main-wrapper {
    display: flex;
    gap: 1.5rem;
    flex-direction: column-reverse;
    /* Default for mobile/small screens */
}

@media (min-width: 992px) {
    .gallery-main-wrapper {
        flex-direction: row-reverse;
        /* Right thumbnails for RTL */
        max-height: 600px;
    }

    .media-thumbnails-container {
        flex-direction: column !important;
        width: 100px;
        min-width: 100px;
        max-height: 100%;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding-right: 5px;
        /* Space for scrollbar */
    }

    .thumb-item {
        width: 80px !important;
        height: 80px !important;
        margin-bottom: 0.5rem;
    }
}

.main-media-container {
    flex-grow: 1;
    background: #ffffff;
    border-radius: 32px;
    /* Extra smooth radius */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.modern-detail-main-img {
    transition: opacity 0.4s ease-in-out, transform 0.6s ease;
}

.main-media-container.switching .modern-detail-main-img {
    opacity: 0;
    transform: scale(0.98);
}

/* Premium Thumb Styling */
.thumb-item {
    border: 2px solid transparent;
    border-radius: 18px;
    padding: 4px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.thumb-item img {
    border-radius: 14px;
    opacity: 0.6;
}

.thumb-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.thumb-item.active {
    border-color: var(--primary-color);
    box-shadow: 0 10px 25px rgba(var(--primary-color-rgb), 0.2);
}

.thumb-item.active img {
    opacity: 1;
}

/* Scrollbar refinement for thumbs */
.media-thumbnails-container::-webkit-scrollbar {
    width: 3px;
    height: 3px;
}

.media-thumbnails-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.media-thumbnails-container:hover::-webkit-scrollbar-thumb {
    background: var(--primary-color);
}