/**
 * Elyose One-Page Store — Zero Tech Mega-Store Stylesheet
 * 
 * Styled for: Zero Tech (Electronics, Gadgets & Home Appliance Mega-Store)
 * Language Direction: RTL (Arabic)
 * Design Philosophy: Creative, Clean, Off-white backgrounds, Vibrant actions,
 *                    Seamless transitions, Glassmorphism, Cinematic Modals.
 * Responsive: Mobile-first.
 * 
 * @package Elyose_Onepage_Store
 */

/* ─── 1. Design Tokens & Root Variables ───────────────────────────────────── */
:root {
    --zero-primary: #0f2e5a;        /* Logo Dark Navy Blue */
    --zero-primary-hover: #0b2142;
    --zero-secondary: #ff5500;      /* Logo Vibrant Orange */
    --zero-secondary-hover: #e04b00;
    
    --zero-dark: #0f2e5a;           /* Dark Navy Blue for headers */
    --zero-light: #f7f9fc;          /* Site Background light slate */
    --zero-white: #ffffff;
    --zero-gray-100: #eef2f6;
    --zero-gray-200: #e2e8f0;
    --zero-gray-300: #cbd5e1;
    --zero-gray-600: #556880;       /* Cool Gray for body texts and description */
    --zero-gray-800: #2d3748;       /* Slate Dark for labels/subtitles */
    
    --zero-success: #8cc63f;        /* Logo Lime Green (In-stock highlight) */
    --zero-shadow-sm: 0 2px 4px rgba(15, 46, 90, 0.05);
    --zero-shadow-md: 0 10px 20px rgba(15, 46, 90, 0.08);
    --zero-shadow-lg: 0 20px 40px rgba(15, 46, 90, 0.12);
    --zero-radius-sm: 8px;
    --zero-radius-md: 16px;
    --zero-radius-lg: 24px;
    --zero-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    --zero-font: 'Cairo', sans-serif;
}

/* ─── 2. General Store Container ─────────────────────────────────────────── */
.store {
    font-family: var(--zero-font);
    background-color: var(--zero-light);
    color: var(--zero-dark);
    padding: 24px 16px;
    border-radius: var(--zero-radius-md);
    max-width: 1400px;
    margin: 0 auto;
    direction: rtl;
    box-sizing: border-box;
}

/* Force Cairo font on buttons and inputs inside the store */
.store button,
.store input,
.store select,
.store textarea {
    font-family: var(--zero-font) !important;
}

.store * {
    box-sizing: border-box;
}

/* ─── 3. Store Header ────────────────────────────────────────────────────── */
.store__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--zero-gray-200);
    padding-bottom: 20px;
    flex-wrap: wrap;
}

.store__header-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--zero-dark);
    margin: 0;
    position: relative;
    padding-right: 12px;
    white-space: nowrap;
}

.store__header-title::before {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 4px;
    background-color: var(--zero-primary);
    border-radius: 2px;
}

/* Glassmorphism Interactive Search Bar */
.store__search {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 460px;
    min-width: 240px;
}

.store__search-icon {
    position: absolute;
    right: 16px;
    display: flex;
    align-items: center;
    color: var(--zero-gray-600);
    pointer-events: none;
    transition: color 0.3s ease;
}

.store__search-input {
    width: 100%;
    padding: 11px 44px 11px 40px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--zero-gray-200);
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    color: var(--zero-dark);
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(15, 46, 90, 0.03);
}

.store__search-input:focus {
    background: #ffffff;
    border-color: var(--zero-secondary);
    box-shadow: 0 0 0 4px rgba(255, 85, 0, 0.12), 0 4px 16px rgba(15, 46, 90, 0.06);
}

.store__search-input:focus + .store__search-icon {
    color: var(--zero-secondary);
}

.store__search-clear {
    position: absolute;
    left: 12px;
    background: none;
    border: none;
    font-size: 18px;
    color: var(--zero-gray-600);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.store__search-clear:hover {
    color: var(--zero-dark);
    background-color: var(--zero-gray-100);
}

/* Cart Toggle Button */
.store__cart-toggle {
    background-color: var(--zero-white);
    border: 1px solid var(--zero-gray-200);
    padding: 12px 20px;
    border-radius: var(--zero-radius-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--zero-transition);
    box-shadow: var(--zero-shadow-sm);
    position: relative;
    white-space: nowrap;
}

.store__cart-toggle:hover {
    border-color: var(--zero-primary);
    box-shadow: var(--zero-shadow-md);
    transform: translateY(-2px);
}

.store__cart-toggle-icon svg {
    fill: none;
    stroke: var(--zero-dark);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: var(--zero-transition);
}

.store__cart-toggle:hover .store__cart-toggle-icon svg {
    stroke: var(--zero-primary);
}

.store__cart-toggle-count {
    background-color: var(--zero-secondary);
    color: var(--zero-white);
    font-size: 12px;
    font-weight: 700;
    min-width: 22px;
    height: 22px;
    padding: 2px 6px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(255, 102, 0, 0.4);
    transition: transform 0.2s ease;
}

@keyframes cartPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.35); background-color: #ff7700; box-shadow: 0 0 16px rgba(255, 119, 0, 0.7); }
    100% { transform: scale(1); }
}

.store__cart-toggle-count--pulse {
    animation: cartPulse 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ─── 4. Category Filter Bar (Pills & Horizontal Scroll) ─────────────────── */
.store__filters {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 8px 4px 16px 4px;
    margin-bottom: 32px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Hide default scrollbar on Firefox */
    -ms-overflow-style: none; /* Hide default scrollbar on IE/Edge */
}

/* Hide default scrollbar on Chrome/Safari/Opera for Mobile View */
.store__filters::-webkit-scrollbar {
    display: none;
}

.store__filters-btn {
    background-color: var(--zero-white);
    color: var(--zero-gray-600);
    border: 1px solid var(--zero-gray-200);
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--zero-transition);
    box-shadow: var(--zero-shadow-sm);
}

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

/* Mobile Active Pill Style: Orange border and text, white background */
.store__filters-btn--active {
    background-color: var(--zero-white) !important;
    color: var(--zero-secondary) !important;
    border-color: var(--zero-secondary) !important;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(230, 92, 0, 0.08);
}

/* ─── 5. Responsive Product Grid ─────────────────────────────────────────── */
.store__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr) !important; /* 2 columns on Mobile/Tablet */
    gap: 16px;
    position: relative;
    min-height: 200px;
}

/* ─── 5.1 Desktop Layout Redesign (min-width: 992px) ─────────────────────── */
@media (min-width: 992px) {
    /* 2-Column main store layout */
    .store {
        display: grid;
        grid-template-columns: 280px 1fr;
        gap: 32px;
        align-items: start;
    }
    
    .store__header {
        grid-column: 1 / -1; /* Header takes full width */
    }
    
    /* Sticky Sidebar Filters */
    .store__filters {
        grid-column: 1;
        position: sticky;
        top: 24px;
        max-height: calc(100vh - 48px);
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 4px;
        scrollbar-width: thin;
        scrollbar-color: var(--zero-primary) var(--zero-gray-100);
        -webkit-mask-image: none;
        mask-image: none;
    }
    
    /* Show thin scrollbar on desktop sidebar if needed */
    .store__filters::-webkit-scrollbar {
        width: 4px;
        display: block;
    }
    .store__filters::-webkit-scrollbar-track {
        background: var(--zero-gray-100);
        border-radius: 2px;
    }
    .store__filters::-webkit-scrollbar-thumb {
        background: var(--zero-primary);
        border-radius: 2px;
    }
    
    /* Sidebar vertical block button style */
    .store__filters-btn {
        display: block;
        width: 100%;
        text-align: right;
        padding: 12px 20px;
        background-color: transparent;
        color: var(--zero-gray-800);
        border: none !important;
        border-radius: 0;
        margin: 0;
        white-space: normal;
        box-shadow: none;
    }
    
    .store__filters-btn:not(.store__filters-btn--active):hover {
        background-color: #f7fafc;
        color: var(--zero-primary);
        border-color: transparent;
        transform: none;
    }
    
    /* Desktop Active Button: Right orange stripe, white bg, bold dark navy text */
    .store__filters-btn--active {
        background-color: var(--zero-white) !important;
        color: var(--zero-primary) !important;
        font-weight: 700;
        border-right: 4px solid var(--zero-secondary) !important;
        border-left: none !important;
        border-top: none !important;
        border-bottom: none !important;
        border-radius: 0;
        box-shadow: 0 2px 8px rgba(15, 46, 90, 0.04) !important;
    }
    
    /* Product grid takes 2nd column and uses 3 columns layout */
    .store__grid {
        grid-column: 2;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 24px;
    }
}

/* Grid Loaders */
.store__grid-loader {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 0;
}

/* ─── Shimmering Skeleton Loader ───────────────────────────────────────── */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton-card {
    pointer-events: none;
    user-select: none;
    border-color: rgba(226, 232, 240, 0.6) !important;
    background: #ffffff !important;
    box-shadow: 0 4px 12px rgba(15, 46, 90, 0.03) !important;
}

.skeleton-box {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 37%, #f1f5f9 63%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: 8px;
}

.skeleton-img {
    width: 100%;
    padding-bottom: 100%;
    border-radius: 0;
}

.skeleton-title {
    height: 18px;
    width: 85%;
    margin-bottom: 12px;
}

.skeleton-price {
    height: 22px;
    width: 45%;
    margin-bottom: 16px;
}

.skeleton-btn {
    height: 42px;
    width: 100%;
    margin-top: auto;
    border-radius: 10px;
}

.store__grid-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
    color: var(--zero-gray-600);
    background-color: var(--zero-white);
    border-radius: var(--zero-radius-md);
    border: 1px dashed var(--zero-gray-300);
}

/* ─── 6. Premium Product Card ────────────────────────────────────────────── */
.product-card {
    background-color: var(--zero-white);
    border-radius: var(--zero-radius-md);
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 4px 14px rgba(15, 46, 90, 0.03);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease;
    box-sizing: border-box;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06), 0 4px 10px rgba(15, 46, 90, 0.04);
    border-color: rgba(15, 46, 90, 0.2);
}

/* Image Wrapper with fixed aspect ratio */
.product-card__image-wrapper {
    position: relative;
    padding-bottom: 100%; /* 1:1 Square Aspect Ratio */
    background-color: var(--zero-gray-100);
    overflow: hidden;
}

/* Badges Floating Container */
.product-card__badges {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 5;
    pointer-events: none;
}

.product-card__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.2px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.product-card__badge--sale {
    background: rgba(255, 85, 0, 0.92);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.product-card__badge--featured {
    background: rgba(15, 46, 90, 0.92);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.product-card__badge--out-of-stock {
    background: rgba(100, 116, 139, 0.92);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.product-card__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-card__image {
    transform: scale(1.08);
}

/* Product Card Details Body */
.product-card__body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-card__title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--zero-dark);
    margin: 0 0 10px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 42px; /* Enforces title grid alignment */
    transition: var(--zero-transition);
}

.product-card:hover .product-card__title {
    color: var(--zero-dark); /* Keep the luxury Dark Navy Blue */
}

.product-card__price {
    font-size: 17px;
    font-weight: 800;
    color: var(--zero-secondary);
    margin-bottom: 16px;
}

/* Quick View Interactive CTA Button */
.product-card__cta {
    background: transparent;
    color: var(--zero-primary);
    border: 2px solid var(--zero-primary);
    padding: 11px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
    margin-top: auto;
}

.product-card__cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--zero-primary) 0%, #1a437a 100%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card__cta:hover {
    color: #ffffff;
    border-color: var(--zero-primary);
    box-shadow: 0 6px 16px rgba(15, 46, 90, 0.25);
    transform: translateY(-1px);
}

.product-card__cta:hover::before {
    opacity: 1;
}

.product-card__cta:active {
    transform: scale(0.97);
}

/* ─── 7. Cinematic Quick View Modal ──────────────────────────────────────── */
.quick-view-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.quick-view-modal--open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Backdrop */
.quick-view-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(18, 24, 36, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Dialog Container */
.quick-view-modal__dialog {
    background-color: var(--zero-white);
    border-radius: var(--zero-radius-md);
    width: 100%;
    max-width: 900px;
    max-height: 90%;
    overflow-y: auto;
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr; /* Single column on mobile */
    box-shadow: var(--zero-shadow-lg);
    border: 1px solid var(--zero-gray-200);
    animation: modalScaleUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (min-width: 768px) {
    .quick-view-modal__dialog {
        grid-template-columns: 1fr 1fr; /* Two columns on Tablet/Desktop */
        overflow: hidden;
    }
}

/* Modal Close Button */
.quick-view-modal__close {
    position: absolute;
    top: 16px;
    left: 16px; /* Positioned left for RTL design */
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--zero-white);
    border: 1px solid var(--zero-gray-200);
    color: var(--zero-dark);
    font-size: 24px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 15;
    box-shadow: var(--zero-shadow-sm);
    transition: var(--zero-transition);
}

.quick-view-modal__close:hover {
    background-color: var(--zero-gray-100);
    transform: rotate(90deg);
}

/* Modal Loading Overlay */
.quick-view-modal__loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 12;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

/* Hide loader when hidden attribute is present or when loading class is removed */
.quick-view-modal__loader[hidden],
.quick-view-modal__loader:not(.quick-view-modal__loader--loading) {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.quick-view-modal__loader-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--zero-gray-200);
    border-top-color: var(--zero-primary);
    border-radius: 50%;
    animation: spinner 0.8s linear infinite;
}

/* Gallery Section */
.quick-view-modal__gallery {
    padding: 24px;
    background-color: var(--zero-gray-100);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

.quick-view-modal__gallery-main {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--zero-white);
    border-radius: var(--zero-radius-sm);
    overflow: hidden;
    box-shadow: var(--zero-shadow-sm);
}

.quick-view-modal__gallery-main-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: var(--zero-transition);
}

.quick-view-modal__gallery-thumbs {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-x: auto;
    width: 100%;
    justify-content: center;
}

.quick-view-modal__gallery-thumb {
    width: 60px;
    height: 60px;
    border-radius: var(--zero-radius-sm);
    border: 2px solid transparent;
    background-color: var(--zero-white);
    padding: 4px;
    cursor: pointer;
    overflow: hidden;
    transition: var(--zero-transition);
}

.quick-view-modal__gallery-thumb--active {
    border-color: var(--zero-primary);
}

.quick-view-modal__gallery-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Details Section */
.quick-view-modal__details {
    padding: 40px 32px 32px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.quick-view-modal__title {
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 12px 0;
    color: #1a2b4c !important; /* Dark Navy Blue */
    line-height: 1.3;
}

.quick-view-modal__price {
    font-size: 24px;
    font-weight: 800 !important; /* Bold font */
    color: #e65c00 !important; /* Premium Accent Orange */
    margin-bottom: 20px;
}

.quick-view-modal__description {
    font-size: 15px;
    line-height: 1.6;
    color: #4a5568 !important; /* Readable dark gray */
    margin-bottom: 24px;
}

/* Quantity & Add to Cart Alignment */
.quick-view-modal__qty-wrapper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--zero-gray-200);
    border-radius: var(--zero-radius-sm);
    padding: 4px;
    background-color: var(--zero-gray-100);
    margin-bottom: 20px;
    width: fit-content;
}

.quick-view-modal__qty-btn {
    border: none;
    background: none;
    width: 36px;
    height: 36px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--zero-gray-800);
    transition: var(--zero-transition);
}

.quick-view-modal__qty-btn:hover {
    color: var(--zero-primary);
}

.quick-view-modal__qty-input {
    width: 50px;
    border: none;
    background: transparent;
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    color: var(--zero-dark);
    -webkit-appearance: textfield;
    -moz-appearance: textfield;
    appearance: textfield;
}

.quick-view-modal__qty-input::-webkit-outer-spin-button,
.quick-view-modal__qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.quick-view-modal__add-to-cart {
    background-color: var(--zero-secondary);
    color: var(--zero-white);
    border: none;
    padding: 16px 32px;
    border-radius: var(--zero-radius-sm);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--zero-transition);
    text-align: center;
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.2);
}

.quick-view-modal__add-to-cart:hover:not(:disabled) {
    background-color: var(--zero-secondary-hover);
    box-shadow: 0 6px 16px rgba(255, 102, 0, 0.4);
    transform: translateY(-2px);
}

.quick-view-modal__add-to-cart:disabled {
    background-color: var(--zero-gray-300);
    color: var(--zero-gray-600);
    cursor: not-allowed;
    box-shadow: none;
}

/* ─── 8. Sliding Off-Canvas Cart Drawer ───────────────────────────────────── */
.cart-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.cart-drawer--open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Overlay blur */
.cart-drawer__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(18, 24, 36, 0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* Sliding Panel */
.cart-drawer__panel {
    position: absolute;
    top: 0;
    right: 0; /* Slide from Right for RTL compatibility */
    width: 100%;
    max-width: 440px;
    height: 100%;
    background-color: var(--zero-white);
    box-shadow: -10px 0 30px rgba(18, 24, 36, 0.15);
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateX(100%); /* Start off-screen */
}

/* Open states */
.cart-drawer--open .cart-drawer__panel {
    transform: translateX(0);
}

/* Drawer Header */
.cart-drawer__header {
    padding: 24px;
    border-bottom: 1px solid var(--zero-gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-drawer__title {
    font-size: 20px;
    font-weight: 800;
    margin: 0;
    color: var(--zero-dark);
}

.cart-drawer__close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--zero-gray-600);
    cursor: pointer;
    transition: var(--zero-transition);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.cart-drawer__close:hover {
    background-color: var(--zero-gray-100);
    color: var(--zero-dark);
}

/* Items List */
.cart-drawer__items {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    flex-grow: 1;
}

.cart-drawer__item {
    display: flex;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--zero-gray-100);
    align-items: center;
}

.cart-drawer__item-image {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: var(--zero-radius-sm);
    background-color: var(--zero-gray-100);
    border: 1px solid var(--zero-gray-200);
}

.cart-drawer__item-details {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.cart-drawer__item-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--zero-dark);
    margin-bottom: 4px;
    line-height: 1.4;
}

.cart-drawer__item-meta {
    font-size: 13px;
    color: var(--zero-gray-600);
    margin-bottom: 2px;
}

.cart-drawer__item-total {
    font-size: 14px;
    font-weight: 800;
    color: var(--zero-secondary);
}

/* Empty State */
.cart-drawer__empty {
    text-align: center;
    padding: 60px 24px;
    color: var(--zero-gray-600);
    font-size: 15px;
    margin: 0;
}

/* Footer Section */
.cart-drawer__footer {
    padding: 24px;
    border-top: 1px solid var(--zero-gray-200);
    background-color: var(--zero-gray-100);
}

.cart-drawer__total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 800;
    color: var(--zero-dark);
    margin-bottom: 20px;
}

.cart-drawer__total::before {
    content: 'الإجمالي:';
}

.cart-drawer__actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-drawer__view-cart {
    background-color: var(--zero-white);
    color: var(--zero-primary);
    border: 1px solid var(--zero-primary);
    padding: 14px;
    text-align: center;
    border-radius: var(--zero-radius-sm);
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: var(--zero-transition);
}

.cart-drawer__view-cart:hover {
    background-color: var(--zero-gray-100);
}

.cart-drawer__checkout {
    background-color: var(--zero-primary);
    color: var(--zero-white);
    padding: 14px;
    text-align: center;
    border-radius: var(--zero-radius-sm);
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: var(--zero-transition);
}

.cart-drawer__checkout:hover {
    background-color: var(--zero-primary-hover);
}

/* ─── 9. Keyframes & Animation Declarations ───────────────────────────────── */
@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

@keyframes modalScaleUp {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ─── 10. Quick View Specifications Cards & Tables ────────────────────────── */
/* ─── 10. Quick View Specifications Cards & Tables ────────────────────────── */
.quick-view-modal__description {
    max-height: 280px;
    overflow-y: auto;
    padding-right: 4px;
    margin-bottom: 20px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

.quick-view-modal__description::-webkit-scrollbar {
    width: 5px;
}

.quick-view-modal__description::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.quick-view-modal__description::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.quick-view-modal__description::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.modal-spec-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.modal-spec-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    direction: rtl;
}

.modal-spec-header {
    background-color: #f1f5f9;
    color: #0f2e5a;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-spec-header::before {
    content: '▪';
    color: #e65c00;
    font-size: 12px;
}

.modal-spec-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    padding: 8px 14px;
    border-bottom: 1px solid #f1f5f9;
    align-items: start;
    font-size: 13px;
    transition: background-color 0.15s ease;
}

.modal-spec-row:last-child {
    border-bottom: none;
}

.modal-spec-row:nth-child(even) {
    background-color: #fafafa;
}

.modal-spec-row:hover {
    background-color: #f8fafc;
}

.modal-spec-key {
    font-weight: 600;
    color: #334155;
    padding-left: 8px;
    line-height: 1.5;
}

.modal-spec-val {
    color: #64748b;
    line-height: 1.5;
    word-break: break-word;
}

.modal-spec-paragraph {
    padding: 8px 14px;
    margin: 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.6;
    border-bottom: 1px solid #f1f5f9;
}

.modal-spec-paragraph:last-child {
    border-bottom: none;
}

@media (max-width: 600px) {
    .modal-spec-row {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 8px 12px;
    }
    .modal-spec-key {
        color: #ff5500;
        font-size: 12px;
    }
}

/* ─── 11. Creative Full-Screen Zoomable Lightbox Modal ─────────────────────── */
.elyose-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 20000;
    display: flex;
    flex-direction: column;
    direction: rtl;
    user-select: none;
}

.elyose-lightbox[hidden] {
    display: none !important;
}

.elyose-lightbox__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 15, 30, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.elyose-lightbox__bar {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: rgba(15, 23, 42, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.elyose-lightbox__counter {
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
}

.elyose-lightbox__tools {
    display: flex;
    align-items: center;
    gap: 10px;
}

.elyose-lightbox__btn {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}

.elyose-lightbox__btn:hover {
    background: #ff5500;
    border-color: #ff5500;
    transform: scale(1.08);
}

.elyose-lightbox__btn--close {
    background: rgba(239, 68, 68, 0.8);
    border-color: rgba(239, 68, 68, 0.9);
}

.elyose-lightbox__btn--close:hover {
    background: #dc2626;
    border-color: #dc2626;
}

.elyose-lightbox__stage {
    position: relative;
    z-index: 5;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    overflow: hidden;
}

.elyose-lightbox__nav {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    transition: all 0.25s ease;
    z-index: 10;
}

.elyose-lightbox__nav:hover {
    background: #ff5500;
    border-color: #ff5500;
    transform: scale(1.1);
}

.elyose-lightbox__nav[hidden] {
    display: none !important;
}

.elyose-lightbox__img-container {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: zoom-in;
}

.elyose-lightbox__img {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s ease-out;
    transform-origin: center center;
}
