body {
    font-family: 'Cairo', sans-serif;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f8fafc;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #B20000, #800000);
    border-radius: 10px;
    border: 2px solid #f8fafc;
    /* Create 'floating' thumb effect */
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.animate-bounce-slow {
    animation: float 3s ease-in-out infinite;
}

/* Premium Global Styles */
::selection {
    background: #B20000;
    color: white;
}

/* Upgrade all flat red backgrounds to a premium deep gradient automatically */
.bg-\[\#B20000\] {
    background: linear-gradient(135deg, #B20000 0%, #850000 100%) !important;
    box-shadow: 0 4px 15px -3px rgba(178, 0, 0, 0.3);
    /* Subtle glow */
}

/* Enhance text contrast */
.text-\[\#B20000\] {
    color: #c90000 !important;
    /* Slightly brighter for legibility or keep same */
}

.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.whatsapp-float {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 100;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

.force-red {
    color: #B20000 !important;
}

.active-tab {
    background-color: #B20000 !important;
    color: white !important;
    border-color: #B20000 !important;
}

/* طباعة الفاتورة فقط */
@media print {
    body * {
        visibility: hidden;
    }

    #invoice-viewer,
    #invoice-viewer * {
        visibility: visible;
    }

    #invoice-viewer {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 0;
        background: white;
    }

    nav,
    .whatsapp-float,
    #cart-sidebar,
    footer,
    .no-print {
        display: none !important;
    }
}

/* أنيميشن قائمة الموبايل */
@keyframes menuFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-menu-enter {
    animation: menuFadeIn 0.3s ease-out forwards;
}

.animate-link {
    opacity: 0;
    animation: slideUpFade 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.15s;
}

.delay-3 {
    animation-delay: 0.2s;
}

.delay-4 {
    animation-delay: 0.25s;
}

.delay-5 {
    animation-delay: 0.3s;
}

/* Toast Container z-index override */
#toast-container {
    z-index: 9999 !important;
}

/* Skeleton Loading */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.skeleton {
    animation: shimmer 2s infinite linear;
    background: linear-gradient(to right, #f6f7f8 4%, #edeef1 25%, #f6f7f8 36%);
    background-size: 1000px 100%;
}

/* Scroll Animations */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}


.reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Scaling - Reduce sizes on smaller screens */
@media (max-width: 768px) {
    html {
        font-size: 85%;
        /* Scales down all rem-based sizes (text, padding, margins, heights) */
    }

    /* Adjust specific fixed-size elements if necessary */
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 15px;
        left: 15px;
    }

    /* Slightly smaller navbar height */
    nav {
        height: 4rem !important;
        /* Overriding h-20 (5rem) */
    }

    /* Adjust spacing */
    main {
        padding-top: 4rem !important;
        /* Match new navbar height */
    }
}