/* =========================================================
   MENU
========================================================= */

.ro-menu {
    max-width: 1180px;
    margin: 0 auto;
    padding: 34px 20px 60px;
}

.ro-menu h1 {
    text-align: center;
    margin: 0 0 44px;
    font-size: clamp(32px, 4vw, 46px);
    line-height: 1.1;
}

.ro-category {
    margin: 0 0 46px;
    scroll-margin-top: 90px;
}

.ro-category-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #eee;
}

.ro-category-heading h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 30px);
    line-height: 1.2;
}

.ro-category-count {
    color: #777;
    font-size: 14px;
    white-space: nowrap;
}

.ro-food-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.ro-food-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
    transition: transform .2s ease, box-shadow .2s ease;
}

.ro-food-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .11);
}

.ro-food-media {
    position: relative;
    aspect-ratio: 16 / 10;
    background: #f4f4f4;
    overflow: hidden;
}

.ro-food-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ro-food-image-placeholder {
    display: grid;
    place-items: center;
    color: #999;
    font-size: 44px;
}

.ro-food-diet {
    position: absolute;
    left: 12px;
    top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    font-size: 12px;
    font-weight: 800;
}

.ro-food-diet-mark {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 2px solid currentColor;
    position: relative;
}

.ro-food-diet-mark::after {
    content: '';
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor;
    left: 1px;
    top: 1px;
}

.ro-food-diet.is-veg { color: #18864b; }
.ro-food-diet.is-nonveg { color: #c0392b; }

.ro-food-content {
    padding: 18px;
}

.ro-food-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.ro-food-content h3 {
    margin: 0 0 8px;
    font-size: 20px;
    line-height: 1.25;
    font-weight: 800;
}

.ro-food-content p {
    color: #666;
    min-height: 42px;
    line-height: 1.5;
    font-size: 14px;
    margin: 0 0 16px;
}

.ro-food-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
}

.ro-food-bottom strong {
    font-size: 21px;
    font-weight: 800;
}

/* ---- Reviews & Ratings (customer-facing) ---- */
.ro-food-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 2px 0 8px;
    font-size: 14px;
    color: #475569;
}
.ro-food-rating-avg { font-weight: 800; color: #1e293b; }
.ro-food-rating-count { color: #64748b; font-size: 12px; }
.ro-food-reviews {
    margin-top: 12px;
    border-top: 1px solid #f1f5f9;
    padding-top: 8px;
    font-size: 13px;
}
.ro-food-reviews > summary {
    cursor: pointer;
    font-weight: 700;
    color: #1e293b;
    list-style: none;
    padding: 4px 0;
}
.ro-food-reviews > summary::-webkit-details-marker { display: none; }
.ro-food-reviews > summary::after { content: " ▾"; color: #94a3b8; }
.ro-food-reviews[open] > summary::after { content: " ▴"; }
.ro-food-reviews-list {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    display: grid;
    gap: 8px;
}
.ro-food-review {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ro-food-review-stars { color: #f59e0b; letter-spacing: 1px; font-size: 13px; }
.ro-food-review-text { color: #475569; overflow-wrap: anywhere; }
@media (max-width: 480px) {
    .ro-food-rating { font-size: 13px; }
    .ro-food-reviews { font-size: 12px; }
}

.ro-add-cart {
    min-width: 88px;
    min-height: 42px;
    background: #e63946;
    color: #fff;
    border: 0;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 800;
    transition: transform .15s ease, opacity .15s ease;
}

.ro-add-cart:hover { opacity: .9; }
.ro-add-cart:active { transform: scale(.97); }
.ro-add-cart:focus-visible { outline: 3px solid rgba(230,57,70,.28); outline-offset: 2px; }

/* ─── Inline food-card quantity control (− N +) ───
   Reuses the OwnServe accent (#e63946) and the Add button's footprint so the
   card layout never shifts when Add becomes − N +. Sits in the same
   .ro-food-bottom flex slot as the Add button. Touch-friendly targets, fixed
   min-width so 1–99 never overflows or wraps the card. */
.ro-food-cart-control { display: inline-flex; }
.ro-food-quantity {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 88px;
    min-height: 42px;
    padding: 0 6px;
    border: 1px solid #e63946;
    border-radius: 10px;
    background: #fff;
    box-sizing: border-box;
}
.ro-food-quantity .ro-quantity-button {
    width: 34px;
    height: 34px;
    min-width: 34px;
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    color: #e63946;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}
.ro-food-quantity .ro-quantity-button:hover { background: rgba(230,57,70,.08); }
.ro-food-quantity .ro-quantity-button:active { transform: scale(.94); }
.ro-food-quantity .ro-quantity-button:focus-visible { outline: 3px solid rgba(230,57,70,.28); outline-offset: 2px; }
.ro-food-quantity .ro-quantity-number {
    min-width: 20px;
    text-align: center;
    font-size: 15px;
    font-weight: 800;
    color: #1e293b;
    font-variant-numeric: tabular-nums;
}

/* ─── Sold Out ─── */
.ro-food-card.is-sold-out{opacity:.6;pointer-events:none}
.ro-food-card.is-sold-out .ro-food-media::after{content:'SOLD OUT';position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);background:rgba(0,0,0,.7);color:#fff;padding:6px 14px;border-radius:8px;font-size:12px;font-weight:800;letter-spacing:.5px}
.ro-food-card.is-sold-out .ro-food-media{position:relative}
.ro-sold-out-badge{display:inline-flex;align-items:center;padding:6px 12px;border-radius:8px;background:#fef2f2;color:#dc2626;font-size:12px;font-weight:800;border:1px solid #fecaca}
.ro-cart-item-unavailable{background:#fef2f2;border:1px solid #fecaca;border-radius:8px;padding:6px 10px;font-size:12px;color:#dc2626;font-weight:600;margin-top:6px}
.ro-cart-item-unavailable::before{content:'⚠ '}
.ro-cart-item.is-unavailable{opacity:.7;border-color:#fecaca}
.ro-cart-unavailable-banner{background:#fef2f2;border:1px solid #fecaca;border-radius:12px;padding:12px 16px;font-size:13px;color:#991b1b;font-weight:600;margin-bottom:14px}

@media (max-width: 900px) {
    .ro-food-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* =========================================================
   CART PAGE
========================================================= */

.ro-cart-page {
    max-width: 900px;
    margin: 50px auto;
    padding: 20px;
}

.ro-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.ro-cart-header h1 {
    margin: 0;
}

.ro-continue-shopping {
    text-decoration: none;
    color: inherit;
}

.ro-cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 20px;
    margin-bottom: 15px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
}

.ro-cart-item-info {
    flex: 1;
}

.ro-cart-item-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 5px;
}

.ro-cart-item-price {
    color: #666;
    font-size: 14px;
}

.ro-cart-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ro-quantity-button {
    width: 34px;
    height: 34px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.ro-quantity-number {
    min-width: 25px;
    text-align: center;
    font-weight: 700;
}

.ro-cart-item-total {
    min-width: 90px;
    text-align: right;
    font-weight: 700;
    font-size: 16px;
}

.ro-remove-item {
    border: none;
    background: transparent;
    color: #e63946;
    cursor: pointer;
    font-size: 13px;
    padding: 5px;
}

.ro-cart-empty {
    text-align: center;
    padding: 60px 20px;
    border: 1px solid #eee;
    border-radius: 12px;
    background: #fff;
}

.ro-cart-summary {
    margin-top: 30px;
    padding: 25px;
    background: #f8f8f8;
    border-radius: 12px;
}

.ro-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 15px;
}

.ro-summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 20px;
}

/* ─── Coupon Section (Phase R) ─── */
.ro-coupon-section{margin:15px 0;padding:14px;background:#f8fafc;border:1px dashed #cbd5e1;border-radius:12px}
.ro-coupon-label{display:block;font-size:13px;font-weight:700;color:#334155;margin-bottom:8px}
.ro-coupon-input-group{display:flex;gap:8px}
.ro-coupon-input-group input{flex:1;min-width:0;padding:10px 12px;border:1px solid #cbd5e1;border-radius:8px;font-size:14px;text-transform:uppercase}
.ro-coupon-input-group input:focus{outline:none;border-color:#e63946;box-shadow:0 0 0 3px rgba(230,57,70,.12)}
.ro-coupon-apply{padding:10px 18px;background:#1e293b;color:#fff;border:none;border-radius:8px;font-weight:700;font-size:14px;cursor:pointer;white-space:nowrap}
.ro-coupon-apply:hover{background:#0f172a}
.ro-coupon-apply:disabled{opacity:.6;cursor:not-allowed}
.ro-coupon-message{margin-top:8px;font-size:13px;font-weight:600}
.ro-coupon-message.is-error{color:#dc2626}
.ro-coupon-message.is-success{color:#16a34a}
.ro-coupon-applied{display:flex;justify-content:space-between;align-items:center;gap:10px}
/* The `hidden` attribute is the single source of truth for the applied-coupon
   UI (JS sets it only after the server confirms a successful apply/remove).
   Because `.ro-coupon-applied` and `.ro-summary-row` set `display:flex`, that
   author rule was overriding the UA `hidden` (=display:none), so the green
   applied box + Remove + discount row showed on load with NO coupon applied.
   These overrides make `hidden` win again — success UI only shows when JS
   removes the attribute after a confirmed server response. */
.ro-coupon-applied[hidden]{display:none}
.ro-coupon-discount-row[hidden]{display:none}
.ro-coupon-applied-info{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.ro-coupon-applied-code{font-weight:800;font-family:monospace;background:#dcfce7;color:#166534;padding:3px 8px;border-radius:6px;font-size:13px}
.ro-coupon-applied-desc{font-size:12px;color:#16a34a;font-weight:700}
.ro-coupon-remove{background:none;border:none;color:#dc2626;font-size:13px;font-weight:600;cursor:pointer;text-decoration:underline}
.ro-coupon-discount-row{color:#16a34a}
.ro-coupon-discount-row strong{color:#16a34a}
@media(max-width:412px){
    .ro-coupon-input-group{flex-direction:column}
    .ro-coupon-apply{width:100%}
}

.ro-checkout-button,
.ro-cart-button {
    display: inline-block;
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    background: #e63946;
    color: #fff;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
}

.ro-checkout-button:hover,
.ro-cart-button:hover {
    opacity: 0.9;
    color: #fff;
}


/* =========================================================
   MOBILE
========================================================= */

@media ( max-width: 600px ) {

    .ro-food-grid {
        grid-template-columns: 1fr;
    }

    .ro-cart-item {
        flex-wrap: wrap;
    }

    .ro-cart-item-total {
        text-align: left;
    }

    .ro-cart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .ro-menu {
        padding: 10px;
    }
}

/* =========================================================
   PHASE I — CUSTOMER MENU EXPERIENCE
========================================================= */

.ro-customer-menu {
    --ro-primary: #e63946;
    --ro-text: #171717;
    --ro-muted: #6b7280;
    --ro-border: #e8e8e8;
    max-width: 1180px;
    margin: 0 auto;
    padding: 20px 20px 100px;
}

.ro-menu-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 26px 0 28px;
    border-bottom: 1px solid var(--ro-border);
}

.ro-menu-brand { display:flex; align-items:center; gap:15px; min-width:0; }
.ro-menu-logo { width:64px; height:64px; border-radius:18px; background:#fff1f2; display:grid; place-items:center; overflow:hidden; flex:0 0 64px; font-size:31px; }
.ro-menu-logo img { width:100%; height:100%; object-fit:cover; }
.ro-menu-brand h1 { margin:0 0 4px; font-size:clamp(26px,4vw,38px); line-height:1.1; }
.ro-menu-brand p { margin:0; color:var(--ro-muted); font-size:15px; }
.ro-menu-hero-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
.ro-open-badge,.ro-call-link { display:inline-flex; align-items:center; gap:7px; border-radius:999px; padding:10px 14px; font-size:13px; font-weight:800; text-decoration:none; }
.ro-open-badge { background:#ecfdf3; color:#15803d; }
.ro-open-badge.is-closed { background:#fef2f2; color:#b91c1c; }
.ro-status-dot { width:8px; height:8px; border-radius:50%; background:currentColor; }
.ro-call-link { border:1px solid var(--ro-border); color:var(--ro-text); background:#fff; }

.ro-menu-toolbar { display:flex; gap:14px; align-items:center; justify-content:space-between; padding:22px 0 14px; }

/* Restaurant closed banner */
.ro-closed-banner{background:#fef2f2;border:1px solid #fecaca;border-radius:12px;padding:14px 18px;font-size:14px;color:#991b1b;display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:4px}
.ro-closed-banner strong{font-weight:800}
.ro-closed-banner span{color:#7f1d1d;font-size:13px}
.ro-menu-search-wrap { flex:1; max-width:520px; position:relative; }
.ro-menu-search-wrap > span { position:absolute; left:16px; top:50%; transform:translateY(-50%); font-size:24px; color:#777; }
.ro-menu-search { width:100%; box-sizing:border-box; border:1px solid var(--ro-border); border-radius:14px; padding:13px 16px 13px 46px; font-size:16px; background:#fff; outline:none; }
.ro-menu-search:focus { border-color:var(--ro-primary); box-shadow:0 0 0 3px rgba(230,57,70,.12); }
.ro-menu-filters { display:flex; gap:8px; }
.ro-filter-btn { border:1px solid var(--ro-border); background:#fff; color:var(--ro-text); padding:10px 16px; border-radius:999px; font-weight:800; cursor:pointer; }
.ro-filter-btn.is-active { background:var(--ro-text); color:#fff; border-color:var(--ro-text); }

.ro-category-nav { position:sticky; top:0; z-index:10; display:flex; gap:9px; overflow-x:auto; padding:10px 0 13px; background:rgba(255,255,255,.96); scrollbar-width:none; }
.ro-category-nav::-webkit-scrollbar { display:none; }
.ro-category-chip { flex:0 0 auto; display:inline-flex; align-items:center; gap:7px; padding:10px 14px; border:1px solid var(--ro-border); border-radius:999px; color:var(--ro-text); background:#fff; text-decoration:none; font-size:14px; font-weight:800; }
.ro-category-chip:hover { border-color:#ccc; color:var(--ro-primary); }
.ro-category-chip span { color:#888; font-size:12px; }

.ro-menu-list .ro-category { scroll-margin-top:75px; margin-bottom:42px; }
.ro-category-heading { margin-bottom:18px; }
.ro-category-heading > div { display:flex; align-items:baseline; justify-content:space-between; gap:15px; }
.ro-category-heading h2 { margin:0; font-size:26px; }
.ro-menu-no-results { color:var(--ro-muted); padding:16px 0; }
.ro-menu-empty { text-align:center; padding:80px 20px; border:1px solid var(--ro-border); border-radius:22px; background:#fff; }
.ro-menu-empty > div { font-size:46px; }
.ro-menu-empty h2 { margin:12px 0 6px; }
.ro-menu-empty p { margin:0; color:var(--ro-muted); }

.ro-add-cart.is-disabled { background:#d1d5db; cursor:not-allowed; }
.ro-menu-info-row { display:flex; justify-content:center; gap:12px; flex-wrap:wrap; margin:15px 0 30px; color:var(--ro-muted); font-size:13px; }
.ro-menu-info-row span { background:#f8fafc; border:1px solid var(--ro-border); border-radius:999px; padding:8px 12px; }
.ro-mobile-cart-bar { position:fixed; z-index:50; left:14px; right:14px; bottom:14px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:13px 16px; border-radius:16px; background:#171717; color:#fff; text-decoration:none; box-shadow:0 12px 35px rgba(0,0,0,.24); }
.ro-mobile-cart-bar small { display:block; color:#bdbdbd; margin-top:2px; }

@media (max-width: 700px) {
    .ro-customer-menu { padding:8px 12px 100px; }
    .ro-menu-hero { align-items:flex-start; flex-direction:column; padding:18px 0 20px; }
    .ro-menu-hero-actions { justify-content:flex-start; }
    .ro-menu-toolbar { flex-direction:column; align-items:stretch; }
    .ro-menu-search-wrap { max-width:none; }
    .ro-menu-filters { overflow-x:auto; padding-bottom:2px; }
    .ro-filter-btn { flex:0 0 auto; }
    .ro-category-nav { margin:0 -12px; padding-left:12px; padding-right:12px; }
    .ro-food-grid { grid-template-columns:1fr; gap:14px; }
    .ro-food-media { aspect-ratio:16/9; }
    .ro-food-content { padding:15px; }
    .ro-food-content h3 { font-size:18px; }
    .ro-food-bottom strong { font-size:19px; }
    .ro-add-cart { min-height:44px; min-width:82px; }
    .ro-food-quantity { min-height:44px; min-width:88px; }
}

/* =========================================================
   PHASE J — SERVER-SIDE CART
========================================================= */

.ro-cart-item-image {
    width: 82px;
    height: 82px;
    flex: 0 0 82px;
    object-fit: cover;
    border-radius: 12px;
    background: #f4f4f4;
}

.ro-cart-item-image-placeholder {
    display: grid;
    place-items: center;
    font-size: 28px;
}

.ro-cart-item {
    position: relative;
}

.ro-checkout-button:disabled {
    opacity: .55;
    cursor: not-allowed;
}

@media (max-width: 600px) {
    .ro-cart-page {
        margin: 20px auto;
        padding: 12px;
    }

    .ro-cart-item {
        display: grid;
        grid-template-columns: 64px 1fr;
        gap: 12px;
        align-items: center;
        padding: 14px;
    }

    .ro-cart-item-image {
        width: 64px;
        height: 64px;
        grid-row: span 2;
    }

    .ro-cart-item-info {
        min-width: 0;
    }

    .ro-cart-quantity {
        justify-content: flex-start;
    }

    .ro-cart-item-total {
        min-width: 0;
        text-align: left;
        grid-column: 2;
    }

    .ro-remove-item {
        grid-column: 2;
        justify-self: start;
    }
}

/* =========================================================
   PHONE OTP VERIFICATION
========================================================= */
.ro-otp-modal[hidden] { display: none !important; }
.ro-otp-modal { position: fixed; inset: 0; z-index: 99999; display: grid; place-items: center; padding: 18px; }
.ro-otp-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .58); backdrop-filter: blur(3px); }
.ro-otp-dialog { position: relative; width: min(100%, 430px); background: #fff; border-radius: 20px; padding: 28px; box-shadow: 0 24px 70px rgba(15, 23, 42, .25); }
.ro-otp-close { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #f1f5f9; color: #475569; font-size: 25px; cursor: pointer; }
.ro-otp-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; background: #fff1f2; font-size: 26px; margin-bottom: 14px; }
.ro-otp-dialog h2 { margin: 0 0 7px; font-size: 25px; }
.ro-otp-help { margin: 0 0 20px; color: #64748b; line-height: 1.5; }
.ro-otp-dialog label { display: block; margin-bottom: 7px; font-weight: 700; color: #334155; }
.ro-otp-input { width: 100%; box-sizing: border-box; min-height: 48px; border: 1px solid #cbd5e1; border-radius: 11px; padding: 12px 14px; font-size: 16px; outline: none; }
.ro-otp-input:focus { border-color: #e63946; box-shadow: 0 0 0 3px rgba(230,57,70,.12); }
.ro-otp-code { text-align: center; letter-spacing: .32em; font-weight: 800; }
.ro-otp-primary, .ro-otp-secondary { width: 100%; min-height: 48px; margin-top: 12px; border-radius: 11px; font-weight: 800; cursor: pointer; }
.ro-otp-primary { border: 0; background: #e63946; color: #fff; }
.ro-otp-primary:disabled { opacity: .55; cursor: not-allowed; }
.ro-otp-secondary { border: 1px solid #cbd5e1; background: #fff; color: #334155; }
.ro-otp-secondary:disabled { opacity: .5; cursor: not-allowed; }
.ro-otp-message { min-height: 22px; margin-top: 13px; font-size: 14px; color: #475569; line-height: 1.4; }
.ro-otp-message.is-error { color: #b42318; }
.ro-otp-message.is-success { color: #15803d; }
@media (max-width: 480px) {
    .ro-otp-dialog { padding: 23px 18px; border-radius: 18px; }
}

/* =========================================================
   CHECKOUT — Phase M
========================================================= */
.ro-checkout-page{max-width:1180px;margin:32px auto;padding:0 18px 70px;color:#172033}
.ro-checkout-header{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:22px}
.ro-checkout-eyebrow{display:block;text-transform:uppercase;letter-spacing:.12em;font-size:11px;font-weight:800;color:#e63946;margin-bottom:6px}
.ro-checkout-header h1{margin:0;font-size:34px;line-height:1.1}
.ro-checkout-header p{margin:8px 0 0;color:#64748b}
.ro-checkout-call{border:1px solid #e2e8f0;border-radius:12px;padding:11px 15px;text-decoration:none;font-weight:800;color:#172033;background:#fff}
.ro-checkout-layout{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(300px,.85fr);gap:22px;align-items:start}
.ro-checkout-main{display:grid;gap:16px}
.ro-checkout-side{position:sticky;top:20px}
.ro-checkout-card{background:#fff;border:1px solid #e7ebf0;border-radius:18px;padding:22px;box-shadow:0 5px 20px rgba(15,23,42,.04)}
.ro-checkout-section-head{display:flex;gap:12px;align-items:flex-start;margin-bottom:18px}
.ro-checkout-section-head h2,.ro-order-summary-card h2{margin:0;font-size:20px}
.ro-checkout-section-head p{margin:4px 0 0;color:#64748b;font-size:13px}
.ro-step{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#fff0f1;color:#e63946;font-weight:900;flex:none}
.ro-order-type-grid,.ro-payment-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.ro-order-type-card,.ro-payment-card{position:relative;border:1px solid #dbe2ea;border-radius:15px;padding:17px;cursor:pointer;display:grid;gap:6px;transition:.15s;background:#fff}
.ro-order-type-card:hover,.ro-payment-card:hover{border-color:#f08a93}
.ro-order-type-card.is-selected,.ro-payment-card:has(input:checked){border-color:#e63946;box-shadow:0 0 0 3px rgba(230,57,70,.09)}
.ro-order-type-card input,.ro-payment-card input,.ro-checkout-table-card input{position:absolute;opacity:0;pointer-events:none}
.ro-order-type-icon,.ro-payment-card>span{font-size:25px}
.ro-order-type-card strong,.ro-payment-card strong{font-size:15px}
.ro-order-type-card small,.ro-payment-card small{color:#64748b;line-height:1.4}
.ro-checkout-fields{display:grid;gap:14px}
.ro-checkout-fields.two-col{grid-template-columns:repeat(2,minmax(0,1fr))}
.ro-checkout-fields label{display:grid;gap:7px;font-weight:700;font-size:13px;color:#334155}
.ro-checkout-fields label b{color:#e63946}
.ro-checkout-fields input,.ro-checkout-fields textarea{width:100%;box-sizing:border-box;border:1px solid #cbd5e1;border-radius:11px;padding:12px 13px;font:inherit;font-weight:400;outline:none;background:#fff}
.ro-checkout-fields input:focus,.ro-checkout-fields textarea:focus{border-color:#e63946;box-shadow:0 0 0 3px rgba(230,57,70,.1)}
.ro-checkout-fields input[readonly]{background:#f8fafc;color:#64748b}
.ro-table-select-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.ro-checkout-table-card{position:relative;border:1px solid #dbe2ea;border-radius:14px;padding:15px;text-align:center;cursor:pointer;display:grid;gap:4px}
.ro-checkout-table-card:has(input:checked){border-color:#e63946;background:#fff7f7;box-shadow:0 0 0 3px rgba(230,57,70,.08)}
.ro-table-number-label{font-weight:900;font-size:17px}.ro-checkout-table-card small{color:#64748b}
.ro-checkout-table-card.is-own-session{border-color:#16a34a;background:#f0fdf4}
.ro-table-own-badge{display:inline-block;font-size:10px;font-weight:700;text-transform:uppercase;color:#16a34a;background:#dcfce7;padding:2px 7px;border-radius:6px;margin-top:2px}
.ro-checkout-inline-error{padding:13px;border-radius:11px;background:#fff7ed;color:#9a3412}
.ro-checkout-items{display:grid;gap:12px;margin:16px 0}
.ro-checkout-item{display:grid;grid-template-columns:48px 1fr auto;gap:10px;align-items:center}.ro-checkout-item img,.ro-checkout-item-placeholder{width:48px;height:48px;border-radius:10px;object-fit:cover;background:#f1f5f9;display:grid;place-items:center}.ro-checkout-item div{min-width:0}.ro-checkout-item strong{display:block;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ro-checkout-item small{display:block;color:#64748b;margin-top:3px}.ro-checkout-item>b{font-size:13px}
.ro-checkout-total-box{border-top:1px solid #e2e8f0;padding-top:13px;display:grid;gap:9px}.ro-checkout-total-box div{display:flex;justify-content:space-between;gap:12px;color:#64748b}.ro-checkout-total-box .is-total{margin-top:5px;padding-top:12px;border-top:1px solid #e2e8f0;color:#172033;font-size:18px}.ro-checkout-total-box .is-total strong{font-size:20px}
.ro-back-cart{display:block;text-align:center;margin-top:16px;color:#475569;text-decoration:none;font-weight:700}
.ro-checkout-alert{display:flex;gap:8px;align-items:center;flex-wrap:wrap;border-radius:13px;padding:13px 15px;margin-bottom:16px}.ro-checkout-alert.is-warning{background:#fff7ed;color:#9a3412}.ro-checkout-alert.is-error{background:#fff1f2;color:#b42318}.ro-checkout-alert a{font-weight:800;color:inherit}
.ro-checkout-empty{text-align:center;background:#fff;border:1px solid #e7ebf0;border-radius:18px;padding:55px 20px}.ro-checkout-empty-icon{font-size:42px}.ro-checkout-empty h2{margin:12px 0 5px}.ro-checkout-empty p{color:#64748b}.ro-checkout-primary-link{display:inline-block;margin-top:10px;padding:12px 18px;border-radius:11px;background:#e63946;color:#fff;text-decoration:none;font-weight:800}
.ro-checkout-place-button{width:100%;border:0;border-radius:13px;min-height:52px;background:#e63946;color:#fff;font-size:16px;font-weight:900;cursor:pointer}.ro-checkout-place-button:disabled{opacity:.6;cursor:not-allowed}.ro-checkout-place-button.is-success{background:#15803d}
.ro-checkout-message{min-height:20px;border-radius:11px;font-size:14px;line-height:1.45}.ro-checkout-message.is-error{padding:12px;background:#fff1f2;color:#b42318}.ro-checkout-message.is-success{padding:12px;background:#ecfdf3;color:#166534}
@media(max-width:800px){.ro-checkout-layout{grid-template-columns:1fr}.ro-checkout-side{position:static}.ro-table-select-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:560px){.ro-checkout-page{margin:18px auto;padding:0 12px 50px}.ro-checkout-header{align-items:flex-start;flex-direction:column}.ro-checkout-header h1{font-size:28px}.ro-order-type-grid,.ro-payment-grid,.ro-checkout-fields.two-col{grid-template-columns:1fr}.ro-checkout-card{padding:17px;border-radius:15px}.ro-table-select-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* Phase N — order confirmation */
.ro-confirmation-page{max-width:760px;margin:40px auto;padding:20px}.ro-confirmation-hero{text-align:center;padding:24px 12px}.ro-confirmation-check{width:64px;height:64px;border-radius:50%;margin:0 auto 14px;display:grid;place-items:center;font-size:34px;font-weight:800;background:#e8f7ee;color:#168447}.ro-confirmation-hero span{font-weight:700;color:#168447}.ro-confirmation-hero h1{margin:8px 0 6px;font-size:34px}.ro-confirmation-hero p{margin:0;color:#68707a}.ro-confirmation-card{background:#fff;border:1px solid #e6e9ed;border-radius:18px;padding:22px;box-shadow:0 8px 28px rgba(0,0,0,.06)}.ro-confirmation-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.ro-confirmation-grid>div{background:#f7f8fa;border-radius:12px;padding:13px}.ro-confirmation-grid span{display:block;font-size:12px;color:#737b85;margin-bottom:5px}.ro-confirmation-grid strong{display:block;font-size:15px}.ro-confirmation-status{color:#168447}.ro-confirmation-items{margin-top:20px;border-top:1px solid #eceef1}.ro-confirmation-items>div{display:flex;justify-content:space-between;gap:12px;padding:13px 0;border-bottom:1px solid #eceef1}.ro-confirmation-total{display:flex;justify-content:space-between;font-size:19px;font-weight:800;padding:18px 0}.ro-confirmation-actions{display:flex;gap:10px;flex-wrap:wrap}.ro-confirmation-actions a{display:inline-flex;justify-content:center;align-items:center;padding:12px 16px;border-radius:10px;background:#111;color:#fff;text-decoration:none}.ro-confirmation-empty{max-width:600px;margin:60px auto;padding:30px;text-align:center}.ro-confirmation-empty h2{margin-bottom:8px}@media(max-width:600px){.ro-confirmation-page{margin:20px auto;padding:12px}.ro-confirmation-grid{grid-template-columns:1fr}.ro-confirmation-hero h1{font-size:28px}.ro-confirmation-card{padding:16px}}


/* Cart template fallback */
.ro-cart-template-main { width: 100%; box-sizing: border-box; }
.ro-cart-template-main .ro-cart-page { min-height: 320px; }



/* =========================================================
   MY ORDERS — Customer Page
========================================================= */
.ro-my-orders-page{max-width:800px;margin:0 auto;padding:24px 16px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,sans-serif}
.ro-my-orders-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}
.ro-my-orders-header h1{font-size:26px;font-weight:850;margin:0}
.ro-my-orders-action{font-size:14px;font-weight:600;color:#e63946;text-decoration:none;padding:8px 16px;border:1px solid #e63946;border-radius:10px;transition:.15s}
.ro-my-orders-action:hover{background:#e63946;color:#fff}
.ro-my-orders-link{font-size:13px;font-weight:600;color:#1d2b3a;text-decoration:none;padding:6px 12px;border:1px solid #dbe2ea;border-radius:8px;transition:.15s}
.ro-my-orders-link:hover{border-color:#e63946;color:#e63946}
.ro-my-orders-unverified,.ro-my-orders-empty{text-align:center;padding:60px 20px;background:#f9fafb;border-radius:16px;border:1px solid #e5e7eb}
.ro-my-orders-empty-icon{font-size:48px;margin-bottom:12px}
.ro-my-orders-unverified h2,.ro-my-orders-empty h2{font-size:20px;margin:0 0 8px}
.ro-my-orders-unverified p,.ro-my-orders-empty p{color:#64748b;margin:0 0 20px}
.ro-my-orders-btn{display:inline-block;padding:12px 24px;background:#e63946;color:#fff;border-radius:10px;text-decoration:none;font-weight:600;font-size:14px;transition:.15s}
.ro-my-orders-btn:hover{background:#c5303c}
.ro-my-orders-list{display:grid;gap:12px}
.ro-my-order-card{border:1px solid #e5e7eb;border-radius:14px;overflow:hidden;background:#fff;transition:box-shadow .15s}
.ro-my-order-card[open]{box-shadow:0 4px 16px rgba(0,0,0,.06)}
.ro-my-order-card.ro-order-highlighted{box-shadow:0 0 0 2px #3b82f6,0 4px 16px rgba(59,130,246,.15);animation:ro-highlight-fade 3s forwards}
@keyframes ro-highlight-fade{0%{box-shadow:0 0 0 2px #3b82f6,0 4px 16px rgba(59,130,246,.15)}100%{box-shadow:0 4px 16px rgba(0,0,0,.06)}}
.ro-my-order-summary{list-style:none;padding:16px;cursor:pointer;display:grid;gap:6px}
.ro-my-order-summary::-webkit-details-marker{display:none}
.ro-my-order-summary::marker{content:''}
.ro-my-order-top{display:flex;justify-content:space-between;align-items:center}
.ro-my-order-number{font-weight:800;font-size:13px;font-family:monospace;color:#1d2b3a}
.ro-my-order-status{font-size:11px;font-weight:700;padding:3px 9px;border-radius:99px;text-transform:uppercase;letter-spacing:.3px}
.ro-status-confirmed{background:#e0f0ff;color:#1a5fa8}
.ro-status-preparing{background:#fef3cd;color:#856404}
.ro-status-ready{background:#d4edda;color:#155724}
.ro-status-out_for_delivery{background:#e2d9f3;color:#563d7c}
.ro-status-delivered{background:#d1ecf1;color:#0c5460}
.ro-status-cancelled{background:#f8d7da;color:#721c24}
.ro-my-order-meta{display:flex;justify-content:space-between;align-items:center;font-size:14px}
.ro-my-order-type{color:#64748b}
.ro-my-order-total{font-weight:850;font-size:16px;color:#1d2b3a}
.ro-my-order-date{font-size:12px;color:#94a3b8}
.ro-my-order-details{padding:0 16px 16px;border-top:1px solid #f1f5f9}
.ro-my-order-items{display:grid;gap:6px;padding:12px 0}
.ro-my-order-item{display:flex;justify-content:space-between;font-size:13px;color:#334155}
.ro-my-order-item strong{font-weight:700}
.ro-my-order-footer{border-top:1px solid #f1f5f9;padding-top:12px;display:grid;gap:4px;font-size:13px}
.ro-my-order-footer>div{display:flex;justify-content:space-between}
.ro-my-order-discount{color:#16a34a}
.ro-my-order-discount strong{color:#16a34a}
.ro-my-order-total-row{font-weight:800;font-size:14px;padding-top:6px;border-top:1px solid #e5e7eb}
/* GST breakdown rows (customer order details). Match footer row layout. */
.ro-my-order-tax{color:#475569}
.ro-my-order-tax.ro-tax-row-taxable{padding-top:6px;border-top:1px dashed #e5e7eb}
.ro-my-order-tax strong{font-weight:600;color:#334155}
.ro-my-order-tax-note{margin-top:6px;font-size:11px;color:#64748b;line-height:1.4}
@media (max-width:480px){
  .ro-my-order-footer{font-size:12px}
  .ro-my-order-tax{gap:8px}
  .ro-my-order-tax span{min-width:0;overflow-wrap:anywhere}
  .ro-my-order-tax-note{font-size:10.5px}
}
.ro-my-order-payment{margin-top:8px;display:grid;gap:3px;color:#64748b;font-size:12px}
.ro-my-order-payment-status{display:inline-block;font-size:11px;font-weight:700;padding:2px 8px;border-radius:99px;margin-top:2px}
.ro-pay-status-pending    { background:#fff7ed;color:#c2410c; }
.ro-pay-status-authorized { background:#eff6ff;color:#1d4ed8; }
.ro-pay-status-paid       { background:#f0fdf4;color:#166534; }
.ro-pay-status-failed     { background:#fef2f2;color:#991b1b; }
.ro-pay-status-refunded   { background:#f5f3ff;color:#6d28d9; }
.ro-my-order-invoice{margin-top:12px}
.ro-my-order-invoice-btn{display:inline-block;padding:9px 16px;background:#1e293b;color:#fff;text-decoration:none;border-radius:8px;font-size:13px;font-weight:700}
.ro-my-order-invoice-btn:hover{background:#0f172a}
@media(max-width:600px){.ro-my-orders-header{flex-direction:column;align-items:flex-start;gap:12px}.ro-my-orders-header h1{font-size:22px}}



/* =========================================================
   NOTIFICATIONS — Customer Bell + Panel
========================================================= */
.ro-notifications-bell{position:relative;background:none;border:1px solid #dbe2ea;border-radius:8px;padding:6px 10px;cursor:pointer;font-size:16px;line-height:1;transition:.15s}
.ro-notifications-bell:hover{border-color:#e63946;background:#fff7f7}
.ro-notif-badge{position:absolute;top:-5px;right:-5px;background:#e63946;color:#fff;font-size:10px;font-weight:800;min-width:18px;height:18px;line-height:18px;text-align:center;border-radius:99px;padding:0 4px}
.ro-notifications-panel{position:absolute;top:100%;right:0;z-index:1000;width:340px;max-height:420px;background:#fff;border:1px solid #e5e7eb;border-radius:14px;box-shadow:0 12px 40px rgba(0,0,0,.12);overflow:hidden;margin-top:8px}
.ro-menu-hero-actions{position:relative}
.ro-notif-header{display:flex;justify-content:space-between;align-items:center;padding:14px 16px;border-bottom:1px solid #f1f5f9}
.ro-notif-header h3{margin:0;font-size:15px;font-weight:800}
.ro-notif-mark-all{background:none;border:none;color:#e63946;font-size:12px;font-weight:600;cursor:pointer;padding:4px 8px;border-radius:6px}
.ro-notif-mark-all:hover{background:#fff7f7}
.ro-notif-list{overflow-y:auto;max-height:350px;padding:8px 0}
.ro-notif-item{display:grid;gap:3px;padding:10px 16px;border-bottom:1px solid #f9fafb;cursor:pointer;transition:background .1s}
.ro-notif-item:hover{background:#f9fafb}
.ro-notif-item.is-unread{background:#f0f7ff;border-left:3px solid #3b82f6}
.ro-notif-item-title{font-size:13px;font-weight:700;color:#1d2b3a}
.ro-notif-item-message{font-size:12px;color:#64748b}
.ro-notif-item-time{font-size:11px;color:#94a3b8}
.ro-notif-empty{text-align:center;padding:30px 16px;color:#94a3b8;font-size:13px}
.ro-notif-item-link{font-size:11px;color:#e63946;font-weight:600;margin-top:2px}
.ro-notif-item[data-order-id]:hover .ro-notif-item-link{text-decoration:underline}
@media(max-width:600px){
    .ro-notifications-panel{width:calc(100vw - 32px);right:-16px}
}
@media(max-width:412px){
    .ro-notifications-bell{padding:5px 8px;font-size:15px}
    .ro-notif-badge{top:-4px;right:-4px;min-width:16px;height:16px;line-height:16px;font-size:9px}
    .ro-notifications-panel{width:calc(100vw - 24px);right:-8px;border-radius:12px}
    .ro-notif-header{padding:12px 14px}
    .ro-notif-item{padding:9px 14px}
}
@media(max-width:375px){
    .ro-menu-hero-actions{gap:6px}
    .ro-notifications-bell{padding:4px 7px;font-size:14px}
    .ro-my-orders-link{font-size:12px;padding:8px 10px}
    .ro-notifications-panel{width:calc(100vw - 20px);right:-6px}
}


/* =========================================================
   PHASE U — Location, Saved Addresses, Reviews
========================================================= */

/* Location button */
.ro-use-location-btn{display:inline-flex;align-items:center;gap:6px;padding:11px 16px;background:#eef2ff;color:#4338ca;border:1px solid #c7d2fe;border-radius:10px;font-size:14px;font-weight:700;cursor:pointer;margin-bottom:10px;width:100%;justify-content:center}
.ro-use-location-btn:hover{background:#e0e7ff}
.ro-use-location-btn:disabled{opacity:.6;cursor:progress}
.ro-location-status{font-size:13px;padding:8px 12px;border-radius:8px;margin-bottom:10px}
.ro-location-status.is-ok{background:#f0fdf4;color:#16a34a;border:1px solid #bbf7d0}
.ro-location-status.is-error{background:#fef2f2;color:#dc2626;border:1px solid #fecaca}

/* Save this address toggle */
/* Save-this-address toggle.
   This label lives inside `.ro-checkout-fields`, whose generic rules
   (`.ro-checkout-fields label{display:grid}` and
   `.ro-checkout-fields input{width:100%;border;padding}`) were higher in
   specificity than a bare `.ro-save-address-toggle` rule — so the toggle was
   forced into a vertical grid and its checkbox rendered as a full-width
   bordered box (the empty pink bar). We scope the fix under
   `.ro-checkout-fields` to match that specificity: keep the checkbox + text on
   ONE row, and let the optional Label input wrap onto its own row below. */
.ro-checkout-fields label.ro-save-address-toggle{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:13px;font-weight:700;color:#334155;margin-top:8px}
.ro-checkout-fields label.ro-save-address-toggle input[type="checkbox"]{width:18px;height:18px;min-width:18px;flex:0 0 auto;margin:0;padding:0;border:0;border-radius:0;box-shadow:none;background:none;accent-color:#e63946;cursor:pointer}
.ro-checkout-fields label.ro-save-address-toggle > span{font-weight:400}
.ro-checkout-fields label.ro-save-address-toggle input[type="text"]{flex:1 1 100%;min-width:0;width:100%;box-sizing:border-box;padding:8px 10px;border:1px solid #cbd5e1;border-radius:8px;font-size:13px}

/* Saved addresses list */
.ro-saved-addresses{margin-bottom:12px}
.ro-saved-addresses-list{display:grid;gap:8px}
.ro-saved-address{display:flex;align-items:flex-start;gap:10px;padding:12px 14px;border:1px solid #e5e7eb;border-radius:10px;cursor:pointer;background:#fff}
.ro-saved-address:has(input:checked){border-color:#e63946;background:#fff7f7}
.ro-saved-address input{margin-top:3px}
.ro-saved-address-body{display:flex;flex-direction:column;gap:2px}
.ro-saved-address-body strong{font-size:13px;color:#1d2b3a}
.ro-saved-address-body span{font-size:13px;color:#64748b}
.ro-use-new-address{margin-top:10px;background:none;border:none;color:#e63946;font-size:13px;font-weight:700;cursor:pointer;padding:6px 0}

/* My Orders rate button */
.ro-my-order-rate-btn{display:inline-block;padding:9px 16px;background:#f59e0b;color:#fff;border:none;border-radius:8px;font-size:13px;font-weight:700;cursor:pointer;margin-left:8px}
.ro-my-order-rate-btn:hover{background:#d97706}
.ro-my-order-rate-btn:disabled{background:#16a34a;cursor:default}

/* Review modal */
.ro-review-modal{position:fixed;inset:0;z-index:100000;display:flex;align-items:center;justify-content:center;padding:16px}
/* The modal's open/closed state is driven by the [hidden] attribute in JS
   (modal.hidden = true/false). The unconditional display:flex above would
   otherwise override the browser's [hidden]{display:none}, keeping the modal
   visible even after close() ran. This rule restores [hidden] as authoritative
   without permanently hiding the modal. */
.ro-review-modal[hidden]{display:none}
.ro-review-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.55)}
.ro-review-dialog{position:relative;background:#fff;border-radius:16px;padding:26px;max-width:460px;width:100%;max-height:88vh;overflow-y:auto;box-shadow:0 20px 60px rgba(0,0,0,.3)}
.ro-review-close{position:absolute;top:12px;right:14px;background:none;border:none;font-size:26px;line-height:1;color:#94a3b8;cursor:pointer}
.ro-review-dialog h2{margin:0 0 4px;font-size:20px}
.ro-review-dialog h3{margin:18px 0 8px;font-size:14px;color:#334155}
.ro-review-order-ref{font-size:13px;color:#64748b;margin-bottom:8px}
.ro-review-item{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px solid #f1f5f9;flex-wrap:wrap}
.ro-review-item-name{font-size:14px;font-weight:600;color:#1d2b3a}
.ro-review-done{font-size:13px;color:#16a34a;font-weight:700}
.ro-stars{display:inline-flex;gap:4px}
.ro-star{background:none;border:none;font-size:26px;line-height:1;color:#d1d5db;cursor:pointer;padding:2px;min-width:34px;min-height:34px}
.ro-star.is-on{color:#f59e0b}
.ro-review-dialog textarea{width:100%;box-sizing:border-box;margin-top:10px;padding:10px;border:1px solid #cbd5e1;border-radius:8px;font-size:14px;resize:vertical;min-height:70px}
.ro-review-submit{width:100%;margin-top:16px;padding:13px;background:#e63946;color:#fff;border:none;border-radius:10px;font-size:15px;font-weight:800;cursor:pointer}
.ro-review-submit:hover{background:#c92a37}
.ro-review-submit:disabled{opacity:.6;cursor:progress}
.ro-review-message{margin-top:10px;font-size:13px;font-weight:600;text-align:center}
.ro-review-message.is-ok{color:#16a34a}
.ro-review-message.is-error{color:#dc2626}
.ro-review-error{color:#dc2626;font-size:14px}

/* Mobile */
@media(max-width:412px){
    .ro-review-dialog{padding:20px 16px}
    .ro-star{font-size:28px;min-width:38px;min-height:38px}
    .ro-my-order-rate-btn{margin-left:0;margin-top:8px}
}



/* =========================================================
   MOBILE FOOD MENU — 2-COLUMN GRID (<= 480px)
   Placed last so it overrides the earlier 600px/700px
   single-column rules for .ro-food-grid. Desktop/tablet
   layouts are unchanged.
========================================================= */
@media (max-width: 480px) {
    /* Exactly two food cards per row, each fitting the viewport. */
    .ro-food-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    /* Compact but readable cards at 375–412px. */
    .ro-food-media {
        aspect-ratio: 1 / 1;
    }
    .ro-food-content {
        padding: 10px;
    }
    .ro-food-content h3 {
        font-size: 14px;
        line-height: 1.25;
    }
    .ro-food-content p {
        font-size: 12px;
        /* Clamp long descriptions so names/prices stay visible. */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .ro-food-bottom {
        flex-wrap: wrap;
        gap: 6px;
    }
    .ro-food-bottom strong {
        font-size: 15px;
    }
    /* Keep the ADD / Sold-out control an easy tap target. */
    .ro-add-cart {
        min-height: 40px;
        min-width: 64px;
        padding: 8px 12px;
        font-size: 13px;
    }
    .ro-food-quantity {
        min-height: 40px;
        min-width: 78px;
        gap: 4px;
        padding: 0 4px;
    }
    .ro-food-quantity .ro-quantity-button { width: 32px; height: 32px; min-width: 32px; font-size: 18px; }
    .ro-sold-out-badge {
        font-size: 11px;
        padding: 5px 10px;
    }
}

/* =========================================================
   DELIVERY SERVICE AREA — structured address + searchable PIN
   (mobile-first; degrades gracefully)
========================================================= */
.ro-addr-structured { display: grid; gap: 2px; }
.ro-addr-line { font-size: 13px; line-height: 1.4; }
.ro-addr-key { font-weight: 600; opacity: 0.75; margin-right: 4px; }
.ro-addr-val { word-break: break-word; }
.ro-addr-legacy { white-space: pre-line; word-break: break-word; }

.ro-pin-search { margin-bottom: 8px; width: 100%; }

@media (max-width: 480px) {
    .ro-addr-line { font-size: 12.5px; }
}

/* =========================================================
   TABLE BOOKING (Table Booking feature)
   Mobile-first. Reuses --ro-primary / --ro-muted / --ro-border
   tokens and the shared .ro-otp-primary / .ro-input styles.
========================================================= */

.ro-booking-wrap { max-width: 900px; }

.ro-booking-panel {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 16px 40px;
}

.ro-booking-form-card {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-end;
    background: #fff;
    border: 1px solid var(--ro-border);
    border-radius: 16px;
    padding: 18px;
    margin-top: 18px;
}

.ro-booking-field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 140px; }
.ro-booking-field label { font-size: 13px; font-weight: 700; color: var(--ro-text); }

.ro-booking-form-card .ro-otp-primary,
.ro-booking-form-card .ro-input { margin-top: 0; }

.ro-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--ro-border);
    border-radius: 11px;
    padding: 12px 14px;
    font-size: 16px;
    background: #fff;
    outline: none;
}
.ro-input:focus { border-color: var(--ro-primary); box-shadow: 0 0 0 3px rgba(230,57,70,.12); }

.ro-booking-form-card .ro-otp-primary { flex: 1 1 160px; width: auto; }

/* Slots */
.ro-booking-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 10px;
    margin: 20px 0 4px;
}
.ro-slot-chip {
    border: 1px solid var(--ro-border);
    background: #fff;
    color: var(--ro-text);
    border-radius: 12px;
    padding: 12px 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: border-color .15s, background .15s, color .15s;
}
.ro-slot-chip:hover:not(:disabled) { border-color: var(--ro-primary); color: var(--ro-primary); }
.ro-slot-chip.is-selected { background: var(--ro-primary); border-color: var(--ro-primary); color: #fff; }
.ro-slot-chip:disabled,
.ro-slot-chip.is-unavailable { opacity: .45; cursor: not-allowed; text-decoration: line-through; }

.ro-booking-slots-empty { grid-column: 1 / -1; color: var(--ro-muted); padding: 8px 0; text-align: center; }
.ro-booking-slots-loading { grid-column: 1 / -1; color: var(--ro-muted); padding: 8px 0; text-align: center; }

/* Details form */
.ro-booking-details {
    background: #fff;
    border: 1px solid var(--ro-border);
    border-radius: 16px;
    padding: 18px;
    margin-top: 18px;
}
.ro-booking-details h3 { margin: 0 0 12px; font-size: 18px; }
.ro-booking-details .ro-booking-field { margin-bottom: 12px; }

/* Confirmation card */
.ro-booking-confirmation {
    background: #fff;
    border: 1px solid var(--ro-border);
    border-radius: 18px;
    padding: 26px 20px;
    margin-top: 18px;
    text-align: center;
}
.ro-booking-confirm-icon { font-size: 46px; line-height: 1; }
.ro-booking-confirmation h2 { margin: 10px 0 18px; font-size: 22px; }
.ro-booking-confirm-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    text-align: left;
    max-width: 420px;
    margin: 0 auto 18px;
}
.ro-booking-confirm-grid > div {
    background: #f8fafc;
    border: 1px solid var(--ro-border);
    border-radius: 12px;
    padding: 10px 12px;
}
.ro-booking-confirm-grid span { display: block; font-size: 12px; color: var(--ro-muted); }
.ro-booking-confirm-grid strong { font-size: 15px; }

/* My bookings */
.ro-booking-mybookings { max-width: 640px; margin: 30px auto 0; padding: 0 16px 60px; }
.ro-booking-mybookings h3 { font-size: 18px; margin: 0 0 12px; }
.ro-booking-my-list { display: flex; flex-direction: column; gap: 12px; }
.ro-booking-my-card {
    background: #fff;
    border: 1px solid var(--ro-border);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.ro-booking-my-card .ro-bmc-main { flex: 1 1 200px; }
.ro-booking-my-card .ro-bmc-code { font-weight: 800; }
.ro-booking-my-card .ro-bmc-meta { color: var(--ro-muted); font-size: 14px; margin-top: 2px; }

.ro-booking-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--ro-border);
    background: #f8fafc;
    color: var(--ro-text);
}
.ro-booking-badge.st-pending   { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
.ro-booking-badge.st-confirmed { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.ro-booking-badge.st-seated    { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.ro-booking-badge.st-completed { background: #f3f4f6; color: #374151; border-color: #e5e7eb; }
.ro-booking-badge.st-cancelled { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.ro-booking-badge.st-no_show   { background: #fef2f2; color: #991b1b; border-color: #fecaca; }

.ro-booking-cancel-btn {
    border: 1px solid var(--ro-border);
    background: #fff;
    color: #991b1b;
    border-radius: 10px;
    padding: 8px 14px;
    font-weight: 700;
    cursor: pointer;
    min-height: 40px;
}
.ro-booking-cancel-btn:hover { border-color: #991b1b; }
.ro-booking-cancel-btn:disabled { opacity: .5; cursor: not-allowed; }

@media (max-width: 480px) {
    .ro-booking-form-card .ro-otp-primary { flex: 1 1 100%; }
    .ro-booking-confirm-grid { grid-template-columns: 1fr; }
}


/* =========================================================
   POLICIES / TERMS & CONDITIONS (reusable policy system)
========================================================= */

/* Table Booking inline T&C accordion + agree checkbox */
.ro-booking-terms {
    border: 1px solid var(--ro-border);
    border-radius: 12px;
    background: #fff;
    margin: 4px 0 12px;
    padding: 0;
}
.ro-booking-terms > summary {
    cursor: pointer;
    padding: 12px 14px;
    font-weight: 800;
    color: var(--ro-text);
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ro-booking-terms > summary::-webkit-details-marker { display: none; }
.ro-booking-terms > summary::after { content: '▾'; color: var(--ro-muted); }
.ro-booking-terms[open] > summary::after { content: '▴'; }
.ro-booking-terms-body {
    padding: 0 14px 14px;
    color: var(--ro-text);
    font-size: 14px;
    line-height: 1.6;
    max-height: 260px;
    overflow-y: auto;
}
.ro-booking-terms-body p { margin: 0 0 10px; }

.ro-booking-agree {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 4px 0 14px;
    font-size: 14px;
    color: var(--ro-text);
    cursor: pointer;
}
.ro-booking-agree input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex: 0 0 auto;
}

/* Customer policy page view ([restaurant_policy] / legal pages) */
.ro-policy-wrap { max-width: 820px; margin: 0 auto; padding: 24px 16px 60px; }
.ro-policy-view { }
.ro-policy-title { margin: 0 0 6px; font-size: clamp(24px, 3vw, 32px); }
.ro-policy-updated { margin: 0 0 18px; font-size: 13px; }
.ro-policy-body { color: var(--ro-text); font-size: 15px; line-height: 1.7; }
.ro-policy-body p { margin: 0 0 14px; }
.ro-policy-body ul, .ro-policy-body ol { margin: 0 0 14px 20px; }
.ro-policy-body a { color: var(--ro-primary); }

/* Footer legal links */
.footer-legal-list { list-style: none; margin: 0; padding: 0; }
.footer-legal-list li { margin: 0 0 8px; }
.footer-legal-list a { color: inherit; text-decoration: none; opacity: .9; }
.footer-legal-list a:hover { text-decoration: underline; opacity: 1; }


/* =========================================================
   ORDER STATUS TRACKER (customer, presentation-only)
   Reuses --ro-primary / --ro-muted / --ro-border tokens.
   Placed → Preparing → Ready → Done, mapped from real statuses.
========================================================= */
.ro-tracker {
    background: #fff;
    border: 1px solid var(--ro-border);
    border-radius: 16px;
    padding: 18px 16px;
    margin: 0 0 16px;
}
.ro-tracker-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}
.ro-tracker-icon {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 20px;
    font-weight: 800;
    background: #e8f7ee;
    color: #168447;
}
.ro-tracker.is-cancelled .ro-tracker-icon { background: #fef2f2; color: #991b1b; }
.ro-tracker-title { font-size: 17px; font-weight: 800; line-height: 1.2; }
.ro-tracker-message { font-size: 13px; color: var(--ro-muted); margin-top: 2px; }

/* Horizontal stepper */
.ro-tracker-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: space-between;
    position: relative;
}
/* connector line behind the dots (base = muted).
   `top` is aligned to the DOT row, which now sits below the food-themed
   illustration (illus height + column gap + dot radius). */
.ro-tracker-steps::before {
    content: '';
    position: absolute;
    top: 85px;
    left: 12%;
    right: 12%;
    height: 3px;
    background: var(--ro-border);
    z-index: 0;
}
/* Per-step connector segment (from the previous dot to this dot). Turns green
   when THIS step is completed — giving a cumulative green progress line.
   The first step has no incoming segment. */
.ro-tracker-step::before {
    content: '';
    position: absolute;
    top: 85px;
    right: 50%;
    left: -50%;
    height: 3px;
    background: transparent;
    z-index: 0;
}
.ro-tracker-step:first-child::before { display: none; }
.ro-tracker-step.is-complete::before { background: #168447; }
.ro-tracker-step {
    position: relative;
    z-index: 1;
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    min-width: 0;
}
.ro-tracker-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 14px;
    font-weight: 800;
    background: #fff;
    border: 3px solid var(--ro-border);
    color: #fff;
    transition: background .2s, border-color .2s;
}
.ro-tracker-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--ro-muted);
    line-height: 1.2;
    white-space: nowrap;
}
/* completed steps (all stages up to AND including the current one) */
.ro-tracker-step.is-complete .ro-tracker-dot {
    background: #168447;
    border-color: #168447;
}
.ro-tracker-step.is-complete .ro-tracker-label { color: var(--ro-text); }
/* current step — cumulative-complete (green) with an emphasis ring + bold label */
.ro-tracker-step.is-current .ro-tracker-dot {
    background: #168447;
    border-color: #168447;
    box-shadow: 0 0 0 4px rgba(22,132,71,.18);
}
.ro-tracker-step.is-current .ro-tracker-label {
    color: #168447;
    font-weight: 800;
}
/* upcoming steps keep muted defaults */

/* =========================================================
   ANIMATED CARTOON-CHEF STEP ILLUSTRATIONS (presentation only)
   Small inline-SVG chef characters sit ABOVE the existing dot/label.
   Only the CURRENT step (.is-current, set from the REAL order status)
   animates its SVG sub-parts (arm/ladle, body bob, steam, wheels);
   completed and upcoming steps are fully static. No GIF/video/binary
   assets, no page-height growth, GPU-friendly transforms only.
========================================================= */
.ro-tracker-illus {
    /* Desktop illustration ~64px (within the 50–80px target). */
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #f8fafc;
    border: 1px solid var(--ro-border);
    transition: background .2s, border-color .2s, box-shadow .2s, opacity .2s, filter .2s;
    overflow: hidden;
}
.ro-chef {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
}
.ro-chef g { transform-box: fill-box; }

/* Completed (reached) steps: soft green treatment, STATIC. */
.ro-tracker-step.is-complete .ro-tracker-illus {
    background: #e8f7ee;
    border-color: #bfe6cf;
}
/* Upcoming steps: muted + desaturated, STATIC. */
.ro-tracker-step.is-upcoming .ro-tracker-illus {
    background: #f8fafc;
    border-color: var(--ro-border);
    opacity: .55;
    filter: grayscale(45%);
}
/* CURRENT step: green glow ring + the SVG animates. */
.ro-tracker-step.is-current .ro-tracker-illus {
    background: #e8f7ee;
    border-color: #168447;
    box-shadow: 0 0 0 4px rgba(22,132,71,.16);
}

/* "In progress" badge (only rendered on the current step). */
.ro-tracker-badge {
    display: inline-block;
    margin-top: 2px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #e8f7ee;
    color: #168447;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .3px;
    line-height: 1.4;
    white-space: nowrap;
}

/* ---- Animations: CURRENT step only, targeting SVG sub-parts ----
   Subtle, 1–2s loops, transform/opacity only. Non-current steps never
   receive an animation, so completed/upcoming illustrations stay static. */

/* Gentle whole-body bob for the active chef (all current steps). */
.ro-tracker-step.is-current .ro-chef-body {
    animation: roChefBob 2s ease-in-out infinite;
}

/* Placed: pan hand tosses (small up-down + tilt). */
.ro-tracker-step.is-current[data-step="placed"] .ro-chef-arm-pan {
    animation: roChefToss 1.5s ease-in-out infinite;
    transform-origin: 40px 35px;
}
/* Preparing: stirring arm rotates + steam rises. */
.ro-tracker-step.is-current[data-step="preparing"] .ro-chef-arm-stir {
    animation: roChefStir 1.2s linear infinite;
    transform-origin: 38px 34px;
}
.ro-tracker-step.is-current[data-step="preparing"] .ro-chef-steam {
    animation: roChefSteam 1.8s ease-out infinite;
    transform-origin: 43px 20px;
}
/* Ready: serving arm lifts the cloche + spark twinkles. */
.ro-tracker-step.is-current[data-step="ready"] .ro-chef-arm-serve {
    animation: roChefServe 1.6s ease-in-out infinite;
    transform-origin: 33px 37px;
}
.ro-tracker-step.is-current[data-step="ready"] .ro-chef-spark {
    animation: roChefSpark 1.4s ease-in-out infinite;
    transform-origin: 12px 27px;
}
/* Delivered/Done: scooter rocks, wheels spin, wind streaks. */
.ro-tracker-step.is-current[data-step="done"] .ro-chef-scooter {
    animation: roChefRide 1.2s ease-in-out infinite;
    transform-origin: 32px 50px;
}
.ro-tracker-step.is-current[data-step="done"] .ro-chef-wheel {
    animation: roChefSpin 0.7s linear infinite;
    transform-origin: center;
}
.ro-tracker-step.is-current[data-step="done"] .ro-chef-wind {
    animation: roChefWind 0.9s ease-in-out infinite;
}

@keyframes roChefBob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-1.5px); }
}
@keyframes roChefToss {
    0%, 100% { transform: rotate(0deg) translateY(0); }
    50%      { transform: rotate(-10deg) translateY(-2px); }
}
@keyframes roChefStir {
    0%   { transform: rotate(-10deg); }
    50%  { transform: rotate(10deg); }
    100% { transform: rotate(-10deg); }
}
@keyframes roChefSteam {
    0%   { transform: translateY(3px); opacity: 0; }
    35%  { opacity: .9; }
    100% { transform: translateY(-6px); opacity: 0; }
}
@keyframes roChefServe {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    45%      { transform: translateY(-2.5px) rotate(-4deg); }
}
@keyframes roChefSpark {
    0%, 100% { transform: scale(.7); opacity: .4; }
    50%      { transform: scale(1.15); opacity: 1; }
}
@keyframes roChefRide {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25%      { transform: translateY(-1px) rotate(-1.5deg); }
    75%      { transform: translateY(1px) rotate(1.5deg); }
}
@keyframes roChefSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
@keyframes roChefWind {
    0%, 100% { transform: translateX(0); opacity: .35; }
    50%      { transform: translateX(-3px); opacity: .7; }
}

/* Respect reduced-motion: show the chef illustrations WITHOUT animation. */
@media (prefers-reduced-motion: reduce) {
    .ro-chef-body,
    .ro-chef-arm,
    .ro-chef-steam,
    .ro-chef-spark,
    .ro-chef-scooter,
    .ro-chef-wheel,
    .ro-chef-wind,
    .ro-tracker-step.is-current[data-step] .ro-chef-body,
    .ro-tracker-step.is-current[data-step] .ro-chef-arm,
    .ro-tracker-step.is-current[data-step] .ro-chef-steam,
    .ro-tracker-step.is-current[data-step] .ro-chef-spark,
    .ro-tracker-step.is-current[data-step] .ro-chef-scooter,
    .ro-tracker-step.is-current[data-step] .ro-chef-wheel,
    .ro-tracker-step.is-current[data-step] .ro-chef-wind {
        animation: none !important;
    }
}

/* screen-reader-only per-step state */
.ro-tracker-sr {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.ro-tracker-cancelled-note { margin: 0; color: var(--ro-muted); font-size: 13px; }

/* Mobile: scale illustrations down (target 36–56px height) and keep the
   tracker compact without horizontal overflow. */
@media (max-width: 600px) {
    .ro-tracker-illus { width: 52px; height: 52px; }
    .ro-tracker-badge { font-size: 9px; padding: 1px 6px; }
    /* Realign the progress line to the dot row for the smaller illustration. */
    .ro-tracker-steps::before,
    .ro-tracker-step::before { top: 74px; }
}

/* Small screens: keep labels readable, allow wrapping */
@media (max-width: 380px) {
    .ro-tracker-label { font-size: 11px; white-space: normal; }
    .ro-tracker-dot { width: 24px; height: 24px; }
    .ro-tracker-illus { width: 44px; height: 44px; }
    .ro-tracker-steps::before,
    .ro-tracker-step::before { top: 64px; }
}

/* Desktop: constrain width so dots aren't too far apart in wide cards */
@media (min-width: 720px) {
    .ro-tracker-steps { max-width: 560px; margin: 0 auto; }
}

/* =========================================================
   CUSTOMER OFFERS BANNER (reuses RO_Coupons active offers)
   Sits between the restaurant header and the search toolbar.
   Horizontally scrollable track => never causes page overflow;
   in normal flow => never covers the fixed cart bar or the
   notification panel.
========================================================= */
.ro-offers {
    margin: 14px 0 4px;
}
.ro-offers-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 2px 2px 6px;
    scroll-snap-type: x proximity;
}
.ro-offers-track::-webkit-scrollbar { display: none; }
.ro-offer-card {
    box-sizing: border-box;
    flex: 0 0 auto;
    max-width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid #fecdd3;
    background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
    scroll-snap-align: start;
}
.ro-offer-badge {
    flex: 0 0 auto;
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border-radius: 12px;
    background: #fff;
    font-size: 20px;
    box-shadow: 0 2px 8px rgba(230,57,70,.15);
}
.ro-offer-body { min-width: 0; }
.ro-offer-headline {
    font-size: 16px;
    font-weight: 800;
    color: var(--ro-primary);
    line-height: 1.15;
}
.ro-offer-code {
    margin-top: 3px;
    font-size: 13px;
    color: var(--ro-text);
    word-break: break-word;
}
.ro-offer-code-value {
    font-weight: 800;
    letter-spacing: .5px;
    background: #fff;
    border: 1px dashed var(--ro-primary);
    border-radius: 6px;
    padding: 1px 7px;
    display: inline-block;
}
.ro-offer-condition {
    margin-top: 3px;
    font-size: 12px;
    color: var(--ro-muted);
}

/* Mobile (covers 360 / 390 / 412 widths): cards fit the viewport,
   swipe horizontally, no page overflow. */
@media (max-width: 700px) {
    .ro-offers { margin: 12px 0 2px; }
    .ro-offer-card { max-width: 88vw; padding: 12px 14px; }
    .ro-offer-headline { font-size: 15px; }
}
@media (max-width: 412px) {
    .ro-offer-card { max-width: 90vw; gap: 10px; }
    .ro-offer-badge { width: 36px; height: 36px; font-size: 18px; }
    .ro-offer-headline { font-size: 14px; }
    .ro-offer-code { font-size: 12px; }
}

/* =========================================================
   PRODUCT DETAIL BOTTOM SHEET / MODAL  (additive, isolated)
   Mobile  : bottom sheet (rounded top, drag handle, 85-95vh)
   Tablet  : bottom sheet, wider
   Desktop : centered modal, max width
========================================================= */

/* Clickable card: a full-cover transparent button provides the tap/keyboard
   target without wrapping the existing Add button (which sits above it). */
.ro-food-card { position: relative; }
.ro-food-card-open {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    z-index: 1;
    border-radius: inherit;
    -webkit-tap-highlight-color: transparent;
}
.ro-food-card-open:focus-visible {
    outline: 3px solid rgba(230, 57, 70, .35);
    outline-offset: 2px;
}
/* Keep interactive card elements (Add / quantity) clickable above the overlay. */
.ro-food-card .ro-food-cart-control,
.ro-food-card .ro-add-cart,
.ro-food-card .ro-food-quantity,
.ro-food-card .ro-sold-out-badge { position: relative; z-index: 2; }

/* Clamp the card description so it never dominates the card. */
.ro-food-content p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 0;
    margin: 0 0 12px;
}

/* ---- Sheet container ---- */
.ro-detail-sheet {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.ro-detail-sheet[hidden] { display: none; }

.ro-detail-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    opacity: 0;
    transition: opacity .28s ease;
}
.ro-detail-sheet.is-open .ro-detail-backdrop { opacity: 1; }

.ro-detail-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 640px;
    /* Mobile viewport-safe height. dvh accounts for mobile browser chrome so
       the footer/content are never clipped; vh is the fallback. */
    max-height: 90vh;
    max-height: 90dvh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, .22);
    transform: translateY(100%);
    transition: transform .32s cubic-bezier(.22, .61, .36, 1);
    overflow: hidden;
    padding-bottom: env(safe-area-inset-bottom);
}
.ro-detail-sheet.is-open .ro-detail-panel { transform: translateY(0); }

/* Drag handle */
.ro-detail-handle {
    display: block;
    width: 44px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: #d1d5db;
    margin: 10px auto 4px;
    padding: 0;
    cursor: grab;
    flex: 0 0 auto;
    position: relative;
    z-index: 3;
}
.ro-detail-handle::before {
    content: '';
    position: absolute;
    inset: -12px -40px;
}

/* Structural wrappers.
   MOBILE (default): `display:contents` makes .ro-detail-main and
   .ro-detail-details transparent, so .ro-detail-media and .ro-detail-scroll
   participate directly in the panel's flex column exactly as before (image
   on top, scrollable details below, sticky footer). DESKTOP overrides these
   into a real two-column grid (see @media min-width:768px). */
.ro-detail-main,
.ro-detail-details {
    display: contents;
}

/* Media (modal header region: close + image).
   Responsive aspect-ratio CONTAINER. The container defines the shape and its
   height is capped so the image can never push the product details or the
   sticky Add-to-Cart footer out of the viewport. The <img> fills the container
   with object-fit:cover (no distortion, no overflow).
   Mobile: 16/10, capped at 35vh. Desktop: ~1/1 (see @media min-width:768px). */
.ro-detail-media {
    position: relative;
    flex: 0 0 auto;
    margin: 4px 16px 0;
    border-radius: 16px;
    overflow: hidden;
    background: #f4f4f4;
    width: auto;
    aspect-ratio: 16 / 10;
    max-height: 35vh;
    max-height: 35dvh;
}
.ro-detail-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* The placeholder <div> also carries the .ro-detail-image class, whose
   explicit `display:block` overrides the UA `[hidden]{display:none}` rule.
   That caused the cutlery placeholder to remain visible ON TOP of a
   successfully loaded product image. Force the HTML `hidden` attribute to win
   so the fallback only shows when there is genuinely no image. This changes
   visibility only — no dimensions or layout are affected. */
.ro-detail-image[hidden],
.ro-detail-image-placeholder[hidden] {
    display: none !important;
}
.ro-detail-image-placeholder {
    display: grid;
    place-items: center;
    color: #999;
    font-size: 54px;
}
.ro-detail-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    color: #171717;
    display: grid;
    place-items: center;
    z-index: 4;
}
.ro-detail-close:focus-visible {
    outline: 3px solid rgba(230, 57, 70, .4);
    outline-offset: 2px;
}

/* Content (modal body) — the ONLY scrolling area. `min-height:0` is the
   critical fix: without it a flex child will not shrink below its content
   height, so the scroll region collapses and the image + footer squeeze the
   product details out of view. */
.ro-detail-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px 20px 20px;
}

.ro-detail-header { margin-bottom: 8px; }
.ro-detail-diet {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 6px;
}
.ro-detail-diet.is-veg { color: #18864b; }
.ro-detail-diet.is-nonveg { color: #c0392b; }
.ro-detail-title {
    margin: 2px 0 6px;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 800;
    color: #171717;
}
.ro-detail-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #475569;
}
.ro-detail-rating-star { color: #f59e0b; }
.ro-detail-rating-avg { font-weight: 800; color: #1e293b; }
.ro-detail-rating-count { color: #64748b; font-size: 13px; }

.ro-detail-desc {
    margin: 10px 0 18px;
    color: #4b5563;
    line-height: 1.6;
    font-size: 15px;
}

/* Variant / add-on selectors in the product-detail sheet. */
.ro-detail-options { margin: 4px 0 16px; }
.ro-detail-options[hidden] { display: none; }
.ro-detail-options-title {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 800;
    color: #334155;
}
.ro-detail-options-list { display: flex; flex-direction: column; gap: 8px; }
.ro-detail-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--ro-border, #e8e8e8);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.ro-detail-option:hover { border-color: #cbd5e1; }
.ro-detail-option input { margin: 0; width: 18px; height: 18px; accent-color: var(--ro-primary, #e63946); }
.ro-detail-option-name { flex: 1 1 auto; font-weight: 600; color: #171717; }
.ro-detail-option-price { font-weight: 800; color: #334155; }
.ro-detail-option:has(input:checked) {
    border-color: var(--ro-primary, #e63946);
    background: rgba(230, 57, 70, .04);
}

.ro-detail-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 0;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
}
.ro-detail-unit-price {
    font-size: 22px;
    font-weight: 800;
    color: #171717;
}
.ro-detail-qty {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f8fafc;
    border: 1px solid #e8e8e8;
    border-radius: 999px;
    padding: 4px;
}
.ro-detail-qty-btn {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--ro-primary, #e63946);
    font-size: 22px;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    display: grid;
    place-items: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}
.ro-detail-qty-btn:active { transform: scale(.94); }
.ro-detail-qty-btn:focus-visible {
    outline: 3px solid rgba(230, 57, 70, .35);
    outline-offset: 2px;
}
.ro-detail-qty-num {
    min-width: 32px;
    text-align: center;
    font-weight: 800;
    font-size: 17px;
}

/* Reviews (reuses RO_Reviews data) */
.ro-detail-reviews { margin-top: 20px; }
.ro-detail-reviews-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}
.ro-detail-reviews-head h3 { margin: 0; font-size: 17px; font-weight: 800; }
.ro-detail-reviews-all {
    font-size: 14px;
    font-weight: 700;
    color: var(--ro-primary, #e63946);
    text-decoration: none;
}
.ro-detail-reviews-summary {
    margin: 8px 0 12px;
    color: #475569;
    font-size: 14px;
}
.ro-detail-reviews-summary strong { color: #1e293b; font-size: 16px; }
.ro-detail-reviews-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ro-detail-review {
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px 14px;
}
.ro-detail-review-stars { color: #f59e0b; font-size: 14px; }
.ro-detail-review-text {
    display: block;
    margin-top: 4px;
    color: #334155;
    font-size: 14px;
    line-height: 1.5;
}

/* Sticky footer — never scrolls, never overlaps content. */
.ro-detail-footer {
    flex: 0 0 auto;
    flex-shrink: 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid #eef0f2;
    background: #fff;
    box-shadow: 0 -6px 18px rgba(0, 0, 0, .06);
    display: flex;
    align-items: center;
    gap: 14px;
}
/* The explicit "Total / amount" block is a desktop affordance; on mobile the
   total is shown on the Add-to-Cart button itself, so hide it there. */
.ro-detail-footer-total { display: none; }
.ro-detail-footer-total-label {
    display: block;
    font-size: 12px;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.ro-detail-footer-total-amount {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: #171717;
    line-height: 1.15;
}
.ro-detail-addcart {
    width: 100%;
    flex: 1 1 auto;
    min-height: 54px;
    border: 0;
    border-radius: 14px;
    background: var(--ro-primary, #e63946);
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 20px;
    transition: opacity .15s ease, transform .1s ease;
}
.ro-detail-addcart:hover { opacity: .93; }
.ro-detail-addcart:active { transform: scale(.99); }
.ro-detail-addcart:focus-visible {
    outline: 3px solid rgba(230, 57, 70, .4);
    outline-offset: 2px;
}
.ro-detail-addcart[disabled] {
    background: #cbd5e1;
    cursor: not-allowed;
}
.ro-detail-addcart-total { font-weight: 800; }

/* Lock the page behind the sheet without losing scroll position. */
body.ro-detail-open { overflow: hidden; }

/* ---- Desktop / tablet (>= 768px): centered two-column modal ----
   Structure per spec:
     .ro-detail-panel  (flex column, max-height 88vh)
       .ro-detail-main    (grid 1fr 1fr, min-height:0, flex:1)
         .ro-detail-media   (left image column, ~1:1, object-fit:cover)
         .ro-detail-details (right column, min-height:0, overflow:hidden)
           .ro-detail-scroll  (height:100%, overflow-y:auto)
       .ro-detail-footer  (full-width sticky, flex-shrink:0)                    */
@media (min-width: 768px) {
    .ro-detail-sheet {
        align-items: center;
        justify-content: center;
        padding: 24px;
    }

    .ro-detail-panel {
        width: min(920px, calc(100vw - 48px));
        max-width: none;
        height: auto;
        max-height: 88vh;
        border-radius: 18px;
        /* Reset the mobile bottom-sheet rounding/anim to a centered modal. */
        display: flex;
        flex-direction: column;
        overflow: hidden;
        transform: translateY(24px) scale(.98);
        opacity: 0;
        transition: transform .28s cubic-bezier(.22, .61, .36, 1), opacity .28s ease;
        padding-bottom: 0;
    }
    .ro-detail-sheet.is-open .ro-detail-panel {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    /* Handle is a mobile affordance only. */
    .ro-detail-handle { display: none; }

    /* Two-column main region; only the right column scrolls. */
    .ro-detail-main {
        display: grid;
        grid-template-columns: 1fr 1fr;
        min-height: 0;
        flex: 1 1 auto;
    }

    /* LEFT: prominent, ~1:1 product image. Uses the aspect-ratio container
       (not height:100%) so the image stays roughly square instead of a tall
       strip. align-self:start keeps it from stretching to the full row height;
       max-height caps it so it never exceeds the modal. */
    .ro-detail-media {
        margin: 0;
        border-radius: 0;
        width: 100%;
        height: auto;
        align-self: start;
        aspect-ratio: 1 / 1;
        max-height: 88vh;
        display: block;
        overflow: hidden;
    }
    .ro-detail-image {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        max-height: none;
        object-fit: cover;
        border-radius: 0;
    }
    .ro-detail-image-placeholder {
        width: 100%;
        height: 100%;
        max-height: none;
    }
    .ro-detail-close { top: 14px; right: 14px; }

    /* RIGHT: details column owns its own scroll. */
    .ro-detail-details {
        display: block;
        min-height: 0;
        overflow: hidden;
    }
    .ro-detail-scroll {
        height: 100%;
        min-height: 0;
        overflow-y: auto;
        padding: 28px 30px;
    }

    /* Full-width sticky footer with Total + Add to Cart. */
    .ro-detail-footer {
        flex-shrink: 0;
        padding: 16px 30px;
        justify-content: space-between;
    }
    .ro-detail-footer-total { display: block; flex: 0 0 auto; }
    .ro-detail-addcart {
        flex: 0 0 auto;
        width: auto;
        min-width: 260px;
        padding: 0 28px;
    }

    /* ---- Larger desktop typography (no tiny mobile sizes) ---- */
    .ro-detail-title { font-size: 27px; line-height: 1.2; }
    .ro-detail-diet { font-size: 14px; }
    .ro-detail-rating { font-size: 16px; }
    .ro-detail-rating-count { font-size: 15px; }
    .ro-detail-desc { font-size: 16px; line-height: 1.65; margin: 14px 0 20px; }
    .ro-detail-unit-price { font-size: 24px; }
    .ro-detail-reviews-head h3 { font-size: 18px; }
    .ro-detail-reviews-summary { font-size: 15px; }
    .ro-detail-review-text { font-size: 15px; }
    .ro-detail-footer-total-amount { font-size: 24px; }
    .ro-detail-addcart { font-size: 18px; min-height: 56px; }
}

/* Very small height desktop windows: allow the modal a touch more height. */
@media (min-width: 768px) and (max-height: 720px) {
    .ro-detail-panel { max-height: 92vh; }
}

@media (prefers-reduced-motion: reduce) {
    .ro-detail-panel,
    .ro-detail-backdrop { transition: none; }
}

/* ==========================================================================
   Call a Waiter — customer floating widget (OwnServe brand red #ef3340)
   ========================================================================== */
.ro-cw { position: fixed; right: 16px; bottom: 84px; z-index: 9990; }
.ro-cw-fab {
    display: inline-flex; align-items: center; gap: 8px;
    background: #ef3340; color: #fff; border: none; cursor: pointer;
    padding: 12px 18px; border-radius: 999px; font-size: 15px; font-weight: 600;
    box-shadow: 0 6px 18px rgba(239, 51, 64, 0.35);
    transition: transform .12s ease, box-shadow .12s ease, background .2s ease;
}
.ro-cw-fab:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(239, 51, 64, 0.45); }
.ro-cw-fab:active { transform: translateY(0); }
.ro-cw-fab.is-active { background: #1f9d55; box-shadow: 0 6px 18px rgba(31, 157, 85, 0.35); }
.ro-cw-fab-icon { font-size: 18px; line-height: 1; }
.ro-cw-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 9991;
}
.ro-cw-dialog {
    position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
    width: 100%; max-width: 420px; z-index: 9992;
    background: #fff; border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 30px rgba(0,0,0,.2); padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
    animation: ro-cw-slide-up .18s ease;
}
@keyframes ro-cw-slide-up { from { transform: translate(-50%, 20px); opacity: .6; } to { transform: translate(-50%, 0); opacity: 1; } }
.ro-cw-dialog-inner { text-align: center; }
.ro-cw-emoji { font-size: 40px; line-height: 1; margin-bottom: 6px; }
.ro-cw-title { margin: 4px 0 6px; font-size: 20px; font-weight: 700; color: #1a1a1a; }
.ro-cw-desc { margin: 0 0 18px; color: #555; font-size: 14px; }
.ro-cw-actions { display: flex; gap: 12px; }
.ro-cw-btn {
    flex: 1; padding: 13px 16px; border-radius: 10px; font-size: 15px; font-weight: 600;
    cursor: pointer; border: 1px solid transparent;
}
.ro-cw-btn-ghost { background: #f2f3f5; color: #333; border-color: #e2e4e8; }
.ro-cw-btn-primary { background: #ef3340; color: #fff; }
.ro-cw-btn-primary:hover { background: #d92b38; }
.ro-cw-btn-primary:disabled { opacity: .6; cursor: default; }
.ro-cw-msg { margin: 12px 0 0; min-height: 18px; font-size: 13px; color: #ef3340; }
@media (min-width: 480px) {
    .ro-cw-dialog { bottom: 24px; border-radius: 16px; }
}


/* ==========================================================================
   Table Service launcher — customer sheet + type list (extends Call a Waiter)
   ========================================================================== */
.ro-cw-sheet {
    position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
    width: 100%; max-width: 460px; z-index: 9992;
    background: #fff; border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 30px rgba(0,0,0,.2);
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
    animation: ro-cw-slide-up .18s ease;
    /* Viewport-safe: never taller than the viewport, so the top request types
       (Call a Waiter, Water) are always visible; the list scrolls internally.
       svh accounts for mobile browser chrome; vh is the fallback. */
    display: flex; flex-direction: column;
    max-height: 85vh; max-height: 85svh;
    box-sizing: border-box;
}
/* The sheet is toggled via the `hidden` attribute (JS sets sheet.hidden). The
   display:flex above is an author rule that would otherwise override the UA
   `[hidden] { display:none }`, leaving the sheet visible after close (✕,
   Escape, backdrop). This makes `hidden` authoritative again. Same convention
   as the coupon UI and the attendance modal. */
.ro-cw-sheet[hidden] { display: none; }
.ro-cw-sheet-inner { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.ro-cw-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; flex: 0 0 auto; }
.ro-cw-sheet-title { margin: 0; font-size: 18px; font-weight: 700; color: #1a1a1a; }
.ro-cw-close { background: none; border: none; font-size: 26px; line-height: 1; color: #888; cursor: pointer; padding: 0 6px; }
.ro-cw-close:focus-visible { outline: 2px solid #ef3340; outline-offset: 2px; border-radius: 6px; }
.ro-cw-list {
    list-style: none; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    /* The list is the scroll region when the type set exceeds the sheet height. */
    overflow-y: auto; -webkit-overflow-scrolling: touch; min-height: 0; flex: 1 1 auto;
    /* Small inline padding so focus outlines/borders are not clipped by the scroll box. */
    padding: 2px; overscroll-behavior: contain;
}
.ro-cw-item {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    width: 100%; padding: 14px 8px; background: #fafafa; border: 1px solid #ececec;
    border-radius: 12px; cursor: pointer; text-align: center; color: #222; font: inherit;
    transition: border-color .15s ease, background .15s ease, transform .08s ease;
}
.ro-cw-item:hover { border-color: #ef3340; background: #fff5f6; }
.ro-cw-item:active { transform: translateY(1px); }
.ro-cw-item:focus-visible { outline: 2px solid #ef3340; outline-offset: 2px; }
.ro-cw-item-icon { font-size: 24px; line-height: 1; }
.ro-cw-item-label { font-size: 13px; font-weight: 600; }
.ro-cw-item-state { font-size: 11px; color: #ef3340; min-height: 14px; font-weight: 600; }
.ro-cw-item.is-active { border-color: #1f9d55; background: #eef7f0; }
.ro-cw-item.is-active .ro-cw-item-state { color: #1f9d55; }
.ro-cw-notewrap { text-align: left; margin: 4px 0 16px; }
.ro-cw-notewrap label { display: block; font-size: 13px; color: #444; margin-bottom: 6px; font-weight: 600; }
.ro-cw-notewrap textarea {
    width: 100%; box-sizing: border-box; border: 1px solid #d9dce0; border-radius: 10px;
    padding: 10px 12px; font: inherit; font-size: 14px; resize: vertical;
}
.ro-cw-notewrap textarea:focus { outline: none; border-color: #ef3340; box-shadow: 0 0 0 3px rgba(239,51,64,.12); }
@media (min-width: 480px) {
    .ro-cw-sheet { bottom: 24px; border-radius: 16px; }
}
@media (max-width: 360px) {
    .ro-cw-list { grid-template-columns: 1fr; }
}
