/* إعدادات عامة */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-family: 'Noto Kufi Arabic', 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    direction: rtl;
    text-align: right;
}

body {
    background-color: #ffe6e1;
    color: #333333;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* الشريط العلوي */
.header {
    background: #f98f24;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    padding: 0.75rem 0;
}

/* توسيط الشعار والدائرة في الهيدر بدون تغطية الأيقونات */
.header-flex {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    min-height: 70px;
    position: relative;
}

.header-title {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    flex: 0 0 auto;
    position: static;
    transform: none;
    z-index: 1;
}

.header-social,
.header-order {
    flex: 1;
}

/* أزرار التواصل الاجتماعي */
.header-social {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex: 0 0 auto;
    justify-content: flex-end;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.social-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.social-icon:hover::before {
    left: 100%;
}

.social-icon:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.social-icon.whatsapp:hover {
    background: #25D366;
}

.social-icon.instagram:hover {
    background: #E4405F;
}

.social-icon.facebook:hover {
    background: #1877F3;
}

.social-icon.map:hover {
    background: #DB4437; /* Google Maps Red */
}

.social-icon i {
    color: white;
    font-size: 20px;
}

/* شعار المطعم */
.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.logo-circle {
    position: relative;
    width: 70px;
    height: 70px;
    background: #ff0000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.logo-circle:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
}

.logo-img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.logo-circle:hover .logo-img {
    transform: rotate(5deg);
}

.logo-fallback {
    width: 70px;
    height: 70px;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
}

/* زر اطلب الآن */
.header-order {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    justify-content: flex-start;
}

.order-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, #ff0000, #f98f24);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.order-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.order-btn:hover::before {
    left: 100%;
}

.order-btn:hover {
    background: linear-gradient(135deg, #cc0000, #e07e1c);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.5);
}

.phone-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    animation: ring 2s infinite;
}

@keyframes ring {
    0%, 20%, 50%, 80%, 100% {
        transform: rotate(0deg);
    }
    10% {
        transform: rotate(-10deg);
    }
    30% {
        transform: rotate(10deg);
    }
    60% {
        transform: rotate(-5deg);
    }
    70% {
        transform: rotate(5deg);
    }
}

.order-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.order-main {
    font-size: 1.1rem;
    font-weight: 700;
}

.order-phone {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 500;
    direction: ltr;
}

/* فلتر الفئات */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    margin-top: 1.5rem;
}

.category-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid #e5e7eb;
    background: white;
    color: #333333;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-btn:hover {
    border-color: #ff0000;
    color: #ff0000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.category-btn.active {
    background: #ff0000;
    color: white;
    border-color: #ff0000;
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.3);
    transform: scale(1.05);
}

/* إخفاء أيقونة الفئة إذا كانت فارغة (مثل زر الكل) */
.category-btn .cat-icon:empty {
  display: none;
}

/* معلومات الفئة النشطة */
.active-category-info {
    text-align: center;
    margin-bottom: 2rem;
}

.active-category-info h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #ff0000;
    margin-bottom: 0.5rem;
}

.active-category-info p {
    color: #666;
    font-size: 1rem;
}

/* شاشة التحميل */
.loading-spinner {
    display: none;
    justify-content: center;
    align-items: center;
    padding: 3rem 0;
}

.spinner-container {
    position: relative;
}

.spinner-outer {
    width: 4rem;
    height: 4rem;
    border: 4px solid #ffe6e1;
    border-top: 4px solid #ff0000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-inner {
    width: 3rem;
    height: 3rem;
    border: 4px solid transparent;
    border-top: 4px solid #f98f24;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* شبكة الأصناف */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

/* بطاقة الصنف */
.menu-item-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    cursor: pointer;
}

.menu-item-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-color: #ff0000;
    transform: translateY(-5px);
}

.card-image-container {
    position: relative;
    overflow: hidden;
}

.card-image {
    width: 100%;
    height: 12rem;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.menu-item-card:hover .card-image {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
}

.menu-item-card:hover .image-overlay {
    background: rgba(0, 0, 0, 0.4);
    opacity: 1;
}

.view-image-btn {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    padding: 0.75rem;
    transform: scale(0.75);
    transition: transform 0.3s ease;
    border: none;
    cursor: pointer;
}

.menu-item-card:hover .view-image-btn {
    transform: scale(1);
}

.view-image-btn svg {
    width: 1.5rem;
    height: 1.5rem;
    color: #ff0000;
}

.card-content {
    padding: 1.25rem;
}

.card-header {
    margin-bottom: 1rem;
}

.card-title-ar {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ff0000;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.menu-item-card:hover .card-title-ar {
    color: #f98f24;
}

.card-title-en {
    font-size: 0.875rem;
    color: #666;
    font-weight: 500;
}

.card-description {
    margin-bottom: 1rem;
}

.card-description p {
    color: #666;
    font-size: 0.875rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-price {
    margin-bottom: 1rem;
    text-align: center;
}

.price-badge {
    background: #ff0000;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 1.125rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 0, 0, 0.3);
    display: inline-block;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

.card-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.restaurant-info {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.card-logo {
    width: 1rem;
    height: 1rem;
    object-fit: contain;
    opacity: 0.6;
}

.card-logo-fallback {
    width: 1rem;
    height: 1rem;
    display: none;
    align-items: center;
    justify-content: center;
}

.card-logo-fallback svg {
    width: 1rem;
    height: 1rem;
    color: #ff0000;
    opacity: 0.6;
}

.restaurant-name {
    font-size: 0.75rem;
    color: #666;
    font-weight: 500;
}

.category-info {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.category-dot {
    width: 0.5rem;
    height: 0.5rem;
    background: #ff0000;
    border-radius: 50%;
}

.category-name {
    font-size: 0.75rem;
    color: #666;
    font-weight: 500;
}

.view-image-link {
    color: #ff0000;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.view-image-link:hover {
    color: #f98f24;
}

.view-image-link svg {
    width: 1rem;
    height: 1rem;
}

/* رسالة عدم وجود أصناف */
.no-items {
    text-align: center;
    padding: 4rem 0;
}

.no-items-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.no-items h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ff0000;
    margin-bottom: 0.5rem;
}

.no-items p {
    color: #666;
}

/* الشريط السفلي */
.footer {
    background: #ff0000;
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
}

.footer-logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.footer-logo-circle {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 50%;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-logo-img {
    width: 3rem;
    height: 3rem;
    object-fit: contain;
}

.footer-logo-fallback {
    width: 3rem;
    height: 3rem;
    display: none;
    align-items: center;
    justify-content: center;
}

.footer-name-ar {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.footer-name-en {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.footer-thanks-ar {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.footer-thanks-en {
    font-size: 0.875rem;
    opacity: 0.7;
}

/* نافذة عرض الصورة */
.image-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.image-modal.active {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
}

.modal-content {
    position: relative;
    max-width: 64rem;
    max-height: 90vh;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-close:hover {
    background: white;
}

.modal-close svg {
    width: 1.5rem;
    height: 1.5rem;
    color: #333;
}

.modal-image-container {
    position: relative;
}

.modal-image {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
}

.modal-image-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 1.5rem;
}

.modal-image-title h3 {
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
}

/* تصميم متجاوب */
@media (max-width: 768px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .header-flex {
        flex-direction: row;
        gap: 1rem;
        min-height: auto;
        padding: 1rem 0;
    }
    
    .header-social,
    .header-order {
        flex: none;
    }
    
    .header-social {
        order: 3;
    }
    
    .header-title {
        order: 2;
    }
    
    .header-order {
        order: 1;
    }
    
    .logo-circle {
        width: 70px;
        height: 70px;
    }
    
    .logo-img {
        width: 60px;
        height: 60px;
    }
    
    .menu-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .category-filter {
        gap: 0.5rem;
    }
    
    .category-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    html {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .header-flex {
        gap: 0.5rem;
        padding: 0.75rem 0;
        justify-content: space-between;
    }
    
    .header-social {
        gap: 0.25rem;
    }
    
    .social-icon {
        width: 36px;
        height: 36px;
    }
    
    .logo-circle {
        width: 60px;
        height: 60px;
    }
    
    .logo-img {
        width: 50px;
        height: 50px;
    }
    
    .order-btn {
        padding: 0.75rem 1.25rem;
        gap: 0.75rem;
    }
    
    .order-main {
        font-size: 1rem;
    }
    
    .order-phone {
        font-size: 0.8rem;
    }
    
    .phone-icon {
        width: 20px;
        height: 20px;
    }
}

/* تأثيرات إضافية */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* تحديد النص */
::selection {
    background-color: #ff0000;
    color: white;
}

/* التركيز */
button:focus,
input:focus {
    outline: 2px solid #ff0000;
    outline-offset: 2px;
}

/* شريط التمرير المخصص */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #ff0000;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #f98f24;
}

.cat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* الشريط السفلي */
.footer-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-title {
  flex: 1;
  text-align: center;
  order: 2;
}
.footer-social {
  display: flex;
  gap: 0.5rem;
  order: 1;
  justify-content: flex-start;
}
@media (max-width: 700px) {
  .header-flex {
    flex-direction: column;
    gap: 0.5rem;
    min-height: unset;
    padding: 0 0.5rem;
  }
  .logo-container, .header-social {
    margin: 0;
  }
}

@media (max-width: 480px) {
    .header-flex {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100%;
        padding: 0 1rem;
    }
    .logo-container {
        order: 1;
        margin: 0;
        display: flex;
        align-items: center;
        height: 100%;
    }
    .logo-circle {
        padding: 0.2rem;
    }
    .logo-img, .logo-fallback {
        width: 2.2rem;
        height: 2.2rem;
    }
    .header-title {
        order: 2;
        flex: 1 1 0;
        text-align: right;
        align-self: center;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 0;
        padding: 0;
        direction: rtl;
    }
    .restaurant-name-ar {
        font-size: 1.3rem;
        line-height: 1.1;
        margin: 0;
    }
    .restaurant-name-en {
        font-size: 0.85rem;
        line-height: 1.1;
        margin: 0;
        color: #333;
        opacity: 0.8;
        display: block;
    }
}

@media (max-width: 480px) {
    .header-flex {
        position: relative !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100%;
        padding: 0 1rem;
        display: flex;
    }
    .logo-container {
        position: absolute !important;
        right: 1rem !important;
        left: unset !important;
        top: 50%;
        transform: translateY(-50%);
        margin: 0 !important;
        display: flex;
        align-items: center;
        height: 100%;
        z-index: 2;
    }
    .logo-circle {
        padding: 0.2rem;
    }
    .logo-img, .logo-fallback {
        width: 3rem;
        height: 3rem;
    }
    .header-title {
        position: relative !important;
        margin: 0 auto !important;
        text-align: center !important;
        flex: unset !important;
        align-self: center !important;
        display: block !important;
        padding: 0 !important;
        direction: rtl;
        z-index: 1;
    }
    .restaurant-name-ar {
        font-size: 1.3rem;
        line-height: 1.1;
        margin: 0;
    }
    .restaurant-name-en {
        font-size: 0.85rem;
        line-height: 1.1;
        margin: 0;
        color: #333;
        opacity: 0.8;
        display: block;
    }
}

@media (max-width: 480px) {
    .header {
        min-height: 4.2rem; /* أو height: 4.2rem; حسب الحاجة */
        padding: 0.5rem 0;
        box-sizing: border-box;
    }
    .header-flex {
        position: relative !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100%;
        padding: 0 1rem;
        display: flex;
        height: 100%;
        min-height: 4.2rem; /* نفس ارتفاع الشريط */
    }
    .logo-container {
        position: absolute !important;
        right: 1rem !important;
        left: unset !important;
        top: 50%;
        transform: translateY(-50%);
        margin: 0 !important;
        display: flex;
        align-items: center;
        height: 3rem;
        z-index: 2;
    }
    .logo-circle {
        width: 5rem;
        height: 5rem;
    }
    .logo-img, .logo-fallback {
        width: 3rem;
        height: 3rem;
    }
    .header-title {
        position: relative !important;
        margin: 0 auto !important;
        text-align: center !important;
        flex: unset !important;
        align-self: center !important;
        display: block !important;
        padding: 0 !important;
        direction: rtl;
        z-index: 1;
    }
    .restaurant-name-ar {
        font-size: 1.3rem;
        line-height: 1.1;
        margin: 0;
    }
    .restaurant-name-en {
        font-size: 0.85rem;
        line-height: 1.1;
        margin: 0;
        color: #333;
        opacity: 0.8;
        display: block;
    }
}