/* ====================================
   Global Styles - Professional White Design
   ====================================  */
:root {
    --primary: #dc2626;
    --primary-dark: #b91c1c;
    --primary-light: #ef4444;
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --accent: #f59e0b;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Tajawal', sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }

/* Container */
.container { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 24px; } }
@media (min-width: 1024px) { .container { padding: 0 32px; } }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 24px; border-radius: var(--radius); font-weight: 700;
    font-size: 14px; transition: all 0.2s; cursor: pointer; border: none;
    font-family: 'Tajawal', sans-serif;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-success { background: var(--success); color: white; }
.btn-sm { padding: 6px 16px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }

/* Cards */
.card {
    background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow);
    overflow: hidden; transition: all 0.3s;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

/* Product Card */
.product-card {
    background: white; border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow); transition: all 0.3s; display: flex;
    flex-direction: column; height: 100%;
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.product-card .card-image { aspect-ratio: 1/1; overflow: hidden; position: relative; }
.product-card .card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.product-card:hover .card-image img { transform: scale(1.05); }
.product-card .card-body { padding: 12px; flex: 1; display: flex; flex-direction: column; }
.product-card .product-name { font-size: 14px; font-weight: 700; color: var(--gray-800); margin-bottom: 4px; line-height: 1.4; }
.product-card .product-price { font-size: 16px; font-weight: 800; color: var(--primary); }
.product-card .product-old-price { font-size: 13px; color: var(--gray-400); text-decoration: line-through; margin-right: 8px; }

/* Badge */
.badge {
    display: inline-flex; align-items: center; padding: 4px 10px;
    border-radius: 20px; font-size: 11px; font-weight: 700;
}
.badge-sale { background: var(--danger); color: white; }
.badge-new { background: var(--success); color: white; }
.badge-free-shipping { background: var(--primary-50); color: var(--primary); border: 1px solid var(--primary-100); }

/* Add to Cart Button */
.add-to-cart-btn {
    width: 38px; height: 38px; border-radius: 10px; border: none;
    background: var(--primary); color: white; display: flex;
    align-items: center; justify-content: center; cursor: pointer;
    transition: all 0.2s; box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}
.add-to-cart-btn:hover { background: var(--primary-dark); transform: scale(1.1); }

/* Category Card */
.category-card {
    background: white; border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow); transition: all 0.3s; text-align: center;
}
.category-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.category-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.category-card .cat-name { padding: 10px 8px; font-weight: 700; font-size: 13px; color: var(--gray-700); }

/* Section */
.section { padding: 32px 0; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.section-title { font-size: 20px; font-weight: 800; color: var(--gray-900); display: flex; align-items: center; gap: 10px; }
.section-title .line { width: 4px; height: 24px; border-radius: 2px; background: var(--primary); }
.view-all { font-size: 14px; font-weight: 700; color: var(--primary); display: flex; align-items: center; gap: 4px; }
.view-all:hover { color: var(--primary-dark); }

/* Swiper overrides */
.swiper-pagination-bullet { background: var(--gray-300) !important; opacity: 0.7 !important; }
.swiper-pagination-bullet-active { background: var(--primary) !important; width: 24px !important; border-radius: 4px !important; opacity: 1 !important; }
.swiper-button-next, .swiper-button-prev {
    width: 40px !important; height: 40px !important; background: white !important;
    border-radius: 50% !important; box-shadow: var(--shadow-md) !important;
}
.swiper-button-next::after, .swiper-button-prev::after { font-size: 16px !important; color: var(--gray-700); font-weight: bold; }

/* Hero Slider */
.hero-swiper { width: 100%; height: 220px; overflow: hidden; border-radius: var(--radius-lg); }
.hero-swiper .swiper-slide { width: 100% !important; }
@media (min-width: 640px) { .hero-swiper { height: 320px; } }
@media (min-width: 1024px) { .hero-swiper { height: 450px; border-radius: var(--radius-xl); } }
.hero-slide { width: 100%; height: 100%; position: relative; overflow: hidden; }
.hero-slide img, .hero-slide video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to left, transparent 20%, rgba(0,0,0,0.6) 100%); z-index: 2; }
.hero-content { position: relative; z-index: 3; padding: 48px; height: 100%; display: flex; flex-direction: column; justify-content: center; max-width: 600px; }
@media (max-width: 768px) { .hero-content { padding: 24px; } }

/* Navbar */
.navbar {
    background: white; position: sticky; top: 0; z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08); border-bottom: 1px solid var(--gray-100);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.navbar .logo-img { height: 44px; width: auto; object-fit: contain; }
.navbar .search-bar {
    flex: 1; max-width: 480px; display: flex; align-items: center;
    background: var(--gray-100); border: 1.5px solid var(--gray-200);
    border-radius: 50px; padding: 0 16px; height: 42px; transition: all 0.2s;
}
.navbar .search-bar:focus-within { border-color: var(--primary); background: white; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.navbar .search-bar input { border: none; outline: none; background: transparent; font-family: 'Tajawal'; font-size: 14px; color: var(--gray-800); flex: 1; }
.navbar .icon-btn {
    width: 42px; height: 42px; display: flex; align-items: center; justify-content: center;
    background: var(--gray-100); border: 1px solid var(--gray-200); border-radius: 12px;
    color: var(--gray-600); transition: all 0.2s; cursor: pointer; position: relative;
}
.navbar .icon-btn:hover { background: var(--primary-50); border-color: var(--primary-100); color: var(--primary); }
.cart-badge {
    position: absolute; top: -4px; left: -4px; background: var(--primary);
    color: white; font-size: 10px; font-weight: 800; min-width: 18px;
    height: 18px; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; border: 2px solid white;
}

/* Footer */
.footer { background: var(--gray-900); color: white; padding: 48px 0 24px; margin-top: 48px; }
.footer a { color: var(--gray-400); transition: color 0.2s; }
.footer a:hover { color: white; }

/* Features */
.feature-card {
    background: white; border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
    padding: 20px 16px; text-align: center; transition: all 0.3s;
}
.feature-card:hover { border-color: var(--primary-100); box-shadow: var(--shadow-md); }
.feature-icon {
    width: 48px; height: 48px; border-radius: 12px; background: var(--primary-50);
    display: flex; align-items: center; justify-content: center; margin: 0 auto 12px;
    color: var(--primary);
}

/* Form Inputs */
.form-input {
    width: 100%; padding: 12px 16px; border: 1.5px solid var(--gray-200);
    border-radius: var(--radius); font-family: 'Tajawal'; font-size: 14px;
    font-weight: 600; color: var(--gray-800); background: white; transition: all 0.2s;
}
.form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.form-label { display: block; font-size: 13px; font-weight: 700; color: var(--gray-600); margin-bottom: 6px; }

/* Responsive */
@media (max-width: 640px) {
    .navbar .search-bar { max-width: 200px; height: 36px; padding: 0 10px; }
    .navbar .search-bar input { font-size: 12px; }
    .navbar .icon-btn { width: 36px; height: 36px; }
    .section-title { font-size: 17px; }
    .product-card .card-body { padding: 10px; }
    .product-card .product-name { font-size: 13px; }
    .product-card .product-price { font-size: 14px; }
}

/* Alert Messages */
.alert { padding: 14px 18px; border-radius: var(--radius); font-weight: 600; display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-info { background: var(--primary-50); border: 1px solid var(--primary-100); color: var(--primary-dark); }

/* Top Banner */
.top-banner {
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 50%, var(--primary) 100%);
    color: white; text-align: center; padding: 8px 16px; font-size: 13px; font-weight: 700;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200;
    display: none; opacity: 0; transition: opacity 0.3s;
}
.mobile-menu.active { display: block; opacity: 1; }
.mobile-menu-content {
    position: absolute; top: 0; right: 0; width: 280px; height: 100%;
    background: white; padding: 24px; overflow-y: auto;
    transform: translateX(100%); transition: transform 0.3s;
}
.mobile-menu.active .mobile-menu-content { transform: translateX(0); }
