/* product detail screen */

    /* ══ PRODUCT DETAIL SCREEN ════════════════════════════════════ */
    .prod-detail-screen {
      position: absolute; inset: 0;
      display: flex; flex-direction: column;
      background: var(--bg);
      overflow: hidden;
    }
    .prod-detail-hero {
      position: relative; height: 300px; flex-shrink: 0;
      background: var(--surface2);
      display: flex; align-items: center; justify-content: center;
    }
    .prod-detail-hero-img {
      width: 100%; height: 100%;
      object-fit: cover; display: block;
    }
    .prod-detail-hero-emoji {
      font-size: 96px; line-height: 1;
      filter: drop-shadow(0 8px 24px rgba(0,0,0,0.15));
    }
    .prod-detail-back {
      position: absolute; top: max(16px, calc(env(safe-area-inset-top,16px) + 4px)); left: 16px;
      width: 36px; height: 36px; border-radius: 50%;
      background: rgba(255,255,255,0.88); backdrop-filter: blur(8px);
      border: 1px solid var(--border);
      display: flex; align-items: center; justify-content: center;
      cursor: pointer; z-index: 5; color: var(--text);
      box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    .prod-detail-back svg { width: 18px; height: 18px; }
    .prod-detail-badge {
      position: absolute; top: max(16px, calc(env(safe-area-inset-top,16px) + 4px)); right: 16px;
      padding: 4px 10px; border-radius: 999px;
      font-size: 10px; font-weight: 800; letter-spacing: 0.5px;
      text-transform: uppercase;
    }
    .prod-detail-badge.limited {
      background: rgba(255,107,74,0.9); color: white;
    }
    .prod-detail-badge.available {
      background: rgba(74,222,128,0.15); color: #16a34a;
      border: 1px solid rgba(74,222,128,0.3);
    }
    .prod-detail-body {
      flex: 1; overflow-y: auto; padding: 16px 16px 120px;
      scrollbar-width: none;
    }
    .prod-detail-body::-webkit-scrollbar { display: none; }
    .prod-detail-name {
      font-size: 24px; font-weight: 900;
      letter-spacing: -0.4px; line-height: 1.15;
      margin-bottom: 4px;
    }
    .prod-detail-price-row {
      display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
    }
    .prod-detail-price {
      font-size: 26px; font-weight: 900; color: var(--accent);
    }
    .prod-detail-earn {
      font-size: 11px; font-weight: 700;
      color: #16a34a;
      background: rgba(74,222,128,0.1);
      border: 1px solid rgba(74,222,128,0.2);
      padding: 3px 8px; border-radius: 999px;
    }
    .prod-detail-desc {
      font-size: 14px; line-height: 1.65; color: var(--text2);
      margin-bottom: 16px;
    }
    .prod-detail-tag-row {
      display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px;
    }
    .prod-detail-tag {
      padding: 4px 10px; border-radius: 999px;
      font-size: 11px; font-weight: 600;
      background: var(--surface2); border: 1px solid var(--border);
      color: var(--text2);
    }
    .prod-detail-tag.highlight {
      background: rgba(255,107,74,0.08);
      border-color: rgba(255,107,74,0.2);
      color: var(--accent);
    }
    .prod-detail-location-row {
      display: flex; align-items: center; gap: 10px;
      padding: 12px 14px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      margin-bottom: 12px; cursor: pointer;
    }
    .prod-detail-location-icon { font-size: 20px; flex-shrink: 0; }
    .prod-detail-location-name { font-size: 13px; font-weight: 700; }
    .prod-detail-location-sub { font-size: 11px; color: var(--text3); }
    .prod-detail-stock-row {
      display: flex; align-items: center; justify-content: space-between;
      padding: 10px 14px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      margin-bottom: 12px;
    }
    .prod-detail-stock-label { font-size: 12px; color: var(--text3); font-weight: 600; }
    .prod-detail-stock-val { font-size: 13px; font-weight: 800; }
    .prod-detail-stock-val.low { color: var(--accent); }
    .prod-detail-stock-val.out { color: var(--red); }
    .prod-detail-coin-row {
      display: flex; align-items: center; gap: 8px;
      padding: 10px 14px;
      background: linear-gradient(135deg, rgba(255,107,74,0.04), rgba(255,107,74,0.01));
      border: 1px solid rgba(255,107,74,0.14);
      border-radius: var(--radius-sm);
      margin-bottom: 12px;
      font-size: 12px;
    }
    .prod-detail-coin-icon { font-size: 18px; flex-shrink: 0; }
    .prod-detail-coin-text { color: var(--text2); }
    .prod-detail-coin-text strong { color: var(--text); }
    .prod-detail-footer {
      position: absolute; bottom: 0; left: 0; right: 0;
      padding: 12px 16px max(16px, calc(env(safe-area-inset-bottom,16px) + 4px));
      background: linear-gradient(to top, var(--bg) 82%, transparent);
      display: flex; flex-direction: column; gap: 8px;
    }
    .prod-add-btn {
      width: 100%; padding: 15px;
      background: var(--accent); color: white;
      border: none; border-radius: var(--radius-sm);
      font-size: 16px; font-weight: 800;
      cursor: pointer; font-family: inherit;
      box-shadow: 0 4px 16px rgba(255,107,74,0.3);
      transition: transform 0.15s;
    }
    .prod-add-btn:active { transform: scale(0.97); }
    .prod-add-btn:disabled { opacity: 0.45; cursor: default; box-shadow: none; }
    .prod-add-btn.added {
      background: var(--green);
      box-shadow: 0 4px 16px rgba(74,222,128,0.3);
    }

    .events-header {
      padding: 16px;
      padding-top: max(16px, calc(env(safe-area-inset-top, 16px) + 4px));
    }
    .events-header h1 {
      font-size: 28px;
      font-weight: 800;
      margin-bottom: 4px;
    }
    .events-header p { font-size: 13px; color: var(--text2); }
    .events-content { padding: 0 16px; }

    .cart-fab {
      position: fixed;
      bottom: calc(var(--nav-h) + var(--safe-bottom) + 16px);
      right: 16px;
      z-index: 900;
      width: 56px; height: 56px;
      border-radius: 50%;
      background: var(--accent);
      color: white;
      border: none;
      display: none;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      box-shadow: 0 4px 24px rgba(255,107,74,0.3);
      transition: all 0.2s;
    }
    .cart-fab.show { display: flex; }
    .cart-fab:active { transform: scale(0.9); }
    .cart-fab svg { width: 24px; height: 24px; }
    .cart-fab .cart-count {
      position: absolute;
      top: -2px; right: -2px;
      width: 20px; height: 20px;
      border-radius: 50%;
      background: white;
      color: var(--accent);
      font-size: 11px;
      font-weight: 800;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .sheet-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.35);
      z-index: 2000;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s;
    }
    .sheet-overlay.show { opacity: 1; pointer-events: auto; }

    .sheet {
      position: fixed;
      bottom: 0; left: 0; right: 0;
      z-index: 2001;
      background: linear-gradient(to bottom, rgba(252,248,244,0.98) 0%, rgba(248,243,238,0.99) 100%);
      backdrop-filter: blur(28px) saturate(1.5);
      -webkit-backdrop-filter: blur(28px) saturate(1.5);
      border-radius: 22px 22px 0 0;
      border-top: 1px solid rgba(220,200,185,0.5);
      box-shadow: 0 -4px 40px rgba(140,80,50,0.14), 0 1px 0 rgba(255,255,255,0.8) inset;
      max-height: 85dvh;
      transform: translateY(100%);
      transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
      display: flex;
      flex-direction: column;
      visibility: hidden;
    }
    .sheet.show { transform: translateY(0); visibility: visible; }

    .sheet-handle {
      width: 36px; height: 4px;
      border-radius: 2px;
      background: var(--text3);
      margin: 10px auto 0;
      flex-shrink: 0;
    }
    .sheet-header {
      padding: 16px 20px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-bottom: 1px solid var(--border);
      flex-shrink: 0;
    }
    .sheet-header h2 { font-size: 18px; font-weight: 700; }
    .sheet-close {
      width: 32px; height: 32px;
      border-radius: 50%;
      background: var(--surface2);
      border: none;
      color: var(--text);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: 18px;
    }

    .sheet-body {
      flex: 1;
      overflow-y: auto;
      padding: 16px 20px;
    }

    .cart-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 0;
      border-bottom: 1px solid var(--border);
    }
    .cart-item:last-child { border-bottom: none; }
    .cart-item-emoji { font-size: 28px; }
    .cart-item-info { flex: 1; }
    .cart-item-name { font-weight: 600; font-size: 14px; }
    .cart-item-price { font-size: 13px; color: var(--text2); }

    .qty-controls {
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .qty-btn {
      width: 28px; height: 28px;
      border-radius: 7px;
      background: var(--surface2);
      border: 1px solid var(--border);
      color: var(--text);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: 16px;
      font-weight: 600;
    }
    .qty-val { font-weight: 700; font-size: 14px; min-width: 20px; text-align: center; }

    .sheet-footer {
      padding: 16px 20px;
      padding-bottom: calc(16px + var(--safe-bottom));
      border-top: 1px solid var(--border);
      flex-shrink: 0;
    }
    .total-row {
      display: flex;
      justify-content: space-between;
      margin-bottom: 14px;
    }
    .total-label { font-size: 14px; color: var(--text2); }
    .total-value { font-size: 20px; font-weight: 800; }

    .checkout-btn {
      width: 100%;
      padding: 15px;
      border-radius: var(--radius-sm);
      background: var(--accent);
      color: white;
      font-size: 15px;
      font-weight: 800;
      border: none;
      cursor: pointer;
      font-family: inherit;
      transition: all 0.2s;
      letter-spacing: 0.2px;
      box-shadow: 0 4px 18px rgba(232,93,58,0.35);
    }
    .checkout-btn:active { transform: scale(0.97); }
    .checkout-btn:disabled { opacity: 0.5; cursor: default; }

    .timeslot-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 8px;
      margin: 12px 0;
    }
    .timeslot {
      padding: 10px 6px;
      border-radius: 8px;
      background: var(--surface2);
      border: 1px solid var(--border);
      text-align: center;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
    }
    .timeslot.selected {
      background: var(--accent-glow);
      border-color: var(--accent);
      color: var(--accent);
    }

    .orders-header {
      padding: 16px;
      padding-top: max(16px, calc(env(safe-area-inset-top, 16px) + 4px));
    }
    .orders-header h1 { font-size: 28px; font-weight: 800; margin-bottom: 4px; }
    .orders-header p { font-size: 13px; color: var(--text2); }
    .orders-content { padding: 0 16px; }

    .order-card {
      background: var(--glass-strong);
      border: 1px solid var(--glass-border);
      border-radius: var(--radius);
      box-shadow: 0 2px 12px rgba(140,80,50,0.08), 0 1px 0 rgba(255,255,255,0.9) inset;
      padding: 16px;
      margin-bottom: 12px;
      cursor: pointer;
      transition: all 0.2s;
    }
    .order-card:active { transform: scale(0.98); }
    .order-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 10px;
    }
    .order-id { font-weight: 700; font-size: 14px; }
    .order-status {
      font-size: 11px;
      font-weight: 700;
      padding: 4px 10px;
      border-radius: 20px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }
    .status-preparing { background: rgba(217,119,6,0.1); color: #d97706; }
    .status-ready { background: rgba(22,163,74,0.1); color: #16a34a; }
    .status-completed { background: rgba(37,99,235,0.1); color: #2563eb; }
    .status-cancelled { background: rgba(220,38,38,0.1); color: #dc2626; }

    .order-location { font-size: 13px; color: var(--text2); margin-bottom: 6px; }
    .order-items-summary { font-size: 12px; color: var(--text3); margin-bottom: 10px; }
    .order-bottom {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding-top: 10px;
      border-top: 1px solid var(--border);
    }
    .order-time { font-size: 12px; color: var(--text3); }
    .order-total { font-weight: 700; color: var(--accent); }

    .order-detail-items { margin: 12px 0; }
    .order-detail-item {
      display: flex;
      justify-content: space-between;
      padding: 8px 0;
      font-size: 13px;
      border-bottom: 1px solid var(--border);
    }
    .order-detail-item:last-child { border: none; }

    .pickup-instructions {
      background: linear-gradient(135deg, rgba(255,248,244,0.9) 0%, rgba(255,240,232,0.85) 100%);
      border: 1px solid rgba(232,93,58,0.18);
      border-radius: var(--radius-sm);
      padding: 14px;
      margin-top: 12px;
    }
    .pickup-instructions h4 {
      font-size: 13px;
      font-weight: 700;
      margin-bottom: 6px;
      color: var(--accent);
    }
    .pickup-instructions p {
      font-size: 12px;
      color: var(--text2);
      line-height: 1.5;
    }

    .qr-container {
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 20px;
      margin-top: 12px;
      background: white;
      border-radius: var(--radius-sm);
    }
    .qr-container canvas { border-radius: 8px; }

