/* ============================================
   درب - ملف التنسيقات الرئيسي
   متجر أدوات التخييم والمغامرات
   دعم كامل للغة العربية (RTL)
   ============================================ */

/* ─── استيراد الخطوط العربية ─── */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&display=swap');

/* ─── CSS Variables ─── */
:root {
    /* الألوان الأساسية من هوية الشعار */
    --primary: #1B4332;
    --primary-light: #2D5A3D;
    --primary-dark: #142E22;
    --accent: #D4852A;
    --accent-light: #E8A94F;
    --accent-dark: #B06D1F;
    
    /* ألوان الخلفية */
    --bg-light: #F8F6F1;
    --bg-card: #FFFFFF;
    --bg-dark: #1A1A2E;
    --bg-dark-card: #252540;
    
    /* ألوان النص */
    --text-dark: #2D3436;
    --text-light: #636E72;
    --text-muted: #95A5A6;
    --text-white: #FFFFFF;
    
    /* ألوان الحالة */
    --success: #27AE60;
    --warning: #E67E22;
    --danger: #E74C3C;
    --info: #3498DB;
    
    /* الظلال */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --shadow-accent: 0 4px 20px rgba(212,133,42,0.25);
    
    /* الحدود */
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --border-radius-sm: 8px;
    
    /* الانتقالات */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* المسافات */
    --container-max: 1280px;
    --section-padding: 80px;
}

/* ─── الوضع الداكن ─── */
[data-theme="dark"] {
    --bg-light: #1A1A2E;
    --bg-card: #252540;
    --bg-dark: #0F0F23;
    --bg-dark-card: #1E1E3A;
    --text-dark: #F0E6D3;
    --text-light: #B8B0A0;
    --text-muted: #7A7568;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.4);
}

/* ─── Reset & Base ─── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    direction: rtl;
    text-align: right;
    line-height: 1.7;
    overflow-x: hidden;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* ─── Container ─── */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--text-white);
    box-shadow: 0 4px 15px rgba(27, 67, 50, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(27, 67, 50, 0.4);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: var(--text-white);
    box-shadow: var(--shadow-accent);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(212, 133, 42, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--text-white);
}

.btn-outline-light {
    background: transparent;
    color: var(--text-white);
    border: 2px solid rgba(255,255,255,0.5);
}

.btn-outline-light:hover {
    background: var(--text-white);
    color: var(--primary);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 16px 40px;
    font-size: 1.125rem;
}

/* ─── Section Headers ─── */
.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 50%;
    transform: translateX(50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 2px;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-top: 20px;
}

/* ─── Header & Navigation ─── */
.header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition);
}

[data-theme="dark"] .header {
    background: rgba(26, 26, 46, 0.95);
    border-bottom-color: rgba(255,255,255,0.05);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

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

.logo img {
    height: 50px;
    width: auto;
}

.nav-desktop {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-desktop a {
    padding: 8px 16px;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-dark);
    border-radius: var(--border-radius-sm);
    position: relative;
}

.nav-desktop a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    right: 16px;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.nav-desktop a:hover::after,
.nav-desktop a.active::after {
    width: calc(100% - 32px);
}

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

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

.icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    font-size: 1.2rem;
}

.icon-btn:hover {
    background: var(--bg-light);
    color: var(--primary);
}

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

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-dark);
    transition: var(--transition);
    display: block;
}

/* Mobile Navigation */
.nav-mobile {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 360px;
    height: 100vh;
    background: var(--bg-card);
    z-index: 1100;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    padding: 80px 24px 24px;
    overflow-y: auto;
}

.nav-mobile.active {
    right: 0;
}

.nav-mobile a {
    display: block;
    padding: 14px 16px;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-dark);
    border-radius: var(--border-radius-sm);
    margin-bottom: 4px;
}

.nav-mobile a:hover,
.nav-mobile a.active {
    background: rgba(27, 67, 50, 0.08);
    color: var(--primary);
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

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

/* ─── Hero Section ─── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    margin-top: 0;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26,26,46,0.85) 0%, rgba(27,67,50,0.75) 50%, rgba(26,26,46,0.6) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--text-white);
    padding: 120px 24px 80px;
    max-width: 800px;
    margin: 0 auto;
}

.hero-logo {
    max-width: 250px;
    margin: 0 auto 30px;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.3;
}

.hero h1 span {
    color: var(--accent-light);
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 36px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-scroll {
    position: absolute;
    bottom: 30px;
    right: 50%;
    transform: translateX(50%);
    z-index: 2;
    color: var(--text-white);
    opacity: 0.7;
    animation: bounce 2s infinite;
    font-size: 1.5rem;
    cursor: pointer;
}

@keyframes bounce {
    0%, 100% { transform: translateX(50%) translateY(0); }
    50% { transform: translateX(50%) translateY(10px); }
}

/* ─── Features Section ─── */
.features {
    padding: var(--section-padding) 0;
    background: var(--bg-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.04);
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
    color: var(--text-white);
}

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* ─── Categories Section ─── */
.categories {
    padding: var(--section-padding) 0;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--text-white);
}

.categories .section-header h2,
.categories .section-header p {
    color: var(--text-white);
}

.categories .section-header h2::after {
    background: var(--accent-light);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.category-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 32px 20px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.15);
    transition: var(--transition);
    cursor: pointer;
}

.category-card:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-4px);
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.category-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.category-card span {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* ─── Products Section ─── */
.products {
    padding: var(--section-padding) 0;
    background: var(--bg-light);
}

.products-toolbar {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-box input {
    width: 100%;
    padding: 12px 48px 12px 16px;
    border: 2px solid rgba(0,0,0,0.08);
    border-radius: var(--border-radius);
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    background: var(--bg-card);
    color: var(--text-dark);
    transition: var(--transition);
}

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

.search-box i {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.filter-select {
    padding: 12px 16px;
    border: 2px solid rgba(0,0,0,0.08);
    border-radius: var(--border-radius);
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    background: var(--bg-card);
    color: var(--text-dark);
    cursor: pointer;
    min-width: 160px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* ─── Product Card ─── */
.product-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.04);
    position: relative;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
}

.badge-sale {
    background: var(--danger);
    color: white;
}

.badge-new {
    background: var(--success);
    color: white;
}

.badge-out {
    background: var(--text-muted);
    color: white;
}

.product-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: linear-gradient(135deg, #f0f0f0, #e8e8e8);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

[data-theme="dark"] .product-image {
    background: linear-gradient(135deg, #333, #444);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
    transition: var(--transition);
}

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

.product-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: rgba(0,0,0,0.35);
    transition: var(--transition);
    z-index: 5;
}

/* Hide by default on desktop only - always show on mobile/touch */
@media (min-width: 769px) {
    .product-actions {
        bottom: -50px;
        background: transparent;
    }
    .product-card:hover .product-actions {
        bottom: 0;
        background: rgba(0,0,0,0.35);
    }
}

.product-action-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--bg-card);
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: var(--transition);
    font-size: 1.05rem;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.product-action-btn:hover {
    background: var(--primary);
    color: white;
}

.product-info {
    padding: 20px;
}

.product-category {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 600;
}

.product-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 6px 0;
    line-height: 1.4;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.product-title:hover {
    color: var(--primary);
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.price-current {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

.price-old {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

/* ─── Banner Section ─── */
.banner {
    position: relative;
    padding: 100px 0;
    overflow: hidden;
}

.banner-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.banner-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.1;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.banner-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
}

.banner h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.banner p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 32px;
}

/* ─── About Preview ─── */
.about-preview {
    padding: var(--section-padding) 0;
    background: var(--bg-light);
}

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

.about-image {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.about-image img {
    width: 100%;
    border-radius: var(--border-radius-lg);
}

.about-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.about-content h2 span {
    color: var(--accent);
}

.about-content p {
    color: var(--text-light);
    margin-bottom: 16px;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.stat-item h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-item span {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* ─── Footer ─── */
.footer {
    background: linear-gradient(180deg, #1A1A2E 0%, #0F0F23 100%);
    color: rgba(255,255,255,0.8);
    padding-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 60px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand img {
    height: 60px;
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.8;
    opacity: 0.8;
}

.footer h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin-bottom: 24px;
}

.footer-links a {
    display: block;
    padding: 6px 0;
    font-size: 0.9rem;
    opacity: 0.8;
    transition: var(--transition);
}

.footer-links a:hover {
    opacity: 1;
    color: var(--accent-light);
    padding-right: 8px;
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.footer-social a {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 1.1rem;
}

.footer-social a:hover {
    background: var(--accent);
    transform: translateY(-3px);
}

.footer-bottom {
    padding: 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ─── Floating WhatsApp Button ─── */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: var(--transition);
    animation: pulse-whatsapp 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.5);
}

@keyframes pulse-whatsapp {
    0%, 100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); }
    50% { box-shadow: 0 4px 30px rgba(37, 211, 102, 0.6); }
}

/* ─── Toast Notifications ─── */
.toast-container {
    position: fixed;
    top: 90px;
    left: 24px;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-card);
    color: var(--text-dark);
    padding: 16px 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    transform: translateX(-120%);
    transition: var(--transition);
    border-right: 4px solid var(--primary);
    direction: rtl;
}

.toast.show {
    transform: translateX(0);
}

.toast-success { border-right-color: var(--success); }
.toast-error { border-right-color: var(--danger); }
.toast-warning { border-right-color: var(--warning); }
.toast-info { border-right-color: var(--info); }

.toast-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.toast-success .toast-icon { color: var(--success); }
.toast-error .toast-icon { color: var(--danger); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info .toast-icon { color: var(--info); }

/* ─── Cart Drawer ─── */
.cart-drawer {
    position: fixed;
    top: 0;
    left: -420px;
    width: 100%;
    max-width: 420px;
    height: 100vh;
    background: var(--bg-card);
    z-index: 1100;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
}

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

.cart-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.cart-empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.cart-item {
    display: flex;
    gap: 14px;
    padding: 14px;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    align-items: center;
}

.cart-item-image {
    width: 70px;
    height: 70px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: white;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
}

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

.cart-item-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

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

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.1);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
}

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

.cart-item-remove {
    color: var(--danger);
    cursor: pointer;
    padding: 5px;
    transition: var(--transition);
    font-size: 1.1rem;
    background: none;
    border: none;
}

.cart-item-remove:hover {
    transform: scale(1.2);
}

.cart-footer {
    padding: 20px 24px;
    border-top: 1px solid rgba(0,0,0,0.08);
    background: var(--bg-light);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    font-size: 1.1rem;
}

.cart-total span:last-child {
    font-weight: 700;
    color: var(--primary);
}

/* ─── Product Detail ─── */
.product-detail {
    padding: 100px 0 60px;
    background: var(--bg-light);
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.product-gallery {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.product-gallery-main {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.product-gallery-main img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-detail-info h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.product-detail-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.product-detail-meta span {
    padding: 4px 12px;
    background: var(--bg-card);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.product-detail-price {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.product-detail-price .current {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.product-detail-price .old {
    font-size: 1.2rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.product-detail-desc {
    color: var(--text-light);
    margin-bottom: 32px;
    line-height: 1.8;
}

.product-detail-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0;
    border: 2px solid rgba(0,0,0,0.1);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.quantity-selector button {
    width: 44px;
    height: 44px;
    border: none;
    background: var(--bg-light);
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

.quantity-selector button:hover {
    background: var(--primary);
    color: white;
}

.quantity-selector input {
    width: 60px;
    height: 44px;
    border: none;
    text-align: center;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    background: var(--bg-card);
    color: var(--text-dark);
}

.product-features-list {
    list-style: none;
    padding: 0;
}

.product-features-list li {
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.product-features-list li i {
    color: var(--accent);
}

/* ─── Cart Page ─── */
.cart-page {
    padding: 100px 0 60px;
    min-height: 80vh;
    background: var(--bg-light);
}

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

.cart-products {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.cart-summary {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    height: fit-content;
    position: sticky;
    top: 90px;
}

.cart-summary h3 {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--bg-light);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 0.95rem;
}

.summary-row.total {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    border-top: 2px solid var(--bg-light);
    margin-top: 10px;
    padding-top: 16px;
}

.cart-product-item {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--bg-light);
    align-items: center;
}

.cart-product-item:last-child {
    border-bottom: none;
}

.cart-product-image {
    width: 100px;
    height: 100px;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    flex-shrink: 0;
}

.cart-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

/* ─── About Page ─── */
.about-page {
    padding: 100px 0 60px;
    background: var(--bg-light);
}

.about-hero {
    text-align: center;
    padding: 60px 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: var(--border-radius-lg);
    margin-bottom: 60px;
}

.about-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.about-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.about-values {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

.value-card {
    background: var(--bg-card);
    padding: 32px;
    border-radius: var(--border-radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.value-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.value-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

/* ─── Contact Page ─── */
.contact-page {
    padding: 100px 0 60px;
    background: var(--bg-light);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
}

.contact-info-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--bg-light);
}

.contact-info-item:last-child {
    border-bottom: none;
}

.contact-info-item i {
    font-size: 1.3rem;
    color: var(--accent);
    margin-top: 4px;
}

.contact-info-item h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.contact-info-item p {
    font-size: 0.9rem;
    color: var(--text-light);
}

.contact-map {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    height: 300px;
    position: relative;
}

/* ─── Return Policy ─── */
.policy-page {
    padding: 100px 0 60px;
    background: var(--bg-light);
    min-height: 80vh;
}

.policy-content {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 48px;
    box-shadow: var(--shadow-sm);
}

.policy-content h1 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 32px;
    color: var(--primary);
}

.policy-content h2 {
    font-size: 1.3rem;
    margin: 24px 0 12px;
    color: var(--text-dark);
}

.policy-content p,
.policy-content li {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 8px;
}

.policy-content ul {
    padding-right: 24px;
    list-style: disc;
}

/* ─── 404 Page ─── */
.page-404 {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 24px;
    background: var(--bg-light);
}

.page-404 h1 {
    font-size: 8rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 16px;
}

.page-404 h2 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 16px;
}

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

/* ─── Admin Panel ─── */
.admin-body {
    background: #F3F4F6;
    font-family: 'Cairo', sans-serif;
}

.admin-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 260px;
    height: 100vh;
    background: linear-gradient(180deg, #1B4332 0%, #142E22 100%);
    color: white;
    z-index: 1000;
    overflow-y: auto;
    padding: 24px 0;
}

.admin-sidebar-logo {
    text-align: center;
    padding: 0 24px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 16px;
}

.admin-sidebar-logo img {
    height: 50px;
    margin: 0 auto;
}

.admin-sidebar a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    color: rgba(255,255,255,0.8);
    transition: var(--transition);
    font-size: 0.95rem;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.admin-sidebar a i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.admin-main {
    margin-right: 260px;
    min-height: 100vh;
    padding: 24px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 2px solid #E5E7EB;
}

.admin-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.admin-stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
}

.admin-stat-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.admin-stat-info span {
    font-size: 0.85rem;
    color: var(--text-light);
}

.admin-table {
    width: 100%;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.admin-table table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 14px 16px;
    text-align: right;
    border-bottom: 1px solid #E5E7EB;
    font-size: 0.9rem;
}

.admin-table th {
    background: #F9FAFB;
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.admin-table tr:hover td {
    background: #FAFAFA;
}

.admin-product-img {
    width: 50px;
    height: 50px;
    border-radius: var(--border-radius-sm);
    object-fit: cover;
}

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

.status-available { background: #D1FAE5; color: #065F46; }
.status-unavailable { background: #FEE2E2; color: #991B1B; }

.admin-actions {
    display: flex;
    gap: 8px;
}

.admin-btn {
    padding: 6px 12px;
    border-radius: var(--border-radius-sm);
    border: none;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-size: 0.8rem;
    transition: var(--transition);
}

.admin-btn-edit {
    background: #DBEAFE;
    color: #1E40AF;
}

.admin-btn-edit:hover {
    background: #BFDBFE;
}

.admin-btn-delete {
    background: #FEE2E2;
    color: #991B1B;
}

.admin-btn-delete:hover {
    background: #FECACA;
}

/* Admin Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close:hover {
    background: #F3F4F6;
}

.modal-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #E5E7EB;
    border-radius: var(--border-radius);
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    transition: var(--transition);
    direction: rtl;
}

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

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.image-preview {
    width: 100px;
    height: 100px;
    border: 2px dashed #D1D5DB;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 8px;
}

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

/* Login Page */
.admin-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1B4332 0%, #142E22 100%);
    padding: 24px;
}

.login-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.login-card img {
    height: 80px;
    margin: 0 auto 20px;
}

.login-card h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.login-card p {
    color: var(--text-light);
    margin-bottom: 24px;
    font-size: 0.9rem;
}

/* ─── Animations ─── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

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

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.slide-in {
    animation: slideIn 0.6s ease forwards;
}

.scale-in {
    animation: scaleIn 0.5s ease forwards;
}

/* ─── Lazy Load ─── */
.lazy-load {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.lazy-load.loaded {
    opacity: 1;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ─── PWA Install Prompt ─── */
.pwa-prompt {
    position: fixed;
    bottom: 100px;
    right: 24px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-lg);
    z-index: 900;
    display: none;
    max-width: 300px;
    border: 1px solid rgba(0,0,0,0.08);
}

.pwa-prompt.active {
    display: block;
}

.pwa-prompt h4 {
    margin-bottom: 8px;
    font-size: 1rem;
}

.pwa-prompt p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 12px;
}

.pwa-prompt-buttons {
    display: flex;
    gap: 8px;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .product-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .cart-content {
        grid-template-columns: 1fr;
    }
    
    .cart-summary {
        position: static;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 50px;
    }
    
    .nav-desktop {
        display: none;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .header-actions {
        gap: 8px;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }
    
    .footer-brand img {
        margin: 0 auto 16px;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .banner h2 {
        font-size: 1.8rem;
    }
    
    .banner p {
        font-size: 1rem;
    }
    
    .cart-product-item {
        flex-direction: column;
        text-align: center;
    }
    
    /* Product actions: keep absolute positioned over image on mobile */
    .product-actions {
        bottom: 0;
        opacity: 1;
        position: absolute;
        padding: 8px;
        background: rgba(0,0,0,0.4);
    }
    
    .admin-sidebar {
        right: -260px;
    }
    
    .admin-sidebar.active {
        right: 0;
    }
    
    .admin-main {
        margin-right: 0;
    }
    
    .admin-stats {
        grid-template-columns: 1fr 1fr;
    }
    
    .page-404 h1 {
        font-size: 5rem;
    }
    
    .policy-content {
        padding: 24px;
    }
    
    .toast-container {
        left: 12px;
        right: 12px;
    }
    
    .toast {
        min-width: auto;
        width: 100%;
    }
    
    .cart-drawer {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .product-detail-price .current {
        font-size: 1.5rem;
    }
    
    .admin-stats {
        grid-template-columns: 1fr;
    }
}

/* Print styles */
@media print {
    .header, .footer, .whatsapp-float, .toast-container {
        display: none !important;
    }
}
