/* =========================================
   CORE SETUP & VARIABLES
   ========================================= */
:root {
    --primary-dark: #2A0A0A;
    --primary-light: #4A1C1C;
    --gold: #C5A059;
    --off-white: #FCFBF7;
    --text-dark: #333;
    --nav-height-desktop: 70px;
    --nav-height-mobile: 60px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Lato', sans-serif;
    background-color: var(--off-white);
    background-image: radial-gradient(#E0D0B0 1px, transparent 1px);
    background-size: 30px 30px;
    color: var(--text-dark);
    overflow-x: clip;
    position: relative;
}

h1,
h2,
h3 {
    font-family: 'Playfair Display', serif;
}

/* =========================================
   SCROLL FADE ANIMATION (NEW)
   ========================================= */
/* Initial State (Hidden & Lower) */
.scroll-fade {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

/* Visible State (Triggered by JS) */
.scroll-fade.visible {
    opacity: 1;
    /* Using 'none' ensures it doesn't conflict with Hover transforms later */
    transform: none;
}

/* =========================================
   HERO SECTION
   ========================================= */
.menu-hero {
    height: 60vh;
    min-height: 400px;
    background: url('https://images.unsplash.com/photo-1414235077428-338989a2e8c0?q=80&w=2000&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

/* Glass Overlay */
.menu-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(42, 10, 10, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    padding: 20px;
    animation: fadeInUp 1s ease-out;
}

.sub-headline {
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
}

.hero-content h1 {
    font-size: 3.5rem;
    color: #fff;
    margin: 10px 0;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.8);
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.9);
}

.btn-scroll {
    display: inline-block;
    margin-top: 25px;
    color: var(--gold);
    text-decoration: none;
    border: 1px solid var(--gold);
    padding: 10px 25px;
    border-radius: 50px;
    transition: 0.3s;
    background: rgba(42, 10, 10, 0.6);
    backdrop-filter: blur(5px);
}

.btn-scroll:hover {
    background: var(--gold);
    color: var(--primary-dark);
}

/* =========================================
   STICKY NAVBAR
   ========================================= */
.category-nav {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 9999;
    background-color: var(--primary-dark);
    border-bottom: 2px solid var(--gold);
    height: var(--nav-height-desktop);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    width: 100%;
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.home-btn {
    text-decoration: none;
    color: var(--gold);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    font-size: 1rem;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.home-btn:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 15px;
    padding-left: 20px;
    overflow-x: auto;
    scrollbar-width: none;
    white-space: nowrap;
    align-items: center;
    height: 100%;
}

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

.nav-links li a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    padding: 8px 18px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    transition: all 0.3s ease;
    display: inline-block;
}

.nav-links li a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.nav-links li a.active {
    background: var(--gold);
    color: var(--primary-dark);
    font-weight: bold;
    box-shadow: 0 0 15px rgba(197, 160, 89, 0.4);
    transform: scale(1.05);
}

/* =========================================
   CONTENT & GRID
   ========================================= */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2.8rem;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.gold-line {
    width: 80px;
    height: 3px;
    background: var(--gold);
    margin: 0 auto 15px;
}

.subsection-title {
    color: var(--gold);
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin: 50px 0 25px 0;
    border-bottom: 1px solid rgba(197, 160, 89, 0.3);
    padding-bottom: 10px;
    display: block;
    width: 100%;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

/* =========================================
   MENU CARDS (Hover Effects)
   ========================================= */
.menu-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    /* IMPORTANT: Ensures hover transform works after fade-in */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.menu-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(197, 160, 89, 0.15);
    border-color: rgba(197, 160, 89, 0.3);
}

.card-img {
    height: 220px;
    width: 100%;
    overflow: hidden;
    position: relative;
}

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

.menu-card:hover .card-img img {
    transform: scale(1.1);
}

.card-info {
    padding: 25px 20px;
}

.card-info h3 {
    color: var(--primary-dark);
    font-size: 1.3rem;
    margin-bottom: 8px;
    transition: color 0.3s;
}

.menu-card:hover .card-info h3 {
    color: var(--gold);
}

.card-info p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

.tag {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.tag.trending {
    background-color: #ff5e57;
}

.tag.best-seller {
    background-color: var(--gold);
    color: var(--primary-dark);
}

.tag.new {
    background-color: #2ecc71;
}

/* =========================================
   FOOTER
   ========================================= */
.menu-footer {
    background: var(--primary-dark);
    color: white;
    text-align: center;
    padding: 60px 20px;
    margin-top: 50px;
    border-top: 4px solid var(--gold);
}

.gold-text {
    color: var(--gold);
    font-weight: bold;
}

.back-link {
    color: #aaa;
    text-decoration: none;
    border-bottom: 1px solid #555;
    padding-bottom: 2px;
    transition: 0.3s;
}

.back-link:hover {
    color: var(--gold);
    border-color: var(--gold);
}

/* =========================================
   MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 768px) {
    html {
        scroll-padding-top: 65px;
    }

    .menu-hero {
        height: 50vh;
        background-attachment: scroll;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .category-nav {
        height: var(--nav-height-mobile);
    }

    .nav-container {
        padding: 0 10px;
        gap: 10px;
    }

    .home-btn span {
        display: none;
    }

    .home-btn i {
        font-size: 1.2rem;
        padding: 5px;
    }

    .nav-links li a {
        font-size: 0.85rem;
        padding: 6px 14px;
    }

    .menu-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto 40px;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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







/* -------------cart-------------- */

/* =========================================
   COMBOS SECTION
   ========================================= */
.combo-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-dark);
    color: var(--gold);
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.price-tag {
    display: inline-block;
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: 5px;
}

.btn-add {
    display: block;
    width: 100%;
    padding: 10px;
    margin-top: 15px;
    background-color: var(--primary-dark);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-add:hover {
    background-color: var(--gold);
    color: var(--primary-dark);
}

/* =========================================
   FLOATING CART & MODAL
   ========================================= */
.floating-cart-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--gold);
    color: var(--primary-dark);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 10000;
    transition: transform 0.3s;
}

.floating-cart-btn:hover {
    transform: scale(1.1);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: red;
    color: white;
    font-size: 0.8rem;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

/* Cart Modal Overlay */
.cart-modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10001;
    justify-content: flex-end;
}

.cart-modal.active {
    display: flex;
}

.cart-content {
    background: white;
    width: 100%;
    max-width: 450px;
    height: 100%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.3s ease-out;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--gold);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.close-cart {
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
}

.cart-items {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 20px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.item-details h4 {
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.item-details span {
    color: #666;
    font-size: 0.9rem;
}

.remove-btn {
    color: red;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.cart-footer {
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--primary-dark);
}

.btn-checkout {
    width: 100%;
    padding: 15px;
    background: var(--gold);
    color: var(--primary-dark);
    border: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
}

/* User Form inside Cart (Hidden initially) */
.user-details-form {
    display: none;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.user-details-form input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}


.cart-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-dark);
}

.cart-item {
    background: #faf7f2;
    padding: 12px;
    border-radius: 8px;
}

.cart-item strong {
    display: block;
}

.cart-item button {
    background: none;
    border: none;
    color: rgb(244, 242, 242);
    font-weight: bold;
}

.total-row {
    margin-top: 15px;
}

.cart-content button {
    margin-top: 10px;
    padding: 12px;
    border-radius: 6px;
    border: none;
    background: var(--gold);
    font-weight: bold;
}

.user-details-form input {
    padding: 12px;
    border-radius: 6px;
}

#qrSection {
    margin-top: 15px;
    text-align: center;
}

#qrSection img {
    margin: 10px auto;
    border: 2px solid var(--gold);
    border-radius: 10px;
}

.cart-content {
    overflow-y: auto;
}

/* stop background scroll when cart open */
body.cart-open {
    overflow: hidden;
}

.cart-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.cart-back {
    font-size: 24px;
    cursor: pointer;
    display: none;
}

/* show back button on mobile */
@media(max-width:768px) {
    .cart-back {
        display: block;
    }
}

/* --- FIX: Make Success Modal Appear on Top of Everything --- */
.success-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    /* Darker background to focus attention */
    display: none;
    /* Hidden by default, JS toggles this */
    justify-content: center;
    align-items: center;

    /* FORCE ON TOP */
    z-index: 99999 !important;
    backdrop-filter: blur(5px);
    /* Optional: Blurs the background for a nice effect */
}

.success-box {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 100000;
    /* Ensure content is above the modal background */
    animation: popIn 0.3s ease-out;
}

/* Animation to make it pop */
@keyframes popIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-box h2 {
    margin-bottom: 10px;
}

.success-box button {
    margin-top: 20px;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    background: #C5A059;
    color: black;
    font-weight: 600;
    cursor: pointer;
}








/* --------event type form------ */
.form-group {
    margin-top: 18px;
}

.form-label {
    font-size: 14px;
    font-weight: 600;
    color: #2a0a0a;
    margin-bottom: 6px;
    display: block;
}

.form-label i {
    color: #c5a059;
    margin-right: 6px;
}

.styled-select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1.5px solid #e2d6c2;
    font-size: 14px;
    background-color: #fff;
    cursor: pointer;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.styled-select:focus {
    outline: none;
    border-color: #c5a059;
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.15);
}



/* -----------phone number entering */
.phone-input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.country-code {
    background: #f4f4f4;
    padding: 12px 14px;
    font-weight: 600;
    color: #555;
    border-right: 1px solid #ddd;
}

.phone-input-wrapper input {
    border: none;
    outline: none;
    padding: 12px;
    flex: 1;
    font-size: 14px;
}




/* ------image upload mesaage------ */
.upload-toast {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #2a0a0a;
    color: #fff;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 99999;
    max-width: 90%;
    text-align: center;
}

.upload-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-6px);
}

.upload-toast.success {
    background: #1f7a4a;
}

.upload-toast.error {
    background: #8b1e1e;
}

@media (max-width: 480px) {
    .upload-toast {
        bottom: 14px;
        font-size: 12px;
        padding: 10px 14px;
    }
}