/* --- VARIABLES & RESET --- */
:root {
    --primary: #d35400;     /* Burnt Orange */
    --secondary: #2c3e50;   /* Dark Blue-Grey */
    --bg: #fdfbf7;          /* Off-white paper texture */
    --text: #333;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }
html { scroll-behavior: smooth; }
body { background-color: var(--bg); color: var(--text); overflow-x: hidden; }

/* --- LOADER ANIMATION --- */
#loader-wrapper {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--white); z-index: 9999;
    display: flex; justify-content: center; align-items: center;
    transition: opacity 0.5s ease-out;
}
.loader-content { text-align: center; color: var(--primary); }
.loader-content i { font-size: 3rem; margin-bottom: 15px; }
.loader-content p { font-family: 'Playfair Display', serif; letter-spacing: 2px; }

/* --- NAVIGATION --- */
.navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.8rem 5%; background: var(--white); 
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky; top: 0; z-index: 1000;
}

/* LOGO STYLING */
.logo-img {
    height: 60px; /* Limits height so it fits nicely */
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}
.logo-link { display: flex; align-items: center; }
.logo-link:hover .logo-img { transform: scale(1.05); }

.nav-links { display: flex; gap: 30px; list-style: none; }
.nav-links a { 
    text-decoration: none; color: var(--secondary); font-weight: 500; 
    transition: color 0.3s; position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); }

/* Cart Icon with Badge */
.cart-icon { position: relative; font-size: 1.2rem; }
.cart-badge {
    position: absolute; top: -8px; right: -12px;
    background: var(--primary); color: var(--white);
    font-size: 0.7rem; padding: 2px 6px; border-radius: 50%;
    font-weight: bold;
}
.hamburger { display: none; font-size: 1.5rem; cursor: pointer; color: var(--secondary); }

/* --- HERO SECTION (Parallax) --- */
.hero {
    height: 90vh;
    /* REVERTED TO THE HIGH-QUALITY UNSPLASH IMAGE */
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://images.unsplash.com/photo-1514362545857-3bc16c4c7d1b?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80');
    background-size: cover; 
    background-position: center; 
    background-attachment: fixed;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    color: var(--white); text-align: center; padding: 0 20px;
    position: relative;
}

/* Hero Logo Styling */
.hero-logo {
    display: block;              /* 1. Makes it a block box instead of text */
    margin: 0 auto 20px auto;    /* 2. 'Auto' margins on left/right force it to center perfectly */
    width: 120px;       
    height: auto;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.3));
    animation: float 3s ease-in-out infinite; 
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.hero-content { animation: fadeInUp 1s ease-out; }
.hero h1 { 
    font-family: 'Playfair Display', serif; font-size: 4rem; 
    margin: 10px 0; text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}
.subtitle { font-family: 'Playfair Display', serif; font-style: italic; font-size: 1.5rem; color: var(--primary); }
.hero p { font-size: 1.2rem; margin-bottom: 30px; opacity: 0.9; max-width: 600px; margin-left: auto; margin-right: auto; }

/* Buttons */
.btn-group { display: flex; gap: 20px; justify-content: center; }
.btn {
    padding: 12px 35px; border-radius: 30px; text-decoration: none; font-weight: 600;
    transition: transform 0.3s, background 0.3s;
}
.btn-primary { background: var(--primary); color: var(--white); border: 2px solid var(--primary); }
.btn-primary:hover { background: #b04600; transform: translateY(-3px); }

.btn-outline { background: transparent; color: var(--white); border: 2px solid var(--white); }
.btn-outline:hover { background: var(--white); color: var(--primary); transform: translateY(-3px); }

.scroll-down {
    position: absolute; bottom: 30px; font-size: 2rem; 
    animation: bounce 2s infinite; opacity: 0.7;
}

/* --- SECTIONS (About & General) --- */
.container { max-width: 1200px; margin: 80px auto; padding: 0 20px; }
.section-title { 
    font-family: 'Playfair Display', serif; font-size: 2.5rem; 
    color: var(--secondary); margin-bottom: 20px;
}
.text-center { text-align: center; }
.lead-text { font-size: 1.1rem; color: #555; line-height: 1.8; max-width: 800px; margin: 0 auto; }

/* About Grid */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; margin-top: 50px; }
.about-image { position: relative; }
.about-image img { 
    width: 100%; border-radius: 10px; box-shadow: var(--shadow);
    transition: transform 0.3s;
}
.about-image:hover img { transform: scale(1.02); }

.exp-badge {
    position: absolute; bottom: -20px; right: -20px;
    background: var(--primary); color: var(--white);
    padding: 20px; border-radius: 50%; text-align: center;
    width: 120px; height: 120px; display: flex; flex-direction: column; justify-content: center;
    box-shadow: var(--shadow);
}
.exp-badge span { font-size: 2rem; font-weight: bold; line-height: 1; }

.features-list { list-style: none; margin-top: 20px; }
.features-list li { margin-bottom: 10px; font-size: 1.1rem; display: flex; align-items: center; gap: 10px; }
.features-list i { color: var(--primary); }

/* --- ANIMATIONS --- */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% {transform: translateY(0);} 40% {transform: translateY(-10px);} 60% {transform: translateY(-5px);} }

/* --- RESPONSIVE & MOBILE DRAWER --- */
@media (max-width: 768px) {
    .hero { background-attachment: scroll; height: auto; padding: 120px 20px; }
    .hero h1 { font-size: 2.5rem; }
    .hero-logo { width: 100px; }
    
    .about-grid { grid-template-columns: 1fr; gap: 30px; }
    .exp-badge { right: 0; width: 100px; height: 100px; font-size: 0.8rem; }
    .exp-badge span { font-size: 1.5rem; }
    
    .hamburger { 
        display: block; 
        z-index: 2001; 
        transition: transform 0.3s ease;
    }
    .hamburger.active { transform: rotate(90deg); color: var(--primary); }

    .nav-links {
        position: fixed; top: 0; right: -100%; width: 75%; height: 100vh;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column; justify-content: center; align-items: center; gap: 40px;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: right 0.5s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 2000;
    }
    .nav-links.active { right: 0; }
    .nav-links li { opacity: 0; transform: translateX(20px); transition: all 0.3s ease; }
    .nav-links.active li { opacity: 1; transform: translateX(0); }
    .nav-links.active li:nth-child(1) { transition-delay: 0.1s; }
    .nav-links.active li:nth-child(2) { transition-delay: 0.2s; }
    .nav-links.active li:nth-child(3) { transition-delay: 0.3s; }
    .nav-links.active li:nth-child(4) { transition-delay: 0.4s; }
    .nav-links.active li:nth-child(5) { transition-delay: 0.5s; }

    .nav-links a { font-size: 1.5rem; color: var(--secondary); font-weight: 600; }
}



/* --- CONTACT PAGE STYLES --- */

/* Info Cards (Address, Phone, Email) */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.info-card {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.info-card:hover { transform: translateY(-5px); }
.info-card i { font-size: 2rem; color: var(--primary); margin-bottom: 15px; }
.info-card h3 { color: var(--secondary); margin-bottom: 10px; }
.info-card p { color: #666; font-size: 0.95rem; }
.small-text { font-size: 0.8rem; opacity: 0.7; margin-top: 5px; }

/* Map & Form Layout */
.contact-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: stretch; /* Makes map and form same height */
}

.map-container {
    flex: 1;
    min-width: 300px;
    min-height: 400px; /* Ensure map has height on mobile */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.form-container {
    flex: 1;
    min-width: 300px;
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

/* Form Styling */
.input-group { margin-bottom: 20px; }
.input-group input, .input-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border 0.3s;
    background: #fafafa;
}

.input-group input:focus, .input-group textarea:focus {
    border-color: var(--primary);
    background: #fff;
}

/* --- STAFF / TEAM PAGE STYLES --- */

/* Reusing .info-grid from contact page, but ensuring it handles images well */
.info-card {
    position: relative;
    overflow: hidden; /* Keeps the background image contained */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* Makes all cards same height */
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

/* Specific typography for staff details */
.info-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-top: 10px;
}

.info-card p {
    line-height: 1.6;
}

/* --- 3D FLIP CARD ANIMATION --- */

/* The Container (holds the 3D space) */
.flip-card {
    background-color: transparent;
    perspective: 1000px; /* Gives the 3D depth */
    height: 420px; /* Fixed height is best for flips */
    cursor: pointer;
}

/* The Inner Wrapper (this actually rotates) */
.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    box-shadow: var(--shadow);
    border-radius: 15px;
}

/* The Class JS will toggle to flip it */
.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

/* Common Styles for Front and Back */
.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Front Face (Your existing design) */
.flip-card-front {
    background-color: var(--white);
    /* Existing content styles will fit in here */
}

/* Back Face (The long description) */
.flip-card-back {
    background-color: var(--secondary); /* Dark background for contrast */
    color: var(--white);
    transform: rotateY(180deg);
    padding: 30px;
    justify-content: center;
    align-items: center;
    overflow-y: auto; /* Scroll if text is too long */
}

.flip-card-back h3 {
    font-family: 'Playfair Display', serif;
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.flip-card-back p {
    font-size: 1rem;
    line-height: 1.6;
}

.flip-instruction {
    font-size: 0.8rem; 
    color: #ccc; 
    margin-top: 20px; 
    font-style: italic;
}

/* --- MENU CONTROLS (Search, Filter, Sort) --- */
.menu-controls {
    margin-bottom: 40px;
    background: var(--white);
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

/* Category Filter Buttons (The Pill Shape) */
.filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.filter-btn {
    padding: 10px 25px;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(211, 84, 0, 0.3);
}

/* Tool Bar (Search, Sort, Toggle) */
.tools-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 250px; /* Ensures it doesn't get too small */
}
.search-box input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid #ddd;
    border-radius: 30px;
    outline: none;
    font-size: 0.95rem;
}
.search-box i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
}

#sortSelect {
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-radius: 30px;
    background: white;
    cursor: pointer;
    font-size: 0.95rem;
}

/* --- GRID LAYOUT FIX (Crucial) --- */
.menu-grid {
    display: grid;
    /* Forces cards to be between 280px and 1fr */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 30px;
    width: 100%;
    margin-bottom: 50px;
}

/* FLIP CARD CONTAINER */
.flip-card {
    background-color: transparent;
    perspective: 1000px;
    height: 480px; /* Fixed height is mandatory for 3D flip */
    width: 100%;   /* Fills the grid cell */
    cursor: pointer;
}

/* INNER WRAPPER */
.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    box-shadow: var(--shadow);
    border-radius: 15px;
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

/* FRONT & BACK FACE SHARED */
.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--white);
}

/* FRONT SPECIFIC */
.flip-card-front img {
    width: 100%;
    height: 220px; /* Fixed height for images */
    object-fit: cover;
    border-bottom: 1px solid #eee;
}

.food-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.price-row {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

/* BACK SPECIFIC */
.flip-card-back {
    background-color: var(--secondary);
    color: var(--white);
    transform: rotateY(180deg);
    padding: 30px;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* --- DYNAMIC CART BUTTONS --- */

/* The Container for the button area */
.btn-zone {
    min-width: 110px; /* Prevents layout shift when switching buttons */
    display: flex;
    justify-content: flex-end;
}

/* State 1: The "Add" Button */
.add-btn {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy effect */
    box-shadow: 0 4px 6px rgba(211, 84, 0, 0.2);
}

.add-btn:hover {
    background: #b04600;
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(211, 84, 0, 0.3);
}

.add-btn:active {
    transform: scale(0.95);
}

/* State 2: The Quantity Controller [ - 1 + ] */
.card-qty-control {
    display: flex;
    align-items: center;
    background: var(--white);
    border: 2px solid var(--primary);
    border-radius: 30px;
    overflow: hidden;
    height: 36px; /* Match height of add-btn */
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    animation: popIn 0.3s ease;
}

/* +/- Buttons */
.card-qty-btn {
    background: var(--primary);
    color: white;
    border: none;
    width: 32px;
    height: 100%;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.card-qty-btn:hover {
    background: #8e3900;
}

/* The Number Display */
.card-qty-display {
    padding: 0 12px;
    font-weight: bold;
    color: var(--primary);
    min-width: 20px;
    text-align: center;
    font-size: 1rem;
}

/* Animation for switching */
@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* --- CART PAGE STYLES --- */

/* Layout: Split into Table (Left) and Bill (Right) */
.cart-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
}

.cart-items-container {
    flex: 2; /* Takes up 2/3 space */
    min-width: 300px;
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow);
    overflow: hidden; /* For rounded corners on table */
}

/* The Table */
.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th {
    background: var(--secondary);
    color: var(--white);
    padding: 18px;
    text-align: left;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.cart-table td {
    padding: 20px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

/* Item Info in Table */
.cart-item-info {
    display: flex;
    align-items: center;
    gap: 15px;
}
.cart-item-info img {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    object-fit: cover;
}
.cart-item-info h4 {
    margin: 0;
    color: var(--secondary);
    font-size: 1.1rem;
    font-family: 'Playfair Display', serif;
}

/* Reusing your Cool Quantity Control, but smaller for table */
.table-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 20px;
    overflow: hidden;
}
.table-qty button {
    background: #f4f4f4;
    border: none;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-weight: bold;
    color: var(--secondary);
}
.table-qty button:hover { background: #e0e0e0; }
.table-qty span {
    padding: 0 10px;
    font-weight: bold;
    min-width: 20px;
    text-align: center;
}

/* Remove Button */
.remove-link {
    color: #e74c3c;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform 0.2s;
}
.remove-link:hover { transform: scale(1.2); }

/* --- BILL SUMMARY CARD --- */
.cart-summary-card {
    flex: 1; /* Takes up 1/3 space */
    min-width: 280px;
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 100px; /* Sticks when scrolling */
}

.cart-summary-card h3 {
    margin-bottom: 25px;
    font-family: 'Playfair Display', serif;
    color: var(--secondary);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
    display: inline-block;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    color: #555;
    font-size: 1rem;
}

.summary-row.total {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--secondary);
    margin-top: 15px;
}

.divider {
    height: 1px;
    background: #eee;
    margin: 15px 0;
}

.checkout-btn {
    width: 100%;
    margin-top: 20px;
    padding: 15px;
    font-size: 1.1rem;
}

.continue-link {
    display: block;
    text-align: center;
    margin-top: 15px;
    color: #888;
    text-decoration: none;
    font-size: 0.9rem;
}
.continue-link:hover { text-decoration: underline; color: var(--primary); }

/* Mobile Response */
@media (max-width: 768px) {
    .cart-layout { flex-direction: column; }
    .cart-items-container { width: 100%; overflow-x: auto; }
    .cart-table { min-width: 600px; } /* Forces scroll on mobile */
    .cart-summary-card { width: 100%; }
}
@media screen and (max-width: 768px) {
    .flip-card-front img {
        height: auto !important;   /* STOP forcing 250px height */
        aspect-ratio: 4 / 3;       /* Keep a nice rectangular shape */
        object-fit: cover !important;
        object-position: top center !important; /* Focus on the face */
    }
}