/* ============================================
   Mobile-First Base Styles
   ============================================ */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --accent-color: #28a745;
    --background-color: #f8f9fa;
    --text-color: #333;
    --border-color: #dee2e6;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --border-radius: clamp(0.5rem, 1vw, 0.75rem);
    --transition: all 0.3s ease;

    /* Safe Area Insets للهواتف مع Notch */
    --safe-area-inset-top: env(safe-area-inset-top, 0px);
    --safe-area-inset-right: env(safe-area-inset-right, 0px);
    --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-inset-left: env(safe-area-inset-left, 0px);

    /* Fluid Typography Base */
    --font-size-base: clamp(0.875rem, 2vw, 1rem);
    --font-size-small: clamp(0.75rem, 1.5vw, 0.875rem);
    --font-size-large: clamp(1.125rem, 2.5vw, 1.25rem);
    --font-size-xl: clamp(1.5rem, 4vw, 2rem);
    --font-size-xxl: clamp(2rem, 5vw, 3rem);

    /* Minimum Touch Target Size */
    --touch-target-min: 2.75rem;
    /* 44px */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    /* Base font size */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    direction: rtl;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    /* Safe Area Support */
    padding-top: var(--safe-area-inset-top);
    padding-right: var(--safe-area-inset-right);
    padding-bottom: var(--safe-area-inset-bottom);
    padding-left: var(--safe-area-inset-left);
}

/* Container - Mobile First */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(0.75rem, 3vw, 1.25rem);
}

/* ============================================
   Header Styles - Mobile First
   ============================================ */
.main-header {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: clamp(0.75rem, 2vw, 1rem) 0;
    padding-top: calc(clamp(0.75rem, 2vw, 1rem) + var(--safe-area-inset-top));
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: clamp(0.5rem, 2vw, 1rem);
}

.logo {
    display: flex;
    align-items: center;
    gap: clamp(0.5rem, 2vw, 1rem);
    flex: 1;
    min-width: 0;
}

.logo img {
    width: auto;
    height: clamp(2.5rem, 8vw, 3.125rem);
    max-width: min(200px, 50vw);
    border-radius: var(--border-radius);
    object-fit: contain;
}

.logo h1 {
    font-size: clamp(1rem, 4vw, 1.5rem);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.main-nav {
    display: none;
    /* مخفي على الموبايل */
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: clamp(0.75rem, 3vw, 2rem);
}

.main-nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: clamp(0.5rem, 1.5vw, 0.75rem) clamp(0.75rem, 2vw, 1rem);
    border-radius: var(--border-radius);
    min-height: var(--touch-target-min);
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-nav a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.cart-icon {
    position: relative;
}

.cart-link {
    color: white;
    font-size: clamp(1.25rem, 4vw, 1.5rem);
    text-decoration: none;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: var(--touch-target-min);
    min-height: var(--touch-target-min);
    border-radius: 50%;
    transition: var(--transition);
}

.cart-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.cart-count {
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50%;
    width: clamp(1.25rem, 4vw, 1.5rem);
    height: clamp(1.25rem, 4vw, 1.5rem);
    min-width: 1.25rem;
    min-height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(0.7rem, 2vw, 0.8rem);
    font-weight: bold;
}

/* ============================================
   Hero Section - Mobile First
   ============================================ */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: clamp(2rem, 8vw, 4rem) 0;
    text-align: center;
    margin-bottom: clamp(1.5rem, 6vw, 3rem);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* ============================================
   Banner Slider - Mobile First
   ============================================ */
.banner-slider {
    position: relative;
    width: 100%;
    height: clamp(200px, 50vw, 400px);
    min-height: 200px;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-slide.active {
    opacity: 1;
}

/* Clickable Banner */
.banner-slide[style*="cursor: pointer"] {
    transition: transform 0.3s ease, opacity 0.8s ease-in-out;
}

.banner-slide[style*="cursor: pointer"]:hover {
    transform: scale(1.02);
}

.banner-slide[style*="cursor: pointer"]:active {
    transform: scale(0.98);
}

.banner-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

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

.banner-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: clamp(1rem, 4vw, 2rem);
    background: transparent;
    border-radius: var(--border-radius);
    max-width: min(600px, 90vw);
    margin: 0 auto;
}

.banner-content h2 {
    font-size: clamp(1.5rem, 6vw, 2.5rem);
    margin-bottom: clamp(0.5rem, 2vw, 1rem);
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    color: white;
    line-height: 1.2;
}

.banner-content p {
    font-size: clamp(0.9rem, 3vw, 1.1rem);
    opacity: 0.95;
    line-height: 1.6;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    color: white;
}

/* Banner Click Hint */
.banner-click-hint {
    margin-top: 0.75rem;
    padding: 0.25rem 0.625rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    font-size: 0.7rem;
    opacity: 0.9;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: inline-block;
}

.banner-click-hint i {
    margin-left: 0.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Banner Controls */
.banner-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    z-index: 3;
    pointer-events: none;
}

.banner-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: var(--touch-target-min);
    height: var(--touch-target-min);
    min-width: var(--touch-target-min);
    min-height: var(--touch-target-min);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.banner-nav.prev {
    left: 20px;
}

.banner-nav.next {
    right: 20px;
}

.banner-nav i {
    font-size: 1.2rem;
}

/* Banner Indicators */
.banner-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.banner-indicator {
    width: clamp(0.375rem, 1vw, 0.5rem);
    height: clamp(0.375rem, 1vw, 0.5rem);
    min-width: clamp(0.375rem, 1vw, 0.5rem);
    min-height: clamp(0.375rem, 1vw, 0.5rem);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-indicator:hover {
    background: rgba(255, 255, 255, 0.8);
}

.banner-indicator.active {
    background: white;
    transform: scale(1.3);
    width: clamp(0.5rem, 1.2vw, 0.625rem);
    height: clamp(0.5rem, 1.2vw, 0.625rem);
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero-content p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Filters Section */
.filters-section {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.search-box {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.search-box input {
    flex: 1;
    padding: clamp(0.75rem, 2vw, 1rem);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: var(--font-size-base);
    transition: var(--transition);
    background: white;
    min-height: var(--touch-target-min);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    transform: translateY(-1px);
}

.search-box button {
    padding: clamp(0.75rem, 2vw, 1rem) clamp(1rem, 4vw, 2rem);
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: var(--touch-target-min);
    min-height: var(--touch-target-min);
}

.search-box button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.search-box button:active {
    transform: translateY(0);
}

/* Product View Toggle Buttons */
.product-view-toggle {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    justify-content: center;
    background: #f9fafb;
    padding: 0.5rem;
    border-radius: 12px;
}

.product-view-btn {
    flex: 1;
    padding: 0.75rem 1.25rem;
    border: 2px solid transparent;
    background: transparent;
    color: #6b7280;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-color);
    min-height: var(--touch-target-min);
    flex: 1;
    max-width: 150px;
}

.product-view-btn.active {
    background: linear-gradient(135deg, var(--primary-color, #007bff), var(--accent-color, #28a745));
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.product-view-btn:hover:not(.active) {
    background: #e5e7eb;
    color: #374151;
}

.product-view-btn i {
    font-size: 1rem;
}

.view-btn-text {
    font-size: 0.95rem;
}

.category-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.category-btn {
    padding: clamp(0.625rem, 2vw, 0.75rem) clamp(1rem, 3vw, 1.5rem);
    background-color: var(--background-color);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    position: relative;
    overflow: hidden;
    min-height: var(--touch-target-min);
    font-size: var(--font-size-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 123, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.category-btn:hover::before,
.category-btn.active::before {
    width: 300px;
    height: 300px;
}

.category-btn:hover,
.category-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.category-btn:active {
    transform: translateY(0);
}

/* ============================================
   Products Grid - Mobile First
   ============================================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
    gap: clamp(0.75rem, 3vw, 2rem);
    margin-bottom: clamp(1.5rem, 6vw, 3rem);
    animation: fadeIn 0.5s ease-in;
}

/* ============================================
   Products List View - Mobile First
   ============================================ */
.products-list {
    display: flex;
    flex-direction: column;
    gap: clamp(0.75rem, 2vw, 1.5rem);
    margin-bottom: clamp(1.5rem, 6vw, 3rem);
    animation: fadeIn 0.5s ease-in;
}

.product-card-list {
    display: flex;
    flex-direction: row;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    width: 100%;
    gap: clamp(1rem, 3vw, 2rem);
    padding: clamp(0.75rem, 2vw, 1rem);
    align-items: center;
}

.product-card-list:hover {
    transform: translateX(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.product-card-list .product-image-container {
    flex-shrink: 0;
    width: clamp(120px, 25vw, 200px);
    height: clamp(120px, 25vw, 200px);
    min-width: 120px;
    min-height: 120px;
}

.product-card-list .product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--border-radius);
}

.product-card-list .product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: clamp(0.5rem, 1.5vw, 0.75rem);
    padding: 0;
}

.product-card-list .product-name {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    margin-bottom: clamp(0.25rem, 1vw, 0.5rem);
}

.product-card-list .product-description {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: clamp(0.875rem, 2vw, 1rem);
    color: #6b7280;
    margin-bottom: clamp(0.5rem, 1.5vw, 0.75rem);
}

.product-card-list .product-price {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    margin-bottom: clamp(0.5rem, 1.5vw, 0.75rem);
}

.product-card-list .add-to-cart-btn {
    align-self: flex-start;
    min-width: clamp(8rem, 20vw, 12rem);
}

/* ============================================
   Products Bubbles View - قطرات مطر - Mobile First
   ============================================ */
.products-bubbles {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(0.5rem, 1.5vw, 1rem);
    margin-bottom: clamp(1.5rem, 6vw, 3rem);
    animation: fadeIn 0.5s ease-in;
    padding: clamp(0.5rem, 2vw, 1rem);
    justify-content: flex-start;
    align-items: flex-start;
    width: 100%;
    position: relative;
}

.product-card-bubbles {
    position: relative;
    border-radius: 50%;
    background: white;
    box-shadow: var(--shadow);
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    /* حركة السباحة المستمرة */
    animation: bubbleFloat 8s ease-in-out infinite;
    /* أحجام مختلفة - سيتم تطبيقها عبر JavaScript */
}

/* أحجام مختلفة للفقاعات - غير متساوية */
.product-card-bubbles.size-small {
    width: clamp(80px, 15vw, 120px);
    height: clamp(80px, 15vw, 120px);
    min-width: clamp(80px, 15vw, 120px);
    min-height: clamp(80px, 15vw, 120px);
    animation-duration: 10s;
    animation-delay: 0s;
}

.product-card-bubbles.size-medium {
    width: clamp(100px, 20vw, 150px);
    height: clamp(100px, 20vw, 150px);
    min-width: clamp(100px, 20vw, 150px);
    min-height: clamp(100px, 20vw, 150px);
    animation-duration: 12s;
    animation-delay: 1s;
}

.product-card-bubbles.size-large {
    width: clamp(120px, 25vw, 180px);
    height: clamp(120px, 25vw, 180px);
    min-width: clamp(120px, 25vw, 180px);
    min-height: clamp(120px, 25vw, 180px);
    animation-duration: 14s;
    animation-delay: 2s;
}

/* حركة السباحة - حركة بطيئة مستمرة */
@keyframes bubbleFloat {

    0%,
    100% {
        transform: translateY(0px) translateX(0px) rotate(0deg);
    }

    25% {
        transform: translateY(-15px) translateX(10px) rotate(2deg);
    }

    50% {
        transform: translateY(-25px) translateX(-8px) rotate(-2deg);
    }

    75% {
        transform: translateY(-15px) translateX(5px) rotate(1deg);
    }
}

/* حركات مختلفة للفقاعات المختلفة */
.product-card-bubbles:nth-child(3n+1) {
    animation-name: bubbleFloat1;
}

.product-card-bubbles:nth-child(3n+2) {
    animation-name: bubbleFloat2;
}

.product-card-bubbles:nth-child(3n+3) {
    animation-name: bubbleFloat3;
}

@keyframes bubbleFloat1 {

    0%,
    100% {
        transform: translateY(0px) translateX(0px) rotate(0deg);
    }

    33% {
        transform: translateY(-20px) translateX(12px) rotate(3deg);
    }

    66% {
        transform: translateY(-10px) translateX(-10px) rotate(-2deg);
    }
}

@keyframes bubbleFloat2 {

    0%,
    100% {
        transform: translateY(0px) translateX(0px) rotate(0deg);
    }

    33% {
        transform: translateY(-18px) translateX(-8px) rotate(-2deg);
    }

    66% {
        transform: translateY(-22px) translateX(10px) rotate(2deg);
    }
}

@keyframes bubbleFloat3 {

    0%,
    100% {
        transform: translateY(0px) translateX(0px) rotate(0deg);
    }

    33% {
        transform: translateY(-12px) translateX(15px) rotate(2deg);
    }

    66% {
        transform: translateY(-20px) translateX(-5px) rotate(-3deg);
    }
}

.product-card-bubbles:hover {
    animation-play-state: paused;
    transform: translateY(-10px) scale(1.15) !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.product-card-bubbles:active {
    transform: translateY(-5px) scale(1.1) !important;
}

.product-bubble-image {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 50%;
    margin: 0;
}

.product-card-bubbles .product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 50%;
}

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

/* زر الإضافة كأيقونة فقط - أعلى الصورة */
.product-card-bubbles .add-to-cart-btn {
    position: absolute;
    top: clamp(0.25rem, 1vw, 0.5rem);
    right: clamp(0.25rem, 1vw, 0.5rem);
    width: var(--touch-target-min);
    height: var(--touch-target-min);
    min-width: var(--touch-target-min);
    min-height: var(--touch-target-min);
    padding: 0;
    border-radius: 50%;
    background-color: rgba(0, 123, 255, 0.9);
    color: white;
    border: 2px solid white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 5;
    overflow: hidden;
}

.product-card-bubbles .add-to-cart-btn:hover {
    background-color: rgba(40, 167, 69, 0.95);
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.6);
    border-color: white;
}

.product-card-bubbles .add-to-cart-btn:active {
    transform: scale(1.05);
}

.product-card-bubbles .add-to-cart-btn.disabled,
.product-card-bubbles .add-to-cart-btn:disabled {
    background-color: rgba(108, 117, 125, 0.9);
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none;
    border-color: rgba(255, 255, 255, 0.5);
}

.product-card-bubbles .add-to-cart-btn i {
    margin: 0;
}

/* إخفاء النص من زر الإضافة في عرض الفقاعات */
.product-card-bubbles .add-to-cart-btn .btn-text {
    display: none;
}

.product-card-bubbles .stock-badge {
    position: absolute;
    top: clamp(0.25rem, 1vw, 0.5rem);
    left: clamp(0.25rem, 1vw, 0.5rem);
    z-index: 6;
    font-size: clamp(0.6rem, 1.5vw, 0.7rem);
    padding: clamp(0.25rem, 0.75vw, 0.375rem) clamp(0.375rem, 1vw, 0.5rem);
    z-index: 5;
    border-radius: clamp(0.75rem, 2vw, 1rem);
}

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

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

.product-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

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

.product-card:active {
    transform: translateY(-2px);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.12);
}

.product-image-container {
    position: relative;
    cursor: pointer;
}

.product-image {
    width: 100%;
    height: 220px;
    object-fit: contain;
    transition: transform 0.3s ease, opacity 0.3s ease;
    background: #f8f9fa;
    padding: 0.5rem;
}

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

.product-image:active {
    transform: scale(1.02);
}

.stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.stock-badge.out-of-stock {
    background: rgba(220, 53, 69, 0.9);
}

.product-info {
    padding: 1rem;
}

.product-category {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.product-name {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    line-height: 1.4;
}

.product-description {
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    font-size: 0.9rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.product-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0.75rem;
}

.add-to-cart-btn {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.add-to-cart-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.add-to-cart-btn:active::before {
    width: 300px;
    height: 300px;
}

.add-to-cart-btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.add-to-cart-btn:active {
    transform: translateY(0);
}

.add-to-cart-btn:disabled {
    background-color: var(--secondary-color);
    cursor: not-allowed;
    opacity: 0.6;
}

.add-to-cart-btn.disabled {
    background-color: var(--secondary-color);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Product Modal Styles */
.product-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.product-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.9));
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }

    to {
        opacity: 1;
        backdrop-filter: blur(8px);
    }
}

.modal-content {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%) scale(0.95);
    margin: 0;
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 0;
    background: white;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: min(90vw, 100%);
    max-width: min(90vw, 100%);
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    display: flex;
    flex-direction: column;
    z-index: 10001;
    isolation: isolate;
    box-sizing: border-box;
    contain: layout style paint;
    padding-top: max(env(safe-area-inset-top), 12px);
}

.product-modal.active .modal-content {
    transform: translateX(-50%) scale(1);
}

.modal-header-actions {
    position: absolute;
    top: clamp(0.5rem, 1.5vw, 0.75rem);
    right: clamp(0.75rem, 2vw, 1rem);
    left: auto;
    transform: none;
    display: flex;
    gap: 0.5rem;
    z-index: 50;
    padding: 0;
    justify-content: flex-end;
    flex-shrink: 0;
    width: auto;
    height: auto;
    pointer-events: auto;
    order: -1;
}

.modal-share-btn {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border: 2px solid #e9ecef;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.modal-share-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.modal-share-btn .share-text {
    display: none;
}

.modal-close {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border: 2px solid #e9ecef;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    left: unset;
    top: unset;
}

.modal-close:hover {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    padding-bottom: 0;
}

/* Scroll Support for Modal - تم دمجها مع .modal-content أعلاه */

/* Enhanced Scroll Support */
.product-details-section {
    padding: 1.75rem;
    padding-bottom: 0;
    overflow-y: visible;
    overflow-x: hidden;
    max-height: none;
    width: 100%;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #f1f1f1;
    background: white;
    order: 2;
    flex: 1;
    box-sizing: border-box;
    margin-bottom: 0;
}

.product-details-section::-webkit-scrollbar {
    width: 8px;
}

.product-details-section::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.product-details-section::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
    transition: var(--transition);
}

.product-details-section::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Smooth Scrolling */
.product-details-section {
    scroll-behavior: smooth;
}

/* Scroll Indicators */
.product-details-section::before,
.product-details-section::after {
    content: '';
    position: sticky;
    left: 0;
    right: 0;
    height: 20px;
    pointer-events: none;
    z-index: 1;
}

.product-details-section::before {
    top: 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
}

.product-details-section::after {
    bottom: 0;
    background: linear-gradient(to top, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
}

.product-media-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-x: hidden;
    overflow-y: visible;
    width: 100%;
    min-height: auto;
    max-height: none;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #f1f1f1;
    border-bottom: 2px solid #e9ecef;
    position: relative;
    z-index: 1;
    isolation: isolate;
    contain: layout style paint;
    box-sizing: border-box;
    order: 1;
    flex-shrink: 0;
}

.product-media-section::-webkit-scrollbar {
    width: 8px;
}

.product-media-section::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.product-media-section::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
    transition: var(--transition);
}

.product-media-section::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

.primary-media {
    position: relative;
    text-align: center;
    background: white;
    padding: 1rem;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08), inset 0 0 0 1px rgba(0, 0, 0, 0.05);
    min-height: 200px;
    max-height: 500px;
    height: auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    overflow: hidden;
    contain: layout style paint;
    isolation: isolate;
    box-sizing: border-box;
    margin: 0;
}

.primary-media-container {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: calc(500px - 2rem);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 11;
    overflow: hidden;
    contain: layout style paint;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.primary-media img {
    position: relative;
    max-width: 100%;
    max-height: calc(500px - 2rem);
    width: auto;
    height: auto;
    min-width: 150px;
    min-height: 150px;
    object-fit: contain;
    border-radius: 8px;
    transition: var(--transition);
    cursor: zoom-in;
    display: block;
    margin: 0 auto;
    z-index: 12;
    background: white;
    contain: layout style paint;
    box-sizing: border-box;
}

.primary-media img:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}



.media-thumbnails {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    max-height: 150px;
    overflow-y: auto;
    padding: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.media-thumbnails::-webkit-scrollbar {
    width: 6px;
}

.media-thumbnails::-webkit-scrollbar-track {
    background: transparent;
}

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

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

.thumbnail {
    width: 80px;
    height: 80px;
    min-width: 80px;
    min-height: 80px;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    border: 3px solid transparent;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumbnail:hover {
    border-color: var(--primary-color);
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.thumbnail.active {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.3);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Image Slider Styles */
.image-slider {
    position: relative;
    width: 100%;
    background: white;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    min-height: 200px;
    max-height: 500px;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 200px;
    max-height: 500px;
    overflow: hidden;
}

.slide {
    display: none;
    width: 100%;
    height: 100%;
    min-height: 200px;
    max-height: 500px;
    text-align: center;
    background: white;
    padding: 1rem;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
}

.slide.active {
    display: flex;
}

.slide img {
    max-width: 100%;
    max-height: calc(500px - 2rem);
    width: auto;
    height: auto;
    min-width: 150px;
    min-height: 150px;
    object-fit: contain;
    border-radius: 8px;
    transition: var(--transition);
    cursor: zoom-in;
}

.slide img:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

/* Navigation Buttons */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #e9ecef;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: var(--primary-color);
    font-size: 1.2rem;
}

.slider-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.slider-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.slider-prev {
    right: 15px;
}

.slider-next {
    left: 15px;
}

/* Dots Navigation */
.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 20;
    background: rgba(255, 255, 255, 0.8);
    padding: 8px 15px;
    border-radius: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #cbd5e0;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.dot:hover {
    background: var(--primary-color);
    transform: scale(1.2);
}

.dot.active {
    background: var(--accent-color);
    width: 12px;
    height: 12px;
    border-color: var(--primary-color);
}

.no-media {
    text-align: center;
    padding: 2rem;
    color: var(--secondary-color);
    font-size: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #dee2e6;
}

/* Video Link Button Styles */
.video-link-container {
    text-align: center;
    padding: 1rem;
}

.video-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    position: relative;
    overflow: hidden;
}

.video-link-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.video-link-btn:hover::before {
    left: 100%;
}

.video-link-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
    background: linear-gradient(135deg, #ee5a24, #ff6b6b);
}

.video-link-btn:active {
    transform: translateY(-1px);
}

.video-link-btn i {
    font-size: 1.2rem;
}

.video-link-info {
    display: block;
    margin-top: 0.75rem;
    color: var(--secondary-color);
    font-size: 0.9rem;
    opacity: 0.8;
}

.no-media {
    text-align: center;
    color: var(--secondary-color);
    padding: 2rem;
}

.product-details-section {
    padding: 2rem;
    overflow-y: auto;
}

.product-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.product-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.product-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.product-category-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.product-category-badge:hover::before {
    left: 100%;
}

.product-category-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.product-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0;
    max-height: 300px;
    overflow-y: auto;
    padding: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #f1f1f1;
}

.product-info-grid::-webkit-scrollbar {
    width: 8px;
}

.product-info-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.product-info-grid::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
    transition: var(--transition);
}

.product-info-grid::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.info-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.info-item:hover::before {
    transform: scaleY(1);
}

.info-item:hover {
    transform: translateX(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.info-item .label {
    font-weight: 600;
    color: var(--secondary-color);
}

.info-item .value {
    font-weight: 700;
    color: var(--text-color);
}

.info-item .value.price {
    color: var(--accent-color);
    font-size: 1.2rem;
}

.stock-status {
    font-weight: 600;
}

.stock-status.in-stock {
    color: var(--accent-color);
}

.stock-status.low-stock {
    color: #ffc107;
}

.stock-status.out-of-stock {
    color: #dc3545;
}

.product-description-full {
    margin-bottom: 0;
    padding: 1.25rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    border-right: 4px solid var(--primary-color);
    max-height: 250px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #f1f1f1;
}

.product-description-full::-webkit-scrollbar {
    width: 8px;
}

.product-description-full::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.product-description-full::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
    transition: var(--transition);
}

.product-description-full::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

.product-description-full h4 {
    color: var(--text-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.product-description-full h4 i {
    color: var(--primary-color);
}

.product-description-full p {
    color: var(--secondary-color);
    line-height: 1.8;
    text-align: justify;
    font-size: 1rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.product-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 0.75rem;
    padding: clamp(5rem, 8vw, 6rem) clamp(0.75rem, 2vw, 1rem) clamp(0.75rem, 2vw, 1rem);
    background: #f8f9fa;
    border-radius: 0;
    border: none;
    border-bottom: 2px solid #e9ecef;
    margin: 0;
    position: relative;
    z-index: 150;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    order: -1;
    min-height: fit-content;
    overflow: visible;
}

.product-actions>.quantity-selector {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
    align-self: flex-start;
    padding-right: clamp(4rem, 8vw, 5rem);
}

.product-actions>.add-to-cart-modal-btn {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.product-actions::-webkit-scrollbar {
    width: 8px;
}

.product-actions::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.product-actions::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
    transition: var(--transition);
}

.product-actions::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

.quantity-selector {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
    margin-top: 0;
    position: relative;
    z-index: 1;
}

.quantity-selector>label {
    order: 1;
    margin: 0;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-color);
    white-space: nowrap;
}

.quantity-selector>.quantity-controls {
    order: 2;
    display: flex;
    gap: 0.25rem;
}

.quantity-selector>.quantity-info {
    order: 3;
    width: auto;
    text-align: left;
    font-size: 0.65rem;
}

.quantity-selector>label {
    order: 1;
    margin: 0;
}

.quantity-selector>.quantity-controls {
    order: 2;
}

.quantity-selector>.quantity-info {
    order: 3;
    width: 100%;
    text-align: center;
}

.quantity-selector label {
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.75rem;
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0px;
    margin-left: 18px;
    margin-right: 18px;
    position: absolute;
    left: 138px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.quantity-btn {
    width: 24px;
    height: 24px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-color);
    transition: var(--transition);
    padding: 0;
    position: absolute;
    left: 89px;
}

.quantity-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quantity-selector input {
    width: 40px;
    padding: 0.25rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-align: center;
    font-size: 0.75rem;
    position: absolute;
    left: 51px;
}

.quantity-info {
    font-size: 0.7rem;
    color: var(--secondary-color);
    white-space: nowrap;
    width: 81px;
    margin-top: 0px;
    margin-left: 0px;
    margin-right: 0px;
}

.quantity-selector input:focus {
    outline: none;
    border-color: var(--primary-color);
}

#quantity-input {
    position: absolute;
    left: 51px;
}

.add-to-cart-modal-btn {
    padding: 0.65rem 1.5rem;
    background: linear-gradient(135deg, var(--accent-color), #20c997);
    color: white;
    position: relative;
    z-index: 1;
    margin-top: 0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.25);
    overflow: hidden;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: fit-content;
}

/* Responsive adjustments for product-actions */
@media (min-width: 1200px) {
    .product-actions {
        flex-direction: row;
        padding: clamp(3rem, 4vw, 3.5rem) 1rem 0.85rem;
        gap: 1rem;
        min-height: auto;
    }

    .product-actions>.quantity-selector,
    .product-actions>.add-to-cart-modal-btn {
        width: auto;
    }

    .quantity-selector {
        flex-direction: row;
        width: auto;
        gap: 0.5rem;
    }

    .quantity-selector>label,
    .quantity-selector>.quantity-controls,
    .quantity-selector>.quantity-info {
        order: 0;
    }

    .quantity-selector>.quantity-info {
        width: auto;
        text-align: left;
    }

    .modal-header-actions {
        top: 0.75rem;
        right: 1rem;
        left: auto;
        transform: none;
        justify-content: flex-end;
    }

    .quantity-btn {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }

    .quantity-selector input {
        width: 50px;
        padding: 0.35rem;
        font-size: 0.8rem;
    }

    .quantity-selector label {
        font-size: 0.8rem;
    }

    .quantity-info {
        font-size: 0.75rem;
    }

    .add-to-cart-modal-btn {
        padding: 0.7rem 1.75rem;
        font-size: 1rem;
    }
}

@media (min-width: 900px) and (max-width: 1199px) {
    .product-actions {
        flex-direction: row;
        padding: clamp(2.75rem, 4.5vw, 3.25rem) 0.75rem 0.75rem;
        gap: 0.75rem;
        min-height: auto;
    }

    .product-actions>.quantity-selector,
    .product-actions>.add-to-cart-modal-btn {
        width: auto;
    }

    .quantity-selector {
        flex-direction: row;
        width: auto;
    }

    .quantity-selector>label,
    .quantity-selector>.quantity-controls,
    .quantity-selector>.quantity-info {
        order: 0;
    }

    .quantity-selector>.quantity-info {
        width: auto;
        text-align: left;
    }

    .modal-header-actions {
        top: 0.65rem;
    }

    .quantity-selector {
        gap: 0.4rem;
    }

    .quantity-btn {
        width: 26px;
        height: 26px;
        font-size: 0.85rem;
    }

    .quantity-selector input {
        width: 45px;
        padding: 0.3rem;
        font-size: 0.75rem;
    }

    .quantity-selector label {
        font-size: 0.75rem;
    }

    .quantity-info {
        font-size: 0.7rem;
    }

    .add-to-cart-modal-btn {
        padding: 0.65rem 1.5rem;
        font-size: 0.95rem;
    }
}

@media (min-width: 768px) and (max-width: 899px) {
    .product-actions {
        flex-direction: row;
        padding: clamp(2.5rem, 5vw, 3rem) 0.7rem 0.7rem;
        gap: 0.65rem;
        min-height: auto;
    }

    .product-actions>.quantity-selector,
    .product-actions>.add-to-cart-modal-btn {
        width: auto;
    }

    .quantity-selector {
        flex-direction: row;
        width: auto;
    }

    .quantity-selector>label,
    .quantity-selector>.quantity-controls,
    .quantity-selector>.quantity-info {
        order: 0;
    }

    .quantity-selector>.quantity-info {
        width: auto;
        text-align: left;
    }

    .modal-header-actions {
        top: 0.6rem;
        right: 0.7rem;
        left: auto;
        transform: none;
        gap: 0.4rem;
        justify-content: flex-end;
    }

    .modal-share-btn,
    .modal-close {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    .quantity-selector {
        gap: 0.35rem;
    }

    .quantity-btn {
        width: 24px;
        height: 24px;
        font-size: 0.8rem;
    }

    .quantity-selector input {
        width: 42px;
        padding: 0.28rem;
        font-size: 0.75rem;
    }

    .quantity-selector label {
        font-size: 0.75rem;
    }

    .quantity-info {
        font-size: 0.7rem;
    }

    .add-to-cart-modal-btn {
        padding: 0.6rem 1.3rem;
        font-size: 0.9rem;
    }
}

.add-to-cart-modal-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.add-to-cart-modal-btn:hover:not(:disabled)::before {
    left: 100%;
}

.add-to-cart-modal-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.add-to-cart-modal-btn:active:not(:disabled) {
    transform: translateY(0);
}

.add-to-cart-modal-btn:hover {
    background-color: #218838;
}

.add-to-cart-modal-btn:disabled {
    background-color: var(--secondary-color);
    cursor: not-allowed;
}

/* Product Price and Stock Section */
.product-price-section {
    margin-bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    border: 2px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Scroll Support for Price Section */
.price-display,
.stock-status-display {
    overflow: hidden;
    word-wrap: break-word;
    max-width: 45%;
}

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

.price-label {
    font-size: 0.9rem;
    color: var(--secondary-color);
    font-weight: 600;
}

.price-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
}

.stock-status-display {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

.stock-label {
    font-size: 0.9rem;
    color: var(--secondary-color);
    font-weight: 600;
}

/* Additional Product Information Styles */
.product-colors,
.product-sizes,
.product-video {
    margin: 1.5rem 0 0 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
    overflow: hidden;
}

/* Scroll Support for Lists */
.colors-list,
.sizes-list {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.colors-list::-webkit-scrollbar,
.sizes-list::-webkit-scrollbar {
    width: 6px;
}

.colors-list::-webkit-scrollbar-track,
.sizes-list::-webkit-scrollbar-track {
    background: transparent;
}

.colors-list::-webkit-scrollbar-thumb,
.sizes-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
    transition: var(--transition);
}

.colors-list::-webkit-scrollbar-thumb:hover,
.sizes-list::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

.product-colors h4,
.product-sizes h4,
.product-video h4 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.colors-list {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.color-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: white;
    border-radius: var(--border-radius);
    border: 2px solid var(--border-color);
    transition: var(--transition);
    position: relative;
}

.color-price-badge {
    font-size: 0.75rem;
    color: var(--accent-color);
    font-weight: 600;
    margin-top: 0.25rem;
}

.color-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.color-item.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
}

.color-item.selected .color-name {
    color: white;
}

.color-item.selected .color-preview {
    border-color: white;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.color-item.selected .color-price-badge {
    color: white;
}

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

.color-price-badge {
    font-size: 0.75rem;
    color: var(--accent-color);
    font-weight: 600;
    margin-top: 0.25rem;
}

.color-preview {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.sizes-list {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.size-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: var(--border-radius);
    border: 2px solid var(--border-color);
    transition: var(--transition);
    min-width: 80px;
}

.size-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.size-item.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--accent-color), #28a745);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

.size-item.selected .size-name {
    color: white;
}

.size-item.selected .size-stock {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.size-item.selected .size-price-badge {
    color: white;
}

.size-price-badge {
    font-size: 0.75rem;
    color: var(--accent-color);
    font-weight: 600;
    margin-top: 0.25rem;
}

.size-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
}

.size-stock {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
}

.size-stock.in-stock {
    background: var(--accent-color);
    color: white;
}

.size-stock.out-of-stock {
    background: #dc3545;
    color: white;
}

/* Video Link Button Responsive */
@media (max-width: 768px) {
    .video-link-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    .video-link-btn i {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .video-link-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .video-link-btn i {
        font-size: 1rem;
    }

    .video-link-info {
        font-size: 0.8rem;
    }
}

/* Quantity Controls Enhancement */
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border-color);
    background: white;
    color: var(--text-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 700;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quantity-info {
    font-size: 0.9rem;
    color: var(--secondary-color);
    font-weight: 600;
    width: 81px;
    margin-top: 0px;
    margin-left: 0px;
    margin-right: 0px;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 3rem;
}

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

.spinner::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top-color: var(--primary-color);
    opacity: 0.5;
    animation: spin 0.5s linear infinite reverse;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* No Products */
.no-products {
    text-align: center;
    padding: 3rem;
    color: var(--secondary-color);
}

.no-products i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Cart Page */
.cart-page {
    padding: 2rem 0;
    min-height: 60vh;
}

/* Order Options Styles */
.order-options {
    margin: 2rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    border: 2px solid #e9ecef;
    border-right: 5px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.order-options::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.1), transparent);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.order-options h4 {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.order-options h4::before {
    content: '📝';
    font-size: 1.3rem;
    margin-left: 0.5rem;
}

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

.option-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-color);
    font-size: 1rem;
}

.option-group label::before {
    content: '✓';
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.1rem;
}

.option-group input,
.option-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
    background: white;
}

.option-group input:focus,
.option-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1);
    transform: translateY(-2px);
}

.option-group input::placeholder,
.option-group textarea::placeholder {
    color: #adb5bd;
    opacity: 0.7;
}

.option-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Cart Item Options */
.cart-item-options {
    margin: 0.75rem 0;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-start;
}

/* محرر الخيارات في السلة */
.cart-options-editor {
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    position: relative;
}

.cart-options-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e9ecef;
}

.cart-options-title i {
    font-size: 1.1rem;
}

.cart-option-selector {
    margin-bottom: 1rem;
}

.cart-option-selector:last-child {
    margin-bottom: 0;
}

.cart-option-selector label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.cart-option-selector label i {
    color: var(--primary-color);
}

.cart-color-options {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cart-color-option {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
}

.cart-color-option:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.cart-color-option.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3), 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

.cart-size-options {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cart-size-option {
    padding: 0.625rem 1.25rem;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-color);
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-size-option:hover:not(:disabled) {
    border-color: var(--primary-color);
    background: #f0f7ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.cart-size-option.selected {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    transform: translateY(-2px);
}

.cart-size-option:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8f9fa;
    border-color: #dee2e6;
}

.cart-size-option.out-of-stock {
    position: relative;
}

.cart-size-option.out-of-stock::after {
    content: '✕';
    position: absolute;
    top: -5px;
    left: -5px;
    background: #dc3545;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

.size-stock-badge {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.3);
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-weight: 600;
}

.cart-size-option.selected .size-stock-badge {
    background: rgba(255, 255, 255, 0.25);
}

.option-tag {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.option-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.option-tag.color-tag {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
}

.option-tag.color-tag::before {
    content: '🎨';
    font-size: 0.9rem;
}

.option-tag.size-tag {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
}

.option-tag.size-tag::before {
    content: '📏';
    font-size: 0.9rem;
}

.page-header {
    margin-bottom: 2.5rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.page-title {
    text-align: center;
    margin-bottom: 0;
    color: var(--text-color);
    font-size: 2rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 1rem;
}

.btn-clear-cart-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #dc3545;
    color: white;
    border: 2px solid #dc3545;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
}

.btn-clear-cart-top:hover {
    background: #c82333;
    border-color: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.3);
}

.btn-clear-cart-top:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.2);
}

.btn-clear-cart-top i {
    font-size: 1.1rem;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.back-to-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.back-to-home-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.back-to-home-btn:active::before {
    width: 300px;
    height: 300px;
}

.back-to-home-btn:hover {
    background: linear-gradient(135deg, #0056b3, #218838);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.back-to-home-btn:active {
    transform: translateY(0);
}

.back-to-home-btn i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.back-to-home-btn:hover i {
    transform: translateX(5px);
}

.cart-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.cart-items {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    position: relative;
}

.cart-items::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
    border-radius: 16px 0 0 16px;
}

.cart-item {
    display: flex;
    gap: 1.25rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 12px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cart-item::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.cart-item:hover {
    transform: translateX(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.cart-item:hover::before {
    transform: scaleY(1);
}

.cart-item:last-child {
    margin-bottom: 0;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.cart-item:hover .cart-item-image {
    transform: scale(1.05);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-weight: 700;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    color: var(--text-color);
    line-height: 1.4;
}

.cart-item-price {
    color: var(--accent-color);
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-item-price::before {
    content: '💰';
    font-size: 1rem;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: white;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    width: fit-content;
}

.quantity-btn {
    width: 36px;
    height: 36px;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

.quantity-input {
    width: 60px;
    text-align: center;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
}

.quantity-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.remove-item {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
    border: 2px solid #dc3545;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.remove-item:hover {
    background: #dc3545;
    color: white;
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.remove-item:active {
    transform: scale(0.95) rotate(90deg);
}

.cart-summary {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    height: fit-content;
    position: sticky;
    top: 100px;
    border: 2px solid #e9ecef;
}

.summary-card h3 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--primary-color);
    position: relative;
}

.summary-card h3::before {
    content: '🛒';
    margin-left: 0.5rem;
    font-size: 1.3rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.summary-row:hover {
    transform: translateX(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-color);
}

.summary-row span:first-child {
    font-weight: 600;
    color: var(--text-color);
    font-size: 1rem;
}

.summary-row span:last-child {
    font-weight: 700;
    color: var(--accent-color);
    font-size: 1.2rem;
}

.summary-actions {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e9ecef;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3, #218838);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color), #495057);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #545b62, #343a40);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

.btn-secondary:active {
    transform: translateY(0);
}

.empty-cart {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 2px dashed #e9ecef;
    position: relative;
    overflow: hidden;
}

.empty-cart::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 123, 255, 0.05) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

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

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

.empty-cart i {
    font-size: 5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    opacity: 0.8;
    position: relative;
    z-index: 1;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.empty-cart h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.empty-cart p {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.empty-cart-actions {
    position: relative;
    z-index: 1;
}

.empty-cart .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

/* Footer */
.main-footer {
    background: linear-gradient(135deg, var(--text-color), #2c3e50);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.main-footer p {
    opacity: 0.9;
    font-size: 0.95rem;
}

/* Responsive Design */

/* Large Desktop View (1200px+) */
@media (min-width: 1200px) {

    /* Large desktop-specific scroll enhancements */
    .modal-content {
        max-width: 1100px;
        width: 85%;
        max-height: 85vh;
    }

    .modal-body {
        display: flex;
        flex-direction: column;
    }

    .product-details-section,
    .product-media-section {
        max-height: none;
        overflow-y: visible;
        padding: 2.5rem;
    }

    .product-media-section {
        order: 1;
        flex-shrink: 0;
        border-bottom: 2px solid #e9ecef;
        border-left: none;
    }

    .product-details-section {
        order: 2;
        flex: 1;
    }

    .product-info-grid {
        max-height: 400px;
        overflow-y: auto;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    .product-description-full {
        max-height: 320px;
        overflow-y: auto;
    }

    .product-actions {
        max-height: 320px;
        overflow-y: auto;
    }

    .colors-list,
    .sizes-list {
        max-height: 200px;
        overflow-y: auto;
    }

    .media-thumbnails {
        max-height: 160px;
        overflow-y: auto;
    }

    /* Large desktop-specific spacing */
    .product-title {
        font-size: 2.5rem;
    }

    .info-item {
        padding: 1.8rem;
    }

    .product-price-section {
        padding: 2.5rem;
    }

    .price-value {
        font-size: 2.5rem;
    }

    /* Enhanced large desktop hover effects */
    .info-item:hover {
        transform: translateX(-10px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.18);
    }

    .thumbnail:hover {
        transform: scale(1.18) translateY(-10px);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    }

    .color-item:hover,
    .size-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
    }

    /* Large desktop selected states */
    .color-item.selected,
    .size-item.selected {
        transform: translateY(-5px);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    }

    /* Large desktop scrollbar customization */
    .product-details-section::-webkit-scrollbar,
    .product-media-section::-webkit-scrollbar {
        width: 16px;
    }

    .product-info-grid::-webkit-scrollbar,
    .product-description-full::-webkit-scrollbar,
    .product-actions::-webkit-scrollbar {
        width: 16px;
    }

    .colors-list::-webkit-scrollbar,
    .sizes-list::-webkit-scrollbar,
    .media-thumbnails::-webkit-scrollbar {
        width: 12px;
    }

    /* Enhanced large desktop scrollbar styling */
    .product-details-section::-webkit-scrollbar-thumb,
    .product-media-section::-webkit-scrollbar-thumb {
        border: 3px solid #f1f1f1;
        border-radius: 8px;
    }

    .product-info-grid::-webkit-scrollbar-thumb,
    .product-description-full::-webkit-scrollbar-thumb,
    .product-actions::-webkit-scrollbar-thumb {
        border: 3px solid #f1f1f1;
        border-radius: 8px;
    }

    .colors-list::-webkit-scrollbar-thumb,
    .sizes-list::-webkit-scrollbar-thumb,
    .media-thumbnails::-webkit-scrollbar-thumb {
        border: 2px solid transparent;
        border-radius: 6px;
    }
}

/* Desktop View (1024px - 1200px) */
@media (min-width: 1024px) and (max-width: 1200px) {

    /* Desktop-specific scroll enhancements */
    .modal-content {
        max-width: 1000px;
        width: 90%;
        max-height: 85vh;
    }

    .modal-body {
        display: flex;
        flex-direction: column;
    }

    .product-details-section,
    .product-media-section {
        max-height: none;
        overflow-y: visible;
        padding: 2rem;
    }

    .product-media-section {
        order: 1;
        flex-shrink: 0;
        border-bottom: 2px solid #e9ecef;
        border-left: none;
    }

    .product-details-section {
        order: 2;
        flex: 1;
    }

    .product-info-grid {
        max-height: 350px;
        overflow-y: auto;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .product-description-full {
        max-height: 280px;
        overflow-y: auto;
    }

    .product-actions {
        max-height: 280px;
        overflow-y: auto;
    }

    .colors-list,
    .sizes-list {
        max-height: 180px;
        overflow-y: auto;
    }

    .media-thumbnails {
        max-height: 140px;
        overflow-y: auto;
    }

    /* Desktop-specific spacing */
    .product-title {
        font-size: 2.2rem;
    }

    .info-item {
        padding: 1.5rem;
    }

    .product-price-section {
        padding: 2rem;
    }

    .price-value {
        font-size: 2.2rem;
    }

    /* Enhanced hover effects for desktop */
    .info-item:hover {
        transform: translateX(-8px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    }

    .thumbnail:hover {
        transform: scale(1.15) translateY(-8px);
        box-shadow: 0 12px 25px rgba(0, 0, 0, 0.25);
    }

    .color-item:hover,
    .size-item:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    }

    /* Desktop scrollbar customization */
    .product-details-section::-webkit-scrollbar,
    .product-media-section::-webkit-scrollbar {
        width: 14px;
    }

    .product-info-grid::-webkit-scrollbar,
    .product-description-full::-webkit-scrollbar,
    .product-actions::-webkit-scrollbar {
        width: 14px;
    }

    .colors-list::-webkit-scrollbar,
    .sizes-list::-webkit-scrollbar,
    .media-thumbnails::-webkit-scrollbar {
        width: 10px;
    }

    /* Enhanced desktop scrollbar styling */
    .product-details-section::-webkit-scrollbar-thumb,
    .product-media-section::-webkit-scrollbar-thumb {
        border: 2px solid #f1f1f1;
        border-radius: 7px;
    }

    .product-info-grid::-webkit-scrollbar-thumb,
    .product-description-full::-webkit-scrollbar-thumb,
    .product-actions::-webkit-scrollbar-thumb {
        border: 2px solid #f1f1f1;
        border-radius: 7px;
    }

    .colors-list::-webkit-scrollbar-thumb,
    .sizes-list::-webkit-scrollbar-thumb,
    .media-thumbnails::-webkit-scrollbar-thumb {
        border: 1px solid transparent;
        border-radius: 5px;
    }
}

/* Medium View (768px - 900px) */
@media (min-width: 768px) and (max-width: 900px) {

    /* Medium-specific scroll enhancements */
    .modal-content {
        max-width: 88vw;
        max-height: 88vh;
    }

    /* عرض 3 كاردات في الصف على الشاشات المتوسطة */
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .product-details-section,
    .product-media-section {
        max-height: 65vh;
        overflow-y: auto;
        padding: 1.3rem;
    }

    .product-info-grid {
        max-height: 280px;
        overflow-y: auto;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .product-description-full {
        max-height: 220px;
        overflow-y: auto;
    }

    .product-actions {
        max-height: 220px;
        overflow-y: auto;
    }

    .colors-list,
    .sizes-list {
        max-height: 130px;
        overflow-y: auto;
    }

    .media-thumbnails {
        max-height: 110px;
        overflow-y: auto;
    }

    /* Medium-specific spacing */
    .product-title {
        font-size: 1.7rem;
    }

    .info-item {
        padding: 1.1rem;
    }

    .product-price-section {
        padding: 1.3rem;
    }

    .price-value {
        font-size: 1.7rem;
    }

    /* Medium hover effects */
    .info-item:hover {
        transform: translateX(-5px);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.11);
    }

    .thumbnail:hover {
        transform: scale(1.1) translateY(-5px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    }

    .color-item:hover,
    .size-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 16px rgba(0, 0, 0, 0.11);
    }

    /* Medium scrollbar customization */
    .product-details-section::-webkit-scrollbar,
    .product-media-section::-webkit-scrollbar {
        width: 9px;
    }

    .product-info-grid::-webkit-scrollbar,
    .product-description-full::-webkit-scrollbar,
    .product-actions::-webkit-scrollbar {
        width: 9px;
    }

    .colors-list::-webkit-scrollbar,
    .sizes-list::-webkit-scrollbar,
    .media-thumbnails::-webkit-scrollbar {
        width: 7px;
    }
}

/* Tablet View (900px - 1024px) */
@media (min-width: 900px) and (max-width: 1024px) {

    /* Tablet-specific scroll enhancements */
    .modal-content {
        max-width: min(85vw, 100%);
        width: min(85vw, 100%);
        max-height: 85vh;
    }

    .product-details-section,
    .product-media-section {
        max-height: 70vh;
        overflow-y: auto;
        padding: 1.5rem;
    }

    .product-info-grid {
        max-height: 300px;
        overflow-y: auto;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .product-description-full {
        max-height: 250px;
        overflow-y: auto;
    }

    .product-actions {
        max-height: 250px;
        overflow-y: auto;
    }

    .colors-list,
    .sizes-list {
        max-height: 150px;
        overflow-y: auto;
    }

    .media-thumbnails {
        max-height: 120px;
        overflow-y: auto;
    }

    /* Tablet-specific spacing */
    .product-title {
        font-size: 1.8rem;
    }

    .info-item {
        padding: 1.2rem;
    }

    .product-price-section {
        padding: 1.5rem;
    }

    .price-value {
        font-size: 1.8rem;
    }

    /* Tablet hover effects */
    .info-item:hover {
        transform: translateX(-6px);
        box-shadow: 0 5px 18px rgba(0, 0, 0, 0.12);
    }

    .thumbnail:hover {
        transform: scale(1.12) translateY(-6px);
        box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
    }

    .color-item:hover,
    .size-item:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    }

    /* Tablet selected states */
    .color-item.selected,
    .size-item.selected {
        transform: translateY(-3px);
        box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
    }

    /* Tablet scrollbar customization */
    .product-details-section::-webkit-scrollbar,
    .product-media-section::-webkit-scrollbar {
        width: 10px;
    }

    .product-info-grid::-webkit-scrollbar,
    .product-description-full::-webkit-scrollbar,
    .product-actions::-webkit-scrollbar {
        width: 10px;
    }

    .colors-list::-webkit-scrollbar,
    .sizes-list::-webkit-scrollbar,
    .media-thumbnails::-webkit-scrollbar {
        width: 8px;
    }
}

/* Mobile View (max-width: 768px) */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    /* تحسين الهيدر للهواتف */
    .main-header {
        padding: 0.75rem 0;
        position: sticky;
        top: 0;
        z-index: 1000;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
        flex-wrap: nowrap;
    }

    .logo {
        flex: 0 0 auto;
        gap: 0.5rem;
    }

    .logo img {
        height: 40px;
        max-width: 120px;
    }

    .logo h1 {
        font-size: 1.1rem;
        display: none;
        /* إخفاء النص على الشاشات الصغيرة */
    }

    .main-nav {
        display: none;
        /* إخفاء القائمة الرئيسية على الهواتف */
    }

    .cart-icon {
        flex: 0 0 auto;
    }

    .cart-link {
        font-size: 1.3rem;
        padding: 0.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .cart-count {
        width: 18px;
        height: 18px;
        font-size: 0.7rem;
        top: -5px;
        right: -5px;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }

    /* Mobile Banner - تحسينات */
    .hero-section {
        padding: 1.5rem 0;
        margin-bottom: 1.5rem;
    }

    .banner-slider {
        height: 220px;
        border-radius: 12px;
    }

    .banner-content {
        padding: 1rem;
        max-width: 95%;
        background: transparent;
    }

    .banner-content h2 {
        font-size: 1.3rem;
        margin-bottom: 0.5rem;
        line-height: 1.3;
    }

    .banner-content p {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    .banner-nav {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .banner-nav.prev {
        left: 8px;
    }

    .banner-nav.next {
        right: 8px;
    }

    .banner-indicators {
        bottom: 10px;
        gap: 6px;
    }

    .banner-indicator {
        width: 5px;
        height: 5px;
    }

    .banner-indicator.active {
        width: 6px;
        height: 6px;
    }

    /* تحسين قسم الفلاتر */
    .filters-section {
        padding: 1.25rem;
        margin-bottom: 1.5rem;
        border-radius: 12px;
    }

    .search-box {
        flex-direction: column;
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .search-box input {
        padding: 0.875rem;
        font-size: 0.95rem;
        border-radius: 10px;
    }

    .search-box button {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
        border-radius: 10px;
        width: 100%;
    }

    .view-toggle {
        margin-bottom: 1rem;
        gap: 0.5rem;
    }

    .toggle-btn {
        padding: 0.625rem 1rem;
        font-size: 0.85rem;
        flex: 1;
        border-radius: 20px;
    }

    .category-filters {
        justify-content: center;
        margin-top: 0.75rem;
    }

    .all-categories-btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
        width: 100%;
        margin-bottom: 1rem;
        border-radius: 20px;
    }

    .category-groups {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .group-button {
        min-width: auto;
        width: 100%;
        max-width: 300px;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        border-radius: 20px;
    }

    .group-dropdown {
        position: absolute;
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
        min-width: 100%;
        max-width: calc(100vw - 2rem);
        margin-top: 0.5rem;
        border-radius: 12px;
    }

    .group-dropdown.active {
        transform: translateX(-50%) translateY(0);
    }

    .group-dropdown::before {
        left: 50%;
        transform: translateX(-50%);
    }

    .simple-categories {
        gap: 0.5rem;
        justify-content: center;
    }

    .simple-categories .category-item {
        min-width: auto;
        flex: 1 1 auto;
        padding: 0.625rem 1rem;
        font-size: 0.85rem;
        border-radius: 20px;
    }

    /* تحسين بطاقات المنتجات - 3 كاردات في السطر */
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
        margin-bottom: 2rem;
    }

    .product-card {
        border-radius: 10px;
        overflow: hidden;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .product-card:active {
        transform: scale(0.98);
    }

    .product-image {
        height: 120px;
        padding: 0.25rem;
    }

    .product-info {
        padding: 0.5rem;
    }

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

    .product-name {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
        line-height: 1.25;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        min-height: 2.5em;
    }

    .product-description {
        font-size: 0.65rem;
        margin-bottom: 0.375rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.3;
        min-height: 2.6em;
    }

    .product-price {
        font-size: 0.85rem;
        margin-bottom: 0.375rem;
    }

    .add-to-cart-btn {
        padding: 0.375rem;
        font-size: 0.7rem;
        border-radius: 6px;
        font-weight: 600;
    }

    .stock-badge {
        padding: 0.375rem 0.75rem;
        font-size: 0.7rem;
        top: 8px;
        right: 8px;
        border-radius: 15px;
    }

    /* تحسين السلة للهواتف */
    .page-header {
        margin-bottom: 2rem;
    }

    .back-to-home-btn {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
        margin-bottom: 0;
    }

    .btn-clear-cart-top {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }

    .page-title {
        font-size: 1.5rem;
        margin-bottom: 0;
        padding-bottom: 0.75rem;
    }

    .page-title::after {
        width: 60px;
        height: 3px;
    }

    .cart-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .cart-items {
        padding: 1.25rem;
        border-radius: 12px;
    }

    .cart-items::before {
        width: 3px;
    }

    .cart-item {
        flex-direction: column;
        gap: 1rem;
        padding: 1.25rem;
        text-align: center;
        align-items: center;
        margin-bottom: 1rem;
    }

    .cart-item:hover {
        transform: translateY(-3px);
    }

    .cart-item::before {
        width: 100%;
        height: 3px;
        top: 0;
        right: 0;
        transform: scaleX(0);
    }

    .cart-item:hover::before {
        transform: scaleX(1);
    }

    .cart-item-image {
        width: 120px;
        height: 120px;
        border-radius: 12px;
        object-fit: cover;
        margin: 0 auto;
    }

    .cart-item-details {
        width: 100%;
        text-align: center;
    }

    .cart-item-name {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }

    .cart-item-price {
        font-size: 1.3rem;
        display: block;
        margin-bottom: 0.75rem;
        justify-content: center;
    }

    .cart-item-options {
        justify-content: center;
        margin: 0.75rem 0;
    }

    .cart-options-editor {
        margin: 1rem 0;
        padding: 0.875rem;
    }

    .cart-options-title {
        font-size: 0.95rem;
        margin-bottom: 0.875rem;
        padding-bottom: 0.625rem;
    }

    .cart-option-selector {
        margin-bottom: 0.875rem;
    }

    .cart-option-selector label {
        font-size: 0.9rem;
        margin-bottom: 0.625rem;
    }

    .cart-color-options {
        gap: 0.5rem;
        justify-content: center;
    }

    .cart-color-option {
        width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }

    .cart-size-options {
        gap: 0.5rem;
        justify-content: center;
    }

    .cart-size-option {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .cart-item-quantity {
        justify-content: center;
        margin-top: 0.75rem;
        width: 100%;
        max-width: 200px;
        margin-left: auto;
        margin-right: auto;
    }

    .quantity-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .quantity-input {
        width: 70px;
        padding: 0.625rem;
        font-size: 1.1rem;
    }

    .remove-item {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        margin-top: 0.5rem;
    }

    .cart-summary {
        padding: 1.5rem;
        border-radius: 12px;
        position: relative;
        top: auto;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }

    .summary-card h3 {
        font-size: 1.3rem;
        margin-bottom: 0;
    }

    .summary-row {
        padding: 0.875rem;
        margin-bottom: 0.875rem;
    }

    .summary-row span:first-child {
        font-size: 0.95rem;
    }

    .summary-row span:last-child {
        font-size: 1.1rem;
    }

    .order-options {
        padding: 1.25rem;
        margin: 1.5rem 0;
        border-radius: 12px;
    }

    .order-options h4 {
        font-size: 1.1rem;
        margin-bottom: 0;
    }

    .option-group {
        margin-bottom: 0;
    }

    .option-group label {
        font-size: 0.95rem;
        margin-bottom: 0.625rem;
    }

    .option-group input,
    .option-group textarea {
        padding: 0.875rem;
        font-size: 0.95rem;
        border-radius: 10px;
    }

    .summary-actions {
        margin-top: 1.5rem;
        gap: 0.875rem;
    }

    .btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        border-radius: 12px;
    }

    .empty-cart {
        padding: 3rem 1.5rem;
    }

    .empty-cart i {
        font-size: 4rem;
    }

    .empty-cart h3 {
        font-size: 1.5rem;
    }

    .empty-cart p {
        font-size: 1rem;
    }

    /* Responsive Modal - تحسينات للهواتف */
    .modal-content {
        position: fixed;
        top: 0;
        left: 50%;
        transform: translateX(-50%) scale(0.98);
        margin: 0;
        padding-left: 0;
        padding-right: 0;
        max-width: min(90vw, 100%);
        width: min(90vw, 100%);
        max-height: 100vh;
        height: 100vh;
        border-radius: 16px 16px 0 0;
        padding-top: max(env(safe-area-inset-top), 8px);
    }

    .product-modal.active .modal-content {
        transform: translateX(-50%) scale(1);
    }

    .modal-header-actions {
        position: absolute;
        top: clamp(0.5rem, 1.5vw, 0.75rem);
        right: clamp(0.75rem, 2vw, 1rem);
        left: auto;
        transform: none;
        gap: 0.4rem;
        justify-content: flex-end;
        padding: 0;
        width: auto;
        height: auto;
        pointer-events: auto;
    }

    .modal-share-btn {
        width: 36px;
        height: 36px;
        padding: 0;
        font-size: 1.1rem;
    }

    .modal-share-btn .share-text {
        display: none;
    }

    .modal-close {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    .modal-body {
        display: flex;
        flex-direction: column;
        max-height: calc(100vh - max(env(safe-area-inset-top), 8px) - 50px);
        height: calc(100vh - max(env(safe-area-inset-top), 8px) - 50px);
        gap: 0;
        overflow-y: auto;
        padding-bottom: 0;
    }

    .product-actions {
        flex-direction: column;
        padding: clamp(2.75rem, 5vw, 3.25rem) clamp(0.75rem, 2vw, 1rem) max(clamp(0.75rem, 2vw, 1rem), env(safe-area-inset-bottom, clamp(0.75rem, 2vw, 1rem)));
        gap: clamp(0.75rem, 2vw, 1rem);
        border-radius: 12px 12px 0 0;
        margin-top: auto;
        margin-bottom: 0;
        min-height: auto;
    }

    .product-actions>.quantity-selector,
    .product-actions>.add-to-cart-modal-btn {
        width: 100%;
    }

    .quantity-selector {
        flex-direction: column;
        width: 100%;
    }

    .quantity-selector>.quantity-info {
        width: 100%;
        text-align: center;
    }

    .modal-header-actions {
        top: clamp(0.5rem, 1.5vw, 0.75rem);
        right: clamp(0.75rem, 2vw, 1rem);
        left: auto;
        transform: none;
        gap: 0.4rem;
        justify-content: flex-end;
    }

    .modal-share-btn,
    .modal-close {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    .product-media-section {
        padding: 1rem;
        order: 1;
        flex-shrink: 0;
        border-bottom: 2px solid #e9ecef;
        border-left: none;
        max-height: none;
        overflow-y: visible;
    }

    .primary-media {
        padding: 0.875rem;
        position: relative;
        z-index: 1;
    }

    .primary-media-container {
        position: relative;
        width: 100%;
        z-index: 2;
    }

    .primary-media img {
        position: relative;
        max-height: 250px;
        width: 100%;
        height: auto;
        object-fit: contain;
        display: block;
        margin: 0 auto;
        z-index: 3;
        background: white;
    }

    /* Image Slider Responsive */
    .image-slider {
        min-height: 200px;
        max-height: 350px;
    }

    .slider-container {
        min-height: 200px;
        max-height: 350px;
    }

    .slide {
        min-height: 200px;
        max-height: 350px;
        padding: 0.875rem;
    }

    .slide img {
        max-height: calc(350px - 2rem);
        min-height: 150px;
    }

    .slider-btn {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .slider-prev {
        right: 10px;
    }

    .slider-next {
        left: 10px;
    }

    .slider-dots {
        bottom: 10px;
        padding: 6px 12px;
        gap: 6px;
    }

    .dot {
        width: 8px;
        height: 8px;
    }

    .dot.active {
        width: 10px;
        height: 10px;
    }

    .media-thumbnails {
        max-height: 80px;
        gap: 0.5rem;
        padding: 0.5rem 0;
    }

    .thumbnail {
        width: 60px;
        height: 60px;
    }

    .thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .product-details-section {
        padding: 1.25rem;
        max-height: none;
        overflow-y: visible;
        order: 2;
        flex: 1;
        width: 100%;
    }

    .product-actions {
        position: sticky;
        bottom: 0;
        background: white;
        border-top: 2px solid #e9ecef;
        margin: 0 -1.25rem -1.25rem;
        padding: clamp(2.75rem, 4vw, 3.25rem) 1.25rem 1rem;
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
        min-height: auto;
    }

    .modal-header-actions {
        top: 0.75rem;
        right: 1.25rem;
        left: auto;
        transform: none;
        justify-content: flex-end;
    }

    .product-header {
        margin-bottom: 0;
    }

    .product-title {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
        line-height: 1.3;
    }

    .product-category-badge {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        border-radius: 20px;
    }

    .product-price-section {
        padding: 1rem;
        margin-bottom: 0;
        flex-direction: column;
        gap: 1rem;
        border-radius: 12px;
    }

    .price-display,
    .stock-status-display {
        max-width: 100%;
        width: 100%;
        text-align: center;
    }

    .price-value {
        font-size: 1.5rem;
    }

    .stock-status-display {
        align-items: center;
    }

    /* Mobile Scroll Optimization */
    .product-info-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        max-height: none;
        overflow-y: visible;
        margin-bottom: 0;
    }

    .info-item {
        flex-direction: row;
        justify-content: space-between;
        gap: 0.5rem;
        padding: 0.875rem;
        text-align: right;
        border-radius: 10px;
    }

    .info-item .label {
        font-size: 0.85rem;
        flex: 0 0 auto;
    }

    .info-item .value {
        font-size: 0.9rem;
        text-align: left;
    }

    .product-description-full {
        margin-bottom: 0;
        padding: 1rem;
        max-height: 200px;
        overflow-y: auto;
        border-radius: 12px;
    }

    .product-description-full h4 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .product-description-full p {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .product-colors,
    .product-sizes {
        margin: 1rem 0;
        padding: 1rem;
        border-radius: 12px;
    }

    .product-colors h4,
    .product-sizes h4 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .colors-list,
    .sizes-list {
        max-height: 100px;
        overflow-y: auto;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.5rem 0;
    }

    .color-item {
        padding: 0.5rem;
        min-width: 70px;
    }

    .color-name {
        font-size: 0.75rem;
    }

    .color-preview {
        width: 25px;
        height: 25px;
    }

    .size-item {
        padding: 0.625rem 0.875rem;
        min-width: 60px;
    }

    .size-name {
        font-size: 0.9rem;
    }

    .size-stock {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }

    .product-actions {
        flex-direction: row;
        gap: 0.5rem;
        padding: 0.625rem;
        margin-top: 1rem;
    }

    .quantity-selector {
        flex-direction: row;
        align-items: center;
        gap: 0.35rem;
        flex: 1;
    }

    .quantity-selector label {
        font-size: 0.7rem;
    }

    .quantity-controls {
        gap: 0.25rem;
    }

    .quantity-btn {
        width: 22px;
        height: 22px;
        font-size: 0.75rem;
        border-radius: 4px;
    }

    .quantity-selector input {
        width: 38px;
        padding: 0.2rem;
        font-size: 0.7rem;
    }

    .quantity-input {
        width: 38px;
        padding: 0.2rem;
        font-size: 0.7rem;
    }

    .quantity-info {
        font-size: 0.65rem;
    }

    .add-to-cart-modal-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
        border-radius: 8px;
        flex-shrink: 0;
        min-width: auto;
    }

    .product-actions {
        flex-wrap: wrap;
        align-items: center;
    }

    .quantity-selector {
        min-width: 0;
    }

    .quantity-selector label,
    .quantity-controls,
    .quantity-btn,
    .quantity-selector input,
    .quantity-info {
        flex-shrink: 0;
    }

    /* Mobile selected states */
    .color-item.selected,
    .size-item.selected {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .video-link-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
    }

    .video-link-info {
        font-size: 0.8rem;
    }

    /* تحسينات عامة للهواتف */
    .loading-spinner {
        padding: 2rem 1rem;
    }

    .spinner {
        width: 40px;
        height: 40px;
        border-width: 3px;
    }

    .loading-spinner p {
        font-size: 0.9rem;
        margin-top: 0.75rem;
    }

    .no-products {
        padding: 2rem 1rem;
    }

    .no-products i {
        font-size: 3rem;
        margin-bottom: 0.75rem;
    }

    .no-products h3 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .no-products p {
        font-size: 0.9rem;
    }

    /* Footer للهواتف */
    .main-footer {
        padding: 1.5rem 0;
        margin-top: 2rem;
    }

    .main-footer p {
        font-size: 0.85rem;
        padding: 0 1rem;
    }
}

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

    /* تحسينات إضافية للشاشات الصغيرة */
    .main-header {
        padding: 0.625rem 0;
    }

    .logo img {
        height: 35px;
        max-width: 100px;
    }

    .cart-link {
        font-size: 1.2rem;
    }

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

    .hero-content h2 {
        font-size: 1.25rem;
    }

    /* Small Screen Banner */
    .banner-slider {
        height: 200px;
        border-radius: 10px;
    }

    .banner-content {
        padding: 0.875rem;
        max-width: 98%;
        background: transparent;
    }

    .banner-content h2 {
        font-size: 1.1rem;
        margin-bottom: 0.375rem;
    }

    .banner-content p {
        font-size: 0.8rem;
    }

    .banner-nav {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .banner-nav.prev {
        left: 5px;
    }

    .banner-nav.next {
        right: 5px;
    }

    .banner-indicators {
        bottom: 8px;
        gap: 5px;
    }

    .banner-indicator {
        width: 4px;
        height: 4px;
    }

    .banner-indicator.active {
        width: 5px;
        height: 5px;
    }

    /* تحسينات الفلاتر */
    .filters-section {
        padding: 1rem;
        margin-bottom: 0;
    }

    .search-box {
        margin-bottom: 0;
    }

    .search-box input {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .search-box button {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }

    .product-view-toggle {
        gap: 0.4rem;
        padding: 0.35rem;
        margin-bottom: 0;
    }

    .product-view-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .product-view-btn i {
        font-size: 0.85rem;
    }

    /* List view adjustments for small screens */
    .product-card-list {
        flex-direction: column;
        align-items: stretch;
    }

    .product-card-list .product-image-container {
        width: 100%;
        height: clamp(200px, 50vw, 250px);
    }

    .product-card-list .add-to-cart-btn {
        width: 100%;
    }

    /* Bubbles view adjustments - متزاحمة بدون عدد محدد */
    .products-bubbles {
        gap: clamp(0.375rem, 1vw, 0.75rem);
    }

    .product-card-bubbles.size-small {
        width: clamp(70px, 14vw, 100px);
        height: clamp(70px, 14vw, 100px);
        min-width: clamp(70px, 14vw, 100px);
        min-height: clamp(70px, 14vw, 100px);
    }

    .product-card-bubbles.size-medium {
        width: clamp(85px, 18vw, 130px);
        height: clamp(85px, 18vw, 130px);
        min-width: clamp(85px, 18vw, 130px);
        min-height: clamp(85px, 18vw, 130px);
    }

    .product-card-bubbles.size-large {
        width: clamp(100px, 22vw, 160px);
        height: clamp(100px, 22vw, 160px);
        min-width: clamp(100px, 22vw, 160px);
        min-height: clamp(100px, 22vw, 160px);
    }

    .toggle-btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.8rem;
    }

    .all-categories-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .group-button {
        padding: 0.625rem 0.875rem;
        font-size: 0.85rem;
    }

    /* تحسينات المنتجات - عرض 3 كاردات في الصف للشاشات 480px */
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .product-image {
        height: clamp(100px, 30vw, 120px);
        padding: clamp(0.2rem, 0.8vw, 0.25rem);
        object-fit: contain;
        max-height: 120px;
    }

    .product-info {
        padding: clamp(0.4rem, 1.2vw, 0.5rem);
    }

    .product-name {
        font-size: clamp(0.7rem, 2vw, 0.75rem);
        line-height: 1.25;
        margin-bottom: clamp(0.2rem, 0.8vw, 0.3rem);
        -webkit-line-clamp: 2;
        line-clamp: 2;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .product-description {
        font-size: clamp(0.6rem, 1.5vw, 0.65rem);
        line-height: 1.25;
        margin-bottom: clamp(0.3rem, 1vw, 0.5rem);
        -webkit-line-clamp: 2;
        line-clamp: 2;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .product-price {
        font-size: clamp(0.8rem, 2.2vw, 0.85rem);
        margin-bottom: clamp(0.3rem, 1vw, 0.5rem);
    }

    .add-to-cart-btn {
        padding: clamp(0.3rem, 1vw, 0.375rem);
        font-size: clamp(0.65rem, 1.8vw, 0.7rem);
        min-height: clamp(36px, 10vw, 40px);
    }

    /* تحسينات السلة للشاشات 480px */
    .page-header {
        margin-bottom: 1.5rem;
    }

    .back-to-home-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .back-to-home-btn span {
        font-size: 0.85rem;
    }

    .btn-clear-cart-top {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .btn-clear-cart-top span {
        font-size: 0.85rem;
    }

    .page-title {
        font-size: 1.3rem;
        margin-bottom: 0;
    }

    .cart-items {
        padding: 1rem;
    }

    .cart-item {
        flex-direction: column;
        padding: 1rem;
        text-align: center;
        align-items: center;
    }

    .cart-item-image {
        width: 100px;
        height: 100px;
        margin: 0 auto;
    }

    .cart-item-details {
        width: 100%;
        text-align: center;
    }

    .cart-item-name {
        font-size: 1rem;
    }

    .cart-item-price {
        font-size: 1.2rem;
        justify-content: center;
    }

    .cart-item-quantity {
        justify-content: center;
        width: 100%;
        max-width: 180px;
        margin: 0.75rem auto 0;
    }

    .remove-item {
        width: 44px;
        height: 44px;
        margin-top: 0.5rem;
    }

    .cart-summary {
        padding: 1.25rem;
    }

    .summary-card h3 {
        font-size: 1.2rem;
    }

    .summary-row {
        padding: 0.75rem;
    }

    /* Order Options Mobile */
    .order-options {
        padding: 1rem;
        margin: 1.25rem 0;
    }

    .order-options h4 {
        font-size: 1rem;
    }

    .option-group {
        margin-bottom: 1rem;
    }

    .option-group label {
        font-size: 0.9rem;
    }

    .option-group input,
    .option-group textarea {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .option-tag {
        font-size: 0.7rem;
        padding: 0.4rem 0.8rem;
    }

    .cart-options-editor {
        margin: 0.875rem 0;
        padding: 0.75rem;
    }

    .cart-options-title {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
    }

    .cart-option-selector {
        margin-bottom: 0.75rem;
    }

    .cart-option-selector label {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }

    .cart-color-option {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }

    .cart-size-option {
        padding: 0.45rem 0.875rem;
        font-size: 0.8rem;
    }

    .summary-actions {
        margin-top: 1.25rem;
        gap: 0.75rem;
    }

    .btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }

    .empty-cart {
        padding: 2.5rem 1.25rem;
    }

    .empty-cart i {
        font-size: 3.5rem;
    }

    .empty-cart h3 {
        font-size: 1.3rem;
    }

    .empty-cart p {
        font-size: 0.95rem;
    }

    /* Small Screen Modal Optimization */
    .modal-content {
        position: fixed;
        top: 0;
        left: 50%;
        transform: translateX(-50%) scale(0.98);
        margin: 0;
        padding-left: 0;
        padding-right: 0;
        max-width: min(90vw, 100%);
        width: min(90vw, 100%);
        max-height: 100vh;
        height: 100vh;
        border-radius: 12px 12px 0 0;
        padding-top: max(env(safe-area-inset-top), 8px);
    }

    .product-modal.active .modal-content {
        transform: translateX(-50%) scale(1);
    }

    .modal-header-actions {
        position: absolute;
        top: clamp(0.5rem, 1.5vw, 0.75rem);
        right: clamp(0.75rem, 2vw, 1rem);
        left: auto;
        transform: none;
        gap: 0.35rem;
        justify-content: flex-end;
        padding: 0;
        width: auto;
        height: auto;
        pointer-events: auto;
    }

    .modal-share-btn,
    .modal-close {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }

    .modal-share-btn {
        width: 34px;
        height: 34px;
        padding: 0;
        font-size: 1rem;
    }

    .modal-share-btn .share-text {
        display: none;
    }

    .modal-close {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }

    .modal-body {
        max-height: calc(98vh - max(env(safe-area-inset-top), 8px) - 50px);
        height: calc(98vh - max(env(safe-area-inset-top), 8px) - 50px);
        gap: 0.625rem;
        padding-right: 8px;
        padding-left: 8px;
        padding-bottom: 0;
    }

    .product-media-section {
        padding: 0.625rem;
        max-height: none;
        overflow-y: visible;
        order: 1;
        flex-shrink: 0;
        border-bottom: 2px solid #e9ecef;
        border-left: none;
    }

    .product-details-section {
        order: 2;
        flex: 1;
        width: 100%;
    }

    .product-actions {
        padding: clamp(0.625rem, 1.5vw, 0.875rem);
        padding-bottom: max(clamp(0.625rem, 1.5vw, 0.875rem), env(safe-area-inset-bottom, clamp(0.625rem, 1.5vw, 0.875rem)));
        gap: clamp(0.5rem, 1.5vw, 0.625rem);
        border-radius: 12px 12px 0 0;
        margin-top: auto;
        margin-bottom: 0;
        flex-direction: column;
        order: 3;
    }

    .quantity-selector {
        width: 100%;
        justify-content: space-between;
    }

    .add-to-cart-modal-btn {
        width: 100%;
        margin-top: 0.5rem;
    }

    .primary-media {
        padding: 0.75rem;
        position: relative;
        z-index: 1;
    }

    .primary-media-container {
        position: relative;
        width: 100%;
        z-index: 2;
    }

    .primary-media img {
        position: relative;
        max-height: 200px;
        width: 100%;
        height: auto;
        object-fit: contain;
        display: block;
        margin: 0 auto;
        z-index: 3;
        background: white;
    }

    /* Image Slider Extra Small */
    .image-slider {
        min-height: 180px;
        max-height: 280px;
    }

    .slider-container {
        min-height: 180px;
        max-height: 280px;
    }

    .slide {
        min-height: 180px;
        max-height: 280px;
        padding: 0.75rem;
    }

    .slide img {
        max-height: calc(280px - 2rem);
        min-height: 120px;
    }

    .slider-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .slider-prev {
        right: 8px;
    }

    .slider-next {
        left: 8px;
    }

    .slider-dots {
        bottom: 8px;
        padding: 5px 10px;
        gap: 5px;
    }

    .dot {
        width: 7px;
        height: 7px;
    }

    .dot.active {
        width: 9px;
        height: 9px;
    }

    .media-thumbnails {
        max-height: 70px;
        gap: 0.375rem;
    }

    .thumbnail {
        width: 50px;
        height: 50px;
    }

    .thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .product-details-section {
        padding: 0.875rem;
    }

    .product-title {
        font-size: 1.1rem;
    }

    .product-category-badge {
        padding: 0.45rem 0.875rem;
        font-size: 0.75rem;
    }

    .product-price-section {
        padding: 0.875rem;
        margin-bottom: 1rem;
    }

    .price-value {
        font-size: 1.3rem;
    }

    .product-info-grid {
        gap: 0.625rem;
        margin-bottom: 1rem;
    }

    .info-item {
        padding: 0.75rem;
    }

    .info-item .label {
        font-size: 0.8rem;
    }

    .info-item .value {
        font-size: 0.85rem;
    }

    .product-description-full {
        padding: 0.875rem;
        margin-bottom: 1rem;
        max-height: 150px;
    }

    .product-description-full h4 {
        font-size: 0.95rem;
    }

    .product-description-full p {
        font-size: 0.85rem;
    }

    .product-colors,
    .product-sizes {
        padding: 0.875rem;
        margin: 0.875rem 0;
    }

    .product-colors h4,
    .product-sizes h4 {
        font-size: 0.95rem;
    }

    .colors-list,
    .sizes-list {
        max-height: 80px;
        gap: 0.375rem;
    }

    .color-item {
        min-width: 60px;
        padding: 0.45rem;
    }

    .color-name {
        font-size: 0.7rem;
    }

    .color-preview {
        width: 20px;
        height: 20px;
    }

    .size-item {
        min-width: 50px;
        padding: 0.5rem 0.75rem;
    }

    .size-name {
        font-size: 0.85rem;
    }

    .size-stock {
        font-size: 0.65rem;
    }

    .product-actions {
        flex-direction: column;
        gap: 0.75rem;
        padding: clamp(2.5rem, 5vw, 3rem) 0.5rem 0.5rem;
        min-height: auto;
    }

    .product-actions>.quantity-selector,
    .product-actions>.add-to-cart-modal-btn {
        width: 100%;
    }

    .quantity-selector {
        flex-direction: column;
        width: 100%;
    }

    .quantity-selector>.quantity-info {
        width: 100%;
        text-align: center;
    }

    .quantity-selector {
        gap: 0.3rem;
        flex: 1;
    }

    .quantity-selector label {
        font-size: 0.7rem;
    }

    .quantity-controls {
        gap: 0.2rem;
    }

    .quantity-btn {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }

    .quantity-selector input {
        width: 35px;
        padding: 0.2rem;
        font-size: 0.7rem;
    }

    .quantity-info {
        font-size: 0.65rem;
        flex-shrink: 0;
        width: 100%;
        text-align: center;
        margin-top: 0.25rem;
    }

    .add-to-cart-modal-btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.8rem;
        flex-shrink: 0;
        min-width: auto;
    }

    .product-actions {
        flex-wrap: wrap;
        align-items: center;
    }

    .quantity-selector {
        min-width: 0;
    }

    .quantity-selector label,
    .quantity-controls,
    .quantity-btn,
    .quantity-selector input {
        flex-shrink: 0;
    }

    .quantity-input {
        width: 70px;
        padding: 0.5rem;
        font-size: 0.95rem;
    }

    .quantity-info {
        font-size: 0.8rem;
    }

    .add-to-cart-modal-btn {
        padding: 0.55rem 1rem;
        font-size: 0.85rem;
    }

    .video-link-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.85rem;
    }

    .video-link-info {
        font-size: 0.75rem;
    }

    /* Extra small screen scrollbar customization */
    .product-details-section::-webkit-scrollbar,
    .product-media-section::-webkit-scrollbar {
        width: 5px;
    }

    .product-info-grid::-webkit-scrollbar,
    .product-description-full::-webkit-scrollbar,
    .product-actions::-webkit-scrollbar {
        width: 5px;
    }

    .colors-list::-webkit-scrollbar,
    .sizes-list::-webkit-scrollbar,
    .media-thumbnails::-webkit-scrollbar {
        width: 4px;
    }
}

/* زر WhatsApp العائم */
.floating-whatsapp-btn {
    position: fixed;
    bottom: max(20px, env(safe-area-inset-bottom, 20px));
    left: max(20px, env(safe-area-inset-left, 20px));
    width: 60px;
    height: 60px;
    min-width: 60px;
    min-height: 60px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 9998;
    /* أقل من modal لكن أعلى من باقي العناصر */
    transition: all 0.3s ease;
    text-decoration: none;
    animation: pulse 2s infinite;
    touch-action: manipulation;
    /* تحسين الاستجابة للمس */
}

.floating-whatsapp-btn:hover {
    background: #20BA5A;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.floating-whatsapp-btn:active {
    transform: scale(0.95);
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    }

    50% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.8);
    }

    100% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    }
}

/* Responsive للزر العائم */
@media (max-width: 768px) {
    .floating-whatsapp-btn {
        width: 56px;
        height: 56px;
        min-width: 56px;
        min-height: 56px;
        font-size: 28px;
        bottom: max(16px, env(safe-area-inset-bottom, 16px));
        left: max(16px, env(safe-area-inset-left, 16px));
    }
}

@media (max-width: 480px) {
    .floating-whatsapp-btn {
        width: 52px;
        height: 52px;
        min-width: 52px;
        min-height: 52px;
        font-size: 26px;
        bottom: max(12px, env(safe-area-inset-bottom, 12px));
        left: max(12px, env(safe-area-inset-left, 12px));
    }
}

@media (max-width: 360px) {
    .floating-whatsapp-btn {
        width: 48px;
        height: 48px;
        min-width: 48px;
        min-height: 48px;
        font-size: 24px;
        bottom: max(10px, env(safe-area-inset-bottom, 10px));
        left: max(10px, env(safe-area-inset-left, 10px));
    }
}

/* ============================================
   Mobile-First Media Queries
   ============================================ */

/* Extra Small Phones (less than 320px) */
@media (max-width: 319px) {
    .container {
        padding: 0 clamp(0.5rem, 2vw, 0.75rem);
    }

    .logo img {
        height: clamp(2rem, 6vw, 2.5rem);
        max-width: min(90px, 40vw);
    }

    .logo h1 {
        font-size: clamp(0.875rem, 3vw, 1rem);
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: clamp(0.5rem, 2vw, 0.75rem);
    }

    .banner-slider {
        height: clamp(180px, 45vw, 220px);
    }

    .banner-content h2 {
        font-size: clamp(1.25rem, 5vw, 1.5rem);
    }

    .modal-content {
        position: fixed;
        top: 0;
        left: 50%;
        transform: translateX(-50%) scale(0.98);
        margin: 0;
        padding-left: 0;
        padding-right: 0;
        max-width: min(90vw, 100%);
        width: min(90vw, 100%);
        max-height: 100vh;
        height: 100vh;
        border-radius: clamp(0.5rem, 2vw, 0.75rem) clamp(0.5rem, 2vw, 0.75rem) 0 0;
        padding-top: max(env(safe-area-inset-top), clamp(0.5rem, 2vw, 0.75rem));
    }

    .product-modal.active .modal-content {
        transform: translateX(-50%) scale(1);
    }

    .modal-header-actions {
        position: absolute;
        top: max(env(safe-area-inset-top), clamp(0.5rem, 2vw, 0.75rem));
        right: max(env(safe-area-inset-right), clamp(0.75rem, 2vw, 1rem));
        left: auto;
        transform: none;
        justify-content: flex-end;
        gap: clamp(0.25rem, 1vw, 0.375rem);
    }
}

/* Small Phones (320px to 480px) */
@media (min-width: 320px) and (max-width: 480px) {
    .main-nav {
        display: none;
        /* مخفي على الهواتف الصغيرة */
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: clamp(0.5rem, 2vw, 0.75rem);
    }

    .banner-slider {
        height: clamp(220px, 50vw, 280px);
    }

    .banner-content {
        padding: clamp(1rem, 3vw, 1.5rem);
    }

    .banner-content h2 {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }

    .modal-content {
        position: fixed;
        top: 0;
        left: 50%;
        transform: translateX(-50%) scale(0.98);
        margin: 0;
        padding-left: 0;
        padding-right: 0;
        max-width: min(90vw, 100%);
        width: min(90vw, 100%);
        max-height: 100vh;
        height: 100vh;
        border-radius: clamp(0.75rem, 2vw, 1rem) clamp(0.75rem, 2vw, 1rem) 0 0;
        padding-top: max(env(safe-area-inset-top), clamp(0.75rem, 2vw, 1rem));
    }

    .product-modal.active .modal-content {
        transform: translateX(-50%) scale(1);
    }

    .modal-header-actions {
        position: absolute;
        top: clamp(0.75rem, 2vw, 1rem);
        right: clamp(0.75rem, 2vw, 1rem);
        left: auto;
        transform: none;
        justify-content: flex-end;
        padding: 0;
        width: auto;
        height: auto;
        pointer-events: auto;
        gap: clamp(0.25rem, 1vw, 0.375rem);
    }

    .modal-share-btn,
    .modal-close {
        width: clamp(2rem, 6vw, 2.5rem);
        height: clamp(2rem, 6vw, 2.5rem);
        min-width: var(--touch-target-min);
        min-height: var(--touch-target-min);
        font-size: clamp(0.875rem, 2.5vw, 1rem);
    }

    .modal-body {
        flex-direction: column;
        padding: clamp(1rem, 3vw, 1.5rem);
        gap: clamp(1rem, 3vw, 1.5rem);
    }
}

/* Medium Phones (481px to 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .main-nav {
        display: block;
    }

    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: clamp(0.75rem, 2vw, 1rem);
    }

    .banner-slider {
        height: clamp(280px, 45vw, 350px);
    }

    .banner-content h2 {
        font-size: clamp(2rem, 5vw, 2.5rem);
    }
}

/* Tablets (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: clamp(1rem, 2vw, 1.5rem);
    }

    .banner-slider {
        height: clamp(350px, 40vw, 400px);
    }
}

/* Desktop (1025px and above) */
@media (min-width: 1025px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: clamp(1.5rem, 2vw, 2rem);
    }

    .main-nav {
        display: block;
    }

    /* Bubbles view - متزاحمة بدون عدد محدد */
    .products-bubbles {
        gap: clamp(0.75rem, 1.5vw, 1.25rem);
    }

    .product-card-bubbles.size-small {
        width: clamp(100px, 14vw, 140px);
        height: clamp(100px, 14vw, 140px);
        min-width: clamp(100px, 14vw, 140px);
        min-height: clamp(100px, 14vw, 140px);
    }

    .product-card-bubbles.size-medium {
        width: clamp(120px, 18vw, 170px);
        height: clamp(120px, 18vw, 170px);
        min-width: clamp(120px, 18vw, 170px);
        min-height: clamp(120px, 18vw, 170px);
    }

    .product-card-bubbles.size-large {
        width: clamp(140px, 22vw, 200px);
        height: clamp(140px, 22vw, 200px);
        min-width: clamp(140px, 22vw, 200px);
        min-height: clamp(140px, 22vw, 200px);
    }
}

/* Landscape Orientation - Mobile Phones */
@media (orientation: landscape) and (max-height: 600px) {
    .product-card {
        max-height: none;
        display: flex;
        flex-direction: column;
    }

    .product-image {
        height: clamp(100px, 25vh, 140px);
        max-height: 140px;
        padding: clamp(0.25rem, 1vw, 0.5rem);
    }

    .product-info {
        padding: clamp(0.5rem, 1.5vw, 0.75rem);
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .product-name {
        font-size: clamp(0.75rem, 2vw, 0.85rem);
        margin-bottom: clamp(0.125rem, 0.5vw, 0.25rem);
        line-height: 1.2;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .product-description {
        font-size: clamp(0.65rem, 1.5vw, 0.7rem);
        margin-bottom: clamp(0.25rem, 1vw, 0.5rem);
        line-height: 1.2;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .product-price {
        font-size: clamp(0.85rem, 2.5vw, 0.95rem);
        margin-bottom: clamp(0.25rem, 1vw, 0.5rem);
    }

    .add-to-cart-btn {
        padding: clamp(0.375rem, 1vw, 0.5rem);
        font-size: clamp(0.7rem, 1.8vw, 0.8rem);
        min-height: clamp(36px, 8vh, 40px);
    }

    .products-grid {
        gap: clamp(0.5rem, 1.5vw, 0.75rem);
    }
}

/* Small Landscape Screens */
@media (orientation: landscape) and (max-height: 500px) {
    .product-image {
        height: clamp(80px, 20vh, 100px);
        max-height: 100px;
        padding: clamp(0.125rem, 0.5vw, 0.25rem);
    }

    .product-info {
        padding: clamp(0.375rem, 1vw, 0.5rem);
    }

    .product-name {
        font-size: clamp(0.7rem, 1.8vw, 0.8rem);
        line-height: 1.15;
        margin-bottom: clamp(0.125rem, 0.5vw, 0.2rem);
    }

    .product-description {
        font-size: clamp(0.6rem, 1.3vw, 0.65rem);
        line-height: 1.15;
        margin-bottom: clamp(0.2rem, 0.8vw, 0.4rem);
    }

    .product-price {
        font-size: clamp(0.8rem, 2vw, 0.9rem);
        margin-bottom: clamp(0.2rem, 0.8vw, 0.4rem);
    }

    .add-to-cart-btn {
        padding: clamp(0.3rem, 0.8vw, 0.4rem);
        font-size: clamp(0.65rem, 1.5vw, 0.75rem);
        min-height: clamp(32px, 7vh, 36px);
    }
}

/* Extra Small Screen (max-width: 360px) - Legacy Support */
@media (max-width: 360px) {
    .container {
        padding: 0 clamp(0.5rem, 2vw, 0.75rem);
    }

    .logo img {
        height: clamp(2rem, 6vw, 2.5rem);
        max-width: min(90px, 40vw);
    }

    .cart-link {
        font-size: clamp(1.1rem, 3vw, 1.25rem);
    }

    .modal-content {
        position: fixed;
        top: 0;
        left: 50%;
        transform: translateX(-50%) scale(0.98);
        margin: 0;
        padding-left: 0;
        padding-right: 0;
        max-width: min(90vw, 100%);
        width: min(90vw, 100%);
        max-height: 100vh;
        height: 100vh;
        border-radius: clamp(0.5rem, 2vw, 0.75rem) clamp(0.5rem, 2vw, 0.75rem) 0 0;
        padding-top: max(env(safe-area-inset-top), clamp(0.5rem, 2vw, 0.75rem));
    }

    .product-modal.active .modal-content {
        transform: translateX(-50%) scale(1);
    }

    .modal-header-actions {
        position: absolute;
        top: clamp(0.5rem, 1.5vw, 0.75rem);
        right: clamp(0.75rem, 2vw, 1rem);
        left: auto;
        transform: none;
        gap: clamp(0.25rem, 1vw, 0.375rem);
        justify-content: flex-end;
        padding: 0;
        width: auto;
        height: auto;
        pointer-events: auto;
        padding: 0;
        width: auto;
        height: auto;
        pointer-events: auto;
        top: clamp(0.5rem, 1.5vw, 0.75rem);
    }

    .modal-share-btn {
        width: clamp(2rem, 6vw, 2.5rem);
        height: clamp(2rem, 6vw, 2.5rem);
        min-width: var(--touch-target-min);
        min-height: var(--touch-target-min);
        padding: 0;
        font-size: clamp(0.875rem, 2.5vw, 1rem);
    }

    .modal-share-btn .share-text {
        display: none;
    }

    .modal-close {
        width: clamp(2rem, 6vw, 2.5rem);
        height: clamp(2rem, 6vw, 2.5rem);
        min-width: var(--touch-target-min);
        min-height: var(--touch-target-min);
        font-size: clamp(0.875rem, 2.5vw, 1rem);
    }

    .modal-body {
        max-height: calc(95vh - 40px);
        height: calc(95vh - 40px);
    }

    .product-media-section,
    .product-details-section {
        max-height: none;
        padding: 0.5rem;
    }

    .product-title {
        font-size: 1rem;
    }

    /* Extra Small Screen Banner */
    .banner-slider {
        height: 180px;
        border-radius: 8px;
    }

    .banner-content {
        padding: 0.625rem;
        max-width: 98%;
        background: transparent;
    }

    .banner-content h2 {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }

    .banner-content p {
        font-size: 0.75rem;
    }

    .banner-nav {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }

    .banner-nav.prev {
        left: 3px;
    }

    .banner-nav.next {
        right: 3px;
    }

    .banner-indicators {
        bottom: 5px;
        gap: 4px;
    }

    .banner-indicator {
        width: 5px;
        height: 5px;
    }

    .filters-section {
        padding: 0.875rem;
    }

    .search-box input {
        padding: 0.625rem;
        font-size: 0.85rem;
    }

    .search-box button {
        padding: 0.625rem 1rem;
        font-size: 0.85rem;
    }

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

    .product-image {
        height: 140px;
        padding: 0.375rem;
        object-fit: contain;
    }

    .product-info {
        padding: 0.625rem;
    }

    .product-name {
        font-size: 0.8rem;
    }

    .product-description {
        font-size: 0.7rem;
    }

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

    .add-to-cart-btn {
        padding: 0.5rem;
        font-size: 0.75rem;
    }

    .info-item {
        padding: 0.625rem;
        flex-direction: column;
        text-align: center;
        gap: 0.375rem;
    }

    .info-item .label,
    .info-item .value {
        font-size: 0.75rem;
    }

    .product-price-section {
        padding: 0.875rem;
        flex-direction: column;
        gap: 0.75rem;
    }

    .price-value {
        font-size: 1.3rem;
    }

    .cart-item {
        flex-direction: column;
        text-align: center;
        gap: 0.625rem;
    }

    .cart-item-image {
        width: 80px;
        height: 80px;
        margin: 0 auto;
    }

    .cart-item-details {
        width: 100%;
    }

    .cart-item-quantity {
        justify-content: center;
    }

    /* Order Options Extra Small */
    .order-options {
        padding: 0.75rem;
        margin: 1rem 0;
    }

    .option-group {
        margin-bottom: 0.75rem;
    }

    .option-group label {
        font-size: 0.8rem;
    }

    .option-group input,
    .option-group textarea {
        padding: 0.5rem;
        font-size: 0.85rem;
    }

    .option-tag {
        font-size: 0.65rem;
        padding: 0.15rem 0.5rem;
    }

    .btn {
        padding: 0.625rem 1rem;
        font-size: 0.85rem;
    }

    /* Extra small selected states */
    .color-item.selected,
    .size-item.selected {
        transform: translateY(-1px);
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    }

    .product-actions {
        flex-direction: row;
        gap: 0.35rem;
        padding: 0.45rem;
    }

    .quantity-selector {
        gap: 0.25rem;
        flex: 1;
    }

    .quantity-selector label {
        font-size: 0.65rem;
    }

    .quantity-controls {
        gap: 0.15rem;
    }

    .quantity-btn {
        width: 18px;
        height: 18px;
        font-size: 0.65rem;
    }

    .quantity-selector input {
        width: 32px;
        padding: 0.15rem;
        font-size: 0.65rem;
    }

    .quantity-info {
        font-size: 0.6rem;
    }

    .add-to-cart-modal-btn {
        padding: 0.45rem 0.75rem;
        font-size: 0.75rem;
    }

    .quantity-input {
        width: 40px;
        padding: 0.25rem;
        font-size: 0.75rem;
    }

    .add-to-cart-modal-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    /* Extra small screen scrollbar customization */
    .product-details-section::-webkit-scrollbar,
    .product-media-section::-webkit-scrollbar {
        width: 4px;
    }

    .product-info-grid::-webkit-scrollbar,
    .product-description-full::-webkit-scrollbar,
    .product-actions::-webkit-scrollbar {
        width: 4px;
    }

    .colors-list::-webkit-scrollbar,
    .sizes-list::-webkit-scrollbar,
    .media-thumbnails::-webkit-scrollbar {
        width: 3px;
    }
}

/* Modal adjustments for small screens to prevent overlap */
@media (max-width: 480px) {
    .modal-header-actions {
        position: relative;
        top: auto;
        right: auto;
        left: auto;
        transform: none;
        justify-content: center;
        padding: 0.5rem 0;
        order: -1;
        margin-bottom: 0.5rem;
    }

    .product-actions {
        padding-top: 1rem;
    }

    .modal-content {
        padding-top: 0;
    }
}