
:root {

    --primary-color: #4f46e5;
    --bg-color: #f9fafb;
    --logo-bg: #4f46e5;

 
    --surface-color: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border-color: #f3f4f6;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --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);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    --transition-speed: 0.3s;
}

body { 
    font-family: 'Almarai', sans-serif; 
    overflow-x: hidden; 
    -webkit-tap-highlight-color: transparent; 
    /* تأثير انتقال ناعم يمهد للوضع الليلي */
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
    touch-action: manipulation;
    background-color: var(--bg-color);
    color: var(--text-main);
    -webkit-user-select: none; 
    user-select: none; 
}

::-webkit-scrollbar { 
    width: 0px; 
    height: 0px; 
}
.bg-primary { background-color: var(--primary-color) !important; }
.text-primary { color: var(--primary-color) !important; }
.border-primary { border-color: var(--primary-color) !important; }
#store-logo-bg { background-color: var(--logo-bg); }


.touch-target { 
    min-height: 48px; 
    min-width: 48px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}


.tap-scale {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
}
.tap-scale:active { 
    transform: scale(0.95); 
}
.tap-scale:hover {
    box-shadow: var(--shadow-md);
}

.line-clamp-1 { 
    display: -webkit-box; 
    -webkit-line-clamp: 1; 
    -webkit-box-orient: vertical; 
    overflow: hidden; 
}

.modal { 
    display: none; 
    position: fixed; 
    inset: 0; 
    z-index: 1000; 
    align-items: center; 
    justify-content: center; 
    background: rgba(0,0,0,0.8); 
    backdrop-filter: blur(8px); 
    padding: 20px; 
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
}
.modal.active { 
    display: flex; 
    opacity: 1;
    animation: fadeIn var(--transition-speed) ease-out forwards;
}


.modal > div {
    box-shadow: var(--shadow-xl);
    transform: translateY(20px) scale(0.95);
    transition: transform var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
}
.modal.active > div {
    transform: translateY(0) scale(1);
}


.sidebar { 
    transform: translateX(100%); 
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease; 
    width: 85%; 
    max-width: 320px; 
    background-color: var(--surface-color);
    box-shadow: -5px 0 25px rgba(0,0,0,0.05); 
}
.sidebar.active { 
    transform: translateX(0); 
    box-shadow: -15px 0 40px rgba(0,0,0,0.15); 
}


.tab-content { 
    display: none; 
    opacity: 0;
    transform: translateY(10px);
    transition: opacity var(--transition-speed) ease, transform var(--transition-speed) ease;
}
.tab-content.active { 
    display: block; 
    opacity: 1;
    transform: translateY(0);
    animation: slideUpFade 0.4s ease-out forwards; 
}


.rating-stars { 
    color: #fbbf24; 
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.4); 
}


.visitor-pulse { 
    animation: pulse 2s infinite cubic-bezier(0.4, 0, 0.6, 1); 
}


.glass-effect {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-lg);
}


.card-shadow-hover {
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-speed) ease, transform 0.2s ease;
}
.card-shadow-hover:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}


@keyframes pulse { 
    0% { opacity: 1; transform: scale(1); } 
    50% { opacity: 0.3; transform: scale(1.6); } 
    100% { opacity: 1; transform: scale(1); } 
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUpFade {
    from { 
        opacity: 0; 
        transform: translateY(15px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}


@media (max-width: 640px) {
    .hero-padding { padding: 2rem 1.5rem !important; }
    .grid-mobile { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
    .text-responsive-h1 { font-size: 1.8rem !important; }
}