/* 
   Rita Mattresses Design System & Style Sheets 
   Theme: Casper.com Inspired (Bright, Minimalist, Premium Navy & Off-White)
*/

:root {
    --color-primary: #002b49;       /* Deep Casper Navy */
    --color-secondary: #0066cc;     /* Sky Blue Accent */
    --color-accent: #ff5a00;        /* Coral Orange (CTA) */
    --color-bg-light: #f8f9fa;      /* Cozy Off-White */
    --color-bg-white: #ffffff;
    --color-text-dark: #1e293b;     /* Slate Dark Text */
    --color-text-light: #64748b;    /* Charcoal Text */
    --color-border: #e2e8f0;
    --font-ar: 'Cairo', sans-serif;
    --font-en: 'Outfit', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
}

/* Reset and Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-ar);
    color: var(--color-text-dark);
    background-color: var(--color-bg-white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navigation and Headers */
.promo-bar {
    background-color: var(--color-primary);
    color: var(--color-bg-white);
    text-align: center;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
}

.main-header {
    background-color: rgba(255, 255, 255, 0.75);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02);
    transition: var(--transition);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
}

.logo {
    font-family: var(--font-en);
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--color-primary);
    text-decoration: none;
    letter-spacing: 1px;
}

.logo-accent {
    color: var(--color-secondary);
}

.nav-menu {
    display: flex;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: var(--color-text-light);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    padding: 6px 0;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-secondary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover, .nav-link.active {
    color: var(--color-primary);
}

.nav-link:hover::after, .nav-link.active::after {
    transform: scaleX(1);
    transform-origin: right;
}

.admin-link-nav {
    color: var(--color-secondary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cart-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.35rem;
    color: var(--color-primary);
    position: relative;
    padding: 6px;
    transition: var(--transition);
}

.cart-btn:hover {
    color: var(--color-secondary);
    transform: scale(1.05);
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: var(--color-accent);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--color-primary);
    cursor: pointer;
}

/* Button UI Components */
.btn-primary {
    background-color: var(--color-accent);
    color: white;
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 700;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #e04f00;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-primary);
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 700;
    border: 2px solid var(--color-primary);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: var(--color-bg-light);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    background-color: var(--color-bg-light);
    padding: 80px 24px;
    overflow: hidden;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.badge {
    background-color: rgba(0, 102, 204, 0.08);
    color: var(--color-secondary);
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.hero-content h1 {
    font-size: 3rem;
    color: var(--color-primary);
    line-height: 1.25;
    margin-bottom: 24px;
    font-weight: 800;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--color-text-light);
    margin-bottom: 32px;
}

.hero-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 36px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.feature-item i {
    color: #10b981;
    font-size: 1.15rem;
}

.hero-actions-group {
    display: flex;
    gap: 16px;
}

.hero-visual {
    display: flex;
    justify-content: center;
    position: relative;
}

.hero-main-img {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

/* 3D Scroll-driven Interactive Section */
.scroll-3d-section {
    position: relative;
    background-color: var(--color-bg-light);
}

.scroll-3d-wrapper {
    position: relative;
    height: 450vh; /* Long scroll track to trigger steps */
}

.sticky-container {
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    overflow: hidden;
}

.visual-pane {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1400px; /* Strong depth */
    position: relative;
}

.mattress-3d-scene {
    width: 450px;
    height: 550px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.mattress-3d {
    width: 280px;
    height: 420px;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateX(60deg) rotateY(0deg) rotateZ(-40deg);
    transition: transform 0.1s ease-out;
}

/* 3D Layers */
.mattress-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.1, 0.8, 0.2, 1);
    will-change: transform;
}

.layer-face {
    position: absolute;
    background-color: #e2e8f0;
}

/* Common box styling rules */
.face-top {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    transform: translateZ(10px);
    box-shadow: inset 0 0 15px rgba(0,0,0,0.06);
}

.face-front {
    width: 100%;
    height: 20px;
    bottom: -20px;
    left: 0;
    transform: rotateX(-90deg);
    transform-origin: top;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.15);
}

.face-left {
    width: 20px;
    height: 100%;
    top: 0;
    left: -20px;
    transform: rotateY(-90deg);
    transform-origin: right;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.15);
}

/* Specific styling for mattress layers */
/* Shared Mattress 3D Layer Styling & Textures (Hero & Scroll Sections) */

/* Layer 5: Top Outer Cover (Premium Diamond Tufted Knit) */
.layer-top-fabric .face-top,
.hero-mattress-layer.layer-top-fabric .face-top {
    background-color: #ffffff;
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(0, 43, 73, 0.04) 1.5px, transparent 2.5px),
        linear-gradient(45deg, transparent 48%, rgba(0, 43, 73, 0.03) 49%, rgba(0, 43, 73, 0.03) 51%, transparent 52%),
        linear-gradient(-45deg, transparent 48%, rgba(0, 43, 73, 0.03) 49%, rgba(0, 43, 73, 0.03) 51%, transparent 52%);
    background-size: 16px 16px;
    border: 1px solid #cbd5e1;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.04);
}
.layer-top-fabric .face-front,
.layer-top-fabric .face-left,
.hero-mattress-layer.layer-top-fabric .face-front,
.hero-mattress-layer.layer-top-fabric .face-left {
    background: linear-gradient(to bottom, #ffffff 30%, #f1f5f9 100%);
    border: 1px solid #cbd5e1;
}

/* Layer 4: Comfort Gel Memory Foam (Pastel Ice Blue) */
.layer-foam .face-top,
.hero-mattress-layer.layer-foam .face-top {
    background: linear-gradient(135deg, #a5f3fc 0%, #38bdf8 100%);
    border: 1px solid #0ea5e9;
    box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.6);
}
.layer-foam .face-front,
.layer-foam .face-left,
.hero-mattress-layer.layer-foam .face-front,
.hero-mattress-layer.layer-foam .face-left {
    background: linear-gradient(to bottom, #0ea5e9 0%, #0284c7 100%);
    border: 1px solid #0284c7;
}

/* Layer 3: Ergonomic Zoned Support Foam (Casper-style Tri-Zone) */
.layer-felt-top .face-top,
.hero-mattress-layer.layer-felt-top .face-top {
    background: linear-gradient(to bottom, 
        #38bdf8 0%, 
        #38bdf8 25%, 
        #0066cc 25%, 
        #0066cc 75%, 
        #38bdf8 75%, 
        #38bdf8 100%
    );
    border: 1px solid #002b49;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.1);
}
.layer-felt-top .face-front,
.hero-mattress-layer.layer-felt-top .face-front {
    background-color: #38bdf8;
    border: 1px solid #0284c7;
}
.layer-felt-top .face-left,
.hero-mattress-layer.layer-felt-top .face-left {
    background: linear-gradient(to bottom, 
        #38bdf8 0%, 
        #38bdf8 25%, 
        #0066cc 25%, 
        #0066cc 75%, 
        #38bdf8 75%, 
        #38bdf8 100%
    );
    border: 1px solid #002b49;
}

/* Layer 2: Springs */
.layer-springs .face-top,
.hero-mattress-layer.layer-springs .face-top {
    background-color: #cbd5e1;
    border: 1px solid #94a3b8;
    position: relative;
    overflow: hidden;
}
.layer-springs .face-top .spring-texture-grid,
.hero-mattress-layer.layer-springs .face-top .spring-texture-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, #64748b 35%, transparent 45%);
    background-size: 15px 15px;
    opacity: 0.8;
}
.layer-springs .face-front {
    height: 35px;
    bottom: -35px;
    background: repeating-linear-gradient(90deg, 
        #ffffff 0px, 
        #f8fafc 4px, 
        #cbd5e1 10px, 
        #94a3b8 14px, 
        #475569 16px, 
        #cbd5e1 18px
    );
    border: 1px solid #cbd5e1;
}
.layer-springs .face-left {
    width: 35px;
    left: -35px;
    background: repeating-linear-gradient(180deg, 
        #ffffff 0px, 
        #f8fafc 4px, 
        #cbd5e1 10px, 
        #94a3b8 14px, 
        #475569 16px, 
        #cbd5e1 18px
    );
    border: 1px solid #cbd5e1;
}

/* Layer 1: Bottom Support Felt */
.layer-felt-bottom .face-top,
.hero-mattress-layer.layer-felt-bottom .face-top {
    background-color: #0f172a;
    border: 1px solid #020617;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}
.layer-felt-bottom .face-front, .layer-felt-bottom .face-left,
.hero-mattress-layer.layer-felt-bottom .face-front, .hero-mattress-layer.layer-felt-bottom .face-left {
    background-color: #020617;
    border: 1px solid #020617;
}

/* Text Overlays Pane */
.text-pane {
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 48px;
    position: relative;
}

.scroll-step {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) translateY(30px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1), transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.6s;
    max-width: 480px;
    width: calc(100% - 96px);
}

.scroll-step.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateY(0);
}

.layer-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.scroll-step h2 {
    font-size: 2.2rem;
    color: var(--color-primary);
    margin-bottom: 16px;
    font-weight: 800;
}

.scroll-step p {
    font-size: 1.05rem;
    color: var(--color-text-light);
    line-height: 1.7;
}

/* Mouse Wheel indicator animation */
.scroll-indicator-mouse {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 32px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-secondary);
}

.mouse-wheel {
    width: 22px;
    height: 38px;
    border: 2px solid var(--color-secondary);
    border-radius: 12px;
    position: relative;
}

.mouse-wheel::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 8px;
    background-color: var(--color-secondary);
    border-radius: 2px;
    left: 50%;
    transform: translateX(-50%);
    top: 6px;
    animation: scroll-wheel-anim 1.5s infinite;
}

@keyframes scroll-wheel-anim {
    0% { top: 6px; opacity: 1; }
    50% { top: 16px; opacity: 0; }
    100% { top: 6px; opacity: 1; }
}

/* Products Grid Section */
.products-section {
    padding: 100px 24px;
    background-color: var(--color-bg-white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.4rem;
    color: var(--color-primary);
    font-weight: 800;
    margin-bottom: 16px;
}

.section-header p {
    color: var(--color-text-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 32px auto;
}

.product-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-btn {
    background-color: var(--color-bg-light);
    color: var(--color-text-light);
    border: 1px solid var(--color-border);
    padding: 10px 22px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
    position: relative;
    min-height: 200px;
}

.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--color-text-light);
    font-size: 1.1rem;
    font-weight: 600;
}

.loading-state i {
    color: var(--color-secondary);
    margin-left: 8px;
}

/* Casper-style Product Cards */
.product-card {
    background-color: var(--color-bg-light);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: #cbd5e1;
}

.card-visual {
    position: relative;
    padding-top: 66%; /* 3:2 Aspect Ratio */
    background-color: #eef2f6;
    overflow: hidden;
}

.card-visual img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .card-visual img {
    transform: scale(1.05);
}

.card-tag {
    position: absolute;
    top: 16px;
    right: 16px;
    background-color: var(--color-primary);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-content h3 {
    font-size: 1.35rem;
    color: var(--color-primary);
    font-weight: 700;
    margin-bottom: 8px;
}

.card-firmness {
    color: var(--color-secondary);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.card-desc {
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 4.8em;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

.card-price {
    display: flex;
    flex-direction: column;
}

.price-from {
    font-size: 0.75rem;
    color: var(--color-text-light);
    font-weight: 600;
}

.price-num {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-primary);
}

.btn-card {
    background-color: var(--color-primary);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.product-card:hover .btn-card {
    background-color: var(--color-secondary);
}

/* Configuration & Price Widget Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 20, 35, 0.65);
    backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.4s;
}

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

.modal-content {
    background-color: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(25px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 20, 35, 0.25);
    transform: scale(0.95);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.modal.active .modal-content {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 20px;
    left: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--color-primary);
    cursor: pointer;
    z-index: 10;
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
}

.modal-visual {
    background-color: var(--color-bg-light);
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-left: 1px solid var(--color-border);
}

.modal-visual img {
    width: 100%;
    max-width: 320px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.product-specs-badges {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.spec-badge {
    background-color: var(--color-bg-white);
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-dark);
}

.spec-badge i {
    color: var(--color-secondary);
}

.modal-details {
    padding: 40px;
}

.modal-details h2 {
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: 8px;
    font-weight: 800;
}

.product-chassis {
    color: var(--color-secondary);
    font-weight: 700;
    margin-bottom: 20px;
}

.product-desc {
    color: var(--color-text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.config-section {
    margin-bottom: 24px;
}

.config-section h3 {
    font-size: 0.95rem;
    color: var(--color-primary);
    font-weight: 700;
    margin-bottom: 12px;
}

.sizes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
    gap: 8px;
}

.size-btn {
    background-color: var(--color-bg-light);
    color: var(--color-text-dark);
    border: 1px solid var(--color-border);
    padding: 10px 4px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.size-btn:hover {
    border-color: var(--color-primary);
}

.size-btn.active {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.length-selector {
    display: flex;
    gap: 16px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    background-color: var(--color-bg-light);
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.radio-label input {
    accent-color: var(--color-primary);
}

.radio-label:has(input:checked) {
    border-color: var(--color-primary);
    background-color: rgba(0, 43, 73, 0.03);
}

.price-action-section {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-display {
    display: flex;
    flex-direction: column;
}

.price-label {
    font-size: 0.8rem;
    color: var(--color-text-light);
    font-weight: 600;
}

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

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

.btn-add-cart {
    background-color: var(--color-accent);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-add-cart:hover {
    background-color: #e04f00;
    transform: translateY(-2px);
}

/* Why Choose Us & Trust Indicators */
.why-us-section {
    background-color: var(--color-bg-light);
    padding: 100px 24px;
}

.why-us-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.why-us-img img {
    width: 100%;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.why-us-content h2 {
    font-size: 2.4rem;
    color: var(--color-primary);
    font-weight: 800;
    margin-bottom: 24px;
}

.why-us-content p {
    color: var(--color-text-light);
    font-size: 1.05rem;
    margin-bottom: 36px;
}

.value-propositions {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.val-item {
    display: flex;
    gap: 20px;
}

.val-icon {
    background-color: var(--color-bg-white);
    color: var(--color-secondary);
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: var(--shadow);
    flex-shrink: 0;
}

.val-text h3 {
    font-size: 1.15rem;
    color: var(--color-primary);
    font-weight: 700;
    margin-bottom: 6px;
}

.val-text p {
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* Testimonials / Customer Reviews */
.testimonials {
    padding: 100px 24px;
    background-color: var(--color-bg-white);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

.testimonial-card {
    background-color: var(--color-bg-light);
    padding: 32px;
    border-radius: 16px;
    border: 1px solid var(--color-border);
    transition: var(--transition);
}

.testimonial-card:hover {
    border-color: var(--color-secondary);
}

.stars {
    color: #fbbf24;
    margin-bottom: 16px;
}

.testimonial-card p {
    color: var(--color-text-dark);
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 24px;
}

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

.client-info strong {
    color: var(--color-primary);
    font-weight: 700;
}

.client-info span {
    color: var(--color-text-light);
    font-size: 0.8rem;
    font-weight: 600;
}

/* Off-canvas Shopping Cart Drawer */
.cart-drawer {
    position: fixed;
    top: 0;
    left: -400px;
    width: 400px;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(25px) saturate(180%);
    border-left: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: -5px 0 25px rgba(0, 20, 35, 0.15);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transition: left 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* RTL override for left-aligned drawer */
body[dir="rtl"] .cart-drawer {
    left: auto;
    right: -400px;
    border-left: none;
    border-right: 1px solid rgba(255, 255, 255, 0.4);
    transition: right 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

body[dir="rtl"] .cart-drawer.active {
    right: 0;
}

.cart-drawer.active {
    left: 0;
}

.cart-drawer-header {
    padding: 24px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-drawer-header h3 {
    font-size: 1.15rem;
    color: var(--color-primary);
    font-weight: 700;
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--color-text-light);
}

.cart-items-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 24px;
}

.empty-cart-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--color-text-light);
    gap: 16px;
}

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

.btn-primary-sm {
    background-color: var(--color-primary);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
}

/* Cart Item Rows styling */
.cart-item {
    display: flex;
    gap: 16px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
}

.cart-item-info {
    flex-grow: 1;
}

.cart-item-info h4 {
    font-size: 0.95rem;
    color: var(--color-primary);
    margin-bottom: 4px;
    font-weight: 700;
}

.cart-item-size {
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin-bottom: 8px;
    font-weight: 600;
}

.cart-item-price-qty {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.qty-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    overflow: hidden;
}

.qty-btn {
    background-color: var(--color-bg-light);
    border: none;
    width: 28px;
    height: 28px;
    font-weight: 700;
    cursor: pointer;
}

.qty-val {
    width: 32px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
}

.cart-item-price {
    font-weight: 700;
    color: var(--color-primary);
}

.remove-item-btn {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px;
}

/* Drawer footer checkout form */
.cart-drawer-footer {
    padding: 24px;
    border-top: 1px solid var(--color-border);
    background-color: var(--color-bg-light);
}

.cart-summary {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 20px;
}

.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkout-form h4 {
    font-size: 0.9rem;
    color: var(--color-primary);
    margin-bottom: 4px;
    font-weight: 700;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-family: var(--font-ar);
    font-size: 0.85rem;
    outline: none;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--color-primary);
}

.btn-checkout {
    background-color: var(--color-accent);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-checkout:hover {
    background-color: #e04f00;
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

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

/* Footer Section */
.main-footer {
    background-color: var(--color-primary);
    color: var(--color-bg-white);
    padding: 80px 24px 0 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr;
    gap: 48px;
    margin-bottom: 60px;
}

.brand-col h3 {
    font-family: var(--font-en);
    letter-spacing: 1px;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.brand-col p {
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    color: var(--color-primary);
    background-color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--color-secondary);
    color: white;
}

.footer-col h4 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col ul li a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
}

.footer-col ul li a:hover {
    color: white;
    padding-right: 4px;
}

.footer-col ul li {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

.footer-col ul li i {
    margin-left: 8px;
    color: var(--color-secondary);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 24px 0;
}

.footer-bottom-flex {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    flex-wrap: wrap;
    gap: 16px;
}

/* Response Media Queries for Mobile/Tablets */
@media (max-width: 992px) {
    html {
        font-size: 15px;
    }
    .hero-container {
        grid-template-columns: 1fr;
        gap: 36px;
        text-align: center;
    }
    .hero-content {
        align-items: center;
    }
    .hero-actions-group {
        width: 100%;
        justify-content: center;
    }
    .sticky-container {
        grid-template-columns: 1fr;
        grid-template-rows: 0.85fr 1.15fr;
        top: 60px;
        height: calc(100vh - 60px);
    }
    .visual-pane {
        grid-row: 1;
        height: 100%;
        padding-top: 10px;
    }
    .mattress-3d-scene {
        width: 280px;
        height: 280px;
        transform: scale(0.7);
    }
    .text-pane {
        grid-row: 2;
        padding: 0 24px;
        justify-content: center;
        align-items: center;
    }
    .scroll-step {
        text-align: center;
        max-width: 100%;
        width: calc(100% - 48px);
        left: 24px;
        right: 24px;
    }
    .scroll-indicator-mouse {
        display: none;
    }
    .why-us-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .modal-grid {
        grid-template-columns: 1fr;
    }
    .modal-visual {
        border-left: none;
        border-bottom: 1px solid var(--color-border);
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 72px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 72px);
        background-color: rgba(255, 255, 255, 0.88);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        padding: 40px 24px;
        transition: var(--transition);
        border-top: 1px solid var(--color-border);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    }
    .nav-menu.active {
        left: 0;
    }
    body[dir="rtl"] .nav-menu {
        left: auto;
        right: -100%;
    }
    body[dir="rtl"] .nav-menu.active {
        right: 0;
    }
    .menu-toggle {
        display: block;
    }
    .cart-drawer {
        width: 100%;
        left: -100%;
    }
    body[dir="rtl"] .cart-drawer {
        right: -100%;
    }
    .hero-content h1 {
        font-size: 2.2rem;
    }
    .scroll-step h2 {
        font-size: 1.5rem;
    }
    .scroll-step p {
        font-size: 0.95rem;
        line-height: 1.5;
    }
}
@media (max-width: 480px) {
    .sticky-container {
        grid-template-rows: 0.7fr 1.3fr;
    }
    .mattress-3d-scene {
        transform: scale(0.58);
    }
    .scroll-step h2 {
        font-size: 1.35rem;
    }
}

/* 
   ==========================================================================
   PREMIUM UX GLOW, INTRO PRELOADER & INTERACTIVE 3D HERO EFFECTS
   ==========================================================================
*/

/* Wow-Factor Glassmorphic Preloader Overlay */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #001a2e 0%, #000a14 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.8s, transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}
.preloader-glow-orb {
    position: absolute;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(0, 102, 204, 0.15) 0%, transparent 70%);
    filter: blur(60px);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: preloader-float-glow 6s ease-in-out infinite alternate;
}
@keyframes preloader-float-glow {
    0% { transform: translate(-50%, -50%) scale(0.9) translate(-20px, -20px); }
    100% { transform: translate(-50%, -50%) scale(1.1) translate(20px, 20px); }
}
.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
    transform: scale(1.04);
}
.preloader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    z-index: 2;
}
.preloader-logo {
    font-family: var(--font-en);
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: 4px;
    color: white;
    text-shadow: 0 0 25px rgba(0, 102, 204, 0.4);
    animation: pulse-logo 2.5s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}
@keyframes pulse-logo {
    0% { transform: scale(0.97); letter-spacing: 4px; opacity: 0.85; }
    100% { transform: scale(1.03); letter-spacing: 6px; opacity: 1; text-shadow: 0 0 40px rgba(0, 102, 204, 0.8); }
}
.preloader-progress-wrap {
    width: 220px;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
}
.preloader-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--color-secondary), var(--color-accent));
    border-radius: 4px;
    animation: preloader-loading 1.6s cubic-bezier(0.65, 0.05, 0.36, 1) forwards;
}
@keyframes preloader-loading {
    0% { width: 0%; }
    40% { width: 65%; }
    80% { width: 90%; }
    100% { width: 100%; }
}
.preloader-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    margin-top: -5px;
    opacity: 0;
    animation: fade-in-text 1.2s ease-out 0.4s forwards;
}
@keyframes fade-in-text {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero 3D Mattress Interactive container */
.hero-3d-scene-wrap {
    width: 100%;
    height: 480px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1400px;
}
.hero-3d-glow {
    position: absolute;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(0, 102, 204, 0.2) 0%, transparent 70%);
    filter: blur(40px);
    z-index: 1;
    animation: float-glow 8s ease-in-out infinite alternate;
}
@keyframes float-glow {
    0% { transform: scale(1) translate(-10px, -10px); background: radial-gradient(circle, rgba(0, 102, 204, 0.2) 0%, transparent 70%); }
    100% { transform: scale(1.2) translate(10px, 10px); background: radial-gradient(circle, rgba(255, 90, 0, 0.1) 0%, transparent 70%); }
}
.hero-mattress-3d {
    width: 240px;
    height: 360px;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateX(60deg) rotateY(0deg) rotateZ(-38deg);
    z-index: 2;
    animation: float-hero-mattress 6s ease-in-out infinite alternate;
    transition: transform 0.2s ease-out;
}
@keyframes float-hero-mattress {
    0% { transform: rotateX(58deg) rotateY(-1deg) rotateZ(-36deg) translateY(0px); }
    100% { transform: rotateX(55deg) rotateY(1deg) rotateZ(-32deg) translateY(-25px); }
}

/* Bind class selectors of .hero-mattress-layer to share face styles */
.hero-mattress-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    transform-style: preserve-3d;
    transition: transform 0.5s cubic-bezier(0.15, 0.85, 0.3, 1.1); /* Elastic split */
    will-change: transform;
}
.hero-mattress-layer .layer-face {
    position: absolute;
}
/* Bind the faces of the layers */
.hero-mattress-layer .face-top {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    transform: translateZ(8px);
    box-shadow: inset 0 0 12px rgba(0,0,0,0.06);
}
.hero-mattress-layer .face-front {
    width: 100%;
    height: 16px;
    bottom: -16px;
    left: 0;
    transform: rotateX(-90deg);
    transform-origin: top;
    box-shadow: inset 0 0 8px rgba(0,0,0,0.15);
}
.hero-mattress-layer .face-left {
    width: 16px;
    height: 100%;
    top: 0;
    left: -16px;
    transform: rotateY(-90deg);
    transform-origin: right;
    box-shadow: inset 0 0 8px rgba(0,0,0,0.15);
}

.hero-mattress-layer.layer-springs .face-front {
    height: 28px;
    bottom: -28px;
}
.hero-mattress-layer.layer-springs .face-left {
    width: 28px;
    left: -28px;
}

/* Floating Technical 3D Labels for Hero Mattress */
.layer-label {
    position: absolute;
    left: -170px;
    top: 30%;
    transform: rotateZ(38deg) rotateX(-60deg) translateZ(10px);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 43, 73, 0.08);
    border-left: 4px solid var(--color-secondary);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-primary);
    box-shadow: 0 8px 24px rgba(0, 43, 73, 0.12);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.layer-label::before {
    content: '';
    position: absolute;
    right: -24px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 1px;
    border-top: 1.5px dashed rgba(0, 102, 204, 0.5);
}

/* Micro Interaction Hover-split for Hero Mattress */
.hero-3d-scene-wrap:hover .hero-mattress-3d {
    animation-play-state: paused;
    transform: rotateX(54deg) rotateY(4deg) rotateZ(-30deg) translateY(-20px);
}
.hero-3d-scene-wrap:hover .hero-mattress-layer {
    /* Explode layers on hover to WOW user instantly! */
    transform: translate3d(0, calc(var(--layer-index) * -8px), calc(var(--layer-index) * 32px));
}
.hero-3d-scene-wrap:hover .layer-label {
    opacity: 1;
    transform: rotateZ(38deg) rotateX(-60deg) translateZ(10px) translateX(15px);
}

/* Additional Premium Card Aesthetics */
.product-card {
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 20px rgba(0, 43, 73, 0.02);
}

/* Glow hover for primary CTA button */
.btn-primary {
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(255, 90, 0, 0.3);
}
.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.25), transparent);
    transform: skewX(-25deg);
    transition: 0.75s;
}
.btn-primary:hover::after {
    left: 125%;
}

/* Phase 2: Product Image Gallery Thumbnails & Colors Selector */
.modal-gallery-thumbnails {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 16px;
    margin-bottom: 8px;
    flex-wrap: wrap;
    width: 100%;
}
.modal-gallery-thumbnails img {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}
.modal-gallery-thumbnails img:hover,
.modal-gallery-thumbnails img.active {
    border-color: var(--color-primary);
    transform: translateY(-2px) scale(1.05);
}

.colors-selector-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.color-option {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
}
.color-option:hover,
.color-option.active {
    transform: scale(1.18);
    border-color: var(--color-primary);
    box-shadow: 0 0 10px rgba(0, 43, 73, 0.25);
}
.color-option.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    font-size: 0.9rem;
    font-weight: 800;
}
/* White color checkmark contrast adjustments */
.color-option[style*="background-color: rgb(255, 255, 255)"].active::after,
.color-option[style*="background-color: #ffffff"].active::after {
    color: var(--color-primary) !important;
    text-shadow: none !important;
}

/* 
   ==========================================================================
   CRO (CONVERSION RATE OPTIMIZATION) CUSTOM DESIGN SYSTEMS
   ==========================================================================
*/

/* Countdown Timer & Urgent Promos */
.promo-countdown {
    color: var(--color-accent);
    font-weight: 800;
    background: rgba(255, 90, 0, 0.12);
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    font-family: monospace;
    font-size: 0.95rem;
    margin: 0 4px;
    border: 1px solid rgba(255, 90, 0, 0.2);
}

/* Stock Urgency Alerts */
.stock-urgency-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #fff5f5;
    border: 1px solid #feb2b2;
    color: #c53030;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 16px;
    animation: pulse-urgency-border 2s infinite;
}

@keyframes pulse-urgency-border {
    0% { border-color: #feb2b2; }
    50% { border-color: #e53e3e; box-shadow: 0 0 8px rgba(229, 62, 62, 0.2); }
    100% { border-color: #feb2b2; }
}

/* WhatsApp & Phone Call Fast Order CTAs */
.btn-whatsapp-order {
    background-color: #25d366;
    color: white !important;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
}

.btn-whatsapp-order:hover {
    background-color: #128c7e;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.3);
}

.btn-call-order {
    background-color: var(--color-primary);
    color: white !important;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--color-primary);
    cursor: pointer;
    transition: var(--transition);
}

.btn-call-order:hover {
    background-color: var(--color-secondary);
    border-color: var(--color-secondary);
    transform: translateY(-2px);
}

/* Purchase Safety & Trust Badges */
.modal-guarantees {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--color-border);
}

.guarantee-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text-dark);
}

.guarantee-badge i {
    color: #10b981;
    font-size: 1rem;
}

/* Floating Contact/Call Shortcuts */
.floating-contact-shortcuts {
    position: fixed;
    bottom: 30px;
    left: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
}

body[dir="rtl"] .floating-contact-shortcuts {
    left: 30px;
    right: auto;
}

.floating-whatsapp, .floating-phone, .floating-facebook {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white !important;
    font-size: 26px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
}

.floating-whatsapp {
    background-color: #25d366;
}

.floating-whatsapp:hover {
    background-color: #128c7e;
    transform: scale(1.1);
}

.floating-phone {
    background-color: var(--color-secondary);
}

.floating-phone:hover {
    background-color: var(--color-primary);
    transform: scale(1.1);
}

.floating-facebook {
    background-color: #1877f2;
}

.floating-facebook:hover {
    background-color: #0a5dc2;
    transform: scale(1.1);
}

.floating-contact-shortcuts .tooltip-text {
    visibility: hidden;
    position: absolute;
    left: 70px;
    background-color: #1e293b;
    color: #fff;
    text-align: center;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
    font-weight: 700;
    box-shadow: var(--shadow);
}

body[dir="rtl"] .floating-contact-shortcuts .tooltip-text {
    left: 70px;
    right: auto;
}

.floating-contact-shortcuts a:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

@media (max-width: 768px) {
    .floating-contact-shortcuts {
        bottom: 20px;
        left: 16px;
        right: auto;
        display: flex !important;
        flex-direction: column;
        gap: 10px;
        z-index: 9999;
    }
    body[dir="rtl"] .floating-contact-shortcuts {
        left: 16px;
        right: auto;
    }
    .floating-whatsapp, .floating-phone, .floating-facebook {
        width: 50px;
        height: 50px;
        font-size: 22px;
        display: flex !important;
        box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    }
    /* Hide tooltip text on touch/mobile - no hover events */
    .floating-contact-shortcuts .tooltip-text {
        display: none !important;
    }
}

/* Blog Section & Cards Styling */
.blog-section {
    padding: 100px 24px;
    background-color: var(--color-bg-light);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    margin-top: 45px;
}

.blog-card {
    background-color: var(--color-bg-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--color-border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-secondary);
    box-shadow: var(--shadow-lg);
}

.blog-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin-bottom: 12px;
    font-weight: 600;
}

.blog-card-meta i {
    color: var(--color-secondary);
}

.blog-card-title {
    font-size: 1.2rem;
    color: var(--color-primary);
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
}

.blog-card-summary {
    color: var(--color-text-light);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.btn-blog-read {
    background-color: transparent;
    color: var(--color-secondary);
    border: 1px solid var(--color-secondary);
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    align-self: flex-start;
    transition: var(--transition);
}

.btn-blog-read:hover {
    background-color: var(--color-secondary);
    color: white;
}

/* Blog Article Modal override */
.blog-modal-content {
    max-width: 800px !important;
}

.blog-article-detail {
    padding: 24px;
}

.blog-detail-img {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 24px;
}

.blog-detail-meta {
    display: flex;
    gap: 20px;
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: 16px;
    font-weight: 600;
}

.blog-detail-meta i {
    color: var(--color-secondary);
}

.blog-detail-title {
    font-size: 1.85rem;
    color: var(--color-primary);
    font-weight: 800;
    margin-bottom: 24px;
    line-height: 1.35;
}

.blog-detail-content {
    color: var(--color-text-dark);
    font-size: 1rem;
    line-height: 1.8;
}

.blog-detail-content h3 {
    font-size: 1.35rem;
    color: var(--color-primary);
    margin-top: 24px;
    margin-bottom: 12px;
    font-weight: 700;
}

.blog-detail-content h4 {
    font-size: 1.15rem;
    color: var(--color-secondary);
    margin-top: 18px;
    margin-bottom: 10px;
    font-weight: 700;
}

.blog-detail-content p {
    margin-bottom: 16px;
}

.blog-detail-content ul {
    margin-bottom: 16px;
    padding-right: 20px;
}

.blog-detail-content ul li {
    margin-bottom: 8px;
    list-style-type: disc;
}

/* Premium Payment Method Selector Styles */
.payment-selector-container {
    display: flex;
    gap: 8px;
    direction: rtl;
    margin-bottom: 12px;
}

.payment-card {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 4px;
    border: 2px solid var(--color-border);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    text-align: center;
}

.payment-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.payment-card i {
    font-size: 1.4rem;
    color: #9ca3af;
    transition: all 0.3s ease;
}

.payment-card span {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-primary);
    transition: all 0.3s ease;
}

/* Disabled/Coming Soon Card Styles */
.payment-card.disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background: #f8fafc;
    border-color: #e2e8f0;
}

.payment-card.disabled:hover {
    transform: none !important;
    box-shadow: none !important;
    border-color: #e2e8f0 !important;
}

.payment-card.disabled span,
.payment-card.disabled i {
    color: #94a3b8 !important;
}

/* Active State Styles */
.payment-card.active {
    border-color: var(--color-accent);
    background: rgba(255, 90, 0, 0.04);
}

.payment-card.active i {
    color: var(--color-accent);
    transform: scale(1.05);
}

.payment-card.active span {
    color: var(--color-accent);
}

/* Responsive grid for ultra-small viewports */
@media (max-width: 380px) {
    .payment-selector-container {
        flex-wrap: wrap;
    }
    .payment-card {
        flex: 1 1 calc(50% - 4px);
    }
    .payment-card#cardVisa {
        flex: 1 1 100%;
    }
}

/* InstaPay Premium Instruction box */
.instapay-box {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 16px;
    direction: rtl;
    box-shadow: 0 4px 6px rgba(0, 102, 204, 0.05);
    text-align: right;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.instapay-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: #0369a1;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.instapay-steps {
    list-style: none;
    padding: 0;
    margin: 0 0 12px 0;
    font-size: 0.8rem;
    color: #334155;
    line-height: 1.6;
}

.instapay-steps li {
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.instapay-steps li::before {
    content: "•";
    color: #0284c7;
    font-weight: bold;
    display: inline-block;
    width: 8px;
}

/* Pay Button inside InstaPay info */
.btn-instapay-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #0284c7;
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(2, 132, 199, 0.2);
    width: 100%;
    margin-top: 4px;
    margin-bottom: 8px;
    border: none;
    cursor: pointer;
}

.btn-instapay-action:hover {
    background: #0369a1;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(2, 132, 199, 0.3);
}

.ipa-badge {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 6px 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
    margin-bottom: 12px;
}

.ipa-text {
    font-family: monospace;
    font-size: 0.9rem;
    font-weight: 700;
    color: #0369a1;
}

.ipa-copy-btn {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.ipa-copy-btn:hover {
    color: #0284c7;
    background: #e2e8f0;
}

/* Premium Success & Redirect UI inside Drawer */
.success-payment-state {
    text-align: center;
    padding: 40px 20px;
    direction: rtl;
    animation: drawerFadeIn 0.4s ease forwards;
}

@keyframes drawerFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes checkBounce {
    0% { transform: scale(0.5); opacity: 0; }
    80% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

/* 
   ==========================================================================
   DIGITAL WARRANTY PORTAL & GLASSMORPHIC STYLING
   ==========================================================================
*/

.warranty-body {
    background: radial-gradient(circle at center, #071626 0%, #020912 100%) !important;
    color: #f1f5f9 !important;
    min-height: 100vh;
}

.warranty-section {
    padding: 120px 24px 80px 24px;
    position: relative;
    overflow: hidden;
}

.warranty-section::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 102, 204, 0.08) 0%, transparent 70%);
    filter: blur(80px);
    top: -10%;
    right: -10%;
    pointer-events: none;
}

.warranty-section::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 90, 0, 0.05) 0%, transparent 70%);
    filter: blur(80px);
    bottom: -10%;
    left: -10%;
    pointer-events: none;
}

.warranty-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.warranty-header {
    text-align: center;
    margin-bottom: 48px;
}

.warranty-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 12px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
}

.warranty-header p {
    color: #94a3b8;
    font-size: 1.1rem;
    font-weight: 500;
}

.warranty-portal-card {
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    padding: 32px;
    margin-bottom: 40px;
    transition: var(--transition);
}

.warranty-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 6px;
    border-radius: 16px;
    margin-bottom: 32px;
}

.warranty-tab-btn {
    background: none;
    border: none;
    color: #94a3b8;
    padding: 14px 8px;
    border-radius: 12px;
    font-family: var(--font-ar);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.warranty-tab-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.warranty-tab-btn.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-secondary), var(--color-accent));
    box-shadow: 0 4px 15px rgba(255, 90, 0, 0.25);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.warranty-tab-content {
    display: none;
}

.warranty-tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.warranty-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.warranty-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: right;
}

.warranty-form-group label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #e2e8f0;
}

.warranty-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.warranty-input-wrapper i.input-icon {
    position: absolute;
    right: 16px;
    color: #64748b;
    font-size: 1.1rem;
}

.warranty-input {
    width: 100%;
    padding: 14px 44px 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: #ffffff;
    font-family: var(--font-ar);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.warranty-input:focus {
    border-color: var(--color-secondary);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
}

.btn-warranty-action {
    background: linear-gradient(135deg, var(--color-secondary), var(--color-accent));
    color: #ffffff;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-family: var(--font-ar);
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(255, 90, 0, 0.2);
    transition: all 0.3s ease;
}

.btn-warranty-action:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 90, 0, 0.3);
}

.btn-warranty-action:active:not(:disabled) {
    transform: translateY(0);
}

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

.btn-scanner-toggle {
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
    padding: 12px;
    border-radius: 12px;
    font-family: var(--font-ar);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-scanner-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--color-secondary);
    color: #ffffff;
}

/* Camera Barcode Scanner viewport */
.scanner-viewport {
    width: 100%;
    max-width: 480px;
    aspect-ratio: 4/3;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: #000;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

/* Glassmorphic alerts and details panels */
.warranty-alert {
    padding: 16px 20px;
    border-radius: 14px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: right;
    border-width: 1px;
    border-style: solid;
}

.warranty-alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.warranty-alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: #a7f3d0;
}

.warranty-alert i {
    font-size: 1.25rem;
    margin-top: 2px;
}

.warranty-success-box {
    text-align: center;
    padding: 24px 0;
}

.warranty-success-box i {
    font-size: 4rem;
    color: #10b981;
    margin-bottom: 16px;
    animation: checkBounce 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.warranty-success-box h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 8px;
}

.warranty-success-box p {
    color: #94a3b8;
    margin-bottom: 24px;
}

.verified-details-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    text-align: right;
}

.verified-details-box h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.95rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.03);
}

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

.detail-label {
    color: #94a3b8;
}

.detail-value {
    color: #e2e8f0;
    font-weight: 600;
}

/* User Account Info bar */
.user-account-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 14px 20px;
    border-radius: 14px;
    margin-bottom: 24px;
    text-align: right;
}

.user-account-bar-info {
    color: #e2e8f0;
    font-size: 0.95rem;
    font-weight: 600;
}

.btn-logout {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 6px 12px;
    border-radius: 8px;
    font-family: var(--font-ar);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #ffffff;
}

/* Warranty List Cards */
.warranties-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.warranty-list-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: right;
    transition: var(--transition);
}

.warranty-list-card:hover {
    border-color: rgba(0, 102, 204, 0.3);
    background: rgba(255, 255, 255, 0.04);
}

.warranty-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.warranty-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
}

.warranty-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-active {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #34d399;
}

.badge-pending {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #fbbf24;
}

.badge-expired {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #f87171;
}

.warranty-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.warranty-card-item {
    font-size: 0.85rem;
    color: #94a3b8;
}

.warranty-card-item strong {
    color: #e2e8f0;
    font-weight: 600;
    font-family: monospace, var(--font-ar);
}

.btn-download-certificate {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    text-decoration: none;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-download-certificate:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(255, 90, 0, 0.2);
}

.empty-warranties {
    text-align: center;
    padding: 40px 0;
    color: #64748b;
}

.empty-warranties i {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.3;
}

@media (max-width: 600px) {
    .warranty-tabs {
        grid-template-columns: 1fr;
        border-radius: 12px;
        gap: 4px;
    }
    .warranty-portal-card {
        padding: 20px;
    }
    .warranty-card-grid {
        grid-template-columns: 1fr;
    }
}

