/* =========================================================
   Lebak Cafe - Slim & Responsive Menu Card (FULL VERSION)
   - Fixed: Close Button, Large Overlay Image, Red Bottom Bar
   ========================================================= */

.menu-wrap {
  width: 95%;
  max-width: 980px;
  margin: 0 auto;
  padding: 100px 0 120px; /* Ruang bawah untuk bottom bar */
}

/* ===== Menu Header: Title + Search (theme) ===== */
.menu-title{
  margin: 6px 15px 10px;
  font-family: 'Playfair Display', serif;
  font-size: 1.7rem;
  letter-spacing: 0.2px;
  color: #111;
}

.menu-search{
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 15px 10px;
  padding: 12px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 8px 22px rgba(0,0,0,0.06);
}
.menu-search svg{ color: #d60000; }
.menu-search input{
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-weight: 700;
  font-size: 0.92rem;
  color: #111;
}
.menu-search input::placeholder{ color: rgba(17,17,17,0.45); font-weight: 600; }
.menu-search:focus-within{
  border-color: rgba(214,0,0,0.35);
  box-shadow: 0 10px 26px rgba(214,0,0,0.12);
}

/* --- 1. KATEGORI STICKY (Lutsinar & Blur) --- */
.menu-top {
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  padding: 10px 0;
}

.menu-chips {
  display: flex;
  gap: 8px;
  padding: 5px 15px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.menu-chips::-webkit-scrollbar { display: none; }

.menu-chip {
  flex: 0 0 auto;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.1);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  color: #444;
  cursor: pointer;
  transition: all 0.2s ease;
}

.menu-chip.is-active {
  background: #d60000 !important;
  color: #fff !important;
  border-color: #d60000 !important;
}

.menu-chip:active{ transform: translateY(1px); }

/* Label Tajuk Kategori Section */
.category-label {
  margin: 30px 15px 15px;
  font-weight: 900;
  font-size: 1.1rem;
  color: #d60000;
  border-left: 5px solid #d60000;
  padding-left: 12px;
  text-transform: uppercase;
}

/* --- 2. GRID & SLIM CARD (96px) --- */
.menu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 0 12px;
}

@media (min-width: 768px) {
  .menu-grid { grid-template-columns: 1fr 1fr; }
}

.menu-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 16px;
  display: grid;
  grid-template-columns: 96px 1fr;
  min-height: 96px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  position: relative;
  cursor: pointer;
}

.menu-card__img {
  width: 96px;
  height: 96px;
  object-fit: cover;
}

.menu-card__body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.menu-card__name {
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.2;
  color: #111;
}

.menu-card__desc {
  font-size: 0.78rem;
  color: #666;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 2px;
}

.menu-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.menu-price {
  font-weight: 800;
  font-size: 0.9rem;
  color: #111;
}

/* --- 3. KAWALAN KUANTITI (Card) --- */
.menu-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f1f1f1;
  border-radius: 10px;
  padding: 3px 6px;
}

.menu-qty__btn {
  width: 24px;
  height: 24px;
  background: #d60000;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-qty__val {
  font-weight: 800;
  font-size: 0.85rem;
  min-width: 18px;
  text-align: center;
}

/* --- 4. OVERLAY MENU SHEET (Popup) --- */
.menu-sheet {
  position: fixed !important;
  inset: 0;
  z-index: 20000 !important;
  visibility: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.menu-sheet.is-open { visibility: visible; }

.menu-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.menu-sheet.is-open .menu-sheet__backdrop { opacity: 1; }

.menu-sheet__panel {
  position: relative;
  width: 100%;
  max-width: 500px;
  background: #fff;
  border-radius: 24px 24px 0 0;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 2;
  padding: 25px 20px 40px;
  max-height: 90vh;
  overflow-y: auto;
}
.menu-sheet.is-open .menu-sheet__panel { transform: translateY(0); }

/* FIX: Butang Tutup (X) di Atas Kanan Panel Overlay */
.menu-sheet__close {
  position: absolute !important;
  top: 15px;
  right: 15px;
  width: 32px;
  height: 32px;
  background: #f0f0f0;
  color: #333;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  line-height: 1;
}

/* FIX: Gambar dlm Overlay (Besar & Menarik) */
.menu-sheet__img {
  width: 100% !important;
  max-width: 320px !important; 
  height: 180px !important;
  object-fit: cover !important;
  border-radius: 16px !important;
  margin: 10px auto 20px !important;
  display: block !important;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* ===== Overlay: Nota + Panas/Sejuk (lebih kemas ikut tema) ===== */
.menu-sheet__note{ margin-top: 14px; }
.menu-sheet__label{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 900;
  font-size: 0.92rem;
  color: #111;
  margin: 0 0 8px;
}
.menu-sheet__optional{
  font-weight: 900;
  font-size: 0.78rem;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.05);
  color: rgba(0,0,0,0.65);
}

.menu-sheet__textarea,
.menu-sheet__select{
  width: 100%;
  border: 1px solid rgba(0,0,0,0.10);
  background: #fff;
  border-radius: 14px;
  padding: 12px 12px;
  font-weight: 700;
  font-size: 0.92rem;
  color: #111;
  outline: none;
  box-shadow: 0 8px 18px rgba(0,0,0,0.05);
}

.menu-sheet__textarea:focus,
.menu-sheet__select:focus{
  border-color: rgba(214,0,0,0.35);
  box-shadow: 0 10px 22px rgba(214,0,0,0.12);
}

/* Dropdown yang nampak premium */
.menu-sheet__select{
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(0,0,0,0.55) 50%),
    linear-gradient(135deg, rgba(0,0,0,0.55) 50%, transparent 50%),
    linear-gradient(to right, transparent, transparent);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%,
    0 0;
  background-size: 6px 6px, 6px 6px, 100% 100%;
  background-repeat: no-repeat;
  padding-right: 36px;
}

.menu-sheet__note--drink .menu-sheet__label{ color: #d60000; }

/* Dua butang untuk panas/sejuk */
.drink-toggle{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}
.drink-pill{
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.10);
  background: #fff;
  font-weight: 900;
  color: #111;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0,0,0,0.05);
}
.drink-pill.is-active{
  background: #d60000;
  border-color: #d60000;
  color: #fff;
  box-shadow: 0 10px 22px rgba(214,0,0,0.18);
}
.drink-pill:active{ transform: scale(0.98); }

/* Select kekal sebagai fallback/compatibility tapi disorok bila UI pill ada */
.menu-sheet__note--drink .menu-sheet__select{
  position: absolute;
  opacity: 0;
  pointer-events: none;
  height: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
}

/* MS Chips (Pilihan Combo dlm Overlay) */
.ms-chip {
  padding: 10px 18px;
  border-radius: 50px;
  border: 1px solid #ddd;
  background: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  margin: 0 8px 8px 0;
  cursor: pointer;
  transition: 0.2s;
  color: #444;
}

/* Container pilihan combo */
.menu-sheet__options {
  margin-top: 14px;
}

.ms-group {
  margin: 14px 0 10px;
  padding: 12px;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 16px;
  background: #fff;
}

.ms-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 900;
  font-size: 0.92rem;
  color: #111;
  margin-bottom: 10px;
}

.ms-count {
  font-weight: 900;
  font-size: 0.82rem;
  color: #d60000;
  background: rgba(214, 0, 0, 0.08);
  padding: 6px 10px;
  border-radius: 999px;
}

.ms-row {
  display: flex;
  flex-wrap: wrap;
}

.ms-empty {
  font-size: 0.85rem;
  color: #666;
  padding: 6px 2px;
}

/* Fixed includes box */
.fixed-includes-box {
  margin: 12px 0;
  padding: 12px;
  border-radius: 16px;
  background: #fafafa;
  border: 1px solid rgba(0,0,0,0.06);
}

.fixed-label {
  font-weight: 900;
  color: #111;
  margin-bottom: 6px;
}

.fixed-list {
  font-size: 0.88rem;
  color: #444;
  line-height: 1.45;
}

.ms-chip.is-active {
  background: #d60000 !important;
  color: #fff !important;
  border-color: #d60000 !important;
}

/* Butang "Tambah ke Cart" (Pill-style seragam dengan UI lain) */
.menu-sheet__add {
  display: block;
  width: 100%;
  height: 50px;
  background: #d60000;
  color: #fff;
  border: none;
  border-radius: 50px;
  font-weight: 800;
  font-size: 1rem;
  margin-top: 20px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(214, 0, 0, 0.3);
  transition: transform 0.2s ease;
}
.menu-sheet__add:active { transform: scale(0.96); }

.menu-sheet__add:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

/* Status Stok Habis */
.is-out-of-stock { opacity: 0.5; filter: grayscale(1); pointer-events: none; }
.habis-tag { 
  position: absolute; inset: 0; 
  background: rgba(255,255,255,0.6); 
  display: flex; align-items: center; justify-content: center; 
  font-weight: 900; color: #d60000; font-size: 0.8rem; 
}

/* --- 5. BOTTOM BAR (Merah Solid & Stabil) --- */
.bottom-bar {
  position: fixed !important;
  bottom: 20px !important;
  left: 0 !important;
  right: 0 !important;
  margin: 0 auto !important;
  width: 90% !important;
  max-width: 400px !important;
  height: 60px !important;
  background: #d60000 !important;
  border-radius: 50px !important;
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  align-items: center !important;
  z-index: 10000 !important;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3) !important;
  transform: none !important;
}

.bottom-bar__btn {
  background: transparent !important;
  border: none !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer;
  color: #fff !important;
}

.bottom-bar__btn:active { 
  background: rgba(255, 255, 255, 0.1) !important; 
}

.bb-icon svg { stroke: #fff !important; }
.bb-badge { background: #fff !important; color: #d60000 !important; }


.ms-chip { position: relative; }
.ms-count{
  margin-left: 8px;
  font-weight: 800;
  font-size: 0.85em;
  opacity: 0.9;
}

.ms-chip { position: relative; }
.ms-count{
  margin-left: 8px;
  font-weight: 800;
  font-size: 0.85em;
  opacity: 0.9;
}

/* ===== Combo badge count (x2) ===== */
.ms-chip{
  position: relative;
  overflow: visible; /* penting supaya badge tak kena clip */
}

.ms-chip .ms-count{
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 26px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  background: #e60012;
  color: #fff;
  box-shadow: 0 6px 14px rgba(0,0,0,0.18);
  pointer-events: none;
}



/* =========================================
   FULLSCREEN LOADING (Lebak)
   ========================================= */
.lc-loading{
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;

  /* fade */
  opacity: 1;
  transition: opacity .25s ease;
}

.lc-loading.is-hidden{
  opacity: 0;
  pointer-events: none;
}

.lc-loading__center{
  display: grid;
  place-items: center;
}

.lc-loading__ring{
  width: 72px;
  height: 72px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  animation: lcSpin 0.9s linear infinite;
}

.lc-loading__logo{
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 999px;
  display: block;
}

@keyframes lcSpin{
  from{ transform: rotate(0deg); }
  to{ transform: rotate(360deg); }
}
