/* ========================================
   Global Navbar Brand Consistency
   Ensures identical header across all pages
   ======================================== */
html,
body {
    overflow-x: hidden;
}

/* Offset for fixed header when navigating via anchor links */
section, [id] {
    scroll-margin-top: 110px;
}

.navbar-caption.display-4 {
    font-family: 'Source Serif 4', serif !important;
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin-left: 0 !important;
}

@media (min-width: 992px) {
    .navbar-caption.display-4 {
        font-size: 1.25rem !important;
    }
}

/* --- Refined Navbar Logo Styling --- */
/* Hide internal text and focus strictly on the iconic house/chimney */
.navbar-logo a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 62px !important;
    height: 62px !important;
    overflow: hidden !important;
    border-radius: 50%;
    margin-right: 12px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

@media (min-width: 992px) {
    .navbar-logo a {
        width: 66px !important;
        height: 66px !important;
    }
}

.navbar-logo a:hover {
    transform: scale(1.05);
}

.navbar-logo img {
    height: 125% !important;
    /* Zoom out but enough to hide text */
    width: auto !important;
    max-width: none !important;
    object-fit: cover;
    object-position: 50% 0% !important;
    /* Shift down to hide text */
    transition: all 0.3s ease;
}

/* Ensure navbar links stay in a clean single row for desktop */
@media (min-width: 992px) {
    .navbar-nav {
        flex-wrap: nowrap !important;
        flex-direction: row !important;
        align-items: center !important;
    }

    .nav-item {
        white-space: nowrap !important;
    }

    .nav-link {
        padding-left: 0.7rem !important;
        padding-right: 0.7rem !important;
        font-size: 1.05rem !important;
    }

    .navbar-buttons {
        margin-right: 2.5rem !important;
    }
}

/* Prevent horizontal scroll on mobile hero section that breaks index.html layout */
.cid-urceYbaZFM {
    overflow-x: hidden;
}

@media (max-width: 767px) {
    h1.display-2 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
        word-wrap: break-word;
    }
}

/* Custom Overrides STRICTLY for Order Page */

/* Apply this class to body of order.html */
.order-page-specific {
    padding-top: 110px;
    background-color: #f5f2ed;
}

@media (max-width: 991px) {
    .order-page-specific {
        padding-top: 100px;
    }
}

/* Scoped Card Styling */
.order-page-specific .meal-card {
    transition: all 0.2s ease-in-out;
    border-radius: 14px;
    border: 1px solid rgba(200, 170, 110, 0.2);
    border-left: 3px solid #e6a800;
    background: #fffaf0;
}

/* --- Meal Card Images (CSS Sprite) --- */
.order-page-specific .day-meal-image {
    background-image: url('/assets/images/menu.png');
    background-size: 650% auto;
    background-repeat: no-repeat;
    background-position-y: 50%;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.08);
    transition: background-size 0.3s ease;
    height: 120px;
    width: 120px;
    flex-shrink: 0;
    display: block;
    background-color: #eee;
    border-radius: 10px;
}

/* Specific Day Positions (Horizontal) */
.order-page-specific .monday-img {
    background-position-x: 2%;
}

.order-page-specific .tuesday-img {
    background-position-x: 26%;
}

.order-page-specific .wednesday-img {
    background-position-x: 50%;
}

.order-page-specific .thursday-img {
    background-position-x: 74%;
}

.order-page-specific .friday-img {
    background-position-x: 98%;
}

.order-page-specific .card:hover .day-meal-image {
    background-size: 700% auto;
}

.order-page-specific .meal-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(200, 160, 60, 0.18) !important;
    border-color: rgba(230, 168, 0, 0.4);
    border-left: 3px solid #d49a00;
    background: #fff8e8;
}

.order-page-specific .meal-card .card-title {
    color: #2c3e50 !important;
}

/* Custom Order Type Toggle (replaces Bootstrap blue) */
.btn-order-toggle {
    color: #b8860b;
    border: 2px solid #e6a800;
    background: #fff8e8;
    font-weight: 600;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
}

/* Fix double border between the two buttons */
.btn-group>.btn-order-toggle+.btn-check+.btn-order-toggle {
    margin-left: -2px;
}

/* First button - round left corners */
.btn-group>.btn-check:first-child+.btn-order-toggle {
    border-radius: 10px 0 0 10px;
}

/* Last button - round right corners */
.btn-group>.btn-order-toggle:last-child {
    border-radius: 0 10px 10px 0;
}

.btn-order-toggle:hover {
    background: #fff2d1;
    color: #9a7200;
    border-color: #d49a00;
}

.btn-check:checked+.btn-order-toggle {
    background: #e6a800 !important;
    color: #fff !important;
    border-color: #e6a800 !important;
    box-shadow: none;
    z-index: 1;
}

.btn-check:focus+.btn-order-toggle {
    box-shadow: 0 0 0 0.2rem rgba(230, 168, 0, 0.25);
}

.order-page-specific .sticky-sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: 120px;
    z-index: 100;
}

/* Validation Feed */
#postcode-feed {
    font-size: 0.9em;
    min-height: 1.5em;
}

/* Mobile sticky fix */
@media (max-width: 991px) {
    .order-page-specific .sticky-sidebar {
        position: static !important;
    }
}

/* Menu Zoom Effect */
.order-page-specific .menu-image-container {
    overflow: hidden;
    cursor: zoom-in;
    border-radius: 16px;
    position: relative;
    background: #fff;
    width: 100%;
}

/* Desktop: Tall image */
@media (min-width: 992px) {
    .order-page-specific .menu-image-container {
        height: 80vh;
    }

    .order-page-specific .menu-image-container img {
        height: 100%;
        object-fit: cover;
    }
}

/* Mobile: Natural aspect ratio */
@media (max-width: 991px) {
    .order-page-specific .menu-image-container {
        height: auto;
        aspect-ratio: 16/9;
        margin-bottom: 20px;
    }
}

.order-page-specific .menu-image-container img {
    transition: transform 0.3s ease;
    width: 100%;
    display: block;
    transform-origin: top left;
}

.order-page-specific .menu-image-container:hover img {
    transform: scale(1.6);
}

/* Cart Specific */
.order-page-specific #cart-items-container {
    scrollbar-width: thin;
    scrollbar-color: #dee2e6 #fff;
    max-height: 400px;
    overflow-y: auto;
}

.order-page-specific #cart-items-container::-webkit-scrollbar {
    width: 6px;
}

.order-page-specific #cart-items-container::-webkit-scrollbar-thumb {
    background-color: #dee2e6;
    border-radius: 3px;
}

/* Buttons - Scoped */
.order-page-specific .btn-primary {
    background-color: #f7b801 !important;
    border-color: #f7b801 !important;
    color: #fff !important;
    font-weight: 600;
}

.order-page-specific .btn-primary:hover {
    background-color: #dca300 !important;
    border-color: #dca300 !important;
}

.order-page-specific .btn-outline-primary {
    color: #f7b801 !important;
    border-color: #f7b801 !important;
}

.order-page-specific .btn-outline-primary:hover {
    background-color: #f7b801 !important;
    color: #fff !important;
}

/* Text Colors - Scoped */
.order-page-specific .text-primary {
    color: #f7b801 !important;
}

.order-page-specific .bg-primary {
    background-color: #f7b801 !important;
}

/* Active Nav Link Highlight — shows which page the user is on */
.nav-link.active-page {
    background-color: rgba(247, 184, 1, 0.15) !important;
    color: #c68e00 !important;
    font-weight: 700 !important;
    border-radius: 1rem !important;
}

.btn.active-page {
    background-color: #dfa601 !important;
    /* Darker shade */
    color: #fff !important;
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.2) !important;
    border-color: #dfa601 !important;
    opacity: 0.9;
}

/* Force layout order for ordering section */
.order-page-specific #menu-app>.container-fluid>.row {
    flex-direction: row !important;
    direction: ltr !important;
    align-items: flex-start !important;
    /* Cart sits at top, not middle */
}

/* Specific fix for days container: CSS Grid for equal-height cards */
.order-page-specific #days-container {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 1rem;
    text-align: left !important;
    direction: ltr !important;
}

@media (min-width: 576px) {
    .order-page-specific #days-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Make grid children stretch full height */
.order-page-specific #days-container>* {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
}

.order-page-specific #days-container .meal-card {
    height: 100%;
}

/* Cart Delete Button */
.order-page-specific .cart-remove-btn {
    color: #dc3545;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 5px;
    transition: color 0.2s;
}

.order-page-specific .cart-remove-btn:hover {
    color: #a71d2a;
}

/* Address Autocomplete Dropdown */
#address-suggestions {
    border-radius: 0 0 12px 12px;
    border: 1px solid #e6a800;
    border-top: 2px solid #e6a800;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    margin-top: -1px;
}

#address-suggestions .list-group-item {
    border: none;
    border-bottom: 1px solid #f5f0e8;
    transition: background 0.15s ease;
    padding: 10px 14px;
    font-size: 0.88rem;
}

#address-suggestions .list-group-item:last-child {
    border-bottom: none;
}

#address-suggestions .list-group-item:hover,
#address-suggestions .list-group-item[aria-selected="true"] {
    background: #fff8e8 !important;
    cursor: pointer;
}

#address-suggestions .list-group-item-action:active {
    background: #f7efd8 !important;
}

/* Address input focus state */
.order-page-specific #cust-address:focus {
    border-color: #e6a800;
    box-shadow: 0 0 0 0.2rem rgba(230, 168, 0, 0.2);
}

/* All checkout form inputs focus state */
.order-page-specific #checkout-form .form-control:focus {
    border-color: #e6a800;
    box-shadow: 0 0 0 0.15rem rgba(230, 168, 0, 0.2);
}

/* --- Hero Badge Styling --- */
.order-online-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #f7b801, #e6a800);
    color: #fff !important;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 1.2px;
    text-decoration: none !important;
    box-shadow: 0 10px 30px rgba(247, 184, 1, 0.5), inset 0 2px 5px rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.order-online-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-20deg);
    animation: shine 3s infinite;
    z-index: -1;
}

@keyframes shine {
    0% {
        left: -100%;
    }

    20% {
        left: 200%;
    }

    100% {
        left: 200%;
    }
}

.order-online-badge:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 15px 35px rgba(247, 184, 1, 0.6), inset 0 2px 8px rgba(255, 255, 255, 0.5);
    border-color: #fff;
}

.badge-arrow {
    margin-left: 10px;
    transition: transform 0.3s ease;
    display: inline-block;
    font-size: 1.1em;
}

.order-online-badge:hover .badge-arrow {
    transform: translateX(6px);
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    margin-right: 12px;
    position: relative;
}

.pulse-dot::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: #fff;
    border-radius: 50%;
    animation: pulse-ring 1.8s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.33);
        opacity: 0.8;
    }

    80%,
    100% {
        opacity: 0;
        transform: scale(3.5);
    }
}

/* Toast slide-down animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

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