/* ============================================================
   AL-ASIFA PD STORE DESIGN SYSTEM & STYLES (نظام التصميم والأشكال)
   ============================================================ */

:root {
    --bg-main: #07090e;
    --bg-secondary: #0f1523;
    --bg-card: rgba(15, 22, 37, 0.7);
    --bg-glass: rgba(18, 26, 45, 0.65);
    
    --border-color: rgba(245, 158, 11, 0.18);
    --border-hover: rgba(245, 158, 11, 0.5);
    --border-glass: rgba(255, 255, 255, 0.08);
    
    --gold-primary: #f59e0b;
    --gold-light: #fbbf24;
    --gold-dark: #d97706;
    --gold-gradient: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #d97706 100%);
    
    --accent-blue: #38bdf8;
    --accent-purple: #818cf8;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dark: #64748b;
    
    --shadow-gold: 0 0 25px rgba(245, 158, 11, 0.25);
    --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', 'Outfit', sans-serif;
    user-select: none;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    direction: rtl;
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(245, 158, 11, 0.07) 0%, transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(56, 189, 248, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(15, 21, 35, 0.9) 0%, var(--bg-main) 100%);
    background-attachment: fixed;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: rgba(245, 158, 11, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gold-primary);
}

/* Header & Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    padding: 14px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.brand img {
    height: 52px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.4));
    transition: var(--transition);
}

.brand img:hover {
    transform: scale(1.05) rotate(-3deg);
}

.brand-text h1 {
    font-size: 1.25rem;
    font-weight: 800;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.brand-text p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    padding: 9px 18px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    text-decoration: none;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
    color: var(--gold-primary);
    transform: translateY(-2px);
}

.btn-cart {
    position: relative;
    background: var(--gold-gradient);
    border: none;
    color: #000;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-cart:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

.cart-badge {
    background: #000;
    color: var(--gold-primary);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 900;
}

/* Hero Section */
.hero {
    position: relative;
    padding: 70px 5% 50px;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--border-color);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.85rem;
    color: var(--gold-primary);
    margin-bottom: 24px;
}

.hero-badge i {
    font-size: 0.75rem;
}

.hero h2 {
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 1.25;
    margin-bottom: 16px;
}

.hero h2 span {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 680px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

.server-stats {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.stat-pill {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    padding: 10px 22px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

.dot-online {
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Category Filters */
.categories-container {
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 5%;
}

.categories-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cat-tab {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.cat-tab:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-main);
    transform: translateY(-2px);
}

.cat-tab.active {
    background: var(--gold-gradient);
    color: #000;
    border-color: transparent;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.35);
}

/* Products Grid */
.products-container {
    max-width: 1240px;
    margin: 0 auto 80px;
    padding: 0 5%;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
}

/* Product Card */
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
    backdrop-filter: blur(12px);
}

.product-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-card), var(--shadow-gold);
}

.product-thumb {
    position: relative;
    height: 190px;
    width: 100%;
    overflow: hidden;
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-thumb img {
    transform: scale(1.08);
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--gold-gradient);
    color: #000;
    font-size: 0.75rem;
    font-weight: 900;
    padding: 5px 12px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.product-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-main);
}

.product-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 16px;
    min-height: 40px;
}

.product-features {
    list-style: none;
    margin-bottom: 20px;
    flex-grow: 1;
}

.product-features li {
    font-size: 0.82rem;
    color: #cbd5e1;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-features li i {
    color: var(--gold-primary);
    font-size: 0.75rem;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border-glass);
}

.price-tag {
    display: flex;
    flex-direction: column;
}

.price-tag .amount {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--gold-primary);
}

.price-tag .currency {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.btn-add-cart {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid var(--border-color);
    color: var(--gold-primary);
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-weight: 800;
    font-size: 0.88rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-add-cart:hover {
    background: var(--gold-gradient);
    color: #000;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

/* Modal & Drawer (Shopping Cart & Checkout) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 580px;
    max-height: 90vh;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), var(--shadow-gold);
    transform: scale(0.9) translateY(20px);
    transition: var(--transition);
}

.modal-overlay.active .cart-modal {
    transform: scale(1) translateY(0);
}

.cart-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
}

.cart-header h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--gold-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-close {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-muted);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.cart-body {
    padding: 24px;
    overflow-y: auto;
    max-height: 50vh;
}

.empty-cart {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-cart i {
    font-size: 3.5rem;
    color: rgba(245, 158, 11, 0.3);
    margin-bottom: 16px;
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-glass);
}

.cart-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-item-img {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.cart-item-details h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.cart-item-details span {
    font-size: 0.85rem;
    color: var(--gold-primary);
    font-weight: 800;
}

.btn-remove-item {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 6px;
    font-size: 1rem;
    transition: var(--transition);
}

.btn-remove-item:hover {
    transform: scale(1.2);
}

/* User Identity Form in Modal */
.checkout-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-glass);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.form-group label span {
    color: #ef4444;
}

.form-control {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    color: var(--text-main);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

.cart-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-glass);
    background: rgba(0, 0, 0, 0.3);
}

.cart-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.cart-summary span {
    font-size: 1rem;
    color: var(--text-muted);
}

.cart-summary strong {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--gold-primary);
}

#paypal-button-container {
    margin-top: 12px;
    width: 100%;
}

.btn-demo-pay {
    width: 100%;
    background: var(--gold-gradient);
    border: none;
    color: #000;
    padding: 14px;
    border-radius: var(--radius-md);
    font-size: 1.05rem;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
}

.btn-demo-pay:hover {
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
    transform: translateY(-2px);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-secondary);
    border: 1px solid var(--gold-primary);
    color: var(--text-main);
    padding: 14px 20px;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), var(--shadow-gold);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    animation: slideIn 0.3s ease forwards;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Footer */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-glass);
    padding: 40px 5% 30px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.88rem;
}

footer p {
    margin-bottom: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h2 { font-size: 2.1rem; }
    .hero p { font-size: 0.95rem; }
    .navbar { padding: 12px 4%; }
    .brand-text h1 { font-size: 1.05rem; }
    .products-grid { grid-template-columns: 1fr; }
}
