/* ============================================================
   KAWTHAR WORLD — Premium Restaurant Menu Stylesheet
   ============================================================ */

/* === FONTS =================================================== */
@font-face {
    font-family: 'Tajawal';
    src: url('../Font/Tajawal/Tajawal-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Tajawal';
    src: url('../Font/Tajawal/Tajawal-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Tajawal';
    src: url('../Font/Tajawal/Tajawal-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Tajawal';
    src: url('../Font/Tajawal/Tajawal-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Tajawal';
    src: url('../Font/Tajawal/Tajawal-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
}

@font-face {
    font-family: 'Tajawal';
    src: url('../Font/Tajawal/Tajawal-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
}

/* === DESIGN TOKENS =========================================== */
:root {
    --primary: #8B1A1A;
    --primary-dark: #6a1313;
    --primary-light: rgba(139, 26, 26, 0.08);
    --accent: #D4A853;
    --bg-warm: #FAF8F5;
    --bg-card: #ffffff;
    --text-main: #1a1a1a;
    --text-muted: #888;
    --radius-card: 22px;
    --radius-pill: 50px;
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.04);
    --shadow-card-hover: 0 16px 40px rgba(139, 26, 26, 0.10);
    --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === GLOBAL ================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--bg-warm) !important;
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

.fw-black {
    font-weight: 900;
}

/* === BOOTSTRAP OVERRIDES ===================================== */
.bg-primary {
    background-color: var(--primary) !important;
}

.text-primary {
    color: var(--primary) !important;
}

.border-primary {
    border-color: var(--primary) !important;
}

.btn-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
}

.btn-primary:hover {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}

.text-primary-custom {
    color: var(--primary) !important;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
    height: 400px;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.4)),
        url('../assist/bACKGROUND.webp') center / cover no-repeat;
    background-attachment: fixed;
}

.hero::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(transparent, var(--bg-warm));
    z-index: 0;
}

/* ============================================================
   STICKY NAVIGATION BAR
   ============================================================ */
.nav-custom {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    z-index: 1050;
    padding: 12px 0 !important;
    transition: all 0.3s ease;
}

/* Scrollable tabs row */
.nav-scrollable {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 2px;
    gap: 8px;
}

.nav-scrollable::-webkit-scrollbar {
    display: none;
}

/* Category pill buttons */
.nav-tabs-wrapper .nav-link {
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 10px 22px;
    color: var(--text-main);
    background: transparent;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    white-space: nowrap;
    transition: var(--transition);
}

.nav-tabs-wrapper .nav-link.active {
    background: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary) !important;
    box-shadow: 0 6px 16px rgba(139, 26, 26, 0.25);
}

.nav-tabs-wrapper .nav-link:hover:not(.active) {
    background: var(--primary-light);
    color: var(--primary);
    border-color: rgba(139, 26, 26, 0.15);
}

/* Search Bar */
.search-wrapper {
    min-width: 220px;
}

.search-wrapper .input-group {
    background: var(--bg-warm);
    border-radius: var(--radius-pill);
    border: 1.5px solid rgba(0, 0, 0, 0.06);
    transition: var(--transition);
}

.search-wrapper .input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 26, 26, 0.08);
    background: #fff;
}

/* ============================================================
   MENU GRID & CARDS
   ============================================================ */
#menuContainer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
    padding-top: 30px;
}

/* Category section headings span full width */
.category-section {
    grid-column: 1 / -1;
    margin-top: 2.5rem;
    margin-bottom: 0.5rem;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-light);
}

.category-section h3 {
    position: relative;
    padding-inline-start: 14px;
}

.category-section h3::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 70%;
    background: var(--primary);
    border-radius: 3px;
}

[dir="ltr"] .category-section h3::before {
    right: auto;
    left: 0;
}

/* Card */
.card-custom {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bg-card);
    border-radius: var(--radius-card);
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    position: relative;
    transition: transform var(--transition), box-shadow var(--transition);
}

.card-custom:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card-hover);
}

/* Card Image */
.card-img-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f0ebe4;
}

.card-img-custom {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card-custom:hover .card-img-custom {
    transform: scale(1.06);
}

/* Price Badge */
.price-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: var(--primary);
    color: #fff;
    padding: 8px 18px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 4px 12px rgba(139, 26, 26, 0.35);
    z-index: 5;
    transition: transform 0.3s ease;
}

[dir="rtl"] .price-badge {
    left: auto;
    right: 14px;
}

.card-custom:hover .price-badge {
    transform: scale(1.05);
}

.price-badge .riyal-icon-img {
    height: 24px;
    filter: invert(1) brightness(10);
    margin: 0;
}

/* Card Body */
.card-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 6px;
    line-height: 1.4;
}

.card-text {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 14px;
    line-height: 1.65;
    flex-grow: 1;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Size Selector */
.size-selector {
    display: flex;
    background: #f5f3ef;
    padding: 4px;
    border-radius: 14px;
    margin-bottom: 12px;
    gap: 4px;
}

.size-selector .btn {
    flex: 1;
    border: none;
    border-radius: 10px;
    padding: 7px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    background: transparent;
    transition: var(--transition);
}

.size-selector .btn.active {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
}

/* Calories Badge */
.cal-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #c07d1a;
    background: rgba(212, 168, 83, 0.1);
    padding: 5px 12px;
    border-radius: 10px;
}

/* Card entrance animation */
@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-item-fade-in {
    animation: cardFadeIn 0.4s ease both;
}

/* ============================================================
   LANGUAGE SWITCHER
   ============================================================ */
.lang-switch {
    position: fixed;
    top: 18px;
    left: 18px;
    z-index: 3000;
}

[dir="ltr"] .lang-switch {
    left: auto;
    right: 18px;
}

.lang-switch button {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    color: var(--primary);
    font-weight: 700;
    border: 1px solid rgba(139, 26, 26, 0.1);
    transition: var(--transition);
}

.lang-switch button:hover {
    background: var(--primary);
    color: #fff !important;
    border-color: var(--primary);
}

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-to-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(139, 26, 26, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 3000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 26, 26, 0.4);
}

/* ============================================================
   RIYAL ICON
   ============================================================ */
.riyal-icon-img {
    height: 35px;
    margin-inline-start: 4px;
    vertical-align: middle;
    filter: invert(15%) sepia(85%) saturate(3000%) hue-rotate(345deg) brightness(95%) contrast(95%);
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
    background: #121212 !important;
    /* Deep Charcoal/Black - Elegant & Restaurant-like */
    color: #ffffff !important;
    border-top: 3px solid var(--primary);
    position: relative;
}

footer h5 {
    color: #ffffff !important;
    font-weight: 800;
}

footer h6 {
    color: var(--accent) !important;
    /* Golden/Saffron accent for titles */
}

footer p,
footer span {
    color: rgba(255, 255, 255, 0.7) !important;
}

footer .text-white-50 {
    color: rgba(255, 255, 255, 0.5) !important;
}

footer a {
    color: #ffffff !important;
    transition: all 0.3s ease;
}

footer a:hover {
    color: var(--accent) !important;
    transform: translateY(-3px);
}

footer hr {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

footer .rounded-4 {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    transition: all 0.3s ease;
}

footer .rounded-4:hover {
    background: rgba(139, 26, 26, 0.05) !important;
    border-color: rgba(139, 26, 26, 0.3) !important;
}

footer .bi-geo-alt-fill,
footer .bi-truck,
footer .bi-headset {
    color: var(--primary) !important;
    /* Deep Red for restaurant fire/meat theme */
}

footer img {
    filter: brightness(1) grayscale(0);
    opacity: 0.8;
}

/* ============================================================
   WHATSAPP & BANNER SLIDER
   ============================================================ */
.whatsapp-float-container {
    position: fixed;
    bottom: 90px;
    right: 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 3000;
}

[dir="ltr"] .whatsapp-float-container {
    right: auto;
    left: 28px;
}

.whatsapp-float-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #ffffff;
    color: #25d366;
    border-radius: 50px;
    padding: 6px 6px 6px 16px;
    text-decoration: none !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(37, 211, 102, 0.2);
}

[dir="ltr"] .whatsapp-float-pill {
    padding: 6px 16px 6px 6px;
}

.whatsapp-float-pill:hover {
    transform: translateX(-5px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
    background-color: #25d366;
    color: #fff;
    border-color: #25d366;
}

[dir="ltr"] .whatsapp-float-pill:hover {
    transform: translateX(5px);
}

.whatsapp-label {
    font-size: 0.85rem;
    font-weight: bold;
    white-space: nowrap;
}

.whatsapp-icon {
    width: 38px;
    height: 38px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.whatsapp-float-pill:hover .whatsapp-icon {
    background-color: #fff;
    color: #25d366;
}

.offer-banner-img {
    height: 350px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991.98px) {
    .nav-custom {
        padding: 10px 15px !important;
    }

    .search-wrapper {
        width: 100%;
        min-width: unset;
    }

    .nav-tabs-wrapper {
        width: 100%;
    }
}

@media (max-width: 575.98px) {

    /* Hero */
    .hero {
        height: 320px;
    }

    /* Quick Info Bar Mobile */
    .nav-custom .d-flex.justify-content-center.gap-4 {
        flex-direction: column;
        gap: 8px !important;
        align-items: center;
    }

    .nav-custom .d-flex.justify-content-center.gap-4 span {
        font-size: 0.75rem;
    }

    /* Cards */
    #menuContainer {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 15px 5px;
    }

    .card-img-wrapper {
        height: 180px;
    }

    .category-section {
        margin-top: 1.5rem;
    }

    /* Back to top */
    .back-to-top {
        bottom: 18px;
        right: 18px;
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }

    /* WhatsApp Mobile */
    .whatsapp-float-container {
        bottom: 70px;
        right: 18px;
        gap: 10px;
    }

    [dir="ltr"] .whatsapp-float-container {
        right: auto;
        left: 18px;
    }

    .whatsapp-float-pill {
        padding: 5px 5px 5px 14px;
        gap: 8px;
    }
    
    [dir="ltr"] .whatsapp-float-pill {
        padding: 5px 14px 5px 5px;
    }

    .whatsapp-label {
        font-size: 0.8rem;
    }

    .whatsapp-icon {
        width: 34px;
        height: 34px;
        font-size: 1.1rem;
    }

    /* Offer Banner Mobile */
    .offer-banner-img {
        height: 180px;
    }
}