﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f8f9fa;
}

/* Header Styles */
.top-bar {
    background: #2c3e50;
    color: white;
    padding: 8px 0;
    font-size: 12px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

.logo {
    font-size: 28px;
    font-weight: bold;
}

    .logo a {
        color: #e74c3c;
        text-decoration: none;
    }

.search-bar {
    flex: 1;
    max-width: 500px;
    margin: 0 30px;
    position: relative;
}

    .search-bar form {
        position: relative;
        width: 100%;
    }

    .search-bar input {
        width: 100%;
        padding: 12px 50px 12px 20px;
        border: 2px solid #ddd;
        border-radius: 25px;
        font-size: 14px;
        outline: none;
    }

        .search-bar input:focus {
            border-color: #e74c3c;
        }

.search-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-icon {
    position: relative;
    color: #333;
    font-size: 20px;
    cursor: pointer;
    transition: color 0.3s;
}

    .header-icon a {
        color: inherit;
        text-decoration: none;
    }

    .header-icon:hover {
        color: #e74c3c;
    }

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Navigation */
.nav {
    background: #34495e;
    padding: 12px 0;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 40px;
}

    .nav-links a {
        color: white;
        text-decoration: none;
        padding: 8px 16px;
        border-radius: 4px;
        transition: background 0.3s;
    }

        .nav-links a:hover {
            background: #2c3e50;
        }

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    margin-bottom: 40px;
}

    .hero h1 {
        font-size: 48px;
        margin-bottom: 20px;
        font-weight: 300;
    }

    .hero p {
        font-size: 20px;
        margin-bottom: 30px;
        opacity: 0.9;
    }

.cta-button {
    background: #e74c3c;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    display: inline-block;
}

    .cta-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(231, 76, 60, 0.3);
        color: white;
        text-decoration: none;
    }

/* Categories Section */
.categories {
    margin-bottom: 60px;
}

.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
    color: #333;
    position: relative;
}

    .section-title::after {
        content: '';
        width: 60px;
        height: 3px;
        background: #e74c3c;
        position: absolute;
        bottom: -10px;
        left: 50%;
        transform: translateX(-50%);
    }

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.category-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

    .category-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    }

.category-image {
    height: 200px;
    background: linear-gradient(45deg, #3498db, #2ecc71);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    color: white;
}

.category-info {
    padding: 20px;
    text-align: center;
}

    .category-info h3 {
        font-size: 20px;
        margin-bottom: 10px;
        color: #333;
    }

    .category-info p {
        color: #666;
        font-size: 14px;
    }

/* Featured Products */
.featured-products {
    background: white;
    padding: 60px 0;
    margin-bottom: 40px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    position: relative;
}

    .product-card:hover {
        transform: translateY(-5px);
    }

.product-image {
    height: 250px;
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
    position: relative;
}

.discount-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #e74c3c;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.product-info {
    padding: 20px;
}

    .product-info h4 {
        font-size: 16px;
        margin-bottom: 10px;
        color: #333;
    }

.price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.current-price {
    font-size: 18px;
    font-weight: bold;
    color: #e74c3c;
}

.old-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

.add-to-cart {
    width: 100%;
    background: #34495e;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

    .add-to-cart:hover {
        background: #2c3e50;
    }

/* Offers Banner */
.offers-banner {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    padding: 40px 0;
    text-align: center;
    margin: 40px 0;
    border-radius: 15px;
}

    .offers-banner h2 {
        font-size: 36px;
        margin-bottom: 15px;
    }

    .offers-banner p {
        font-size: 18px;
        margin-bottom: 25px;
    }


/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 32px;
    }

    .hero p {
        font-size: 16px;
    }

    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .search-bar {
        margin: 0;
        max-width: 100%;
    }

    .nav-links {
        flex-wrap: wrap;
        gap: 20px;
    }

    .category-grid,
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }

    .section-title {
        font-size: 24px;
    }

    .offers-banner h2 {
        font-size: 28px;
    }

    .offers-banner p {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero {
        padding: 60px 0;
    }

        .hero h1 {
            font-size: 28px;
        }

    .category-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 5px;
    }

    .header-actions {
        gap: 15px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #e74c3c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

    .notification.success {
        background: #27ae60;
    }

    .notification.error {
        background: #e74c3c;
    }

    .notification.warning {
        background: #f39c12;
    }

    .notification.info {
        background: #3498db;
    }

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

    .form-control:focus {
        border-color: #e74c3c;
    }

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s;
}

.btn-primary {
    background: #e74c3c;
    color: white;
}

    .btn-primary:hover {
        background: #c0392b;
        color: white;
    }

.btn-secondary {
    background: #34495e;
    color: white;
}

    .btn-secondary:hover {
        background: #2c3e50;
        color: white;
    }

.btn-success {
    background: #27ae60;
    color: white;
}

    .btn-success:hover {
        background: #219a52;
        color: white;
    }

/* Card Styles */
.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    overflow: hidden;
}

.card-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #dee2e6;
    font-weight: bold;
}

.card-body {
    padding: 20px;
}

.card-footer {
    background: #f8f9fa;
    padding: 15px 20px;
    border-top: 1px solid #dee2e6;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mt-5 {
    margin-top: 3rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

.p-1 {
    padding: 0.25rem;
}

.p-2 {
    padding: 0.5rem;
}

.p-3 {
    padding: 1rem;
}

.p-4 {
    padding: 1.5rem;
}

.p-5 {
    padding: 3rem;
}

.d-none {
    display: none;
}

.d-block {
    display: block;
}

.d-flex {
    display: flex;
}

.align-items-center {
    align-items: center;
}

.justify-content-center {
    justify-content: center;
}

.justify-content-between {
    justify-content: space-between;
}

.product-card-rating {
    margin-bottom: 8px;
    font-size: 14px;
    color: #ffc107; /* áæä ÇáäÌæã ÇáÃÕÝÑ */
}

    .product-card-rating .reviews-count {
        color: #6c757d; /* áæä ÑãÇÏí áÚÏÏ ÇáãÑÇÌÚÇÊ */
        font-size: 12px;
        margin-left: 5px;
    }

.wishlist-btn i,
.fas, .fa-solid,
.far, .fa-regular {
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900;
}



.far, .fa-regular {
    font-weight: 400;
}



/* ========================================================== */
/* ==   تنسيقات كارت المنتج (شارة الخصم والقلب الشفاف)   == */
/* ========================================================== */

.product-card-image-container {
    position: relative; /* ضروري لتثبيت العناصر في الزوايا */
}

/* (جديد) تنسيق شارة الخصم (نقطة #1) */
.product-discount-badge {
    position: absolute;
    top: 10px;
    left: 10px; /* عكس اتجاه القلب (الذي يكون يميناً افتراضياً) */
    background-color: var(--bs-danger, #dc3545); /* اللون الأحمر المطلوب */
    color: white;
    padding: 3px 10px;
    border-radius: 16px; /* شكل بيضاوي */
    font-size: 13px;
    font-weight: 700;
    z-index: 2; /* للتأكد من ظهوره فوق الصورة */
    line-height: 1.5;
}

/* (جديد) دعم RTL لشارة الخصم */
html[dir="rtl"] .product-discount-badge {
    left: auto;
    right: 10px;
}

/* (تعديل) تنسيق زر القلب الشفاف (نقطة #2) */
.wishlist-btn {
    background-color: rgba(255, 255, 255, 0.7) !important; /* خلفية بيضاء شبه شفافة */
    border: 1px solid rgba(0, 0, 0, 0.05) !important; /* إطار خفيف جداً */
    color: #333 !important; /* لون الأيقونة داكن (بدلاً من الأسود) */
    border-radius: 50% !important; /* دائري */
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); /* ظل خفيف للوضوح */
    transition: all 0.2s ease;
    /* (ملاحظة: زر القلب موجود أصلاً في الكود القديم، نحن فقط نعدل تنسيقه) */
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
}

/* دعم RTL لزر القلب */
html[dir="rtl"] .wishlist-btn {
    right: auto;
    left: 10px;
}


.wishlist-btn:hover {
    background-color: #fff !important; /* أبيض صلب عند المرور */
    color: var(--bs-danger, #dc3545) !important; /* أيقونة حمراء عند المرور */
    transform: scale(1.1);
}

/* هذا التنسيق يلون القلب بالأحمر عند تفعيله */
.wishlist-btn.in-wishlist {
    background-color: var(--bs-danger, #dc3545) !important;
    color: white !important;
    border-color: var(--bs-danger, #dc3545) !important;
}

    .wishlist-btn.in-wishlist i {
        font-weight: 900; /* يجعل الأيقونة ممتلئة (solid) */
    }



/* ==========================================================
   💎 تنسيق عام للسعر (PriceTagHelper) - إصلاح حجم الأيقونة
   ========================================================== */

/* تحديث الكلاس الموجود ليكون مرناً أكثر في كل الأماكن */
.price {
    display: inline-flex !important; /* لضمان أن السعر لا يأخذ عرض السطر كاملاً */
    align-items: baseline !important; /* محاذاة مثالية لقاعدة الرقم مع قاعدة الأيقونة */
    gap: 0.3em; /* مسافة صغيرة نسبية بينهما */
    line-height: 1;
}

    /* ✅ هذا هو الكود الجديد الذي ينقصك للتحكم في الأيقونة */
    .price img {
        height: 0.75em !important; /* 🎯 الحل: اجعل الارتفاع 75% من حجم الخط الحالي */
        width: auto; /* الحفاظ على أبعاد الصورة */
        object-fit: contain;
        opacity: 0.9; /* تحسين المظهر */
        margin-bottom: -0.05em; /* سحب الصورة لأسفل قليلاً لضبط المحاذاة الدقيقة */
    }

/* ========================================================== */