/* ========================================
   متجر المعدات الإعلان والترويج - CSS
   ======================================== */

/* CSS Variables */
:root {
    --primary: #DC2626;
    --primary-dark: #991B1B;
    --primary-light: #EF4444;
    --accent: #FEF3C7;
    --bg-dark: #1F1F1F;
    --bg-dark-2: #2D2D2D;
    --bg-card: #FFFFFF;
    --text-primary: #FFFFFF;
    --text-secondary: #A3A3A3;
    --text-dark: #1F1F1F;
    --success: #10B981;
    --warning: #F59E0B;
    --info: #3B82F6;
    --border-radius: 12px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease-out;
}

/* Light Theme */
[data-theme="light"] {
    --bg-dark: #F5F5F5;
    --bg-dark-2: #FFFFFF;
    --text-primary: #1F1F1F;
    --text-secondary: #6B7280;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-dark-2) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: var(--transition);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.5);
}

.btn-secondary {
    background: var(--bg-dark-2);
    color: var(--text-primary);
    border: 2px solid var(--primary);
}

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

.btn-icon {
    background: transparent;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    background: rgba(220, 38, 38, 0.2);
    color: var(--primary);
}

.btn-block {
    width: 100%;
}

/* ========================================
   Header
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(31, 31, 31, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(220, 38, 38, 0.3);
    transition: var(--transition);
}

[data-theme="light"] .header {
    background: rgba(255, 255, 255, 0.95);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

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

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    animation: pulse-glow 2s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.5);
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(220, 38, 38, 0.5);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 30px rgba(220, 38, 38, 0.8);
        transform: scale(1.05);
    }
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-link {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

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

.cart-btn {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--bg-dark);
    z-index: 2000;
    transition: right 0.4s ease-out;
}

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

.mobile-menu-content {
    padding: 80px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.close-menu {
    position: absolute;
    top: 24px;
    left: 24px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 28px;
    cursor: pointer;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-nav-link {
    font-size: 18px;
    font-weight: 600;
    padding: 12px 16px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.mobile-nav-link:hover {
    background: rgba(220, 38, 38, 0.2);
    color: var(--primary);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    position: relative;
    padding: 160px 0 100px;
    overflow: hidden;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-dark-2) 100%);
    z-index: -2;
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(220, 38, 38, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(220, 38, 38, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 40% 80%, rgba(254, 243, 199, 0.05) 0%, transparent 40%);
    z-index: -1;
}

.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: -1;
}

.floating-icon {
    position: absolute;
    color: var(--primary);
    opacity: 0.1;
    font-size: 80px;
}

.floating-icon.f-icon-1 {
    top: 15%;
    left: 10%;
    animation: float1 6s ease-in-out infinite;
}

.floating-icon.f-icon-2 {
    top: 60%;
    right: 15%;
    animation: float2 8s ease-in-out infinite;
}

.floating-icon.f-icon-3 {
    bottom: 20%;
    left: 20%;
    animation: float3 7s ease-in-out infinite;
}

.floating-icon.f-icon-4 {
    top: 30%;
    right: 25%;
    animation: float1 9s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes float2 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(-5deg); }
}

@keyframes float3 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(3deg); }
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
}

.title-line {
    display: block;
    color: var(--text-primary);
}

.title-highlight {
    display: block;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: text-glow 3s ease-in-out infinite;
}

@keyframes text-glow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-search {
    margin-bottom: 48px;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-dark-2);
    border-radius: 50px;
    padding: 8px;
    border: 2px solid transparent;
    transition: var(--transition);
    max-width: 600px;
    margin: 0 auto;
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
}

.search-icon {
    padding: 0 16px;
    color: var(--text-secondary);
    font-size: 18px;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px;
    font-family: inherit;
    font-size: 16px;
    color: var(--text-primary);
    outline: none;
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.search-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.5);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 40px;
    font-weight: 800;
    font-family: 'Tajawal', sans-serif;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ========================================
   Categories Section
   ======================================== */
.categories {
    padding: 100px 0;
}

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

.section-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.section-title i {
    color: var(--primary);
    animation: spin 4s linear infinite;
}

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

.section-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.category-card {
    background: var(--bg-dark-2);
    border-radius: var(--border-radius);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    transition: var(--transition);
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(220, 38, 38, 0.2);
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    animation: icon-pulse 2s ease-in-out infinite;
    box-shadow: 0 0 30px rgba(220, 38, 38, 0.4);
}

@keyframes icon-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 30px rgba(220, 38, 38, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 50px rgba(220, 38, 38, 0.6);
    }
}

.icon-glow {
    position: absolute;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.3) 0%, transparent 70%);
    animation: glow-pulse 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes glow-pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.3); opacity: 0.8; }
}

.category-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.category-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.category-count {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(220, 38, 38, 0.2);
    border-radius: 20px;
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(to top, rgba(220, 38, 38, 0.9), transparent);
    transform: translateY(100%);
    transition: var(--transition);
}

.category-card:hover .category-overlay {
    transform: translateY(0);
}

.shop-btn {
    display: inline-block;
    padding: 8px 24px;
    background: white;
    color: var(--primary);
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

/* ========================================
   Products Section
   ======================================== */
.products {
    padding: 100px 0;
    background: linear-gradient(180deg, transparent 0%, rgba(220, 38, 38, 0.03) 50%, transparent 100%);
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.filter-tab {
    padding: 8px 20px;
    background: var(--bg-dark-2);
    border: 2px solid transparent;
    border-radius: 25px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.filter-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

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

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.product-card {
    background: var(--bg-dark-2);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 2px solid transparent;
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(220, 38, 38, 0.15);
}

.product-image {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, #3a3a3a 0%, #2a2a2a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image i {
    font-size: 64px;
    color: var(--primary);
    opacity: 0.6;
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 12px;
    background: var(--primary);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.product-actions {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-actions {
    opacity: 1;
}

.product-action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    font-size: 16px;
    transition: var(--transition);
}

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

.product-info {
    padding: 20px;
}

.product-category {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 8px;
}

.product-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
}

.product-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.6;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-price {
    font-size: 20px;
    font-weight: 700;
    font-family: 'Tajawal', sans-serif;
    color: var(--primary);
}

.product-price span {
    font-size: 14px;
    font-weight: 400;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--warning);
    font-size: 14px;
}

.load-more {
    text-align: center;
}

/* ========================================
   Features Section
   ======================================== */
.features {
    padding: 80px 0;
}

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

.feature-card {
    background: var(--bg-dark-2);
    border-radius: var(--border-radius);
    padding: 32px;
    text-align: center;
    border: 1px solid rgba(220, 38, 38, 0.2);
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--bg-dark);
    border-top: 1px solid rgba(220, 38, 38, 0.3);
    padding: 64px 0 24px;
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 24px;
    font-weight: 700;
}

.footer-logo i {
    color: var(--primary);
    font-size: 28px;
}

.footer-section p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.footer-section h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary);
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    font-size: 14px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
    padding-right: 8px;
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.footer-contact i {
    color: var(--primary);
    width: 20px;
}

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

.social-link {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-dark-2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 18px;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-4px);
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ========================================
   Cart Sidebar
   ======================================== */
.cart-sidebar {
    position: fixed;
    top: 0;
    left: -400px;
    width: 400px;
    height: 100vh;
    background: var(--bg-dark);
    z-index: 2000;
    transition: left 0.4s ease-out;
    display: flex;
    flex-direction: column;
}

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

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

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

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

.cart-header h3 {
    font-size: 20px;
    font-weight: 700;
}

.cart-header h3 i {
    color: var(--primary);
    margin-left: 8px;
}

.close-cart {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
}

.close-cart:hover {
    color: var(--primary);
}

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

.cart-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--bg-dark-2);
    border-radius: var(--border-radius);
    margin-bottom: 12px;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #3a3a3a 0%, #2a2a2a 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-image i {
    font-size: 32px;
    color: var(--primary);
}

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

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

.cart-item-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Tajawal', sans-serif;
}

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

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.qty-value {
    font-weight: 600;
}

.cart-item-remove {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 18px;
    transition: var(--transition);
}

.cart-item-remove:hover {
    color: var(--primary);
}

.cart-empty {
    text-align: center;
    padding: 48px 16px;
    color: var(--text-secondary);
}

.cart-empty i {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.cart-footer {
    padding: 24px;
    border-top: 1px solid rgba(220, 38, 38, 0.3);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 700;
}

.total-price {
    color: var(--primary);
    font-family: 'Tajawal', sans-serif;
}

/* ========================================
   Admin Dashboard
   ======================================== */
.admin-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3000;
    display: none;
}

.admin-modal.active {
    display: block;
}

.admin-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
}

.admin-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95%;
    max-width: 1400px;
    height: 90vh;
    background: var(--bg-dark);
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--primary);
    color: white;
}

.admin-header h2 {
    font-size: 20px;
    font-weight: 700;
}

.admin-header h2 i {
    margin-left: 8px;
}

.close-admin {
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.admin-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.admin-sidebar {
    width: 250px;
    background: var(--bg-dark-2);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px 0;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: right;
    cursor: pointer;
    transition: var(--transition);
}

.admin-nav-item:hover {
    background: rgba(220, 38, 38, 0.1);
    color: var(--primary);
}

.admin-nav-item.active {
    background: var(--primary);
    color: white;
}

.admin-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

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

.admin-tab-content.active {
    display: block;
}

.admin-tab-content h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
}

.tab-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.tab-header h3 {
    margin-bottom: 0;
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.dash-stat-card {
    background: var(--bg-dark-2);
    border-radius: var(--border-radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.dash-stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.dash-stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    font-family: 'Tajawal', sans-serif;
}

.dash-stat-label {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Tables */
.orders-table,
.admin-products-table table,
.admin-orders-table table {
    width: 100%;
    border-collapse: collapse;
}

.orders-table th,
.orders-table td,
.admin-products-table th,
.admin-products-table td,
.admin-orders-table th,
.admin-orders-table td {
    padding: 12px 16px;
    text-align: right;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.orders-table th,
.admin-products-table th,
.admin-orders-table th {
    background: var(--bg-dark-2);
    font-weight: 600;
    color: var(--primary);
}

.orders-table th:first-child,
.admin-products-table th:first-child,
.admin-orders-table th:first-child {
    border-radius: 8px 0 0 0;
}

.orders-table th:last-child,
.admin-products-table th:last-child,
.admin-orders-table th:last-child {
    border-radius: 0 8px 0 0;
}

/* Admin Categories Grid */
.admin-categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.admin-category-card {
    background: var(--bg-dark-2);
    border-radius: var(--border-radius);
    padding: 24px;
    text-align: center;
}

.admin-category-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.admin-category-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.admin-category-count {
    font-size: 14px;
    color: var(--text-secondary);
}

.admin-category-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

/* Settings Form */
.settings-form {
    max-width: 600px;
}

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-dark-2);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 14px;
    color: var(--text-primary);
    transition: var(--transition);
}

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

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

.form-group select {
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* Orders Filter */
.orders-filters {
    margin-bottom: 24px;
}

.orders-filters select {
    padding: 10px 16px;
    background: var(--bg-dark-2);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
}

/* Action Buttons */
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-edit {
    background: var(--info);
    color: white;
}

.btn-delete {
    background: var(--primary);
    color: white;
}

/* ========================================
   Modal
   ======================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4000;
    display: none;
}

.modal.active {
    display: block;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    background: var(--bg-dark);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--primary);
    color: white;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.modal-header h3 i {
    margin-left: 8px;
}

.close-modal {
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.modal-body {
    padding: 24px;
}

/* ========================================
   Toast Notification
   ======================================== */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--success);
    color: white;
    padding: 16px 32px;
    border-radius: var(--border-radius);
    z-index: 5000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease-out;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

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

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

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

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

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

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-sidebar {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }

    .header-actions .btn:not(.cart-btn):not(#adminBtn) {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-stats {
        gap: 24px;
    }

    .stat-number {
        font-size: 28px;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .cart-sidebar {
        width: 100%;
        left: -100%;
    }

    .admin-container {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }

    .admin-sidebar {
        display: none;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .orders-table {
        font-size: 12px;
    }

    .orders-table th,
    .orders-table td {
        padding: 8px;
    }

    .admin-categories-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 120px 0 60px;
        min-height: auto;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 14px;
    }

    .search-box {
        flex-direction: column;
        border-radius: var(--border-radius);
    }

    .search-icon {
        display: none;
    }

    .search-input {
        width: 100%;
    }

    .search-btn {
        width: 100%;
        border-radius: var(--border-radius);
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .filter-tabs {
        gap: 8px;
    }

    .filter-tab {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* ========================================
   Login Modal
   ======================================== */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5000;
    display: none;
}

.login-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
}

.login-container {
    position: relative;
    width: 90%;
    max-width: 420px;
    background: var(--bg-dark);
    border-radius: var(--border-radius);
    overflow: hidden;
    animation: slideUp 0.4s ease-out;
}

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

.login-header {
    padding: 32px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    text-align: center;
}

.login-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
}

.login-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

.login-header p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.login-form {
    padding: 24px;
}

.login-error {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid var(--primary);
    border-radius: var(--border-radius);
    color: var(--primary);
    font-size: 14px;
}

.login-error.show {
    display: flex;
}

/* Admin Access Button */
.admin-access-btn {
    width: 40px;
    height: 40px;
    margin-right: 16px;
    background: rgba(220, 38, 38, 0.2);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 16px;
    transition: var(--transition);
}

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

/* Language Toggle */
.lang-toggle {
    background: rgba(220, 38, 38, 0.2);
    border: 2px solid var(--primary);
    border-radius: 8px;
    font-weight: 700;
    font-size: 12px;
    width: auto;
    padding: 0 12px;
}

.lang-toggle:hover {
    background: var(--primary);
}

.lang-icon {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
}

[dir="ltr"] .lang-toggle {
    border-radius: 8px;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

