/* ============================================================
   ZENU — BASE MENU STYLES
   Mobile-first: assume 90%+ of visitors are on a phone.
   ============================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fafafa;
    color: #1a1a1a;
    line-height: 1.5;
    padding-bottom: 40px;
}

/* --- Header --- */
.menu-header {
    position: relative;
    background-color: var(--brand-color, #111);
    background-size: cover;
    background-position: center;
    color: #fff;
    text-align: center;
    padding: 32px 16px;
}

.menu-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.menu-logo {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #fff;
    margin-bottom: 12px;
}

/* --- WiFi button (top-left of header) --- */
.wifi-dropdown {
    position: absolute;
    top: 14px;
    left: 14px;
}

.wifi-current {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.95);
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

.wifi-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    padding: 14px 16px;
    min-width: 200px;
    z-index: 20;
}

.wifi-menu.open {
    display: block;
}

.wifi-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #999;
    margin-top: 8px;
}

.wifi-label:first-child {
    margin-top: 0;
}

.wifi-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #222;
    margin-top: 2px;
}

.wifi-password-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.wifi-copy-btn {
    background: #f2f2f2;
    border: none;
    border-radius: 12px;
    padding: 4px 10px;
    font-size: 0.75rem;
    cursor: pointer;
    color: #333;
}

.wifi-copy-btn:hover {
    background: #e5e5e5;
}

/* --- Language switcher (flag dropdown) --- */
.lang-dropdown {
    position: absolute;
    top: 14px;
    right: 14px;
}

.lang-current {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,0.95);
    border: none;
    border-radius: 20px;
    padding: 6px 10px;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

.lang-current img {
    width: 22px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
    display: block;
}

.lang-current .chevron {
    font-size: 0.65rem;
    color: #555;
    margin-left: 2px;
}

.lang-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    overflow: hidden;
    min-width: 170px;
    z-index: 20;
}

.lang-menu.open {
    display: block;
}

.lang-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    text-decoration: none;
    color: #333;
    font-size: 0.9rem;
}

.lang-menu a img {
    width: 22px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
}

.lang-menu a:hover {
    background: #f5f5f5;
}

.lang-menu a.active {
    background: #f0f0f0;
    font-weight: 600;
}

/* --- Content --- */
.menu-content {
    max-width: 640px;
    margin: 0 auto;
    padding: 20px 16px;
}

.empty-state {
    text-align: center;
    color: #777;
    padding: 40px 0;
}

/* --- Category jump-to nav --- */
.prep-time-banner {
    text-align: center;
    background: #fff;
    padding: 10px 16px;
    font-size: 0.85rem;
    color: #444;
    border-bottom: 1px solid #eee;
}

.category-nav {
    position: sticky;
    top: 0;
    z-index: 15;
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 8px 16px;
    display: flex;
    justify-content: center;
}

.category-dropdown {
    position: relative;
}

.category-current {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f2f2f2;
    border: none;
    border-radius: 18px;
    padding: 7px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    cursor: pointer;
}

.category-current .chevron {
    font-size: 0.65rem;
    color: #888;
}

.category-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    overflow: hidden;
    min-width: 200px;
    max-height: 60vh;
    overflow-y: auto;
    z-index: 20;
}

.category-menu.open {
    display: block;
}

.category-menu a {
    display: block;
    padding: 11px 16px;
    text-decoration: none;
    color: #333;
    font-size: 0.9rem;
    border-bottom: 1px solid #f5f5f5;
}

.category-menu a:last-child {
    border-bottom: none;
}

.category-menu a:hover {
    background: #f5f5f5;
}

/* Offsets the jump so headings don't hide under the sticky nav bar */
.menu-category {
    scroll-margin-top: 60px;
}

.menu-category {
    margin-bottom: 32px;
}

.menu-category h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--brand-color, #111);
    border-bottom: 2px solid var(--brand-color, #111);
    padding-bottom: 6px;
    margin-bottom: 14px;
}

/* --- Items --- */
.menu-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.menu-item {
    display: flex;
    gap: 12px;
    background: #fff;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.menu-item.sold-out {
    opacity: 0.5;
}

.item-image {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    cursor: pointer;
}

.item-image-placeholder {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
}

.item-details {
    flex: 1;
    min-width: 0;
}

.item-title-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}

.item-title-row h3 {
    font-size: 1rem;
    font-weight: 600;
}

.badge.featured {
    color: #d4a017;
    margin-left: 4px;
}

.item-price {
    font-weight: 700;
    white-space: nowrap;
    color: var(--brand-color, #111);
}

.item-description {
    font-size: 0.875rem;
    color: #666;
    margin-top: 4px;
}

.allergen-tags {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.allergen-tag {
    font-size: 0.7rem;
    background: #eee;
    color: #555;
    padding: 2px 8px;
    border-radius: 12px;
}

.sold-out-label {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #c0392b;
    text-transform: uppercase;
}

/* --- Footer --- */
/* --- Add to cart button --- */
.add-to-cart-btn {
    margin-top: 8px;
    background: var(--brand-color, #111);
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.add-to-cart-btn:hover {
    opacity: 0.85;
}

/* --- Floating cart button --- */
.cart-fab {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    align-items: center;
    gap: 6px;
    background: var(--brand-color, #111);
    color: #fff;
    border: none;
    border-radius: 28px;
    padding: 12px 18px;
    font-size: 1.1rem;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    cursor: pointer;
    z-index: 30;
}

.cart-fab-count {
    background: rgba(255,255,255,0.25);
    border-radius: 10px;
    padding: 1px 8px;
    font-size: 0.85rem;
    font-weight: 700;
}

/* --- Cart drawer --- */
.cart-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 40;
}

.cart-overlay.open {
    display: block;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 380px;
    height: 100%;
    background: #fff;
    z-index: 50;
    transition: right 0.25s ease;
    padding: 20px;
    overflow-y: auto;
    box-sizing: border-box;
}

.cart-drawer.open {
    right: 0;
}

.cart-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.cart-close-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #666;
}

.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.cart-item-row {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.cart-item-name {
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.cart-item-detail {
    color: #888;
    font-weight: normal;
}

.modifier-group {
    margin-bottom: 16px;
}

.modifier-group-title {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.modifier-option-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    padding: 6px 0;
    cursor: pointer;
}

.modifier-option-row input {
    accent-color: var(--brand-color, #111);
}

.item-options-qty-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-item-qty button {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
}

.cart-item-subtotal {
    font-weight: 600;
    white-space: nowrap;
}

.cart-item-remove {
    background: none;
    border: none;
    color: #c0392b;
    cursor: pointer;
    font-size: 0.85rem;
}

.cart-empty-msg {
    color: #888;
    font-size: 0.9rem;
    text-align: center;
    padding: 20px 0;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 1.05rem;
    border-top: 1px solid #eee;
    padding-top: 12px;
    margin-bottom: 16px;
}

.whatsapp-optin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    background: #25D366;
    color: #fff;
    text-decoration: none;
    padding: 12px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.whatsapp-optin-btn:hover {
    opacity: 0.9;
}

.cart-checkout-btn {
    width: 100%;
    background: var(--brand-color, #111);
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
}

.cart-back-btn {
    width: 100%;
    background: none;
    border: none;
    color: #666;
    padding: 10px;
    font-size: 0.85rem;
    cursor: pointer;
    margin-top: 6px;
}

.cart-form-label {
    display: block;
    font-size: 0.8rem;
    color: #555;
    margin-top: 12px;
    margin-bottom: 4px;
}

.cart-form-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    box-sizing: border-box;
    font-family: inherit;
}

.payment-method-choice {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.payment-method-option {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.9rem;
    cursor: pointer;
}

.payment-method-option input {
    accent-color: var(--brand-color, #111);
}

.cart-error-msg {
    color: #c0392b;
    font-size: 0.8rem;
    margin-top: 10px;
}

.cart-confirm-icon {
    font-size: 2.5rem;
    text-align: center;
    margin-top: 30px;
}

.cart-confirm-title {
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: 10px;
}

.cart-confirm-detail {
    text-align: center;
    color: #666;
    margin: 8px 0 24px;
}

/* --- Review us CTA (under the business name in the header) --- */
.review-cta-header {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    background: rgba(255,255,255,0.95);
    color: var(--brand-color, #111);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 7px 16px;
    border-radius: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.review-cta-header:hover {
    background: #fff;
}

.business-info-line {
    text-align: center;
    padding: 10px 16px 0;
    font-size: 0.85rem;
    color: #666;
}

.business-info-line p {
    margin: 4px 0;
}

.business-info-line a {
    color: inherit;
    text-decoration: none;
}

.menu-footer {
    text-align: center;
    padding: 24px 16px 0;
    font-size: 0.8rem;
    color: #999;
}

.menu-footer a {
    color: var(--brand-color, #111);
    text-decoration: none;
    font-weight: 600;
}

/* --- Tablet/desktop: slightly wider items, unchanged layout --- */
@media (min-width: 640px) {
    .menu-header h1 {
        font-size: 1.9rem;
    }
    .item-image {
        width: 90px;
        height: 90px;
    }
    .item-image-placeholder {
        width: 90px;
        height: 90px;
    }
}

/* --- Image lightbox --- */
.image-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 60;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    cursor: pointer;
}

.image-lightbox.open {
    display: flex;
}

.image-lightbox img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}

.image-lightbox-close {
    position: fixed;
    top: 18px;
    right: 20px;
    color: #fff;
    font-size: 1.5rem;
    z-index: 61;
}
