/* ==========================================================================
   Kayan QR Menu Styling (Mobile-First Luxury Cafe Menu)
   ========================================================================== */

/* Design Tokens & Theme Variables */
:root {
    --bg-dark: #121214;
    --bg-card: #1c1c21;
    --border-dark: rgba(212, 175, 55, 0.15);
    
    --gold: #d4af37;
    --gold-glow: rgba(212, 175, 55, 0.2);
    
    --text-primary: #f4f4f7;
    --text-secondary: #a1a1aa;
    --text-muted: #52525b;

    --font-heading: 'Playfair Display', serif;
    --font-sans: 'Plus Jakarta Sans', sans-serif;
    
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Scrollbar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

::-webkit-scrollbar {
    width: 0px; /* Hide scrollbars for slick app look */
    height: 0px;
}

body.menu-body {
    background-color: #0c0c0e;
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Home Navigation Button */
.home-nav-btn {
    position: fixed;
    top: 2rem;
    left: 2rem;
    width: 45px;
    height: 45px;
    background: var(--bg-card);
    border: var(--border-dark);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--gold);
    font-size: 1.1rem;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 100;
    transition: var(--transition-smooth);
}

.home-nav-btn:hover {
    transform: scale(1.1);
    color: var(--bg-dark);
    background: var(--gold);
}

/* ==========================================================================
   Mobile Mockup Wrapper (Desktop view)
   ========================================================================== */
.mobile-device-frame {
    width: 375px;
    height: 812px;
    background-color: var(--bg-dark);
    border: 10px solid #27272a;
    border-radius: 40px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.mobile-screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-bottom: 75px; /* Leave space for bottom cart bar */
}

/* Cafe Header */
.cafe-header {
    padding: 2.5rem 1.5rem 1.5rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border-dark);
    background-color: var(--bg-card);
}

.cafe-logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 5px;
    color: var(--gold);
    margin-bottom: 0.25rem;
}

.cafe-tagline {
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1.25rem;
}

/* Table Selector */
.table-selector-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    border: var(--border-dark);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
}

.table-selector-wrap label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.table-selector-wrap select {
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
}

/* Category Navigation Scroll Bar */
.category-nav {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    overflow-x: auto;
    background-color: var(--bg-dark);
    flex-shrink: 0;
}

.cat-pill {
    background-color: var(--bg-card);
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition-smooth);
}

.cat-pill.active {
    color: var(--gold);
    border-color: var(--gold);
    background-color: rgba(212, 175, 55, 0.05);
    box-shadow: 0 0 10px var(--gold-glow);
}

/* Menu List Container */
.menu-list {
    flex-grow: 1;
    overflow-y: auto;
    padding: 0.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Menu Item Card */
.menu-item {
    display: grid;
    grid-template-columns: 1fr 75px;
    gap: 1rem;
    background-color: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.02);
    padding: 1.1rem;
    border-radius: 16px;
    align-items: center;
    transition: var(--transition-smooth);
}

.menu-item:hover {
    border-color: var(--border-dark);
}

.item-details h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.item-details p {
    font-size: 0.72rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.item-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gold);
}

.item-right {
    position: relative;
    width: 75px;
    height: 75px;
}

.item-image-mock {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    background: linear-gradient(135deg, #2a2a30 0%, #151518 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(255, 255, 255, 0.05);
    font-size: 1.5rem;
}

.add-item-btn {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background-color: var(--gold);
    color: var(--bg-dark);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: var(--transition-smooth);
}

.add-item-btn:hover {
    transform: scale(1.1);
}

/* ==========================================================================
   Sticky Bottom Tray Bar
   ========================================================================== */
.bottom-tray-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 75px;
    background-color: var(--gold);
    color: var(--bg-dark);
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    cursor: pointer;
}

.tray-info {
    display: flex;
    flex-direction: column;
}

.tray-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
    opacity: 0.7;
}

.tray-total {
    font-size: 1.3rem;
    font-family: var(--font-heading);
    font-weight: 800;
}

.view-tray-btn {
    background: none;
    border: none;
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--bg-dark);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
}

/* ==========================================================================
   Tray Slide-Up Drawer
   ========================================================================== */
.tray-drawer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 20;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.tray-drawer-overlay.active {
    display: block;
    opacity: 1;
}

.tray-drawer {
    position: absolute;
    bottom: -450px;
    left: 0;
    width: 100%;
    height: 450px;
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-dark);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.3);
    z-index: 21;
    display: flex;
    flex-direction: column;
    transition: bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tray-drawer.active {
    bottom: 0;
}

.drawer-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-header h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
}

.close-drawer {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.drawer-items-list {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

/* Empty tray message */
.empty-tray-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
    text-align: center;
}

.empty-tray-message i {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.empty-tray-message p {
    font-size: 0.85rem;
}

/* Cart item */
.tray-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    margin-bottom: 1.25rem;
    align-items: center;
}

.tray-item-details h4 {
    font-size: 0.9rem;
    font-weight: 600;
}

.tray-item-details span {
    font-size: 0.8rem;
    color: var(--gold);
    font-weight: 700;
}

.qty-controls {
    display: flex;
    align-items: center;
    border: 1px solid var(--text-muted);
    border-radius: 4px;
}

.qty-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-weight: 700;
}

.qty-val {
    font-size: 0.8rem;
    width: 22px;
    text-align: center;
}

.remove-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.25rem;
}

.remove-btn:hover {
    color: #ef4444;
}

/* Drawer footer */
.drawer-footer {
    padding: 1.5rem;
    background-color: var(--bg-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.total-row strong {
    font-size: 1.25rem;
    color: var(--gold);
    font-family: var(--font-heading);
}

.order-instructions {
    font-size: 0.65rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.send-order-btn {
    width: 100%;
    background-color: #25d366; /* WhatsApp Green */
    color: white;
    border: none;
    padding: 1rem 0;
    border-radius: 10px;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 0.5px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: opacity 0.3s;
}

.send-order-btn:hover {
    opacity: 0.9;
}

/* Toast */
.toast {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--gold);
    color: var(--bg-dark);
    padding: 0.6rem 1.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    z-index: 500;
    border-radius: 9999px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast i {
    font-size: 0.9rem;
}

.toast.active {
    bottom: 90px;
}

/* ==========================================================================
   Responsive setup (mobile overrides)
   ========================================================================== */
@media (max-width: 480px) {
    body.menu-body { background-color: var(--bg-dark); }
    
    .mobile-device-frame {
        width: 100%;
        height: 100vh;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }
    
    .mobile-screen {
        height: 100%;
        padding-bottom: 75px;
    }
}
