﻿@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900&display=swap');

:root {
    /* Al-Mada Corporate Identity */
    --clr-primary-dark: #0f172a;
    --clr-primary: #1e293b;
    --clr-accent: #f97316;
    --clr-accent-hover: #ea580c;
    --clr-bg: #f8fafc;
    --clr-text: #334155;
    --clr-text-light: #64748b;
    --font-main: 'Cairo', sans-serif;
}

/* ================== Global Reset & Scrollbar ================== */
html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
    position: relative;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--clr-bg);
    color: var(--clr-text);
    direction: rtl;
    text-align: right;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 85px; /* مسافة للـ Fixed Navbar */
    background-image: linear-gradient(rgba(15, 23, 42, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
}

main {
    flex: 1;
}

/* شريط الإزاحة (Custom Scrollbar) بلون الهوية */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: var(--clr-primary-dark);
    border-radius: 10px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: var(--clr-accent);
    }

/* تحويل الماوس ليد في الأماكن التفاعلية */
.interactive-card, .btn, a, .nav-link, .accordion-button {
    cursor: pointer !important;
}

/* ================== Custom Buttons ================== */
.btn-accent {
    background-color: var(--clr-accent);
    color: white;
    font-weight: 700;
    border: 2px solid var(--clr-accent);
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(249, 115, 22, 0.2);
}

    .btn-accent:hover {
        background-color: transparent;
        color: var(--clr-accent);
        box-shadow: none;
    }

.btn-primary-dark {
    background-color: var(--clr-primary-dark);
    color: white;
    font-weight: 700;
    border: 2px solid var(--clr-primary-dark);
    transition: all 0.3s ease;
}

    .btn-primary-dark:hover {
        background-color: var(--clr-accent);
        border-color: var(--clr-accent);
        color: white;
    }

/* ================== Navbar Architecture ================== */
.navbar-custom {
    background-color: var(--clr-primary-dark);
    padding: 10px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-bottom: 3px solid var(--clr-accent);
    transition: all 0.3s ease;
}

.brand-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-right: 12px;
}

.brand-title {
    color: white;
    font-weight: 900;
    font-size: 1.4rem;
    line-height: 1.1;
    letter-spacing: 0.5px;
}

.brand-slogan {
    color: var(--clr-accent);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.navbar-brand img {
    height: 55px;
    background-color: white;
    border-radius: 8px;
    padding: 4px;
    border: 2px solid var(--clr-accent);
}

.nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 600; /* تم تقليل السمك ليكون مريح للعين */
    font-size: 1rem;
    margin: 0 4px;
    padding: 8px 16px !important;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 8px;
    white-space: nowrap !important;
}

    .nav-link i {
        color: var(--clr-accent);
        transition: 0.3s;
    }

    .nav-link:hover, .nav-link.active {
        background-color: rgba(255, 255, 255, 0.08);
        color: white !important;
        border-bottom: 2px solid var(--clr-accent);
        border-radius: 6px 6px 0 0;
    }

/* ================== Footer Architecture ================== */
footer {
    background-color: var(--clr-primary-dark);
    color: #cbd5e1;
    padding-top: 60px;
    border-top: 4px solid var(--clr-accent);
}

    footer h5 {
        color: white;
        font-weight: 800;
    }

    footer a {
        color: #94a3b8;
        text-decoration: none;
        transition: 0.3s;
    }

        footer a:hover {
            color: var(--clr-accent);
            padding-right: 6px;
        }

.developer-link {
    color: var(--clr-accent);
    font-weight: 800;
    text-decoration: none;
}

/* ================== Floating Widgets (Cart, WhatsApp, Phone) ================== */
.floating-widget {
    position: fixed;
    right: 25px; /* تم إعادتها لليمين كما كانت في تصميمك الأصلي */
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9990;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    border: 3px solid white;
    text-decoration: none;
}

    .floating-widget:hover {
        transform: scale(1.1);
    }

.cart-widget-btn {
    bottom: 170px;
    background-color: var(--clr-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(30, 41, 59, 0.4);
}

    .cart-widget-btn:hover {
        background-color: var(--clr-accent);
        color: white;
    }

.phone-widget-btn {
    bottom: 95px;
    background-color: var(--clr-primary-dark);
    color: var(--clr-accent);
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.4);
}

    .phone-widget-btn:hover {
        background-color: var(--clr-accent);
        color: white;
    }

.chat-widget-btn {
    bottom: 20px;
    background-color: #25D366;
    color: white;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    animation: pulse-green 2s infinite;
}

    .chat-widget-btn:hover {
        background-color: #128C7E;
        color: white;
    }

.widget-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ef4444;
    color: white;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    border: 2px solid white;
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}
