/* =========================================================
   MENU PAGE — PRODUCTION FIX (NO OVERFLOW / NO HIDE)
========================================================= */

/* RESET */
*,
*::before,
*::after{
  box-sizing:border-box;
}


/* ================= ROOT VARIABLES ================= */
:root{
  --accent:#ff3b30;
  --bg:#f6f7fb;
  --card:#ffffff;
  --muted:#6b7280;
  --text:#111;
  --success:#16a34a;
  --cart-height: 72px;
  --safe-gap: 10px;
}


    
/* OVERLAY */
.login-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* MODAL */
.login-modal {
    width: 90%;
    max-width: 380px;
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    animation: fadeUp 0.3s ease;
}

/* TITLE */
.login-modal h2 {
    margin-bottom: 5px;
}

.subtitle {
    font-size: 13px;
    color: #666;
    margin-bottom: 20px;
}

/* INPUT */
.login-modal input {
    width: 100%;
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 10px;
    border: 1px solid #ddd;
    font-size: 14px;
}

/* BUTTON */
.primary-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #ff6a00, #ff3c00);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255,60,0,0.4);
}

.primary-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* =========================
   MODAL ANIMATION (SMOOTHER)
========================= */
@keyframes fadeUp {
    from {
        transform: translateY(30px) scale(0.98);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* =========================
   CONSENT BOX (CARD STYLE)
========================= */
.consent-box {
    background: #f9fafb;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 10px 12px;
    margin: 12px 0 16px;
    font-size: 12.5px;
    color: #444;
    line-height: 1.5;
}

/* =========================
   LABEL FLEX
========================= */
.consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

/* =========================
   CUSTOM CHECKBOX
========================= */
.consent-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    min-width: 16px;
    border: 1.5px solid #ccc;
    border-radius: 4px;
    margin-top: 2px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

/* CHECKED STATE */
.consent-label input[type="checkbox"]:checked {
    background: #ff3c00;
    border-color: #ff3c00;
}

/* CHECK MARK */
.consent-label input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* =========================
   TEXT + LINKS
========================= */
.consent-label span {
    flex: 1;
}

.consent-label a {
    color: #ff3c00;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.consent-label a:hover {
    color: #cc2f00;
    text-decoration: underline;
}

/* =========================
   TOUCH IMPROVEMENT
========================= */
.consent-label {
    padding: 4px 0;
}

/* =========================
   ERROR STATE (OPTIONAL)
========================= */
.consent-box.error {
    border-color: #ff3c00;
    background: #fff5f2;
}
/* CLOSE BUTTON */
.close-btn {
    position: absolute;
    top: 10px;
    right: 12px;
    border: none;
    background: none;
    font-size: 20px;
    cursor: pointer;
}

/* FIX MODAL POSITION */
.login-modal {
    position: relative;
}

/* DISABLED BUTTON STATE */
.primary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
/* ================= PAGE ================= */
.badge-veg {
  width:12px;
  height:12px;
  min-width:12px;
  min-height:12px;

  display:inline-block;
  border-radius:50%;

  flex-shrink:0;              /* 🔥 critical */
  vertical-align:middle;

  background:#ccc;            /* fallback */
}

/* 🟢 Veg */
.badge-veg.veg {
  background:#16a34a !important;
}
.veg-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    background: #16a34a;
    border-radius: 50%;
    margin-right: 6px;
}

.bev-icon {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
}

.tag {
    font-size: 11px;
    padding: 2px 6px;
    background: #e5e7eb;
    border-radius: 4px;
}

.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    display: none;
    align-items: center;
    justify-content: center;

    background: rgba(0,0,0,0.6);

    z-index: 99999; /* 🔥 THIS WAS MISSING */
}

.login-modal {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    width: 300px;
    max-width: 90%;
}


/* 🔥 CRITICAL FIX */

/* ===== HARD RESET FOR LAYOUT (OVERRIDE GLOBAL CSS) ===== */

.main-content{

  width:100% !important;
  max-width:100% !important;
  margin:0 !important;
  padding:0 !important;
}

/* kill flex coming from theme */
.page-wrap{
  flex:none !important;
}

/* prevent hidden clipping */
.main-content{
  overflow:visible !important;
}

html, body{
  width:100%;
  max-width:100%;
  overflow-x:hidden;
}

/* ===== TOP CONTROLS LAYOUT ===== */
.top-pills{
    display:grid;
    grid-template-columns: 1fr;
    gap:12px;
    margin:10px 0;
}

/* Desktop */
@media (min-width: 768px){
    .top-pills{
        grid-template-columns: repeat(3, 1fr);
        align-items:end;
    }
}

/* ===== GROUP ===== */
.pill-group{
    display:flex;
    flex-direction:column;
    gap:6px;
}

/* ===== LABEL ===== */
.pill-label{
    font-size:12px;
    color:#6b7280;
    font-weight:500;
}

/* ===== SELECT + INPUT ===== */
.select-pill,
.date-input{
    width:100%;
    height:42px;
    padding:0 12px;
    border-radius:10px;
    border:1px solid #e5e7eb;
    background:#fff;
    font-size:14px;
}

/* focus */
.select-pill:focus,
.date-input:focus{
    outline:none;
    border-color:var(--accent);
}

/* ===== DATE FIELD (with icon) ===== */
.date-field{
    position:relative;
    display:flex;
    align-items:center;
}

.date-input{
    padding-right:40px;
    appearance:none;
    -webkit-appearance:none;
}

/* calendar icon */
.date-icon{
    position:absolute;
    right:12px;
    font-size:16px;
    pointer-events:none;
    opacity:0.6;
}

/* dark mode support */
body.dark .select-pill,
body.dark .date-input{
    background:#1f2937;
    border-color:#374151;
    color:#fff;
}
/* ================= ADDRESS ================= */
.address-bar{
  display:flex;
  justify-content:space-between;
  gap:8px;
  font-size:13px;
  color:var(--muted);
  margin-bottom:10px;
}

.address-text{
  flex:1;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.address-change-btn{
  border:none;
  background:none;
  color:var(--accent);
  font-weight:600;
  cursor:pointer;
}

/* ================= SEARCH ================= */
.search-box{
  position:relative;
}

.search-input{
  width:100%;
  padding:12px;
  border-radius:12px;
  border:1px solid #e6e6e9;
}

/* ================= CATEGORY ================= */
.category-tabs{
  display:flex;
  gap:8px;
  overflow-x:auto;
  padding:8px 0;
  margin-bottom:10px;
}

.cat{
  padding:8px 14px;
  border-radius:18px;
  background:#f3f4f6;
  font-size:12px;
  white-space:nowrap;
}

.cat.active{
  background:var(--accent);
  color:#fff;
}

/* ================= MENU CARD ================= */

.menu-item{
  display:flex;
  gap:12px;
  background:#fff;
  padding:12px;
  border-radius:14px;
  margin-bottom:12px;
  box-shadow:0 4px 14px rgba(2,6,23,0.05);

  /* 🔥 PREVENT WRAP BREAK */
  align-items:flex-start;
}

.menu-thumb{
  width:96px;
  height:80px;
  border-radius:10px;
  object-fit:cover;
  flex-shrink:0;
  background:#eee;
}

.menu-main{
  flex:1;
  min-width:0;
  display:flex;
  flex-direction:column;
}

.menu-title{
  display:flex;
  flex-direction:column;
  gap:4px;
}

/* badges row */
.menu-title-row{
  display:flex;
  gap:6px;
  align-items:center;
}

/* actual title */
.menu-title-text{
  font-size:14px;
  font-weight:700;
  line-height:1.3;

  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;

  word-break:break-word;
}



.menu-desc{
  font-size:12px;
  color:#6b7280;
  margin-top:4px;

  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.menu-meta{
  margin-top:6px;
  font-weight:700;
  font-size:14px;
}

.menu-right{
  display:flex;
  align-items:flex-end;
}

/* ================= QTY ================= */

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

.qty-btn{
  width:32px;
  height:32px;
  border:none;
  border-radius:8px;
  font-size:16px;
  font-weight:800;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
}

.qty-btn.plus{ background:var(--success); }
.qty-btn.minus{ background:var(--accent); }

.qty-value{
  min-width:26px;
  text-align:center;
  font-weight:700;
}


/* ================= BOTTOM NAV FIX ================= */
/* NAV */
.bottom-nav {

    bottom: 0;
    left: 0;
    right: 0;

    height: var(--nav-height);
    background: #fff;

    border-top: 1px solid #eee;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);

    display: flex;
    justify-content: space-around;
    align-items: center;

    z-index: 999;
    transition: transform 0.25s ease;
}

/* HIDE (only when scrolling UP) */
.bottom-nav.hide {
    transform: translateY(100%);
}

/* LINKS */
.bottom-nav a {
    flex: 1;
    text-align: center;
    text-decoration: none;
    color: #777;
    font-size: 11px;
    position: relative;
}

.bottom-nav a span {
    display: block;
    font-size: 20px;
}

.bottom-nav a label {
    display: block;
    font-size: 10px;
    margin-top: 2px;
}

.bottom-nav a.active {
    color: #000;
    font-weight: 600;
}

/* BADGE */
.badge {
    position: absolute;
    top: 2px;
    right: 18%;
    background: red;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 20px;
}

/* iPhone safe area */
@supports (padding: max(0px)) {
    .bottom-nav {
        padding-bottom: max(env(safe-area-inset-bottom), 6px);
        height: calc(var(--nav-height) + env(safe-area-inset-bottom));
    }
}

.cart-amount{
    font-size: 10px;
    color: #16a34a;
    margin-top: 2px;
    font-weight: 600;
}

/* Desktop centered */
@media (min-width: 768px) {

    .bottom-nav {
        max-width: 480px;
        margin: 0 auto;
        border-radius: 16px 16px 0 0;
    }

    .page-content {
        padding-bottom: 20px;
    }

    body {
        padding-bottom: 40px;
    }
}

/* PAGE-SPECIFIC CART BAR */
.page-cart-bar{
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);

    width: 70px;
    height: 140px;

    writing-mode: vertical-rl;
    text-orientation: mixed;

    background: linear-gradient(135deg,#ff3b30,#ff5f57);
    color:#fff;

    border-radius: 12px 0 0 12px;

    display:flex;
    align-items:center;
    justify-content:center;

    z-index:1000;
}
/* hide when empty */
.page-cart-bar.hidden{
    display:none;
}

/* BODY SPACE (CRITICAL) */
body{
    padding-bottom: calc(var(--nav-height) + 20px);
}

/* DESKTOP */
@media(min-width:768px){
    .page-cart-bar{
        right: 0;
        left: auto;
        transform: translateY(-50%);
    }
}
.page-cart-bar{
    z-index: 9999;
}
/* ================= DESKTOP ================= */


.fab-action{
    position: fixed;
    right: 16px;
    bottom: calc(var(--nav-height) + 16px);

    width: 64px;
    height: 64px;
    border-radius: 16px; /* 👈 NOT circle */

    background: linear-gradient(135deg,#ff3b30,#ff5f57);
    color:#fff;

    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;

    font-size:14px;
    font-weight:600;

    z-index:1001;
}

/* badge */
.fab-badge{
    position:absolute;
    top:-4px;
    right:-4px;

    background:red;
    color:#fff;
    font-size:10px;

    padding:2px 6px;
    border-radius:20px;
}
@media(min-width:768px){
  .sticky-cart{
    left:50%;
    transform:translateX(-50%);
    max-width:520px;
    border-radius:16px;
  }
}

/* ===== FOOTER VISIBILITY FIX ===== */
.app-footer {
  position: relative;
  z-index: 1;
}

/* prevent any clipping */
.page-wrapper {
  overflow: visible !important;
}