/* Banaras Backpacker Design System */
:root {
    /* Color Palette */
    --clr-marigold: #F39C12;
    --clr-marigold-light: #FAD7A1;
    --clr-terracotta: #D35400;
    --clr-river-blue: #1A5276;
    --clr-river-teal: #117A65;
    --clr-sand: #FDFEFE;
    --clr-sand-dark: #F2F3F4;
    --clr-dark: #2C3E50;
    --clr-text: #34495E;
    --clr-text-light: #7F8C8D;
    
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;
    
    /* UI Elements */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 50px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.1);
    --shadow-lg: 0 16px 32px rgba(0,0,0,0.15);
    --shadow-up: 0 -8px 24px rgba(0,0,0,0.1);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--clr-sand);
    color: var(--clr-text);
    -webkit-font-smoothing: antialiased;
    padding-bottom: 100px; /* Space for fixed cart drawer */
}

/* Base Styles */
h1, h2, h3 { font-family: var(--font-heading); color: var(--clr-dark); }
a { text-decoration: none; color: inherit; }
button { border: none; background: none; font-family: inherit; cursor: pointer; }

/* Header & Hero */
.hero-header {
    position: relative;
    height: 250px;
    background: linear-gradient(135deg, var(--clr-terracotta), var(--clr-marigold));
    /* Add a subtle pattern if desired */
    /* background-image: url('pattern.svg'); */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.header-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.2) 100%);
}

.header-content {
    position: relative;
    z-index: 2;
    color: white;
}

.brand-name {
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    margin-bottom: 0.25rem;
}

.brand-tagline {
    font-size: 1rem;
    font-weight: 300;
    opacity: 0.9;
    letter-spacing: 1px;
}

/* Loaders */
.loader-container {
    position: absolute;
    background: rgba(255,255,255,0.9);
    width: 100%;
    height: 100%;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: inherit;
}

.spinner {
    width: 40px; height: 40px;
    border: 4px solid var(--clr-sand-dark);
    border-top: 4px solid var(--clr-marigold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Categories Navigation */
.category-nav {
    display: flex;
    overflow-x: auto;
    padding: 1rem;
    gap: 1rem;
    -ms-overflow-style: none; /* IE/Edge */
    scrollbar-width: none; /* Firefox */
}
.category-nav::-webkit-scrollbar { display: none; }

.category-chip {
    padding: 0.5rem 1.25rem;
    background-color: white;
    border-radius: var(--radius-pill);
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
    color: var(--clr-text-light);
    transition: all 0.3s ease;
}

.category-chip.active {
    background-color: var(--clr-river-blue);
    color: white;
    box-shadow: 0 4px 12px rgba(26, 82, 118, 0.3);
}

/* Menu Grid */
.menu-container {
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

.menu-item {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.menu-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.menu-item-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    background-color: var(--clr-sand-dark);
}

.menu-item-content {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.item-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.item-desc {
    font-size: 0.75rem;
    color: var(--clr-text-light);
    margin-bottom: 0.5rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-price {
    font-weight: 700;
    color: var(--clr-terracotta);
    font-size: 1.1rem;
}

.add-btn {
    background-color: var(--clr-marigold);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.3);
    transition: background-color 0.2s;
}

.add-btn:active {
    background-color: var(--clr-terracotta);
    transform: scale(0.95);
}

/* Quantity Controls */
.qty-controls {
    display: flex;
    align-items: center;
    background: var(--clr-sand-dark);
    border-radius: var(--radius-pill);
    padding: 2px;
}
.qty-btn {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: white;
    color: var(--clr-dark);
    font-weight: bold;
    box-shadow: var(--shadow-sm);
}
.qty-count {
    min-width: 24px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Cart Drawer */
.cart-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
    box-shadow: var(--shadow-up);
    z-index: 100;
    transform: translateY(calc(100% - 60px));
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.cart-drawer.open {
    transform: translateY(0);
}

.cart-drawer-header {
    height: 60px;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: var(--clr-dark);
    color: white;
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
}

.cart-summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.badge {
    background: var(--clr-marigold);
    color: white;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
}

.cart-total-amount {
    font-weight: 700;
    font-size: 1.1rem;
}

.cart-drawer-body {
    padding: 1.5rem;
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    max-height: calc(85vh - 60px);
}

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

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--clr-sand-dark);
}

.cart-item-info {
    flex-grow: 1;
}

.cart-item-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.cart-item-price {
    font-size: 0.9rem;
    color: var(--clr-text-light);
}

.empty-cart-msg {
    text-align: center;
    color: var(--clr-text-light);
    padding: 2rem 0;
    font-style: italic;
}

.cart-footer {
    border-top: 2px dashed var(--clr-sand-dark);
    padding-top: 1rem;
    background: white;
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--clr-dark);
}

.table-input-group {
    margin-bottom: 1rem;
}

.table-input-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--clr-text-light);
}

.table-input-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
}

.btn-primary {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--clr-river-blue), var(--clr-river-teal));
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: opacity 0.2s;
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Modals */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 1rem;
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 400px;
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    text-align: center;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--clr-sand-dark);
    width: 30px; height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--clr-text);
}

.modal-title {
    margin-bottom: 1.5rem;
}

.payment-summary {
    background: var(--clr-sand-dark);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.btn-upi {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem;
    background: white;
    border: 2px solid var(--clr-marigold);
    color: var(--clr-dark);
    font-weight: 600;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.ios-upi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 1rem;
}

.btn-ios-upi {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    background: white;
    border: 1px solid var(--clr-marigold);
    color: var(--clr-dark);
    font-weight: 600;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, background-color 0.2s;
}

.btn-ios-upi:active {
    transform: scale(0.95);
    background-color: var(--clr-sand-dark);
}

.upi-logo {
    height: 20px;
}

.qr-section {
    margin: 1.5rem 0;
}

.qr-text {
    font-size: 0.9rem;
    color: var(--clr-text-light);
    margin-bottom: 0.5rem;
}

.qr-container {
    display: flex;
    justify-content: center;
    padding: 1rem;
    background: white;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    margin: 0 auto;
    width: max-content;
}

.completion-steps {
    border-top: 1px solid var(--clr-sand-dark);
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

.step-text {
    font-size: 0.85rem;
    color: var(--clr-text-light);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.btn-whatsapp {
    width: 100%;
    padding: 1rem;
    background: #25D366; /* WhatsApp Brand Color */
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
}

.btn-whatsapp:disabled {
    background: var(--clr-sand-dark);
    color: var(--clr-text-light);
    box-shadow: none;
    cursor: not-allowed;
}

/* Desktop styles helper */
@media (min-width: 768px) {
    .menu-container {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        max-width: 1200px;
        margin: 0 auto;
    }
    .hide-desktop {
        display: none !important;
    }
    .cart-drawer {
        width: 400px;
        right: 2rem;
        left: auto;
        border-top-left-radius: var(--radius-lg);
        border-top-right-radius: var(--radius-lg);
        box-shadow: var(--shadow-lg);
    }
}
