/*
 * shop-index.css
 * Extracted from pages/shop/index.php (Wave 16)
 * Pure CSS — no PHP coupling.
 */

        /* ── Shop Page ── uses theme CSS variables */
        .navbar { height: auto !important; min-height: 50px; }


        /* Testimonial Avatar Styles */
        .testimonial-avatar {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            font-size: 1.5rem;
            color: #fff;
            background: linear-gradient(135deg, var(--color-primary, #007bff), var(--color-primary-hover, #0056b3));
        }

        .testimonial-avatar:hover {
            transform: scale(1.05);
            transition: transform 0.3s ease;
        }

        /* Category Cards Styles */
        .category-card-wrapper {
            position: relative;
            height: 100%;
        }

        .category-card {
            display: block;
            text-decoration: none;
            color: inherit;
            background: #fff;
            border-radius: var(--border-radius-card, 15px);
            box-shadow: var(--shadow-card, 0 4px 15px rgba(0,0,0,.10));
            transition: all .3s ease;
            height: 100%;
            overflow: hidden;
            border: 2px solid transparent;
            width: 100%;
        }

        /* Mobile Slider Styles */
        .category-slider-mobile {
            overflow-x: auto;
            overflow-y: hidden;
            -webkit-overflow-scrolling: touch;
            scroll-behavior: smooth;
            padding-bottom: 10px;
            margin-left: -15px;
            margin-right: -15px;
            padding-left: 15px;
            padding-right: 15px;
        }

        .category-slider-mobile::-webkit-scrollbar {
            height: 6px;
        }

        .category-slider-mobile::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 10px;
        }

        .category-slider-mobile::-webkit-scrollbar-thumb {
            background: #888;
            border-radius: 10px;
        }

        .category-slider-mobile::-webkit-scrollbar-thumb:hover {
            background: #555;
        }

        .category-slider-container {
            display: flex;
            gap: 15px;
            padding-bottom: 5px;
            scroll-snap-type: x mandatory;
            -webkit-overflow-scrolling: touch;
        }

        .category-slide-item {
            flex: 0 0 75%;
            max-width: 75%;
            scroll-snap-align: start;
            scroll-snap-stop: always;
        }

        .category-slide-item .category-card-wrapper {
            height: auto;
        }

        .category-slide-item .category-card {
            min-height: 200px;
        }

        .category-slide-item .category-image {
            height: 140px;
        }

        .category-slide-item .category-content {
            padding: 15px;
        }

        .category-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-premium, 0 8px 25px rgba(0,0,0,.15)); text-decoration: none; color: inherit; }
        .category-card.active { border-color: var(--color-primary, #007bff); box-shadow: 0 8px 25px rgba(var(--color-primary-rgb,0,123,255),.3); }
        .category-image {
            position: relative; height: 120px; overflow: hidden;
            background: linear-gradient(135deg, var(--color-primary, #667eea) 0%, var(--color-accent, #764ba2) 100%);
        }

        .category-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.3s ease;
        }

        .category-card:hover .category-image img {
            transform: scale(1.1);
        }

        .category-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.4);
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.3s ease;
        }

        .category-card:hover .category-overlay {
            background: rgba(0, 0, 0, 0.6);
        }

        .category-content {
            padding: 15px;
            text-align: center;
        }

        .category-title { font-weight: 600; margin-bottom: 5px; color: var(--text-primary, #333); font-size: .95rem; }
        .category-subtitle { font-size: .8rem; color: var(--text-secondary, #666); margin: 0;
            line-height: 1.3;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        /* Filter Sidebar Styles */
        .filter-sidebar {
            position: sticky;
            top: 20px;
            max-height: calc(100vh - 40px);
            overflow-y: auto;
        }

        .filter-title { color: var(--text-primary, #333); font-weight: 600; font-size: .95rem; border-bottom: 2px solid var(--color-primary-light, #f8f9fa); padding-bottom: 8px; }

        .filter-options {
            max-height: 200px;
            overflow-y: auto;
            padding-right: 5px;
        }

        .filter-options::-webkit-scrollbar {
            width: 6px;
        }

        .filter-options::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 3px;
        }

        .filter-options::-webkit-scrollbar-thumb {
            background: #c1c1c1;
            border-radius: 3px;
        }

        .filter-options::-webkit-scrollbar-thumb:hover {
            background: #a8a8a8;
        }

        .form-check-input:checked { background-color: var(--color-primary, #007bff); border-color: var(--color-primary, #007bff); }
        .form-check-label { font-size: .9rem; color: var(--text-secondary, #555); cursor: pointer; transition: color .2s ease; }
        .form-check-label:hover { color: var(--color-primary, #007bff); }

        .price-range-slider {
            position: relative;
        }

        .form-range {
            -webkit-appearance: none;
            appearance: none;
            height: 6px;
            background: #ddd;
            border-radius: 3px;
            outline: none;
        }

        .form-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; background: var(--color-primary, #007bff); border-radius: 50%; cursor: pointer; box-shadow: 0 2px 4px rgba(0,0,0,.20); }
        .form-range::-moz-range-thumb { width: 20px; height: 20px; background: var(--color-primary, #007bff); border-radius: 50%; cursor: pointer; border: none; box-shadow: 0 2px 4px rgba(0,0,0,.20); }

        .price-labels {
            font-size: 0.8rem;
            color: #666;
            margin-top: 5px;
        }

        .price-inputs .form-control {
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 0.85rem;
        }

        .price-inputs .form-control:focus { border-color: var(--color-primary, #007bff); box-shadow: 0 0 0 .2rem rgba(var(--color-primary-rgb,0,123,255),.25); }

        .filter-actions .btn {
            border-radius: 8px;
            font-weight: 500;
            transition: all 0.3s ease;
        }

        .filter-actions .btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(0,0,0,0.15);
        }

        /* RTL Support for Filters */
        .rtl .filter-sidebar {
            text-align: right;
        }

        .rtl .form-check {
            text-align: right;
        }

        .rtl .price-labels {
            direction: ltr;
        }

        /* Product Cards - 3 per row layout */
        .product-card {
            transition: all 0.3s ease;
            overflow: hidden;
            border-radius: 15px;
        }
                
        .product-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2) !important;
        }
                
        .product-card .card-img-top {
            transition: all 0.4s ease;
            object-fit: cover;
        }
                
        .product-card:hover .card-img-top {
            transform: scale(1.08);
        }
                
        .product-card .card-body {
            transition: all 0.3s ease;
            padding: 1.25rem;
        }
                
        /* card-body hover handled by theme */
                
        .product-card:hover .btn {
            transform: scale(1.05);
        }
                
        /* Product Name Styling */
        .product-card .card-title {
            font-size: 1.1rem;
            line-height: 1.4;
            margin-bottom: 0.75rem;
            font-weight: 600;
            color: #333;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
                
        /* Price Styling */
        .product-card .price-original {
            font-size: 0.9rem;
            font-weight: 500;
        }
                
        .product-card .price-current {
            font-size: 1.25rem;
            font-weight: 700;
        }
                
        /* Modern Product Card Design — uses theme CSS via shop-product-cards.css */
        .product-card {
            transition: all 0.3s ease;
            overflow: hidden;
            position: relative;
        }

        /* Image Area */
        .product-card .card-img-container {
            padding: 20px;
            height: 250px;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            background: #fff;
            overflow: hidden;
        }

        .product-card .card-img-top {
            max-height: 100%;
            max-width: 100%;
            object-fit: contain;
            transition: transform 0.5s ease;
        }

        .product-card:hover .card-img-top {
            transform: scale(1.05);
        }

        /* Badges (Left Top) */
        .product-card .badge-container {
            position: absolute;
            top: 15px;
            left: 15px;
            display: flex;
            flex-direction: column;
            gap: 6px;
            z-index: 10;
        }

        .product-card .badge-custom {
            padding: 4px 10px;
            border-radius: 20px;
            font-size: 0.7rem;
            font-weight: 700;
            color: #fff;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
            text-transform: uppercase;
        }

        .product-card .badge-discount {
            background-color: #ff3b30;
        }

        .product-card .badge-new {
            background-color: #28a745;
        }
        
        .product-card .badge-soldout {
            background-color: #6c757d;
        }

        /* Action Buttons (Right Top) */
        .product-card .actions-container {
            position: absolute;
            top: 15px;
            right: 15px;
            display: flex;
            flex-direction: column;
            gap: 10px;
            z-index: 10;
            opacity: 0;
            transform: translateX(10px);
            transition: all 0.3s ease;
        }
        
        /* Show actions on mobile by default or on hover for desktop */
        @media (max-width: 768px) {
            .product-card .actions-container {
                opacity: 1;
                transform: translateX(0);
            }
        }

        .product-card:hover .actions-container {
            opacity: 1;
            transform: translateX(0);
        }

        .product-card .action-btn {
            width: 38px;
            height: 38px;
            border-radius: 50%;
            background: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 3px 8px rgba(0,0,0,0.1);
            color: #666;
            text-decoration: none;
            transition: all 0.2s ease;
            cursor: pointer;
            border: none;
        }

        .product-card .action-btn:hover { background-color: var(--color-primary, #007bff); color: #fff; transform: scale(1.1); }

        /* Content Area */
        .product-card .card-body {
            padding: 15px 20px 20px;
            text-align: left;
        }
        
        body[dir="rtl"] .product-card .card-body {
            text-align: right;
        }

        .product-card .card-title {
            font-size: 1rem;
            font-weight: 600;
            margin-bottom: 8px;
            color: var(--text-primary, #2c3e50);
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            height: 2.8em; /* Fixed height for 2 lines */
            line-height: 1.4;
        }

        /* Rating */
        .product-card .rating-container {
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            gap: 5px;
        }
        
        .product-card .rating-stars i {
            color: #ffc107;
            font-size: 0.85rem;
        }
        
        .product-card .rating-count {
            color: #999;
            font-size: 0.85rem;
        }

        /* Price and Cart Row */
        .product-card .footer-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: auto;
        }

        .product-card .price-container {
            display: flex;
            flex-direction: column;
            line-height: 1.2;
        }

        .product-card .price-old {
            font-size: 0.85rem;
            color: #999;
            text-decoration: line-through;
            margin-bottom: 2px;
        }

        .product-card .price-current {
            font-size: 1.25rem;
            font-weight: 700;
            color: var(--color-primary, #ff3b30);
        }

        .product-card .btn-cart-icon {
            width: 42px;
            height: 42px;
            border-radius: 10px;
            background: var(--color-primary-light, #f8f9fa);
            border: 1px solid var(--border-subtle, #e9ecef);
            color: var(--color-primary, #0d6dfc);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.1rem;
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .product-card .btn-cart-icon:hover:not(:disabled) { background: var(--color-primary, #0d6dfc); border-color: var(--color-primary, #0d6dfc); color: #fff; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(var(--color-primary-rgb,13,109,252),.3); }
        
        .product-card .btn-cart-icon:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }
        
        /* Rating Display Styles */
        .rating-display {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .rating-number {
            font-size: 1.1rem;
            font-weight: 600;
            color: #000;
        }
        
        .rating-stars {
            display: flex;
            gap: 2px;
        }
        
        .rating-stars .fa-star {
            color: #ffc107;
            font-size: 0.9rem;
        }
        
        .rating-stars .fa-star.empty {
            color: #e0e0e0;
        }
        
        /* Ensure stars are always visible */
        .rating-stars i {
            display: inline-block;
        }

        /* Responsive adjustments */
        @media (max-width: 1200px) {
            .col-xl-4 {
                flex: 0 0 33.333333%;
                max-width: 33.333333%;
            }
        }

        @media (max-width: 992px) {
            .col-lg-4 {
                flex: 0 0 50%;
                max-width: 50%;
            }
        }

        @media (max-width: 768px) {
            .category-image {
                height: 120px;
            }

            .category-content {
                padding: 15px;
            }

            .category-title {
                font-size: 1rem;
            }

            .category-subtitle {
                font-size: 0.8rem;
            }

            .filter-sidebar {
                position: static;
                max-height: none;
                margin-bottom: 20px;
            }

            .filter-options {
                max-height: 150px;
            }

            .col-md-4 {
                flex: 0 0 100%;
                max-width: 100%;
            }
        }

        @media (max-width: 576px) {
            .category-slide-item {
                 /* Match subcategory size logic */
                flex: 0 0 140px;
                max-width: 140px;
            }

            .category-slide-item .category-image {
                height: 100px;
            }

            .category-slide-item .category-content {
                padding: 10px;
            }

            .category-slide-item .category-title {
                font-size: 0.9rem;
                font-weight: 600;
            }

            .col-md-4 {
                flex: 0 0 100%;
                max-width: 100%;
            }

            /* Ensure cards take full width on mobile */
            .row.g-3 > [class*="col-"] {
                padding-left: 12px;
                padding-right: 12px;
            }
        }
        
        /* Enforce image height to match subcategories globally or scoped */
        .category-image {
            height: 100px !important; /* Force match subcategory 100px */
            display: flex;
            align-items: center;
            justify-content: center;
            background-color: #f8f9fa;
        }
        
        /* Ensure main slider behaves like subcategory slider */
        .category-slider-container {
            display: flex;
            overflow-x: auto;
            gap: 15px;
            padding: 10px 5px 20px 5px;
            scroll-behavior: smooth;
            -webkit-overflow-scrolling: touch;
        }
        
        .category-slider-container::-webkit-scrollbar {
             height: 6px;
        }

        .category-slide-item {
             /* Default for larger mobile */
             flex: 0 0 140px;
             min-width: 140px;
        }

        /* Discount Badge Styles */
        .discount-badge {
            position: absolute;
            top: -2px;
            right: 15px;
            background: #dc3545;
            color: white;
            padding: 8px 6px 9px;
            font-weight: bold;
            z-index: 4;
            box-shadow: 0 4px 12px rgba(220, 53, 69, 0.6);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            line-height: 1.2;
            min-width: 80px;
            clip-path: polygon(0 0, 100% 0, 100% 75%, 90% 100%, 10% 100%, 0 75%);
            transform: rotate(0deg);
        }

        .discount-badge::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 50%;
            background: linear-gradient(180deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0) 100%);
            pointer-events: none;
            border-radius: 0;
        }

        .discount-badge::after {
            content: '';
            position: absolute;
            bottom: -10px;
            left: 50%;
            transform: translateX(-50%);
            width: 0;
            height: 0;
            border-left: 10px solid transparent;
            border-right: 10px solid transparent;
            border-top: 10px solid #b91c2c;
            filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
        }

        .discount-badge-label {
            font-size: 0.65rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 3px;
            position: relative;
            z-index: 1;
        }

        .discount-badge-value {
            font-size: 1.4rem;
            font-weight: 900;
            line-height: 1;
            position: relative;
            z-index: 1;
        }

        /* Subcategory Slider Styles */
        .sub-category-slider {
            display: flex;
            overflow-x: auto;
            gap: 15px;
            padding: 10px 5px 20px 5px;
            scroll-behavior: smooth;
            -webkit-overflow-scrolling: touch;
            margin-bottom: 20px;
        }
        
        .sub-category-slider::-webkit-scrollbar {
            height: 6px;
        }
        
        .sub-category-slider::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 3px;
        }
        
        .sub-category-slider::-webkit-scrollbar-thumb {
            background: #c1c1c1;
            border-radius: 3px;
        }
        
        .sub-category-item {
            flex: 0 0 140px;
            min-width: 140px;
        }

        @media (min-width: 768px) {
            .sub-category-item {
                flex: 0 0 180px;
                min-width: 180px;
            }
        }
        
        /* Remove gap between header and content */
        body {
            padding-top: 0 !important;
            margin-top: 0 !important;
        }
        
        .hero-header {
            margin-top: 0 !important;
            padding-top: 0 !important;
            padding-bottom: 0 !important;
            position: relative;
            min-height: 500px;
            overflow: hidden;
        }
        
        .hero-background-slider {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 0;
        }
        
        .hero-background-slider .carousel-inner {
            height: 100%;
            overflow: hidden;
        }
        
        .hero-background-slider .carousel-item {
            height: 100%;
            overflow: hidden;
        }
        
        .hero-background-slider .carousel-item img {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .hero-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1;
        }
        
        .hero-content {
            position: relative;
            z-index: 2;
            padding: 4rem 0;
        }
        
        .hero-header h1,
        .hero-header h4,
        .hero-header p {
            color: white !important;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
        }
        
        .hero-header h1 {
            font-weight: 700;
        }
        
        .hero-header h4 {
            font-weight: 600;
        }
        
        /* Hide carousel controls */
        .hero-background-slider .carousel-control-prev,
        .hero-background-slider .carousel-control-next {
            display: none;
        }
        /* Scroll handling for shop section */
        #shop-display-section {
            scroll-margin-top: 100px;
        }
        
        /* Scroll handling for product containers */
        .products-scroll-target {
            scroll-margin-top: 120px;
        }

        /* Desktop Category Slider Styles */
        /* Desktop Category Slider Styles */
        .desktop-category-slider .swiper-slide {
            height: auto !important;
            display: flex; /* Ensure flex context for children */
        }
        
        .desktop-category-slider .swiper-wrapper {
            height: auto !important;
            align-items: stretch; /* Or flex-start if we want varying heights, but we have fixed card height */
        }
        
        .desktop-category-slider .swiper {
            padding-bottom: 20px; /* Increased padding to accommodate hover shadow */
            padding-top: 10px;
            overflow: hidden; /* Prevent page overflow */
        }

        .category-card-new {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 15px;
            border-radius: 10px;
            text-decoration: none;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            height: 200px; /* Fixed height to prevent stretching */
            width: 100%;
            text-align: center;
        }

        .category-card-new:hover {
            transform: translateY(-5px);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
        }

        .category-img-container {
            width: 150px;
            height: 130px;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            border-radius: 8px; /* Soft rounded corners */
        }

        .category-img-container img {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: cover; /* Ensures image fills the container uniformly */
            transition: transform 0.5s ease;
        }

        .category-card-new:hover .category-img-container img {
            transform: scale(1.1); /* Subtle zoom effect on hover */
        }

        .category-card-new h6 { color: var(--text-primary, #253D4E); margin-bottom: 5px; font-size: 16px; }
        .category-card-new span { color: var(--text-secondary, #7E7E7E); font-size: 13px; }
        
        /* Custom Navigation Buttons */
        .swiper-nav-buttons {
            display: flex;
            gap: 12px;
        }
        
        .swiper-button-prev-custom,
        .swiper-button-next-custom {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            background-color: #ffffff;
            border: 1px solid #e4e4e4;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
            color: #253D4E;
            box-shadow: 0 4px 12px rgba(0,0,0,0.08);
            font-size: 1.1rem;
        }
        
        .swiper-button-prev-custom:hover, .swiper-button-next-custom:hover { background-color: var(--color-primary, #007bff); color: #fff; border-color: var(--color-primary, #007bff); box-shadow: 0 6px 15px rgba(var(--color-primary-rgb,0,123,255),.35); transform: translateY(-2px); }

        /* Fix for SubCategory Swiper Height */
        .subCategorySwiper {
            height: auto !important;
            padding-bottom: 20px !important;
        }
        .subCategorySwiper .swiper-slide {
            height: auto !important;
            /* width: auto !important; Removed to allow Swiper to control width */
            display: flex;
            justify-content: center;
        }
        .subCategorySwiper .swiper-wrapper {
            height: auto !important;
        }

        /* Ensure image container is responsive */
        .category-img-container {
            width: 100%;
            max-width: 150px;
            height: 130px;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            border-radius: 8px;
            margin-left: auto;
            margin-right: auto;
        }
