:root {
--main-color: #19150f;
--accent-color: #cac4b6;
}

/* منع تمرير الصفحة لما اللايت بوكس مفتوح */
body.modal-open {
overflow: hidden !important;
}

/* 🔙 زر الرجوع */
.back-btn { margin-bottom: 15px; }
.btn-back {
background-color: var(--main-color);
color: #fff;
padding: 6px 14px;
border-radius: 8px;
text-decoration: none;
transition: all 0.3s ease;
}
.btn-back:hover { background-color: var(--accent-color); color: var(--main-color); }

/* 📦 شبكة التصنيفات */
.menu-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
gap: 20px;
margin-top: 25px;
}
.menu-box {
display: block;
text-align: center;
border-radius: 16px;
overflow: hidden;
background: #fff;
box-shadow: 0 3px 12px rgba(0,0,0,0.08);
transition: all 0.3s ease;
text-decoration: none;
color: var(--main-color);
}
.menu-box img { width: 100%; height: 160px; object-fit: cover; transition: transform 0.3s ease; }
.menu-box h3 { font-size: 1.1rem; padding: 12px; background: var(--main-color); color: #fff; margin: 0; font-weight: 700; }
.menu-box:hover { transform: translateY(-4px); box-shadow: 0 6px 18px rgba(0,0,0,0.15); }

/* 🧾 جدول المنيو */
.menu-table {
width: 100%;
border-collapse: collapse;
margin-top: 30px;
background-color: #fff;
box-shadow: 0 3px 15px rgba(0,0,0,0.1);
border-radius: 12px;
overflow: hidden;
}
.menu-table th {
background-color: var(--main-color);
color: #fff;
padding: 12px;
text-align: center;
font-size: 1rem;
font-weight: 700;
}
.menu-table td {
padding: 12px;
text-align: center;
border-bottom: 1px solid #eee;
font-size: 0.95rem;
vertical-align: middle;
line-height: 1.4;
}

/* ✅ تخصيص اسم الخدمة فقط للصف الأول من كل منتج */
.menu-table tr:first-child td:nth-child(2),
.menu-table td[rowspan]:nth-child(2) {
font-size: 1.05rem;
font-weight: 700;
color: var(--main-color);
white-space: normal;
max-width: 320px;
word-wrap: break-word;
}

/* باقي الصفوف تظل بخط عادي */
.menu-table tr:not(:first-child) td:nth-child(2):not([rowspan]) {
font-weight: 400;
color: #333;
}

/* صف الخدمة */
.service-group {
background-color: #faf9f6;
}
.service-group:hover { background-color: #f1f0ed; }

/* 📸 صورة الخدمة */
.menu-thumb {
width: 85px;
height: 85px;
object-fit: cover;
border-radius: 10px;
cursor: pointer;
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.menu-thumb:hover { transform: scale(1.1); box-shadow: 0 0 10px rgba(0,0,0,0.15); }

/* 💇‍♀️ عنوان التصنيف */
.category-header { text-align: center; margin-top: 30px; }
.category-header h2 {
color: var(--main-color);
border-bottom: 3px solid var(--accent-color);
display: inline-block;
padding-bottom: 5px;
font-size: 1.6rem;
font-weight: 800;
}

/* 💰 مربع ضريبة القيمة المضافة */
.vat-box {
background: var(--accent-color);
color: var(--main-color);
text-align: center;
padding: 14px 18px;
border-radius: 12px;
margin: 25px auto 35px;
width: fit-content;
font-weight: 700;
font-size: 1.05rem;
box-shadow: 0 3px 10px rgba(0,0,0,0.1);
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.vat-box:hover { transform: scale(1.03); box-shadow: 0 5px 15px rgba(0,0,0,0.15); }
.vat-box p { margin: 0; line-height: 1.6; }

/* نسخة بسيطة لو حبينا ملاحظة بدون الصندوق (قديمة) */
.vat-note {
text-align: center;
font-size: 0.95rem;
color: #555;
margin-top: 10px;
margin-bottom: 25px;
font-weight: 500;
}

/* 🖼️ Lightbox (محدث للعمل على Safari وMobile) */
.modal {
display: none;
position: fixed;
inset: 0;
z-index: 999999;
background: rgba(0,0,0,0.92);
justify-content: center;
align-items: center;
overflow: hidden;
}
.modal.active { display: flex !important; }

.modal-content {
position: relative;
max-width: 100%;
max-height: 100%;
display: flex;
justify-content: center;
align-items: center;
padding: 20px;
box-sizing: border-box;
}

.modal-content img,
#modalImage {
display: block;
max-width: 90vw;
max-height: 85vh;
object-fit: contain;
border-radius: 12px;
box-shadow: 0 8px 25px rgba(0,0,0,0.4);
transition: opacity 0.25s ease, transform 0.25s ease;
margin: auto;
opacity: 1;
}

/* زر الإغلاق والأزرار */
.close {
position: absolute;
top: 20px;
right: 28px;
color: #fff;
font-size: 32px;
font-weight: bold;
cursor: pointer;
z-index: 100002;
}

/* ✅ تصحيح مظهر الأسهم في اللايت بوكس */
.prev, .next {
position: absolute;
top: 50%;
transform: translateY(-50%);
width: 42px;
height: 42px;
line-height: 42px;
text-align: center;
font-size: 22px;
font-weight: bold;
color: #fff;
background: rgba(0,0,0,0.45);
border-radius: 50%;
cursor: pointer;
z-index: 100001;
user-select: none;
transition: all 0.25s ease;
display: flex;
justify-content: center;
align-items: center;
-webkit-appearance: none !important;
-webkit-tap-highlight-color: transparent !important;
border: none !important;
padding: 0 !important;
margin: 0 !important;
}

.prev:hover, .next:hover {
background-color: var(--accent-color);
color: var(--main-color);
transform: translateY(-50%) scale(1.1);
}

/* ← السهم السابق */
.prev {
left: 5%;
right: auto !important;
}

/* → السهم التالي */
.next {
right: 5%;
left: auto !important;
}

/* تحسينات للتوافق: نجعل overlay تغطي كامل المساحة وتلتقط النقر */
.modal-overlay {
position: absolute;
inset: 0;
z-index: 99999;
background: transparent;
cursor: pointer;
}

/* 📱 موبايل */
@media (max-width: 768px) {
.menu-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
.menu-table th, .menu-table td { font-size: 13px; padding: 8px; }
.menu-thumb { width: 60px; height: 60px; }
.category-header h2 { font-size: 1.3rem; }
.vat-box { font-size: 0.95rem; margin: 20px auto; }
.prev, .next {
width: 36px;
height: 36px;
font-size: 20px;
}
.prev { left: 4%; }
.next { right: 4%; }
.close { top: 12px; right: 18px; font-size: 26px; }
}



/* تنسيق زر احجز الآن */
.book-now-btn {
display: inline-block;
padding: 10px 24px;
background-color: var(--main-color);
color: #fff !important;
text-decoration: none;
border-radius: 6px;
font-weight: 600;
font-size: 14px;
transition: all 0.3s ease;
text-align: center;
white-space: nowrap;
border: 2px solid var(--main-color);
}

.book-now-btn:hover {
background-color: var(--accent-color);
color: var(--main-color) !important;
border-color: var(--accent-color);
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* تنسيق عمود الحجز في الجدول */
.menu-table th:last-child,
.menu-table td:last-child {
text-align: center;
min-width: 120px;
}

/* تحسين المظهر العام للجدول */
.menu-table {
width: 100%;
border-collapse: collapse;
margin: 20px 0;
}

.menu-table th {
background-color: var(--main-color);
color: #fff;
padding: 12px;
text-align: right;
font-weight: 600;
}

.menu-table td {
padding: 12px;
border-bottom: 1px solid #e0e0e0;
}

/* استجابة للموبايل */
@media (max-width: 768px) {
.book-now-btn {
padding: 8px 16px;
font-size: 12px;
}

.menu-table th:last-child,
.menu-table td:last-child {
min-width: 100px;
}
}


/* تنسيق زر احجز الآن */
.book-now-btn {
display: inline-block;
padding: 12px 28px;
background-color: var(--main-color);
color: #fff !important;
text-decoration: none;
border-radius: 6px;
font-weight: 700;
font-size: 15px;
transition: all 0.3s ease;
text-align: center;
white-space: nowrap;
border: 2px solid var(--main-color);
}

.book-now-btn:hover {
background-color: var(--accent-color);
color: var(--main-color) !important;
border-color: var(--accent-color);
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* تنسيق عمود الحجز في الجدول */
.menu-table th:last-child,
.menu-table td:last-child {
text-align: center;
min-width: 130px;
padding: 10px 8px;
}

/* تحسين المظهر العام للجدول */
.menu-table {
width: 100%;
border-collapse: collapse;
margin: 20px 0;
}

.menu-table th {
background-color: var(--main-color);
color: #fff;
padding: 14px 10px;
text-align: center;
font-weight: 600;
font-size: 14px;
}

.menu-table td {
padding: 12px 8px;
border-bottom: 1px solid #e0e0e0;
text-align: center;
}

/* تحسين للموبايل */
@media (max-width: 768px) {
.book-now-btn {
padding: 12px 20px;
font-size: 14px;
font-weight: 700;
display: block;
width: 100%;
min-width: 100px;
}

.menu-table th:last-child,
.menu-table td:last-child {
min-width: 110px;
padding: 12px 6px;
}

.menu-table th {
font-size: 13px;
padding: 12px 6px;
}

.menu-table td {
font-size: 13px;
padding: 10px 6px;
}

/* جعل الجدول قابل للتمرير أفقياً */
.menu-table-wrapper {
overflow-x: auto;
-webkit-overflow-scrolling: touch;
}
}

/* للشاشات الصغيرة جداً */
@media (max-width: 480px) {
.book-now-btn {
padding: 10px 16px;
font-size: 13px;
font-weight: 700;
}

.menu-table th:last-child,
.menu-table td:last-child {
min-width: 100px;
}

.menu-table th {
font-size: 12px;
padding: 10px 4px;
}

.menu-table td {
font-size: 12px;
padding: 8px 4px;
}
}

/* تنسيق Swatches للمقاسات */
.variations select {
display: none;
}

.variation-swatches {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin: 15px 0;
}

.variation-swatch {
display: inline-block;
padding: 10px 20px;
border: 2px solid #ddd;
border-radius: 5px;
cursor: pointer;
transition: all 0.3s ease;
font-weight: 600;
background: #fff;
color: #333;
}

.variation-swatch:hover {
border-color: var(--accent-color);
background: var(--accent-color);
color: #fff;
}

.variation-swatch.selected {
border-color: var(--main-color);
background: var(--main-color);
color: #fff;
}

.variation-swatch.disabled {
opacity: 0.5;
cursor: not-allowed;
text-decoration: line-through;
}

/* للموبايل */
@media (max-width: 768px) {
.variation-swatch {
padding: 8px 16px;
font-size: 14px;
}
}

/* تصغير عمود اسم الخدمة في الموبايل */
@media (max-width: 768px) {
    .menu-table tr:first-child td:nth-child(2),
    .menu-table td[rowspan]:nth-child(2) {
        font-size: 0.9rem;
        font-weight: 600;
        max-width: 120px;
        min-width: 100px;
        word-break: break-word;
        white-space: normal;
        padding: 8px 4px;
    }
    
    /* تصغير الصورة أكتر */
    .menu-thumb {
        width: 50px;
        height: 50px;
    }
    
    /* تصغير عمود السعر */
    .menu-table td:nth-child(3) {
        max-width: 70px;
        min-width: 60px;
        font-size: 12px;
        padding: 8px 3px;
    }
    
    /* تصغير عمود الخيارات */
    .menu-table td:nth-child(4) {
        max-width: 80px;
        min-width: 70px;
        font-size: 11px;
        padding: 8px 3px;
    }
}

/* للشاشات الصغيرة جداً */
@media (max-width: 480px) {
    .menu-table tr:first-child td:nth-child(2),
    .menu-table td[rowspan]:nth-child(2) {
        max-width: 100px;
        min-width: 80px;
        font-size: 0.85rem;
        padding: 6px 2px;
    }
    
    .menu-thumb {
        width: 45px;
        height: 45px;
    }
    
    .menu-table td:nth-child(3) {
        max-width: 60px;
        font-size: 11px;
    }
    
    .menu-table td:nth-child(4) {
        max-width: 70px;
        font-size: 10px;
    }
}