/* استخراج الألوان والديكور من صورة اللوغو المرفقة */
:root {
    --primary-color: #54392d;       /* بني داكن رصين مأخوذ من كتابة اللوغو */
    --primary-hover: #3d281f;
    --accent-color: #8c5e4a;        /* بني دافئ ناعم */
    --bg-main: #f6f2ec;             /* لون خلفية اللوغو الكريمية الناعمة */
    --bg-card: #fcfaf7;
    --text-color: #3b2820;
    --text-muted: #736157;
    --border-color: #e5ddd3;
    --radius: 14px;
    --transition: all 0.3s ease;
}

/* التنسيقات العامة */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Tajawal', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Navbar شريط التنقل */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(246, 242, 236, 0.95);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 12px rgba(84, 57, 45, 0.06);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 75px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-img {
    height: 48px;
    width: 48px;
    border-radius: 8px;
    object-fit: cover;
    mix-blend-mode: multiply; /* دمج خلفية الصورة مع الموقع */
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--accent-color);
}

.cart-badge-container {
    display: flex;
    align-items: center;
    background-color: #ece3d8;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.cart-badge-container:hover {
    transform: scale(1.05);
}

.cart-icon {
    font-size: 1.2rem;
    margin-left: 6px;
}

.cart-count {
    background-color: var(--accent-color);
    color: #fff;
    font-size: 0.85rem;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 50%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
}

/* Hero Section */
.hero {
    padding: 140px 0 80px;
    background: linear-gradient(135deg, #f6f2ec 0%, #ebe2d5 100%);
    border-bottom-left-radius: 40px;
    border-bottom-right-radius: 40px;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-text {
    flex: 1;
}

.badge {
    background-color: #ebdcd0;
    color: var(--primary-color);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}

.hero-text h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin: 15px 0;
    line-height: 1.3;
}

.hero-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.logo-frame {
    background: var(--bg-main);
    padding: 15px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(84, 57, 45, 0.08);
    border: 1px solid var(--border-color);
}

.hero-logo-img {
    max-width: 280px;
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
    mix-blend-mode: multiply; /* دمج خلفية صورة اللوغو */
}

/* الأزرار العامة */
.btn {
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(84, 57, 45, 0.25);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* الأقسام والعناوين */
section {
    padding: 70px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 45px;
}

.section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.section-header p {
    color: var(--text-muted);
}

/* قسم المنتجات */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.product-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 22px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(84, 57, 45, 0.05);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(84, 57, 45, 0.1);
}

.product-img {
    width: 100%;
    height: 200px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 12px;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply; /* دمج خلفية صور المنتجات البيضاء ناعماً مع الكارد */
    transition: var(--transition);
}

.product-card:hover .product-img img {
    transform: scale(1.05);
}

.product-info h3 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.product-info .price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.btn-add {
    width: 100%;
    background-color: #eee3d6;
    color: var(--primary-color);
    border: 1px solid #ddd0c0;
}

.btn-add:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* قسم استمارة الطلب */
.order-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 30px;
    background: var(--bg-card);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: 0 5px 20px rgba(84, 57, 45, 0.06);
    border: 1px solid var(--border-color);
}

.order-summary {
    background-color: #f8f4ee;
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid #e7ded4;
}

.order-summary h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.cart-items-list {
    min-height: 120px;
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.cart-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed #dcd1c4;
    font-size: 0.95rem;
}

.empty-cart-msg {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    padding-top: 30px;
}

.total-price-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    padding-top: 10px;
    border-top: 2px solid var(--primary-color);
}

.order-form .form-group {
    margin-bottom: 15px;
}

.order-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.order-form .req {
    color: #c0392b;
}

.order-form input, 
.order-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d5c8bb;
    background-color: #fff;
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.order-form input:focus, 
.order-form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(84, 57, 45, 0.2);
}

/* تنسيق مجموعة تحديد الخريطة */
.location-input-group {
    display: flex;
    gap: 8px;
}

.location-input-group input {
    flex: 1;
}

.btn-location {
    background-color: #e2d3c2;
    color: var(--primary-color);
    border: 1px solid #d0bea9;
    padding: 0 15px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.btn-location:hover {
    background-color: var(--accent-color);
    color: #fff;
}

.hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: block;
    margin-top: 4px;
}

.btn-submit {
    width: 100%;
    font-size: 1.05rem;
    padding: 14px;
    margin-top: 10px;
}

/* Footer */
.footer {
    background-color: #3b2820;
    color: #d8ceca;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-info h3 {
    color: #fff;
    font-family: 'Playfair Display', serif;
    margin-bottom: 10px;
}

.footer-links h4, .footer-social h4 {
    color: #fff;
    margin-bottom: 12px;
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 8px;
}

.social-icons a {
    color: #fff;
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #54392d;
    padding-top: 20px;
    font-size: 0.85rem;
    color: #a89a93;
}

/* Responsive التجاوب مع الجوال */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 75px;
        right: 0;
        width: 100%;
        background-color: #f6f2ec;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: flex;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .order-wrapper {
        grid-template-columns: 1fr;
    }

    .location-input-group {
        flex-direction: column;
    }
}