/* --- GLOBAL STYLES --- */
body { font-family: 'Segoe UI', sans-serif; margin: 0; background-color: #fcf6e9; color: #333; overflow-x: hidden; transition: padding-right 0.3s ease-in-out; }
body.cart-active { padding-right: 320px; }
body.cart-active header { width: calc(100% - 320px); }
#app-wrapper { width: 100%; transition: width 0.3s ease-in-out; }

/* --- HEADER --- */
header { background: #6d2e14; color: white; padding: 1rem 2rem; display: flex; justify-content: space-between; align-items: center; position: fixed; top: 0; left: 0; width: 100%; z-index: 100; box-shadow: 0 2px 10px rgba(0,0,0,0.1); box-sizing: border-box; transition: width 0.3s ease-in-out; }
header .logo { display: flex; align-items: center; font-size: 1.5rem; font-weight: bold; color: #f39c12; }
.header-logo { height: 45px; width: 45px; object-fit: cover; margin-right: 12px; border-radius: 50%; border: 2px solid #f39c12; background: #fcf6e9; }
header nav a { color: white; margin: 0 10px; cursor: pointer; font-weight: 500; }
header nav a:hover { color: #f39c12; }

/* --- CART BUTTON & RESTORED MINI PROGRESS BAR --- */
#cart-btn { background: #e67e22; border: none; padding: 8px 15px; border-radius: 20px; color: white; cursor: pointer; font-weight: bold; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 90px; }
@keyframes pop { 0% { transform: scale(1); } 50% { transform: scale(1.10); } 100% { transform: scale(1); } }
.bounce { animation: pop 0.3s ease-in-out; }

.mini-progress-bg { display: none; width: 100%; height: 5px; background: rgba(0, 0, 0, 0.25); border-radius: 3px; overflow: hidden; margin-top: 4px; }
#mini-progress-fill { height: 100%; background: #ffffff; width: 0%; transition: width 0.3s ease; }
main { padding-top: 80px; }

/* --- BREATHING ANIMATION --- */
@keyframes breathe {
    0% { transform: scale(1); box-shadow: 0 5px 15px rgba(230, 126, 34, 0.2); }
    50% { transform: scale(1.02); box-shadow: 0 8px 25px rgba(230, 126, 34, 0.6); }
    100% { transform: scale(1); box-shadow: 0 5px 15px rgba(230, 126, 34, 0.2); }
}

/* --- HERO SECTION --- */
.hero { text-align: center; padding: 80px 20px; background: linear-gradient(135deg, #f39c12, #e67e22); color: white; border-radius: 0 0 30px 30px; margin-bottom: 30px; box-shadow: 0 10px 20px rgba(230, 126, 34, 0.2); }
.hero h1 { font-size: 3rem; margin-bottom: 10px; color: #fff; }
.hero p { font-size: 1.2rem; font-weight: 500; }
.cta-btn { background: #6d2e14; color: white; padding: 18px 45px; border: none; border-radius: 30px; cursor: pointer; font-size: 1.3rem; font-weight: bold; margin-top: 25px; animation: breathe 2.5s infinite ease-in-out; }
.cta-btn:hover { animation-play-state: paused; background: #5a2510; }

/* --- MENU LAYOUT & SIDEBAR --- */
.menu-layout { display: flex; max-width: 1200px; margin: 0 auto; gap: 20px; align-items: flex-start; padding: 20px; }
.category-sidebar { flex: 0 0 220px; background: #6d2e14; color: white; padding: 20px; border-radius: 15px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); position: sticky; top: 100px; }
.category-sidebar h3 { color: #f39c12; margin-top: 0; margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.2); padding-bottom: 10px;}
.cat-btn { display: block; width: 100%; text-align: left; background: none; border: none; padding: 12px 15px; border-radius: 8px; color: white; cursor: pointer; font-size: 1.15rem; font-weight: bold; transition: background 0.2s; margin-bottom: 5px; }
.cat-btn:hover { background: rgba(255,255,255,0.1); }
.cat-btn.active-cat { background: #fcf6e9; color: #6d2e14; font-weight: bold; }
.menu-main-content { flex: 1; }
#menu-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }

/* --- FOOD CARDS --- */
.food-card { background: white; border-radius: 15px; padding: 15px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); border: 1px solid #eee; transition: transform 0.2s; display: flex; flex-direction: column; }
.food-card:hover { transform: translateY(-3px); }
.food-card img { width: 100%; height: 240px; object-fit: cover; border-radius: 10px; background-color: #eee; margin-bottom: 10px; }
.food-details { margin-top: auto; }
.food-details h3 { margin: 5px 0 10px 0; font-size: 1.1rem; }
.item-desc { font-size: 0.85rem; color: #7f8c8d; margin: 0 0 10px 0; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.food-row { display: flex; justify-content: space-between; align-items: center; border-top: 1px dashed #ddd; padding-top: 10px; }
.price-wrapper { display: flex; align-items: center; gap: 8px; }
.original-price { text-decoration: line-through; color: #888; font-size: 0.95rem; font-weight: normal; }
.price { color: #d35400; font-weight: bold; font-size: 1.2rem; }
.add-btn { background: #6d2e14; color: white; border: none; padding: 8px 15px; border-radius: 8px; cursor: pointer; font-weight: bold; }
.add-btn:active { transform: scale(0.95); }

/* --- VARIATION BADGES --- */
.variation-badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: bold; margin-bottom: 5px; border: 1px solid; }
.badge-veg { color: #27ae60; border-color: #27ae60; background: #eafaf1; }
.badge-nonveg { color: #c0392b; border-color: #c0392b; background: #fdedec; }

/* --- CART SIDEBAR STRUCTURE --- */
#cart-sidebar { position: fixed; top: 0; right: 0; width: 380px; height: 100%; background: white; box-shadow: -5px 0 15px rgba(0,0,0,0.1); z-index: 500; transform: translateX(100%); transition: transform 0.3s ease-in-out; display: flex; flex-direction: column; }
#cart-sidebar.open { transform: translateX(0); }
.hidden { display: none; }
.cart-header { padding: 15px; background: #6d2e14; color: white; display: flex; justify-content: space-between; align-items: center; }
.close-btn { background: none; border: none; color: white; font-size: 2rem; cursor: pointer; }

/* List Items inside Cart */
.cart-item { display: flex; justify-content: space-between; align-items: center; padding: 15px; border-bottom: 1px solid #eee; background: white; border-radius: 8px; margin-bottom: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.03);}
.qty-controls { display: flex; align-items: center; gap: 10px; background: #f8f9fa; padding: 5px; border-radius: 20px; }
.qty-btn { background: white; border: 1px solid #ddd; width: 25px; height: 25px; border-radius: 50%; cursor: pointer; font-weight: bold; color: #6d2e14; }

/* --- TOAST NOTIFICATION --- */
#toast-notification { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(100px); background: #27ae60; color: white; padding: 12px 24px; border-radius: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.2); z-index: 9999; font-size: 0.95rem; text-align: center; width: max-content; max-width: 90%; opacity: 0; transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55); pointer-events: none; line-height: 1.4; }
#toast-notification.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* --- OTHER PAGES --- */
.page { display: none; padding-bottom: 50px; }
.page.active { display: block; animation: fadeIn 0.5s; }
.contact-card { background: white; max-width: 600px; margin: 0 auto; padding: 30px; border-radius: 15px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
#loader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #fcf6e9; z-index: 9999; display: flex; justify-content: center; align-items: center; transition: opacity 0.5s; pointer-events: none; opacity: 0; }
#loader.active { opacity: 1; pointer-events: all; }
#loader-logo { width: 250px; animation: pulse 1s infinite alternate; }
@keyframes pulse { 0% { transform: scale(1); } 100% { transform: scale(1.1); } }

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    header { flex-wrap: wrap; padding: 10px 15px; }
    header .logo { font-size: 1.2rem; }
    header nav { width: 100%; display: flex; justify-content: center; gap: 15px; margin-top: 10px; order: 3; font-size: 0.95rem; }
    main { padding-top: 110px; } 
    .hero { padding: 40px 15px; border-radius: 0 0 20px 20px; }
    .hero h1 { font-size: 2rem; } 
    .hero p { font-size: 1rem; }
    .menu-layout { flex-direction: row; padding: 10px 5px; gap: 10px; }
    .category-sidebar { flex: 0 0 90px; position: sticky; top: 115px; max-height: calc(100vh - 130px); overflow-y: auto; padding: 10px 5px; border-radius: 8px; }
    .category-sidebar::-webkit-scrollbar { display: none; }
    .category-sidebar { -ms-overflow-style: none; scrollbar-width: none; }
    .category-sidebar h3 { font-size: 0.8rem; text-align: center; margin-bottom: 10px; }
    .cat-btn { padding: 8px 4px; font-size: 0.85rem; font-weight: bold; text-align: center; margin-bottom: 5px; line-height: 1.2; }
    .menu-main-content { flex: 1; width: calc(100% - 100px); padding: 0; }
    #menu-container { grid-template-columns: 1fr; gap: 15px; }
    #menu-container .food-card img { height: 165px; object-position: center; } 
    #cart-sidebar { width: 100%; }
    body.cart-active { padding-right: 0; overflow: hidden; }
    body.cart-active header { width: 100%; }
}

/* ==========================================
   MODALS & LOCATION BANNER 
   ========================================== */
.location-banner { background: #fdf2e9; color: #d35400; text-align: center; padding: 12px; margin: 0 20px 20px 20px; border-radius: 8px; cursor: pointer; font-weight: 600; border: 1px dashed #e67e22; transition: background 0.3s; }
.location-banner:hover { background: #fae5d3; }
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); display: flex; justify-content: center; align-items: center; z-index: 9999; }
.modal-content { background: #fffdf5; padding: 30px; border-radius: 16px; width: 90%; max-width: 400px; position: relative; box-shadow: 0 10px 30px rgba(0,0,0,0.2); animation: slideUp 0.3s ease; text-align: center; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.close-modal { position: absolute; top: 15px; right: 20px; font-size: 1.5rem; cursor: pointer; color: #999; }
.modern-input { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 8px; font-size: 1rem; box-sizing: border-box; margin-bottom: 15px; }
.modern-input:focus { border-color: #d35400; outline: none; }
.primary-btn { background: #27ae60; color: white; width: 100%; padding: 12px; border: none; border-radius: 8px; font-size: 1.1rem; font-weight: bold; cursor: pointer; transition: background 0.2s; }
.primary-btn:hover { background: #219653; }
.qr-amount { font-size: 1.2rem; margin-bottom: 15px; }
.qr-box { background: white; padding: 15px; border-radius: 12px; display: inline-block; margin-bottom: 15px; border: 2px dashed #ccc; }
#upi-qr-img { max-width: 200px; border-radius: 8px; }
.qr-instructions { font-size: 0.9rem; color: #666; margin-bottom: 15px; }

/* ==========================================
   THE SLEEK CART UPGRADES 
   ========================================== */
.modern-status-bar { padding: 15px; background: white; border-bottom: 1px solid #f0f0f0; }
#delivery-msg { font-size: 0.95rem; color: #555; margin-bottom: 10px; font-weight: 500; text-align: center;}
.progress-bar-bg { height: 8px; background: #ddd; border-radius: 4px; margin-top: 5px; overflow: hidden; }
#progress-bar-fill { height: 100%; background: #27ae60; width: 0%; transition: width 0.3s; }

.cart-scroll-bottom { padding: 15px; background: #fafafa; flex-grow: 1; overflow-y: auto; }
.sleek-card { background: white; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); border: none; }
.sleek-card h3 { margin-top: 0; color: #333; font-weight: 600; }

.sleek-input { width: 100%; padding: 12px; margin-bottom: 12px; border: 1px solid #eee; border-radius: 10px; font-size: 0.95rem; background: #fdfdfd; transition: all 0.3s ease; box-sizing: border-box; }
.sleek-input:focus { border-color: #f39c12; background: white; outline: none; box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.1); }
.sleek-input:disabled { background: #f0fdf4; color: #27ae60; border-color: #27ae60; font-weight: 500; }

.btn-group { display: flex; gap: 10px; margin-top: 5px; }
.btn-pill { padding: 12px 20px; border-radius: 30px; border: none; font-weight: 600; font-size: 0.95rem; cursor: pointer; transition: all 0.2s ease; display: inline-flex; align-items: center; justify-content: center; }
.btn-pill:active { transform: scale(0.97); }

.btn-pill-primary { background: #27ae60; color: white; flex: 1; box-shadow: 0 4px 10px rgba(39, 174, 96, 0.2); }
.btn-pill-primary:hover { background: #219653; }
.btn-pill-primary:disabled { background: #bdc3c7; color: #fff; box-shadow: none; cursor: not-allowed; border: none; }

.btn-pill-outline { background: transparent; color: #f39c12; border: 2px solid #f39c12; padding: 10px 20px; }
.btn-pill-outline:hover { background: #fff8f0; }

.btn-pill-checkout { background: #27ae60; color: white; width: 100%; padding: 16px; font-size: 1.1rem; border-radius: 12px; box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3); }
.btn-pill-checkout:hover { background: #219653; }

.radio-label { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; cursor: pointer; color: #444; font-size: 0.95rem; }
.radio-label input { accent-color: #d35400; width: 18px; height: 18px; }
.modern-footer { background: white; padding: 20px; border-radius: 16px 16px 0 0; box-shadow: 0 -5px 20px rgba(0,0,0,0.03); z-index: 10;}

/* --- RECEIPT STYLES --- */
.receipt-container { background: #fdfdfd; border: 1px solid #eaeaea; border-radius: 12px; padding: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.02); }
.receipt-logistics { display: flex; justify-content: flex-start; gap: 20px; font-size: 0.85rem; color: #555; background: #f4f6f8; padding: 8px 12px; border-radius: 8px; margin-bottom: 15px; font-weight: 600; }
.receipt-logistics strong { font-size: 1rem; color: #d35400; }
.receipt-row { display: flex; justify-content: space-between; font-size: 0.95rem; color: #444; margin-bottom: 8px; }
/* ==========================================
   INTERACTIVE MAP & AUTOCOMPLETE FIX
   ========================================== */
.map-wrapper { position: relative; height: 250px; width: 100%; border-radius: 12px; margin-bottom: 15px; overflow: hidden; background: #e9e9e9; border: 1px solid #ddd; }
#delivery-map { height: 100%; width: 100%; }

/* The fixed pin in the center of the map */
.center-pin { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -100%); font-size: 2.2rem; pointer-events: none; z-index: 10; filter: drop-shadow(0px 4px 4px rgba(0,0,0,0.3)); }

/* The GPS Locate Me Button */
#locate-me-btn { position: absolute; bottom: 15px; right: 15px; background: white; border: none; border-radius: 50%; width: 45px; height: 45px; font-size: 1.3rem; box-shadow: 0 4px 10px rgba(0,0,0,0.2); cursor: pointer; z-index: 10; display: flex; justify-content: center; align-items: center; transition: background 0.2s; }
#locate-me-btn:active { background: #f0f0f0; transform: scale(0.95); }

/* Fixes the Google dropdown hiding behind the modal */
.pac-container { z-index: 10000 !important; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); font-family: 'Segoe UI', sans-serif; margin-top: 5px; }