* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    font-family: var(--font-secondary);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    padding-bottom: 100px;
}

/* ── HERO BANNER ── */
.banner {
    position: relative;
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 20px;
    color: white;
}

.banner-logo {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.6);
    margin-bottom: 8px;
}

.banner h1 {
    font-family: var(--font-primary);
    font-size: 1.6rem;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.banner p {
    font-size: 0.78rem;
    letter-spacing: 1.5px;
    opacity: 0.85;
    text-transform: uppercase;
    margin-top: 3px;
}

/* Back button */
.back-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-size: 1rem;
}

/* AR button */
.ar-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 8px 14px;
    border-radius: 20px;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    gap: 6px;
    color: white;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ── CATEGORY TABS ── */
.tabs-wrapper {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    border-bottom: 1px solid rgba(0,0,0,0.07);
    padding: 0 16px;
}

.tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 12px 0;
    scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
    flex-shrink: 0;
    padding: 7px 16px;
    border-radius: 20px;
    border: 1.5px solid rgba(0,0,0,0.1);
    background: transparent;
    color: var(--text);
    font-family: var(--font-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--secondary);
    font-weight: 600;
}

/* ── MENU CONTENT ── */
.menu-content {
    padding: 20px 16px 0;
}

.category-section {
    margin-bottom: 30px;
}

.category-title {
    font-family: var(--font-primary);
    font-size: 1.25rem;
    color: var(--secondary);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

/* ── DISH WRAPPER ── */
.dish-wrapper {
    margin-bottom: 12px;
}

/* ── DISH CARD ── */
.dish-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow);
    transition: transform 0.15s ease;
    position: relative;
}

.dish-card:active { transform: scale(0.98); }

.dish-img {
    width: 85px;
    height: 85px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f0f0f0;
}

.dish-img-placeholder {
    width: 85px;
    height: 85px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.dish-info {
    flex: 1;
    min-width: 0;
}

.dish-top {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 4px;
}

/* Veg / Non-veg dot */
.veg-dot {
    width: 14px;
    height: 14px;
    border-radius: 2px;
    border: 1.5px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 3px;
}

.veg-dot.veg { border-color: #2e7d32; }
.veg-dot.veg::after {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2e7d32;
}

.veg-dot.nonveg { border-color: #c62828; }
.veg-dot.nonveg::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 7px solid #c62828;
}

.dish-name {
    font-family: var(--font-primary);
    font-size: 1rem;
    color: var(--secondary);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dish-desc {
    font-size: 0.75rem;
    color: #888;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dish-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dish-price {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
}

.add-btn-wrapper {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 6px;
}

/* Add to plate button */
.add-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    color: var(--secondary);
    font-size: 1.45rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    flex-shrink: 0;
    font-weight: 300;
    line-height: 1;
}

.add-btn:active { transform: scale(0.9); }

/* Qty controls */
.qty-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid var(--primary);
    background: transparent;
    color: var(--primary);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 600;
}

.qty-num {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--secondary);
    min-width: 16px;
    text-align: center;
}

/* ── FLOATING PLATE BUTTON ── */
#plate-btn {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 28px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 200;
    white-space: nowrap;
}

#plate-btn.visible {
    transform: translateX(-50%) translateY(0);
}

#plate-btn .plate-count {
    background: var(--primary);
    color: var(--secondary);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

#plate-btn .plate-total {
    font-size: 0.9rem;
    opacity: 0.85;
}

/* ── PLATE DRAWER ── */
#plate-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -8px 40px rgba(0,0,0,0.15);
    z-index: 300;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.34, 1.1, 0.64, 1);
    max-height: 75vh;
    display: flex;
    flex-direction: column;
}

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

.drawer-handle {
    width: 40px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    margin: 14px auto 0;
}

.drawer-header {
    padding: 16px 20px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f0f0f0;
}

.drawer-header h2 {
    font-family: var(--font-primary);
    font-size: 1.2rem;
    color: var(--secondary);
}

.drawer-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f5f5f5;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.drawer-items {
    overflow-y: auto;
    flex: 1;
    padding: 12px 20px;
}

.drawer-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    gap: 10px;
}

.drawer-item-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--secondary);
    flex: 1;
}

.drawer-item-price {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
    min-width: 70px;
    text-align: right;
}

.drawer-footer {
    padding: 16px 20px;
    border-top: 1px solid #f0f0f0;
}

.drawer-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 14px;
    font-weight: 600;
    font-size: 1rem;
    color: var(--secondary);
}

.drawer-total span:last-child { color: var(--primary); }

.place-order-btn {
    width: 100%;
    padding: 15px;
    background: var(--primary);
    color: var(--secondary);
    border: none;
    border-radius: 14px;
    font-family: var(--font-secondary);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.5px;
}

/* Overlay */
#overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 250;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#overlay.show { opacity: 1; pointer-events: all; }

/* Empty plate state */
.empty-plate {
    text-align: center;
    padding: 30px 20px;
    color: #aaa;
    font-size: 0.9rem;
}

.empty-plate i { font-size: 2.5rem; margin-bottom: 10px; display: block; }

/* ── SIZE DROPDOWN ── */
.size-dropdown {
    display: none;
    background: var(--card-bg);
    border-radius: 0 0 16px 16px;
    padding: 0 14px 6px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    border-top: 1px solid rgba(0,0,0,0.06);
    margin-top: -4px;
}
.dish-card:has(+ .size-dropdown.open) {
    border-radius: var(--radius) var(--radius) 0 0;
    box-shadow: 0 2px 0 rgba(0,0,0,0.04);
}
.size-dropdown.open {
    display: block;
    animation: ddOpen 0.22s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
}
@keyframes ddOpen {
    from { opacity: 0; transform: translateY(-6px) scaleY(0.95); }
    to   { opacity: 1; transform: translateY(0) scaleY(1); }
}
.size-options {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 4px 0 8px;
}

/* Each size row: left = name + price, right = qty controls */
.size-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 2px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.size-row:last-child { border-bottom: none; }

.size-row-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}
.size-lbl {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--secondary);
    line-height: 1.2;
}
.size-price {
    font-size: 0.78rem;
    color: var(--primary);
    font-weight: 600;
}

/* Right side controls */
.size-row-ctrl {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.size-row-ctrl .qty-num {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--secondary);
    min-width: 18px;
    text-align: center;
}
.js-size-add {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: var(--secondary);
    font-size: 1.3rem;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.12s ease;
    line-height: 1;
}
.js-size-add:active { transform: scale(0.88); }

.js-size-minus {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid var(--primary);
    background: transparent;
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.12s ease;
    line-height: 1;
}
.js-size-minus:active { transform: scale(0.88); }

.size-total-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    background: var(--secondary);
    color: white;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
}
