/*
 * ===================================================================
 * متجر KD - التصميم الفاخر (Premium Design)
 * ===================================================================
 */

:root {
    /* لوحة الألوان الفاخرة */
    --primary-color: #1A2A3A;
    /* كحلي غامق (Navy Blue) - للرأس والتذييل */
    --secondary-color: #D4AF37;
    /* ذهبي (Gold) - للأزرار والعناوين الفرعية */
    --accent-color: #C0392B;
    /* أحمر غامق (Deep Red) - للعروض والتنبيهات */
    --text-dark: #2C3E50;
    /* رمادي غامق للنصوص */
    --text-light: #7F8C8D;
    /* رمادي فاتح */
    --bg-light: #FDFCF0;
    /* كريمي فاتح جداً (Cream) - للخلفية العامة */
    --bg-white: #FFFFFF;
    /* أبيض نقي للبطاقات */

    --font-cairo: 'Cairo', sans-serif;
    --border-radius-base: 12px;
    /* زوايا أكثر استدارة */
    --box-shadow-card: 0 10px 30px rgba(0, 0, 0, 0.08);
    /* ظل ناعم وفخم */
    --transition-speed: 0.3s;
}

/* التنسيق الأساسي */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-cairo);
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-speed) ease;
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* =========================================
   الشريط العلوي (Top Bar)
   ========================================= */
.top-bar {
    background-color: var(--secondary-color);
    /* ذهبي */
    color: var(--primary-color);
    /* نص كحلي */
    padding: 8px 0;
    font-size: 0.9rem;
    font-weight: bold;
    text-align: center;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* =========================================
   الرأس (Header)
   ========================================= */
.main-header {
    background-color: var(--bg-white);
    /* خلفية بيضاء */
    color: var(--primary-color);
    /* نص كحلي */
    padding: 10px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 60px;
    /* لا يوجد إطار أو خلفية */
}

.main-nav ul {
    display: flex;
    gap: 25px;
}

.main-nav a {
    color: var(--primary-color);
    /* لون الروابط كحلي */
    font-weight: 700;
    font-size: 1.05rem;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width var(--transition-speed);
}

.main-nav a:hover::after {
    width: 100%;
}

.header-icons {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-icons a {
    color: var(--primary-color);
    /* لون الأيقونات كحلي */
    font-size: 1.2rem;
}

.header-icons a:hover {
    color: var(--secondary-color);
    transform: translateY(-2px);
}

/* =========================================
   البانر الرئيسي (Hero Section)
   ========================================= */
.hero-banner {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2c3e50 100%);
    color: var(--bg-white);
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.4rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.btn-primary {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    padding: 12px 35px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    border: 2px solid transparent;
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: scale(1.05);
}

/* =========================================
   المنتجات المميزة (Featured Products)
   ========================================= */
.featured-products {
    padding: 60px 0;
    background-color: var(--bg-light);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--secondary-color);
}

/* شبكة المنتجات */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* بطاقة المنتج */
.product-card {
    background: var(--bg-white);
    border-radius: var(--border-radius-base);
    overflow: hidden;
    box-shadow: var(--box-shadow-card);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.product-image {
    position: relative;
    height: 300px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    color: #fff;
    z-index: 2;
}

.product-badge.hot {
    background-color: var(--accent-color);
    /* أحمر */
}

.product-badge.sale {
    background-color: var(--secondary-color);
    /* ذهبي */
    color: var(--primary-color);
}

.add-to-wishlist {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: all 0.3s;
    opacity: 0;
    transform: translateX(-10px);
}

.product-card:hover .add-to-wishlist {
    opacity: 1;
    transform: translateX(0);
}

.add-to-wishlist:hover {
    background: var(--accent-color);
    color: #fff;
}

.product-info {
    padding: 20px;
    text-align: center;
}

.product-category {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-info h3 {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 10px;
    font-weight: 700;
}

.product-rating {
    color: #F1C40F;
    /* أصفر للنجوم */
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.product-price {
    font-size: 1.3rem;
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.old-price {
    font-size: 0.95rem;
    color: var(--text-light);
    text-decoration: line-through;
    font-weight: normal;
}

.btn-secondary {
    display: inline-block;
    width: 100%;
    padding: 10px;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s;
    background: transparent;
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* =========================================
   التذييل (Footer)
   ========================================= */
.main-footer {
    background-color: var(--primary-color);
    color: #ecf0f1;
    padding: 60px 0 20px;
    margin-top: 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-widget h4 {
    color: var(--secondary-color);
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-widget h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    /* RTL */
    width: 40px;
    height: 2px;
    background-color: var(--secondary-color);
}

.footer-widget ul li {
    margin-bottom: 10px;
}

.footer-widget ul li a {
    color: #bdc3c7;
    transition: color 0.3s;
}

.footer-widget ul li a:hover {
    color: var(--secondary-color);
    padding-right: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: #95a5a6;
}

/* =========================================
   صفحة تفاصيل المنتج (Product Details Page)
   ========================================= */
.product-details-section {
    padding: 40px 0;
}

.product-breadcrumb {
    margin-bottom: 30px;
    color: var(--text-light);
    font-size: 0.95rem;
}

.product-breadcrumb a {
    color: var(--primary-color);
}

.product-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background: var(--bg-white);
    padding: 40px;
    border-radius: var(--border-radius-base);
    box-shadow: var(--box-shadow-card);
}

.main-image-display {
    border-radius: var(--border-radius-base);
    overflow: hidden;
    border: 1px solid #eee;
}

.main-image-display img {
    width: 100%;
    height: auto;
    display: block;
}

.product-info-panel h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.product-rating-and-review {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.review-count {
    color: var(--text-light);
    font-size: 0.9rem;
}

.product-price-section {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.current-price {
    font-size: 2rem;
    color: var(--secondary-color);
    font-weight: bold;
}

.product-short-description {
    color: var(--text-light);
    margin-bottom: 30px;
    line-height: 1.8;
}

.purchase-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.quantity-selector {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 30px;
    overflow: hidden;
}

.quantity-btn {
    background: #f9f9f9;
    border: none;
    width: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-dark);
}

.quantity-input {
    width: 50px;
    border: none;
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.add-to-cart-btn {
    flex: 1;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.3s;
    box-shadow: 0 5px 15px rgba(26, 42, 58, 0.3);
}

.add-to-cart-btn:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.add-to-wishlist-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #fff;
    color: var(--text-light);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
}

.add-to-wishlist-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.quick-info p {
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.quick-info i {
    color: var(--secondary-color);
}

/* استجابة الشاشات (Responsive) */
@media (max-width: 768px) {
    .product-content {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .main-nav {
        display: none;
        /* يمكن إضافة قائمة برجر لاحقاً */
    }
}