:root {
    /* الألوان الأساسية - موحدة 100% */
    --primary: #F6A800;
    --primary-dark: #d49200;
    --primary-light: #ffbb0f;

    /* التدرج البرتقالي الموحد */
    --gradient-primary: linear-gradient(135deg, #F6A800 0%, #d49200 100%);
    --gradient-accent: linear-gradient(135deg, #ffae00 0%, #f5576c 100%);

    /* الألوان الثانوية */
    --secondary: #FF6B81;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;

    /* الألوان الرمادية */
    --dark: #1a1a1a;
    --gray-dark: #333;
    --gray: #666;
    --gray-light: #999;
    --gray-lighter: #e0e0e0;

    /* الخلفيات */
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --bg-light: #fcfcfc;

    /* الحدود */
    --border: #e2e8f0;
    --border-light: #f0f0f0;

    /* الزوايا */
    --radius: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --radius-full: 50px;

    /* الظلال */
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --shadow-primary: 0 4px 15px rgba(246, 168, 0, 0.3);

    /* الانتقالات */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s ease;

    /* الخطوط */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Cairo', sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.6;
}

/* ==================== إعادة تعيين عامة ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--gray-dark);
    background: var(--bg-alt);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==================== الأزرار الموحدة ==================== */
/* زر أساسي */
.btn,
.hero-btn,
.add-to-cart,
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 30px;
    background: #ffbb0f !important;
    color: #fff !important;
    border: none;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-primary);
    outline: none;
}

.btn:hover,
.hero-btn:hover,
.add-to-cart:hover,
.btn-primary:hover {
    background: var(--primary-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(246, 168, 0, 0.4);
}

.btn:active,
.hero-btn:active,
.add-to-cart:active,
.btn-primary:active {
    transform: scale(0.98);
}

/* زر بتدرج لوني */
.btn-gradient,
.deal-btn {
    background:#ffbb0f !important; color: white!important;
    box-shadow: 0 5px 15px rgba(255, 174, 0, 0.3);
}

.btn-gradient:hover,
.deal-btn:hover {
       background: var(--primary-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(246, 168, 0, 0.4);
}

/* زر ناجح (تم الإضافة) */
.btn-success,
.add-to-cart[data-in-cart="1"] {
    background: var(--success) !important;
    cursor: not-allowed;
}

.btn-success:hover,
.add-to-cart[data-in-cart="1"]:hover {
    background: var(--success) !important;
    opacity: 0.9;
    transform: none;
}

/* ==================== بطاقات المنتجات ==================== */
.product-card {
    background: var(--bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

/* صورة المنتج */
.product-card__image,
.product-image {
    position: relative;
    aspect-ratio: 1;
    background: var(--bg-alt);
    overflow: hidden;
}

.product-card__image img,
.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 15px;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-card__image img,
.product-card:hover .product-image img {
    transform: scale(1.08);
}

/* ==================== الشارات (Badges) ==================== */
.badge,
.product-card__badge,
.tag-badge,
.product__badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

/* شارة NEW */
.badge--new,
.tag-badge--new {
    background: linear-gradient(135deg, #f8b90c 0%, #fffc39 100%);
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* شارة SALE */
.badge--sale,
.tag-badge--sale {
    background: linear-gradient(135deg, #ff7c10 0%, #f5576c 100%);
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* تأثير لامع */
.badge::before,
.tag-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.product-card:hover .badge::before,
.product-card:hover .tag-badge::before {
    left: 100%;
}

/* ==================== السعر ==================== */
.product-card__price,
.product-price,
.product__price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}

/* ==================== أزرار الإجراءات (المفضلة + السلة) ==================== */
.btn-favorite,
.btn-cart,
.product-card__action {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.95);
}

/* زر المفضلة */
.btn-favorite i {
    font-size: 18px;
    color: var(--gray-light);
    transition: var(--transition);
}

.btn-favorite.active i {
    color: var(--secondary);
}

.btn-favorite:hover {

    transform: scale(1.1);
}

.btn-favorite:hover i {
    color: rgb(224, 26, 26);
}

/* زر السلة */
.btn-cart,
.product-card__addtocart-icon {
    background: var(--primary);
}

.btn-cart i,
.product-card__addtocart-icon i {
    font-size: 18px;
    color: #fff;
}

.btn-cart:hover,
.product-card__addtocart-icon:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.btn-cart:disabled,
.product-card__addtocart-icon:disabled {
    background: var(--success);
    cursor: not-allowed;
}

/* ==================== النجوم (التقييم) ==================== */
.rating__star {
    width: 16px;
    height: 16px;
    background-color: var(--gray-lighter);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    display: inline-block;
    margin-right: 2px;
    transition: var(--transition-fast);
}

.rating__star--active {
    background-color: var(--primary) !important;
}

.rating__star svg {
    fill: var(--primary);
}

/* ==================== Breadcrumb ==================== */
.breadcrumb__item-link {
    color: var(--gray);
    text-decoration: none;
    transition: var(--transition-fast);
}

.breadcrumb__item-link:hover {
    color: var(--primary);
}

.breadcrumb__item--current .breadcrumb__item-link {
    color: var(--primary);
    font-weight: 600;
}

/* ==================== Pagination ==================== */
.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
    flex-wrap: wrap;
}

.pagination .page-link {
    min-width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
    color: var(--gray);
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    text-decoration: none;
    cursor: pointer;
}

.pagination .page-link:hover {
    background: var(--gradient-primary);
    color: #fff;
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-primary);
}

.pagination .page-item.active .page-link {
    background: var(--gradient-primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: var(--shadow-primary);
    transform: scale(1.1);
}

/* ==================== العناوين ==================== */
.section-header__title,
.block-header__title,
h1, h2, h3 {
    color: #ffbb0f !important;
    font-weight: 700;
}

.section-header h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    /* background: var(--gradient-primary); */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ==================== الحقول (Inputs) ==================== */
.form-control,
input[type="text"],
input[type="email"],
textarea {
    padding: 10px 15px;
    border: 2px solid var(--border);
    border-radius: var(--radius-xs);
    font-size: 15px;
    transition: var(--transition-fast);
    outline: none;
}

.form-control:focus,
input:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(246, 168, 0, 0.1);
}

/* ==================== Checkboxes ==================== */
.input-check__box {
    border: 2px solid var(--primary) !important;
    border-radius: var(--radius-xs) !important;
    transition: var(--transition-fast) !important;
}

.input-check:hover .input-check__box {
    border-color: var(--primary-dark) !important;
    background-color: rgba(246, 168, 0, 0.05) !important;
}

.input-check__input:checked + .input-check__box {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

/* ==================== Range Slider ==================== */
.noUi-connect {
    background: var(--primary) !important;
}

.noUi-horizontal .noUi-handle {
    background-color: var(--primary) !important;
    border: 3px solid #F6A800 !important;
}

/* ==================== SweetAlert ==================== */
.sweet-alert .sa-icon.sa-success {
    border-color: var(--primary) !important;
}

.sweet-alert .sa-icon.sa-success .sa-line {
    background-color: var(--primary) !important;
}

.sweet-alert button.confirm {
    background: #ffbb0f !important;
    color: white !important;
    border-radius: var(--radius-full) !important;
    box-shadow: var(--shadow-primary) !important;
}
.sweet-alert button.cancel {
    background: #ffbb0f !important;
    color: white !important;
    border-radius: var(--radius-full) !important;
    box-shadow: var(--shadow-primary) !important;
}


/* ==================== البطاقات ==================== */
.card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

/* ==================== الروابط ==================== */
a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
    :root {
        --font-size-base: 15px;
    }

    .btn,
    .hero-btn,
    .add-to-cart {
        padding: 10px 25px;
        font-size: 14px;
    }

    .btn-favorite,
    .btn-cart {
        width: 40px;
        height: 40px;
    }

    .product-card__price {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .btn-favorite,
    .btn-cart {
        width: 38px;
        height: 38px;
    }
}

/* ==================== الأنيميشن ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease backwards;
}

/* ==================== دعم RTL ==================== */
html[dir="rtl"] .btn,
html[dir="rtl"] .hero-btn {
    flex-direction: row-reverse;
}

/* ==================== نهاية النظام الموحد ==================== */
