/*
==============================================
FULL MENU PAGE STYLES (COMPACT VERSION)
==============================================
*/

:root {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --background-light: #f4f4f4;
    --text-color: #333;
    --border-color: #ddd;
}

body {
    background-color: var(--background-light);
    font-family: 'Montserrat', sans-serif;
    color: var(--text-color);
}

/* HEADER STYLES */
.full-menu-header {
    background: var(--primary-color);
    color: #fff;
    text-align: center;
    padding: 1.5rem 1rem 2rem; 
    position: relative;
}

.full-menu-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem; 
    margin: 0;
}

.full-menu-header p {
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 0.25rem;
}

.back-button {
    position: absolute;
    top: 1.5rem; 
    left: 2rem;
    background-color: var(--secondary-color);
    color: #fff;
    text-decoration: none;
    padding: 0.6rem 1.2rem; 
    border-radius: 50px;
    font-weight: 700;
    transition: background-color 0.3s, transform 0.3s;
}

.back-button:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}


/* ==============================================
   NEW & UPDATED STYLES START HERE
   ============================================== */

/* TWO-COLUMN LAYOUT CONTAINER */
.menu-layout-container {
    display: flex; /* Establishes the two-column layout */
    justify-content: center;
    gap: 2rem; /* Creates space between the menu and the order summary */
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1rem;
    align-items: flex-start; /* Aligns items to the top */
}

.menu-options-column {
    flex: 2; /* Takes up 2/3 of the available space */
    max-width: 800px;
}

.order-summary-column {
    flex: 1; /* Takes up 1/3 of the available space */
    max-width: 400px;
    position: sticky; /* Makes the summary stick to the top as you scroll */
    top: 2rem;
}


/* START: UPDATED INPUT STYLES */
.search-container {
    position: relative;
    margin: 1.25rem auto 0;
    width: 90%;
    max-width: 500px;
}

.location-container {
    position: absolute; /* Positioned relative to the header */
    top: 1.5rem;
    right: 2rem;
    width: 250px; /* Gave it a specific width */
}

/* Shared styles for both input fields */
#search-bar,
#location-input {
    width: 100%;
    padding: 10px 15px 10px 38px;
    border: 1px solid #ccc;
    border-radius: 25px;
    font-size: 0.9rem;
    box-sizing: border-box;
    outline: none;
    transition: box-shadow 0.3s, border-color 0.3s;
}

#search-bar:focus,
#location-input:focus {
    box-shadow: 0 0 8px rgba(231, 76, 60, 0.4);
    border-color: var(--secondary-color);
}

/* Shared styles for icons inside inputs */
.search-container .fa-magnifying-glass,
.location-container .fa-location-dot {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
}
/* END: UPDATED INPUT STYLES */


/* ORDER SUMMARY STYLES */
.order-notification {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: #eaf2f8;
    border-left: 5px solid #3498db;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}
.order-notification p {
    margin: 0;
    font-size: 0.9rem;
}

.order-summary-box {
    background-color: #fff;
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.order-summary-box h3 {
    font-family: 'Playfair Display', serif;
    text-align: center;
    margin-top: 0;
    margin-bottom: 1.25rem;
}

.cart-items {
    min-height: 50px;
    max-height: 350px;
    overflow-y: auto;
    margin-bottom: 1rem;
}
.cart-empty-msg {
    color: #888;
    text-align: center;
    padding: 1rem 0;
}
.cart-total {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 0.8rem 0;
    border-top: 2px solid var(--background-light);
    color: var(--primary-color);
}

.cart-button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.cart-button:disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
}

.cart-button:not(:disabled) {
    background-color: var(--secondary-color);
    color: white;
}
.cart-button:not(:disabled):hover {
    background-color: #c0392b;
}

/* ACCORDION MENU STYLES */
.accordion-button {
    background-color: var(--primary-color);
    color: #fff;
    cursor: pointer;
    padding: 14px 20px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 1.15rem;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    transition: background-color 0.3s ease;
    position: relative;
    margin-top: 1rem;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.accordion-button:first-of-type {
    margin-top: 0;
}

.accordion-button.active {
    background-color: var(--secondary-color);
}

.accordion-button::after {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: '\f078'; /* chevron-down */
    color: #fff;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

.accordion-button.active::after {
    transform: translateY(-50%) rotate(180deg);
}

.accordion-panel {
    padding: 0 20px;
    background-color: white;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

/* INDIVIDUAL MENU ITEM STYLES */
.menu-item-detailed {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.8rem 0;
    border-bottom: 1px dashed #e0e0e0;
    transition: background-color 0.2s;
}
.menu-item-detailed:hover {
    background-color: #fcfcfc;
    cursor: pointer;
}

.menu-item-detailed:last-child {
    border-bottom: none;
}
.item-info {
    margin-right: 1.5rem;
}
.item-info h4 {
    margin: 0 0 5px 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-color);
}
.item-desc {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
}
.item-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
}
.placeholder {
    padding: 1.5rem 0;
    color: #888;
    font-style: italic;
}

/* FOOTER STYLES */
footer {
    text-align: center;
    padding: 2rem;
    margin-top: 2rem;
    background: var(--primary-color);
    color: #fff;
}


/* RESPONSIVE ADJUSTMENTS */
@media (max-width: 992px) {
    .menu-layout-container {
        flex-direction: column; /* Stacks the columns on top of each other */
        align-items: center;
    }
    .order-summary-column {
        position: static; /* Un-sticks the summary on smaller screens */
        width: 100%;
        max-width: 600px; /* Give it a reasonable max-width */
        margin-top: 2rem;
    }
    .menu-options-column {
        width: 100%;
        max-width: 600px;
    }
    /* On tablet, stack the location input below search */
    .location-container {
        /* * START OF FIX:
         * Changed from 'static' to 'relative'.
         * This allows the container to stack normally in the layout,
         * while also acting as the positioning anchor for the icon inside it.
        */
        position: relative;
        /* Unset the absolute positioning values from the desktop view */
        top: unset;
        right: unset;
        /* END OF FIX */
        
        width: 90%;
        max-width: 500px;
        margin: 1rem auto 0;
    }
}

@media (max-width: 768px) {
    .full-menu-header h1 {
        font-size: 2rem;
    }
    .back-button {
        position: static;
        display: inline-block;
        margin-bottom: 1.5rem;
    }
}