/* ===== RESPONSIVE — MOBILE BOTTOM SHEET ===== */
@media (max-width: 768px) {
  body {
    flex-direction: column;
    overflow: hidden;
    height: 100vh;
  }

  /* Menu fills full screen, bottom padding = 10vh tab */
  .menu-panel {
    flex: 1;
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    padding: 24px 16px calc(10vh + 16px);
  }

  /* ── CART: fixed 10vh tab at bottom ── */
  .cart-panel {
    position: fixed !important;
    bottom: 0 !important;
    top: auto !important;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--surface);
    border-left: none;
    border-radius: 20px 20px 0 0;
    border-top: 1px solid var(--border);
    box-shadow: 0 -8px 40px rgba(0,0,0,0.7);
    z-index: 100;
    display: flex;
    flex-direction: column;
    /* Default: only tab bar height */
    height: 10vh;
    min-height: 52px;
    overflow: hidden;
    transition: height 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  }

  /* Expanded: slide up to 70vh */
  .cart-panel.expanded {
    height: 70vh;
  }

  /* Drag handle pill */
  .cart-panel::before {
    content: '';
    position: absolute;
    top: 7px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    pointer-events: none;
    flex-shrink: 0;
  }

  /* Tab bar row — always visible */
  .cart-header {
    cursor: pointer;
    user-select: none;
    flex-shrink: 0;
    height: 10vh;
    min-height: 52px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 10px;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
  }

  .cart-panel.expanded .cart-header {
    border-bottom-color: var(--border);
  }

  /* Hide desktop elements in tab */
  .cart-header .cart-title  { display: none; }
  .cart-table-info          { display: none !important; }

  /* Tab: count bubble */
  .cart-tab-count {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--gold);
    color: #0f0e0c;
    font-weight: 800;
    font-size: 0.82rem;
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  /* Tab: subtotal */
  .cart-tab-price {
    flex: 1;
    font-size: 1rem;
    font-weight: 700;
    color: var(--gold-light);
    display: block !important;
  }

  .cart-tab-price .currency {
    font-size: 0.72rem;
    font-weight: 400;
    opacity: 0.7;
    margin-right: 1px;
  }

  /* Tab: small confirm button */
  .cart-tab-confirm {
    height: 34px;
    padding: 0 14px;
    background: var(--gold);
    color: #0f0e0c;
    border: none;
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex !important;
    align-items: center;
    gap: 4px;
    transition: background 0.15s, opacity 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.4px;
  }

  .cart-tab-confirm:disabled { opacity: 0.3; cursor: not-allowed; }
  .cart-tab-confirm:not(:disabled):hover { background: var(--gold-light); }

  /* Items list scrolls */
  .cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
    min-height: 0;
  }

  /* Compact footer */
  .cart-footer {
    flex-shrink: 0;
    padding: 8px 16px 14px;
  }

  .cart-footer .cart-summary-row { margin-bottom: 3px; }
  .cart-footer .cart-summary-row .label,
  .cart-footer .cart-summary-row .value {
    font-size: 0.7rem;
    color: var(--text-dim);
  }

  .cart-footer .cart-summary-divider { margin: 5px 0; }

  /* Total + confirm button side by side */
  .cart-footer .cart-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
    gap: 10px;
  }

  .cart-footer .cart-total-label { font-size: 0.85rem; }
  .cart-footer .cart-total-value { font-size: 1.4rem; flex: 1; }

  /* Hide desktop buttons */
  .cart-footer .order-btn,
  .cart-footer .checkout-btn,
  .cart-footer .clear-btn { display: none !important; }

  /* Inline confirm beside total */
  .cart-footer-confirm-btn {
    height: 40px;
    padding: 0 16px;
    background: var(--gold);
    color: #0f0e0c;
    border: none;
    border-radius: 12px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 0.78rem;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex !important;
    align-items: center;
    gap: 4px;
    transition: background 0.15s;
    text-transform: uppercase;
  }

  .cart-footer-confirm-btn:disabled { opacity: 0.3; cursor: not-allowed; }
  .cart-footer-confirm-btn:not(:disabled):hover { background: var(--gold-light); }

  /* Backdrop */
  .cart-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s;
  }

  .cart-backdrop.visible {
    display: block;
    opacity: 1;
  }
}

/* Hide mobile-only elements on desktop */
.cart-mini-preview      { display: none; }
.cart-tab-count         { display: none; }
.cart-tab-price         { display: none; }
.cart-tab-confirm       { display: none; }
.cart-footer-confirm-btn{ display: none; }
