/* ========================================
   Shop Page - Complete Redesign
   ======================================== */

/* Universal Box Sizing Fix */
* {
    box-sizing: border-box;
}

/* High Quality Image Rendering */
img {
    -ms-interpolation-mode: bicubic;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Main Shop Container */
.shop-page {
    min-height: 100vh;
    background: #ffffff;
    padding: 0px 0 80px;
    overflow-x: hidden;
    width: 100%;
}

.shop-container {
    max-width: 1450px;
    margin: 0 auto;
    padding: 0 25px;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 25px;
    position: relative;
    background: #ffffff;
    width: 100%;
    box-sizing: border-box;
}

/* ========================================
   Mobile Filter Toggle
   ======================================== */
.mobile-filter-toggle {
    display: none;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 15px;
    background: #ffffff;
    border: 1px solid #ddd;

    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    cursor: pointer;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.mobile-filter-toggle:hover {
    background: #ffffff;
    border-color: #999;
}

.mobile-filter-toggle svg {
    width: 20px;
    height: 20px;
}

/* ========================================
   Mobile View Toggle
   ======================================== */
.mobile-view-toggle {
    display: none;
    gap: 8px;
    margin-bottom: 15px;
    width: 100%;
    box-sizing: border-box;
}

.mobile-view-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 8px;
    background: #ffffff;
    border: 1px solid #ddd;

    font-size: 12px;
    font-weight: 600;
    color: #1a1a1a;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
}

.mobile-view-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.mobile-view-btn.active {
    background: #1a1a1a;
    color: #ffffff;
    border-color: #1a1a1a;
}

.mobile-view-btn:hover {
    border-color: #999;
}

/* ========================================
   Sidebar Filters
   ======================================== */
.shop-sidebar {
    background: transparent;
    padding: 25px 15px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
}

.sidebar-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #666;
}

.sidebar-close svg {
    width: 24px;
    height: 24px;
}

/* Filter Section */
.filter-section {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 15px;
}

/* ========================================
   مقاس العلابيس (Clothing Sizes)
   ======================================== */
.size-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.size-checkbox {
    display: block;
    cursor: pointer;
}

.size-checkbox input {
    display: none;
}

.size-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border: 1px solid #ddd;

    background: #ffffff;
    transition: all 0.3s ease;
}

.size-checkbox input:checked + .size-label {
    border-color: #1a1a1a;
    background: #ffffff;
    font-weight: 600;
}

.size-value {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 14px;
}

.size-count {
    font-size: 12px;
    color: #666;
}

/* ========================================
   مقاس الحذاء (Shoe Sizes)
   ======================================== */
.shoe-size-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shoe-size-dropdown {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;

    font-size: 14px;
    color: #1a1a1a;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.shoe-size-dropdown:focus {
    outline: none;
    border-color: #1a1a1a;
}

.shoe-size-scroll {
    max-height: 250px;
    overflow-y: auto;
    padding-right: 5px;
}

.shoe-size-scroll::-webkit-scrollbar {
    width: 6px;
}

.shoe-size-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;

}

.shoe-size-scroll::-webkit-scrollbar-thumb {
    background: #ccc;

}

.shoe-size-scroll::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.shoe-size-checkbox {
    display: block;
    cursor: pointer;
    margin-bottom: 8px;
}

.shoe-size-checkbox input {
    display: none;
}

.shoe-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border: 1px solid #e5e5e5;

    background: #ffffff;
    transition: all 0.3s ease;
}

.shoe-size-checkbox input:checked + .shoe-label {
    border-color: #1a1a1a;
    background: #ffffff;
    font-weight: 600;
}

.shoe-label:hover {
    border-color: #999;
}

.shoe-count {
    font-size: 12px;
    color: #666;
}

.shoe-value {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 14px;
}

/* ========================================
   اللون (Colors)
   ======================================== */
.color-scroll {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

.color-scroll::-webkit-scrollbar {
    width: 6px;
}

.color-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;

}

.color-scroll::-webkit-scrollbar-thumb {
    background: #ccc;

}

.color-checkbox {
    display: block;
    cursor: pointer;
    margin-bottom: 10px;
}

.color-checkbox input {
    display: none;
}

.color-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;

    transition: all 0.3s ease;
}

.color-checkbox input:checked + .color-label {
    background: #ffffff;
    border: 1px solid #ddd;
}

.color-label:hover {
    background: #ffffff;
    border: 1px solid #ddd;
}

.color-circle {
    width: 28px;
    height: 28px;

    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.color-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
}

.color-count {
    font-size: 12px;
    color: #666;
}

/* ========================================
   السعر (Price Range)
   ======================================== */
.price-range-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.price-display {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.price-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.price-box label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.price-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid #ddd;

    background: #ffffff;
}

.price-input-wrapper input {
    flex: 1;
    border: none;
    padding: 12px 15px;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    text-align: right;
}

.price-input-wrapper input:focus {
    outline: none;
}

.price-input-wrapper .currency {
    padding-left: 15px;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* Apply Button */
.apply-filters-btn {
    width: 100%;
    padding: 14px;
    background: #1a1a1a;
    color: #fff;
    border: none;

    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.apply-filters-btn:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ========================================
   Products Section
   ======================================== */
.shop-content {
    min-height: 600px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    padding: 0;
    margin: 0;
}

.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0px;
    padding: 20px 0;
    background: transparent;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.shop-results h1 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 5px;
}

.results-count {
    font-size: 14px;
    color: #666;
}

.shop-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.sort-select,
.items-per-page {
    padding: 10px 15px;
    border: 1px solid #ddd;

    font-size: 14px;
    color: #1a1a1a;
    background: #ffffff;
    cursor: pointer;
}

.view-controls {
    display: flex;
    gap: 8px;
}

.view-btn {
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid #ddd;

    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn.active {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

.view-btn svg {
    width: 18px;
    height: 18px;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 40px;
    width: 100%;
    box-sizing: border-box;
}

/* Fluid responsive grid for 1300-1499px - smooth like water */
@media (max-width: 1499px) and (min-width: 1300px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(max(280px, calc((100% - 16px) / 3)), 1fr));
        gap: 8px;
        margin-bottom: 32px;
    }

    .product-card {
        width: 100%;
        max-width: 100%;
        min-width: auto;
    }
}

.products-grid[data-view="grid-2"] {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 0 40px 0 !important;
    box-sizing: border-box !important;
}

.products-grid[data-view="grid-2"] .product-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.products-grid[data-view="grid-2"] .product-image-wrapper {
    width: 100% !important;
    padding-top: 140% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.products-grid[data-view="grid-2"] .product-image-primary,
.products-grid[data-view="grid-2"] .product-image-secondary {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.products-grid[data-view="grid-2"] .product-info {
    padding: 15px 8px !important;
    width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.products-grid[data-view="grid-4"] {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

/* Product Card - Grid 4 Specific Sizing */
.products-grid[data-view="grid-4"] .product-card {
    min-width: 262px;
    max-width: 268px;
    width: 350px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

/* Product Card - Fixed height, no expansion */
.product-card {
    background: transparent;
    overflow: visible;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    /* Remove card enlargement - only add shadow */
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* Product Image Wrapper - Keep consistent */
.product-card .product-image-wrapper {
    position: relative;
    padding-top: 133.33%;
    overflow: hidden;
    background: #ffffff;
    width: 100%;
    box-sizing: border-box;
    contain: layout style paint;
}

/* Hover Content Container - Bottom of image wrapper */
.product-hover-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    overflow: visible;
    transition: all 0.35s ease;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.95));
    backdrop-filter: blur(10px);
    padding: 0;
    margin: 0;
    z-index: 10;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    pointer-events: none;
}

/* Only show if product-hover-content exists and has content */
.product-card:hover .product-hover-content:not(:empty) {
    opacity: 1;
    visibility: visible;
    max-height: 300px;
    padding: 0px 6px;
    pointer-events: auto;
}

/* Colors Display on Hover */
.product-colors-display {
    display: flex;
    gap: 2px;
    margin-bottom: 1.5px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    min-height: 18px;
}

/* Hide colors display if empty to prevent white space */
.product-colors-display:empty {
    display: none;
    margin: 0;
    min-height: 0;
}

.product-color-circle {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(224, 224, 224, 0.8);
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.product-color-circle:hover {
    transform: scale(1.15);
    border-color: #1a1a1a;
    box-shadow: 0 2px 5px rgba(0,0,0,0.25);
}

.product-color-more {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    margin-left: 2px;
    display: flex;
    align-items: center;
}

/* ========================================
   Product Gallery Section - Enhanced
   ======================================== */
.product-gallery-section {
    padding: 0px 0;
    background: transparent;
    position: relative;
    margin: 0px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.product-card:hover .product-gallery-section:not(:empty) {
    /* Gallery shows automatically when hover-content shows */
}

.product-gallery-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    max-width: 220px;
    margin: 0 auto;
}

.gallery-nav-btn {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.15);
    width: 20px;
    height: 20px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0;
    opacity: 0.85;
    z-index: 5;
}

.gallery-nav-btn:hover:not(:disabled) {
    background: #fff;
    border-color: #1a1a1a;
    opacity: 1;
    transform: scale(1.15);
}

.gallery-nav-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
    background: rgba(200, 200, 200, 0.5);
}

.gallery-nav-btn svg {
    width: 11px;
    height: 11px;
    stroke: #333;
    stroke-width: 2.5;
}

.product-gallery-container {
    display: flex !important;
    gap: 6px !important;
    align-items: center;
    flex-wrap: nowrap !important;
    overflow-x: scroll !important;
    overflow-y: visible !important;
    padding: 6px 3px;
    scroll-behavior: smooth !important;
    position: relative;
    width: 100% !important;
    max-width: 180px !important;
    height: auto;
    min-height: 80px;
    scrollbar-width: none;
    -ms-overflow-style: none;

}

/* Hide scrollbar but keep functionality */
.product-gallery-container::-webkit-scrollbar {
    display: none;
}

/* Gallery items wrapper - ensure proper display */
.product-gallery-container a {
    display: inline-flex !important;
    flex-shrink: 0 !important;
    text-decoration: none;
    line-height: 0;
    margin: 0;
    padding: 0;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;

}

.product-gallery-item {
    width: 52px !important;
    height: 70px !important;
    min-width: 52px !important;
    max-width: 52px !important;
    object-fit: cover;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.25s ease;
    flex-shrink: 0 !important;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.12);
    display: block !important;
    vertical-align: top;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
}

.product-gallery-item:hover {
    border-color: rgba(0, 0, 0, 0.5);
    transform: translateY(-2px) scale(1.08);
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    z-index: 3;
}

/* Sizes Display on Hover - Horizontal Scroll */
.product-sizes-display {
    display: flex;
    align-items: center;
    gap: 1.5px;
    justify-content: center;
    min-height: 22px;
    margin-bottom: 0;
}

/* Hide sizes display if empty to prevent white space */
.product-sizes-display:empty {
    display: none;
    margin: 0;
    min-height: 0;
}

.sizes-scroll-btn {
    background: rgba(255,255,255,0.9);
    border: 1px solid #ddd;
    width: 22px;
    height: 22px;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.sizes-scroll-btn:hover {
    background: #fff;
    border-color: #1a1a1a;
}

.sizes-scroll-btn svg {
    width: 11px;
    height: 11px;
}

.product-sizes-wrapper {
    display: flex;
    gap: 1.5px;
    overflow: hidden;
    flex: 1;
    max-width: 180px;
    justify-content: center;
}

.product-size-item {
    min-width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 600;
    color: #333;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(221, 221, 221, 0.8);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0 1.5px;
    flex-shrink: 0;
}

.product-size-item:hover {
    border-color: #1a1a1a;
    background: #fff;
    transform: scale(1.05);
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 133.33%; /* نسبة 4:3 مثل shop بالضبط */
    overflow: hidden;
    background: #ffffff;
    contain: layout style paint;
}

.product-image-primary,
.product-image-secondary {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    box-sizing: border-box;
    /* تنعيم قوي جداً للصور */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    backface-visibility: hidden;
    transform: translateZ(0) scale(1.0001);
    will-change: transform;
    filter: none;
    transition: all 0.35s ease;
}

/* Shrink image by 25% and move up on hover */
.product-card:hover .product-image-primary,
.product-card:hover .product-image-secondary {
    transform: translateZ(0) scale(0.75) translateY(-5%);
}

/* ========================================
   Smaller Desktop (1025px - 1499px)
   Progressive scaling: smaller screen = smaller cards
   ======================================== */

/* Large range: 1300px - 1499px - Fluid responsive grid */
@media (max-width: 1499px) and (min-width: 1300px) {
    .shop-container {
        max-width: min(1400px, 100%);
        padding: 0 clamp(18px, 2vw, 25px);
        grid-template-columns: clamp(230px, 18vw, 250px) 1fr;
        gap: clamp(18px, 1.8vw, 22px);
    }

    .shop-sidebar {
        padding: clamp(18px, 1.5vw, 22px) clamp(8px, 1vw, 12px);
    }

    /* Hide filter toggle in this range */
    .mobile-filter-toggle {
        display: none;
    }

    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: clamp(6px, 0.8vw, 10px);
        margin-bottom: clamp(28px, 2.5vw, 32px);
    }

    .product-card {
        font-size: clamp(13px, 1.1vw, 15px);
    }

    .product-name {
        font-size: clamp(13px, 1.1vw, 15px);
    }

    .product-price {
        font-size: clamp(14px, 1.2vw, 16px);
    }

    .product-brand {
        font-size: clamp(10px, 0.9vw, 12px);
    }

    .product-info {
        padding: 0px clamp(3px, 0.5vw, 5px) clamp(3px, 0.5vw, 5px) clamp(3px, 0.5vw, 5px);
    }
}

/* Medium range: 1200px - 1299px - Fluid responsive */
@media (max-width: 1299px) and (min-width: 1200px) {
    .shop-container {
        max-width: min(1260px, 100%);
        padding: 0 clamp(16px, 1.8vw, 22px);
        grid-template-columns: clamp(225px, 19vw, 245px) 1fr;
        gap: clamp(16px, 1.6vw, 20px);
    }

    .shop-sidebar {
        padding: clamp(16px, 1.6vw, 20px) clamp(8px, 0.9vw, 11px);
    }

    /* Hide filter toggle in this range */
    .mobile-filter-toggle {
        display: none;
    }

    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: clamp(6px, 0.7vw, 9px);
        margin-bottom: clamp(26px, 2.4vw, 30px);
    }

    .product-card {
        font-size: clamp(12px, 1.05vw, 14px);
    }

    .product-name {
        font-size: clamp(12px, 1.05vw, 14px);
    }

    .product-price {
        font-size: clamp(13px, 1.15vw, 15px);
    }

    .product-brand {
        font-size: clamp(10px, 0.85vw, 11px);
    }

    .product-info {
        padding: 0px clamp(3px, 0.4vw, 4px) clamp(3px, 0.5vw, 5px) clamp(3px, 0.4vw, 4px);
    }
}

/* Small-medium range: 1100px - 1199px */
@media (max-width: 1199px) and (min-width: 1100px) {
    /* Convert to single column layout - center products */
    .shop-container {
        max-width: 1180px;
        padding: 0 20px;
        grid-template-columns: 1fr;
        gap: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* Show filter toggle button */
    .mobile-filter-toggle {
        display: flex;
        max-width: 920px;
        width: 100%;
        margin: 0 auto 20px;
    }

    /* Sidebar as overlay */
    .shop-sidebar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 400px;
        max-width: 90%;
        height: 100vh;
        z-index: 9999;
        overflow-y: auto;
        padding: 20px;
        background: #ffffff;
        transition: right 0.3s ease;
        box-shadow: -4px 0 15px rgba(0,0,0,0.2);
    }

    .shop-sidebar.active {
        right: 0;
    }

    .sidebar-header {
        display: flex;
    }

    /* Center products content */
    .shop-content {
        max-width: 920px;
        width: 100%;
        margin: 0 auto;
    }

    .products-grid {
        gap: 12px;
        margin-bottom: 28px;
    }

    .product-card {
        font-size: 13px;
    }

    .product-name {
        font-size: 13px;
        line-height: 1.3;
    }

    .product-price {
        font-size: 14px;
    }

    .product-brand {
        font-size: 11px;
    }

    .product-info {
        padding: 0px 4px 8px 4px;
    }

    .size-option {
        min-width: 36px;
        height: 32px;
        font-size: 12px;
    }

    .add-to-cart-btn {
        padding: 11px;
        font-size: 13px;
    }
}

/* Smallest range: 1025px - 1099px */
@media (max-width: 1099px) and (min-width: 1025px) {
    /* Convert to single column layout - center products */
    .shop-container {
        max-width: 1080px;
        padding: 0 18px;
        grid-template-columns: 1fr;
        gap: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* Show filter toggle button */
    .mobile-filter-toggle {
        display: flex;
        max-width: 860px;
        width: 100%;
        margin: 0 auto 20px;
    }

    /* Sidebar as overlay */
    .shop-sidebar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 380px;
        max-width: 85%;
        height: 100vh;
        z-index: 9999;
        overflow-y: auto;
        padding: 18px;
        background: #ffffff;
        transition: right 0.3s ease;
        box-shadow: -4px 0 15px rgba(0,0,0,0.2);
    }

    .shop-sidebar.active {
        right: 0;
    }

    .sidebar-header {
        display: flex;
    }

    /* Center products content */
    .shop-content {
        max-width: 860px;
        width: 100%;
        margin: 0 auto;
    }

    .shop-header {
        margin-bottom: 18px;
        padding: 14px 0;
    }

    .products-grid {
        gap: 10px;
        margin-bottom: 26px;
    }

    .products-grid[data-view="grid-4"] {
        gap: 8px;
    }

    .product-card {
        font-size: 12px;
    }

    .product-name {
        font-size: 12px;
        line-height: 1.2;
    }

    .product-price {
        font-size: 13px;
    }

    .product-brand {
        font-size: 10px;
    }

    .product-info {
        padding: 0px 3px 3px 3px;
    }

    .size-option {
        min-width: 34px;
        height: 30px;
        font-size: 11px;
    }

    .add-to-cart-btn {
        padding: 10px;
        font-size: 12px;
    }

    .wishlist-btn {
        width: 36px;
        height: 36px;
    }

    .badge.new-season {
        font-size: 10px;
        padding: 5px 10px;
    }
}

/* Fix image rendering for all ranges */
@media (max-width: 1499px) and (min-width: 1025px) {
    .product-image-primary,
    .product-image-secondary {
        object-fit: cover;
        object-position: center;
    }
}

.product-image-primary {
    opacity: 1;
    z-index: 1;
}

.product-image-secondary {
    opacity: 0;
    z-index: 2;
}

.product-card:hover .product-image-secondary {
    opacity: 1;
}

.wishlist-btn {
    position: absolute;
    top: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.9);
    border: none;

    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}

/* RTL: wishlist button on right (opposite of discount badge) */
[dir="rtl"] .wishlist-btn {
    right: 15px;
    left: auto;
}

/* LTR: wishlist button on left (opposite of discount badge) */
[dir="ltr"] .wishlist-btn {
    left: 15px;
    right: auto;
}

.wishlist-btn:hover {
    background: #fff;
    transform: scale(1.1);
}

.wishlist-btn.active svg {
    fill: #e53935;
    stroke: #e53935;
}

.badge.new-season {
    position: absolute;
    bottom: 15px;
    background: #ffffff;
    color: #000000;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    border-radius: 4px;
    z-index: 3;
}

/* RTL: new-season badge on left */
[dir="rtl"] .badge.new-season {
    left: 15px;
    right: auto;
}

/* LTR: new-season badge on right (same side as sale badge) */
[dir="ltr"] .badge.new-season {
    right: 15px;
    left: auto;
}

.badge.discount {
    position: absolute;
    bottom: 15px;
    background: #dc2626;
    color: #fff;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    border-radius: 4px;
    z-index: 3;
    letter-spacing: 0.5px;
}

/* RTL: discount badge on left */
[dir="rtl"] .badge.discount {
    left: 15px;
    right: auto;
}

/* LTR: discount badge on right */
[dir="ltr"] .badge.discount {
    right: 15px;
    left: auto;
}

/* Discount Badge with Image */
.discount-badge-wrapper {
    position: absolute;
    top: 10px;
    z-index: 3;
    width: 40px;
    height: 65px;
}

/* RTL: discount badge on left */
[dir="rtl"] .discount-badge-wrapper {
    left: 10px;
    right: auto;
}

/* LTR: discount badge on right */
[dir="ltr"] .discount-badge-wrapper {
    right: 10px;
    left: auto;
}

.discount-badge-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.discount-badge-text {
    position: absolute;
    top: 32%;
    left: 1%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    pointer-events: none;
}

.discount-text-ar {
    font-size: 8px;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 1px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.discount-text-en {
    font-size: 6px;
    font-weight: 600;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 1px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    text-transform: uppercase;
}

/* New unified discount text class */
.discount-text {
    font-size: 8px;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 1px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

[dir="ltr"] .discount-text {
    font-size: 6px;
    text-transform: uppercase;
}

.discount-percent {
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Responsive Discount Badge */
@media (max-width: 1024px) {
    .discount-badge-wrapper {
        width: 38px;
        height: 60px;
        top: 8px;
    }

    /* RTL: discount badge on left */
    [dir="rtl"] .discount-badge-wrapper {
        left: 8px;
        right: auto;
    }

    /* LTR: discount badge on right */
    [dir="ltr"] .discount-badge-wrapper {
        right: 8px;
        left: auto;
    }

    .discount-badge-text {
        top: 31%;
        left: 0%;
    }

    .discount-text-ar {
        font-size: 7px;
    }

    .discount-text-en {
        font-size: 5px;
    }

    .discount-text {
        font-size: 6px;
    }

    .discount-percent {
        font-size: 11px;
    }
}

@media (max-width: 768px) {
    .discount-badge-wrapper {
        width: 35px;
        height: 55px;
        top: 5px;
    }

    /* RTL: discount badge on left */
    [dir="rtl"] .discount-badge-wrapper {
        left: 5px;
        right: auto;
    }

    /* LTR: discount badge on right */
    [dir="ltr"] .discount-badge-wrapper {
        right: 5px;
        left: auto;
    }

    .discount-badge-text {
        top: 30%;
        left: -1%;
    }

    .discount-text-ar {
        font-size: 6px;
    }

    .discount-text-en {
        font-size: 5px;
    }

    .discount-text {
        font-size: 5px;
    }

    .discount-percent {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .discount-badge-wrapper {
        width: 32px;
        height: 50px;
        top: 5px;
    }

    /* RTL: discount badge on left */
    [dir="rtl"] .discount-badge-wrapper {
        left: 5px;
        right: auto;
    }

    /* LTR: discount badge on right */
    [dir="ltr"] .discount-badge-wrapper {
        right: 5px;
        left: auto;
    }

    .discount-badge-text {
        top: 40%;
        left: 1%;
    }

    .discount-text-ar {
        font-size: 6px;
    }

    .discount-text-en {
        font-size: 4px;
    }

    .discount-text {
        font-size: 5px;
    }

    .discount-percent {
        font-size: 9px;
    }
}

.product-info {
    padding: 0px 5px 1.5px 5px;
    display: flex;
    flex-direction: column;
    flex: 1;
    transition: transform 0.35s ease;
    position: relative;
}

.product-card:hover .product-info {
    /* Move content up slightly to prevent card growth */
    transform: translateY(-8px);
}

.product-brand {
    font-size: 12px;
    color: #666;
    margin-bottom: 1.5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: opacity 0.3s ease, max-height 0.3s ease;
    opacity: 1;
    max-height: 20px;
    overflow: hidden;
}

.product-card:hover .product-brand {
    opacity: 0;
    max-height: 0;
    margin-bottom: 0;
}

.product-name {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 2.5px;
    margin-top: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    display: block;
    min-height: 21px;
    transition: margin-top 0.3s ease;
}

.product-card:hover .product-name {
    /* Reduce top margin on hover */
    margin-top: 2px;
}

.product-price {
    font-size: 16px;
    font-weight: 700;
    color: #2d1300;
    margin-bottom: 1.5px;
    min-height: 24px;
    margin-top: 0px;
}

/* Legacy size selector - hidden */
.size-selector {
    display: none !important;
}

/* Add to Cart Button - Always visible at bottom */
.add-to-cart-btn {
    width: 100%;
    padding: 12px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 1;
    visibility: visible;
    position: relative;
    z-index: 1;
}

.add-to-cart-btn:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.add-to-cart-btn svg {
    width: 18px;
    height: 18px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 30px 0;
}

/* Pagination Skeleton */
.pagination-skeleton {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.skeleton-pagination-btn {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.pagination-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #ddd;
    background: #ffffff;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
    border-color: #1a1a1a;
    background: #f5f5f5;
    color: #1a1a1a;
    font-weight: 600;
}

.pagination-btn.active {
    background: #1a1a1a !important;
    color: #fff !important;
    border-color: #1a1a1a !important;
    font-weight: 600;
}

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

.pagination-dots {
    padding: 0 5px;
    color: #666;
}

/* ========================================
   Tablet (768px - 1024px)
   ======================================== */
@media (max-width: 1024px) {
    .shop-container {
        grid-template-columns: 1fr;
        padding: 0 10px;
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    /* إخفاء العناصر الثلاثة في التابلت */
    .view-controls {
        display: none !important;
    }

    /* Mobile Filter Toggle */
    .mobile-filter-toggle {
        display: flex;
    }

    /* Mobile View Toggle - Show on tablet */
    .mobile-view-toggle {
        display: flex;
    }

    /* Sidebar as Mobile Overlay for Tablet */
    .shop-sidebar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 400px;
        height: 100vh;
        z-index: 9999;
        overflow-y: auto;
        padding: 20px;

        background: #ffffff;
        transition: right 0.3s ease;
        box-shadow: -4px 0 15px rgba(0,0,0,0.2);
    }

    .shop-sidebar.active {
        right: 0;
    }

    .products-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
        width: 100%;
        padding: 0;
        margin: 0;
        box-sizing: border-box;
    }

    /* ضمان عدم وجود أي مساحات بيضاء إضافية */
    .products-grid * {
        box-sizing: border-box !important;
    }

    /* Hover content adjustments for tablet */
    .product-card:hover .product-image-primary,
    .product-card:hover .product-image-secondary {
        transform: translateZ(0) scale(0.87) translateY(-6%);
    }

    .product-card:hover .product-info {
        transform: translateY(-12px);
    }

    .product-hover-content {
        padding: 7px 5px;
    }

    .product-card:hover .product-hover-content {
        max-height: 280px;
        padding: 10px 6px;
    }

    /* Gallery adjustments for tablet */
    .product-gallery-section {
        padding: 5px 0;
        margin: 5px 0;
    }

    .product-gallery-item {
        width: 55px;
        height: 68px;
    }

    .product-gallery-container {
        width: 185px;
        max-width: 185px;
    }

    .product-colors-display {
        min-height: 20px;
        margin-bottom: 4px;
    }

    .product-color-circle {
        width: 18px;
        height: 18px;
    }

    .product-sizes-display {
        min-height: 24px;
        margin-bottom: 0;
    }

    .product-size-item {
        min-width: 22px;
        height: 22px;
        font-size: 9px;
        padding: 0 4px;
    }

    /* Two products view - Tablet */
    .products-grid[data-view="grid-2"] .product-card,
    .products-grid:not([data-view="list"]) .product-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        background: transparent;
        overflow: visible;
    }

    .product-card .product-image-wrapper {
        position: relative !important;
        width: 100% !important;
        height: 0 !important;
        padding-top: 133.33% !important; /* نسبة 4:3 مثل wishlist بالضبط */
        padding-bottom: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
        background: #ffffff;
        box-sizing: border-box !important;
        contain: layout style paint !important; /* نفس wishlist */
    }

    .product-card .product-image-primary,
    .product-card .product-image-secondary {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        /* تنعيم قوي جداً للهواتف - أقوى إعدادات ممكنة */
        image-rendering: -webkit-optimize-contrast !important;
        image-rendering: crisp-edges !important;
        -webkit-font-smoothing: antialiased !important;
        -moz-osx-font-smoothing: grayscale !important;
        backface-visibility: hidden !important;
        transform: translateZ(0) scale(1.0001) !important;
        will-change: transform !important;
        /* إزالة الضبابية من الصور */
        filter: none !important;
        -webkit-backface-visibility: hidden !important;
        -webkit-perspective: 1000 !important;
        perspective: 1000 !important;
    }

    .product-card .product-info {
        padding: 10px 8px !important;
        width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    .product-card .product-name {
        font-size: 13px !important;
        line-height: 1.3;
        margin: 4px 0 !important;
    }

    .product-card .product-price {
        font-size: 14px !important;
        margin: 4px 0 !important;
    }

    .product-card .product-brand {
        font-size: 11px !important;
        margin: 4px 0 !important;
    }

    .product-card .add-to-cart-btn {
        padding: 10px !important;
        font-size: 12px !important;
        margin-top: 8px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .product-card .badge.new-season {
        position: absolute !important;
        bottom: 10px !important;
        left: 10px !important;
        font-size: 8px !important;
        padding: 4px 6px !important;
        margin: 0 !important;
    }

    .product-card .wishlist-btn {
        position: absolute !important;
        width: 32px !important;
        height: 32px !important;
        top: 10px !important;
        margin: 0 !important;
    }

    /* LTR: wishlist on left in tablet */
    [dir="ltr"] .product-card .wishlist-btn {
        left: 10px !important;
        right: auto !important;
    }

    /* RTL: wishlist on right in tablet */
    [dir="rtl"] .product-card .wishlist-btn {
        right: 10px !important;
        left: auto !important;
    }

    /* Single product view - Tablet */
    .products-grid[data-view="list"] {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    .products-grid[data-view="list"] .product-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    .products-grid[data-view="list"] .product-image-wrapper {
        width: 100% !important;
        padding-top: 133.33% !important;
        height: 0 !important;
        position: relative !important;
        overflow: hidden !important;
    }

    .products-grid[data-view="list"] .product-image-primary,
    .products-grid[data-view="list"] .product-image-secondary {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .shop-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .shop-controls {
        width: 100%;
        justify-content: space-between;
    }
}

/* ========================================
   iPad and Tablet Landscape (768px - 1024px)
   ======================================== */
@media (min-width: 768px) and (max-width: 1024px) {
    /* تأكيد إضافي لأجهزة iPad */
    .product-card {
        display: flex;
        flex-direction: column;
        width: 100% !important;
    }

    .product-card .product-image-wrapper {
        flex-shrink: 0;
        width: 100% !important;
    }

    .product-card .product-image-primary,
    .product-card .product-image-secondary {
        display: block !important;
    }
}

/* ========================================
   Mobile (max 767px)
   ======================================== */
@media (max-width: 767px) {
    .shop-page {
        padding: 10px 0 60px;
        background: #ffffff;
        overflow-x: hidden;
        width: 100%;
    }

    .shop-container {
        grid-template-columns: 1fr;
        padding: 0 10px;
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    /* Mobile Filter Toggle */
    .mobile-filter-toggle {
        display: flex;
    }

    /* Mobile View Toggle - Show on mobile */
    .mobile-view-toggle {
        display: flex;
    }

    /* Sidebar as Mobile Overlay */
    .shop-sidebar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 350px;
        height: 100vh;
        z-index: 9999;
        overflow-y: auto;
        padding: 20px;

        background: #ffffff;
        transition: right 0.3s ease;
        box-shadow: -4px 0 15px rgba(0,0,0,0.2);
    }

    .shop-sidebar.active {
        right: 0;
    }

    .shop-sidebar::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;

        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
        z-index: -2;
    }

    .shop-sidebar.active::before {
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar-header {
        display: flex;
    }

    /* Products Grid Mobile */
    .products-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
        padding: 0 !important;
        margin: 0 !important;
        width: 100%;
        box-sizing: border-box;
        overflow: visible;
    }

    .products-grid[data-view="grid-2"],
    .products-grid[data-view="grid-3"],
    .products-grid[data-view="grid-4"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    /* Hover content adjustments for mobile */
    .product-card:hover .product-image-primary,
    .product-card:hover .product-image-secondary {
        transform: translateZ(0) scale(0.89) translateY(-5%);
    }

    .product-card:hover .product-info {
        transform: translateY(-10px);
    }

    .product-hover-content {
        padding: 6px 4px;
    }

    .product-card:hover .product-hover-content {
        max-height: 250px;
        padding: 8px 5px;
    }

    /* Gallery adjustments for mobile */
    .product-gallery-section {
        padding: 4px 0;
        margin: 4px 0;
    }

    .product-gallery-item {
        width: 50px;
        height: 62px;
    }

    .product-gallery-container {
        width: 170px;
        max-width: 170px;
    }

    .product-colors-display {
        min-height: 18px;
        margin-bottom: 4px;
    }

    .product-color-circle {
        width: 17px;
        height: 17px;
    }

    .product-sizes-display {
        min-height: 22px;
        margin-bottom: 0;
    }

    .product-size-item {
        min-width: 20px;
        height: 20px;
        font-size: 8px;
        padding: 0 3px;
    }

    .product-sizes-wrapper {
        max-width: 125px;
    }

    /* Single product view - full width */
    .products-grid[data-view="list"] {
        grid-template-columns: 1fr !important;
        gap: 20px;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .products-grid[data-view="list"] .product-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    .products-grid[data-view="list"] .product-image-wrapper {
        padding-top: 133.33% !important;
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    .products-grid[data-view="list"] .product-image-primary,
    .products-grid[data-view="list"] .product-image-secondary {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
    }

    .products-grid[data-view="list"] .product-info {
        padding: 15px 12px;
        width: 100%;
    }

    .products-grid[data-view="list"] .product-name {
        font-size: 15px;
        line-height: 1.4;
    }

    .products-grid[data-view="list"] .product-price {
        font-size: 16px;
    }

    .products-grid[data-view="list"] .product-brand {
        font-size: 12px;
    }

    /* Two products side by side - Fixed width */
    .products-grid:not([data-view="list"]) .product-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        flex-shrink: 0;
        box-sizing: border-box;
        overflow: visible;
    }

    .product-image-wrapper {
        background: #ffffff;
        padding-top: 140% !important;
        width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box;
    }

    .product-info {
        padding: 8px 6px !important;
        width: 100%;
        margin: 0;
        box-sizing: border-box;
    }

    .product-name {
        font-size: 10px !important;
        line-height: 1.2;
        margin: 3px 0;
    }

    .product-price {
        font-size: 11px !important;
        margin: 3px 0 5px 0;
    }

    .product-brand {
        font-size: 9px !important;
        margin: 3px 0;
    }

    .add-to-cart-btn {
        padding: 8px;
        font-size: 10px;
        margin-top: 5px;
        width: 100%;
    }

    .badge.new-season {
        font-size: 7px;
        padding: 3px 5px;
    }

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

    /* LTR: wishlist on left in mobile */
    [dir="ltr"] .wishlist-btn {
        left: 8px;
        right: auto;
    }

    /* RTL: wishlist on right in mobile */
    [dir="rtl"] .wishlist-btn {
        right: 8px;
        left: auto;
    }

    .wishlist-btn svg {
        width: 14px;
        height: 14px;
    }

    /* Shop Header Mobile */
    .shop-header {
        padding: 12px;
        margin-bottom: 20px;
    }

    .shop-results h1 {
        font-size: 20px;
    }

    .results-count {
        font-size: 13px;
    }

    .shop-controls {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .sort-select,
    .items-per-page {
        width: 100%;
    }

    /* إخفاء العناصر الثلاثة في الهاتف */
    .view-controls {
        display: none !important;
    }

    /* Pagination Mobile */
    .pagination {
        gap: 6px;
        padding: 20px 0;
    }

    .pagination-btn {
        min-width: 35px;
        height: 35px;
        font-size: 13px;
    }

    /* Filter Sections Mobile */
    .size-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .shoe-size-scroll,
    .color-scroll {
        max-height: 200px;
    }
}

/* Medium Mobile (481px - 767px) - Two products side by side */
@media (min-width: 481px) and (max-width: 767px) {
    .shop-container {
        padding: 0 8px;
        width: 100%;
        box-sizing: border-box;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
        padding: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .products-grid[data-view="grid-2"],
    .products-grid[data-view="grid-3"],
    .products-grid[data-view="grid-4"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
    }

    /* Single product view */
    .products-grid[data-view="list"] {
        grid-template-columns: 1fr !important;
        gap: 20px;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .products-grid[data-view="list"] .product-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    .products-grid[data-view="list"] .product-image-wrapper {
        padding-top: 133.33% !important;
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    .products-grid[data-view="list"] .product-image-primary,
    .products-grid[data-view="list"] .product-image-secondary {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
    }

    .products-grid[data-view="list"] .product-info {
        padding: 15px 12px;
        width: 100%;
    }

    .products-grid[data-view="list"] .product-name {
        font-size: 15px;
        line-height: 1.4;
    }

    .products-grid[data-view="list"] .product-price {
        font-size: 16px;
    }

    .product-card {
        width: 100%;
        max-width: none;
        box-sizing: border-box;
        overflow: hidden;
    }

    .product-image-wrapper {
        background: #ffffff;
        padding-top: 140%;
        width: 100%;
        box-sizing: border-box;
    }

    .product-info {
        padding: 6px 4px;
        width: 100%;
        box-sizing: border-box;
    }

    .product-name {
        font-size: 10px;
        line-height: 1.2;
    }

    .product-price {
        font-size: 11px;
    }
}

/* Very Small Mobile (max 480px) - Two products default, single on list view */
@media (max-width: 480px) {
    .shop-container {
        padding: 0 6px;
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px;
        padding: 0;
        width: 100%;
        box-sizing: border-box;
        overflow: visible;
    }

    .products-grid[data-view="grid-2"],
    .products-grid[data-view="grid-3"],
    .products-grid[data-view="grid-4"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px;
    }

    /* Hover content for very small screens */
    .product-card:hover .product-image-primary,
    .product-card:hover .product-image-secondary {
        transform: translateZ(0) scale(0.91) translateY(-4%);
    }

    .product-card:hover .product-info {
        transform: translateY(-8px);
    }

    .product-hover-content {
        padding: 5px 3px;
    }

    .product-card:hover .product-hover-content {
        max-height: 220px;
        padding: 7px 4px;
    }

    /* Gallery adjustments for small mobile */
    .product-gallery-section {
        padding: 4px 0;
        margin: 4px 0;
    }

    .product-gallery-item {
        width: 45px;
        height: 56px;
    }

    .product-gallery-container {
        width: 155px;
        max-width: 155px;
    }

    .product-colors-display {
        min-height: 16px;
        margin-bottom: 3px;
    }

    .product-color-circle {
        width: 15px;
        height: 15px;
    }

    .product-sizes-display {
        min-height: 20px;
        margin-bottom: 0;
    }

    .product-size-item {
        min-width: 18px;
        height: 18px;
        font-size: 7px;
        padding: 0 2px;
    }

    .product-sizes-wrapper {
        max-width: 95px;
    }

    /* Single product view - full width no gaps */
    .products-grid[data-view="list"] {
        grid-template-columns: 1fr !important;
        gap: 20px;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .products-grid[data-view="list"] .product-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    .products-grid[data-view="list"] .product-image-wrapper {
        padding-top: 133.33% !important;
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    .products-grid[data-view="list"] .product-image-primary,
    .products-grid[data-view="list"] .product-image-secondary {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
    }

    .products-grid[data-view="list"] .product-info {
        padding: 15px 12px;
        width: 100%;
    }

    .products-grid[data-view="list"] .product-name {
        font-size: 15px;
        line-height: 1.4;
    }

    .products-grid[data-view="list"] .product-price {
        font-size: 16px;
    }

    .products-grid[data-view="list"] .product-brand {
        font-size: 12px;
    }

    .product-card {
        max-width: 100%;
        width: 100%;
        margin: 0;
        box-sizing: border-box;
        overflow: visible;
    }

    .product-image-wrapper {
        padding-top: 140%;
        background: #ffffff;
        width: 100%;
        box-sizing: border-box;
    }

    .product-info {
        padding: 6px 4px;
        width: 100%;
        box-sizing: border-box;
    }

    .product-name {
        font-size: 9px;
        line-height: 1.2;
    }

    .product-price {
        font-size: 10px;
        margin-bottom: 4px;
    }

    .shop-sidebar {
        width: 90%;
    }

    .add-to-cart-btn {
        padding: 7px;
        font-size: 9px;
        margin-top: 5px;
    }

    .add-to-cart-btn svg {
        width: 14px;
        height: 14px;
    }

    .badge.new-season {
        font-size: 6px;
        padding: 2px 4px;
        max-width: 63px;
    }

    .wishlist-btn {
        width: 26px;
        height: 26px;
        top: 6px;
    }

    /* LTR: wishlist on left in small mobile */
    [dir="ltr"] .wishlist-btn {
        left: 6px;
        right: auto;
    }

    /* RTL: wishlist on right in small mobile */
    [dir="rtl"] .wishlist-btn {
        right: 6px;
        left: auto;
    }

    .wishlist-btn svg {
        width: 12px;
        height: 12px;
    }
}

/* ========================================
   Categories Filter Section
   ======================================== */
.categories-list-wrapper {
    margin-top: 12px;
}

.categories-checkbox-list {
    max-height: 250px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
}

[dir="ltr"] .categories-checkbox-list {
    padding-right: 0;
    padding-left: 5px;
}

.categories-checkbox-list::-webkit-scrollbar {
    width: 4px;
}

.categories-checkbox-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.categories-checkbox-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.categories-checkbox-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.category-checkbox-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-checkbox-item:hover {
    background: #f8f8f8;
    padding-right: 5px;
    padding-left: 5px;
    margin-right: -5px;
    margin-left: -5px;
    border-radius: 4px;
}

.category-checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    flex-shrink: 0;
}

[dir="ltr"] .category-checkbox-item input[type="checkbox"] {
    margin-right: 0;
    margin-left: 10px;
}

.category-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    cursor: pointer;
    font-size: 14px;
}

.category-text {
    color: #1a1a1a;
    font-weight: 400;
}

.category-count {
    color: #999;
    font-size: 13px;
    margin-left: 5px;
}

[dir="ltr"] .category-count {
    margin-left: 0;
    margin-right: 5px;
}

.category-checkbox-item input[type="checkbox"]:checked ~ .category-label .category-text {
    font-weight: 600;
    color: #000;
}

.show-more-categories {
    width: 100%;
    padding: 10px;
    margin-top: 12px;
    background: transparent;
    border: none;
    color: #c19b76;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    text-transform: uppercase;
    text-decoration: underline;
    transition: all 0.3s ease;
    text-align: center;
}

.show-more-categories:hover {
    color: #a07d5c;
}

.show-more-categories.loading {
    opacity: 0.5;
    cursor: wait;
}

/* Custom Checkbox Styling for Categories */
.custom-checkbox {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    min-height: 18px;
    margin-left: 10px;
}

[dir="ltr"] .custom-checkbox {
    margin-left: 0;
    margin-right: 10px;
}

.custom-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    margin: 0;
}

.checkbox-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 3px;
    background: white;
    transition: all 0.2s ease;
    pointer-events: none;
}

.checkbox-mark svg {
    width: 12px;
    height: 12px;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
    stroke: white;
}

.custom-checkbox input[type="checkbox"]:checked ~ .checkbox-mark {
    background: #2d1300;
    border-color: #2d1300;
}

.custom-checkbox input[type="checkbox"]:checked ~ .checkbox-mark svg {
    opacity: 1;
    transform: scale(1);
}

.custom-checkbox input[type="checkbox"]:hover ~ .checkbox-mark {
    border-color: #2d1300;
}

.custom-checkbox input[type="checkbox"]:focus ~ .checkbox-mark {
    box-shadow: 0 0 0 3px rgba(45, 19, 0, 0.1);
}

.category-checkbox-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.category-checkbox-item:hover {
    background: #f9fafb;
}

.category-label {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: space-between;
}

/* Clear Filters Button - Icon Only */
.clear-filters-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 74px;
    height: 37px;
    padding: 0;
    background: #2d1300;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 12px;
    position: relative;
}

[dir="ltr"] .clear-filters-btn {
    margin-left: 0;
    margin-right: 12px;
}

.clear-filters-btn:hover {
    background: #1a0c00;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 4px 16px rgba(45, 19, 0, 0.4);
}

.clear-filters-btn svg {
    width: 22px;
    height: 22px;
}

.clear-filters-btn:active {
    transform: scale(0.95);
}

.clear-filters-btn::after {
    content: attr(title);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(45, 19, 0, 0.95);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 100;
}

.clear-filters-btn:hover::after {
    opacity: 1;
}

/* ========================================
   Product Skeleton Loading
   ======================================== */
.products-grid.skeleton-loading {
    pointer-events: none;
}

.skeleton-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    animation: pulse 1.5s ease-in-out infinite;
}

.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 0%,
        #e0e0e0 50%,
        #f0f0f0 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.skeleton-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    margin-bottom: 15px;
}

.skeleton-content {
    padding: 0 15px 15px;
}

.skeleton-text {
    height: 16px;
    margin-bottom: 10px;
    width: 80%;
}

.skeleton-text-small {
    height: 14px;
    margin-bottom: 10px;
    width: 60%;
}

.skeleton-price {
    height: 20px;
    margin-bottom: 15px;
    width: 40%;
}

.skeleton-button {
    height: 40px;
    width: 100%;
    border-radius: 4px;
}

/* Smooth transitions for products grid */
.products-grid {
    transition: opacity 0.3s ease;
}
/* ========================================
   Shop Sidebar Skeleton Loading Styles
   ======================================== */

/* Sidebar skeleton loading state */
.shop-sidebar.skeleton-loading {
    pointer-events: none;
}

/* Skeleton base styles for sidebar */
.shop-sidebar.skeleton-loading .skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

/* Skeleton title (h2 in header) */
.skeleton-title {
    height: 28px;
    width: 120px;
    margin: 0;
}

/* Skeleton filter title */
.skeleton-filter-title {
    height: 20px;
    width: 140px;
    margin-bottom: 15px;
}

/* Skeleton size grid */
.skeleton-size-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}

.skeleton-size-box {
    height: 45px;
    border-radius: 4px;
}

/* Skeleton categories list */
.skeleton-categories-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skeleton-category-item {
    height: 24px;
    border-radius: 4px;
}

/* Skeleton shoe size section */
.skeleton-shoe-size {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.skeleton-dropdown {
    height: 45px;
    border-radius: 4px;
}

/* Skeleton colors */
.skeleton-colors {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skeleton-color-item {
    height: 36px;
    border-radius: 4px;
}

/* Skeleton price range */
.skeleton-price-range {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.skeleton-price-box {
    height: 80px;
    border-radius: 4px;
}

/* Skeleton apply button */
.skeleton-apply-btn {
    height: 50px;
    border-radius: 25px;
}

/* Sidebar error state */
.sidebar-error {
    padding: 40px 20px;
    text-align: center;
}

/* Smooth transition when sidebar loads */
.shop-sidebar {
    transition: opacity 0.3s ease;
}

/* ========================================
   Product Hover Content Skeleton Loading
   ======================================== */

/* Skeleton for hover content */
.product-hover-skeleton .skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

/* Skeleton hover sections */
.skeleton-hover-section {
    padding: 8px 0;
}

/* Skeleton color circles */
.skeleton-color-circles {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

.skeleton-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

/* Skeleton gallery */
.skeleton-gallery {
    display: flex;
    justify-content: center;
    padding: 10px 0;
}

.skeleton-gallery-item {
    width: 80px;
    height: 80px;
    border-radius: 4px;
}

/* Skeleton sizes */
.skeleton-sizes {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 8px 0;
}

.skeleton-size {
    width: 35px;
    height: 28px;
    border-radius: 4px;
}

/* Hover content smooth transition */
.product-hover-content {
    transition: opacity 0.2s ease;
}

/* Ensure skeleton is visible during loading */
.product-hover-skeleton {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px 10px;
}
