/* ── Public Menu (pm- prefix) ────────────────────────────────────────── */
/* Dark theme matching the platform design language */

.pm-page {
    min-height: 100vh;
    background: #0F1412;
    color: #E8E8E8;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding-bottom: 80px; /* space for cart bar */
}

/* ── Loading & Error ─────────────────────────────────────────────── */
.pm-loading, .pm-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 40px 20px;
}
.pm-loading .pm-spinner {
    width: 40px; height: 40px;
    border: 3px solid #2E2E2E;
    border-top-color: #2DD4BF;
    border-radius: 50%;
    animation: pm-spin 0.8s linear infinite;
    margin-bottom: 16px;
}
@keyframes pm-spin { to { transform: rotate(360deg); } }
.pm-error i { font-size: 48px; color: #EF4444; margin-bottom: 16px; }
.pm-error h2 { color: #E8E8E8; margin: 0 0 8px; }
.pm-error p { color: #9CA3AF; margin: 0 0 20px; }

/* ── Buttons ──────────────────────────────────────────────────────── */
.pm-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    transition: all 0.2s ease;
}
.pm-btn-primary { background: #2DD4BF; color: #0F1412; }
.pm-btn-primary:hover { background: #14B8A6; }
.pm-btn-add { background: transparent; border: 1px solid #2DD4BF; color: #2DD4BF; }
.pm-btn-add:hover { background: rgba(45,212,191,0.15); }
.pm-btn-checkout { background: #2DD4BF; color: #0F1412; font-weight: 700; }
.pm-btn-checkout:hover { background: #14B8A6; }
.pm-btn-text { background: none; color: #9CA3AF; font-weight: 400; padding: 4px 8px; }
.pm-btn-text:hover { color: #EF4444; }
.pm-btn-sm { padding: 4px 10px; font-size: 14px; background: #1A1D1C; color: #E8E8E8; border: 1px solid #2E2E2E; }
.pm-btn-sm:hover { border-color: #2DD4BF; }
.pm-btn-block { width: 100%; justify-content: center; padding: 12px; }

/* ── Header ──────────────────────────────────────────────────────── */
.pm-header {
    background: linear-gradient(135deg, #1A1D1C 0%, #0F1412 100%);
    border-bottom: 1px solid #2E2E2E;
    padding: 24px 20px;
}
.pm-header-content {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.pm-restaurant-name {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 4px;
    color: #FFFFFF;
}
.pm-restaurant-address {
    color: #9CA3AF;
    font-size: 14px;
    margin: 0 0 10px;
}
.pm-restaurant-address i { margin-right: 4px; color: #2DD4BF; }
.pm-status-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.pm-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}
.pm-status-badge.pm-open { background: rgba(45,212,191,0.15); color: #2DD4BF; }
.pm-status-badge.pm-closed { background: rgba(239,68,68,0.15); color: #EF4444; }
.pm-hours { color: #9CA3AF; font-size: 13px; }
.pm-hours i { margin-right: 4px; }
.pm-restaurant-logo {
    width: 72px; height: 72px;
    border-radius: 16px;
    object-fit: cover;
    border: 2px solid #2E2E2E;
    flex-shrink: 0;
}

/* ── Sections ────────────────────────────────────────────────────── */
.pm-section {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 20px;
}
.pm-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.pm-section-title i { color: #2DD4BF; }

/* ── Search ───────────────────────────────────────────────────────── */
.pm-search-bar {
    position: relative;
    margin-bottom: 16px;
}
.pm-search-bar i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #6B7280;
}
.pm-search-input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    background: #1A1D1C;
    border: 1px solid #2E2E2E;
    border-radius: 10px;
    color: #E8E8E8;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}
.pm-search-input::placeholder { color: #6B7280; }
.pm-search-input:focus { border-color: #2DD4BF; }

/* ── Category Tabs ────────────────────────────────────────────────── */
.pm-category-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 20px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.pm-category-tabs::-webkit-scrollbar { display: none; }
.pm-cat-tab {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #2E2E2E;
    background: transparent;
    color: #9CA3AF;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.pm-cat-tab:hover { border-color: #2DD4BF; color: #2DD4BF; }
.pm-cat-tab.pm-cat-active { background: #2DD4BF; color: #0F1412; border-color: #2DD4BF; font-weight: 600; }

/* ── Daily Specials ──────────────────────────────────────────────── */
.pm-specials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.pm-special-card {
    background: linear-gradient(135deg, #1A2B28 0%, #1A1D1C 100%);
    border: 1px solid #2E2E2E;
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}
.pm-special-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(45,212,191,0.1); }
.pm-special-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}
.pm-placeholder-img {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1A1D1C;
    color: #4B5563;
    font-size: 28px;
}
.pm-special-info { padding: 14px; }
.pm-special-info h3 { margin: 0 0 4px; font-size: 16px; color: #FFFFFF; }
.pm-special-desc { color: #9CA3AF; font-size: 13px; margin: 0 0 10px; line-height: 1.4; }
.pm-special-prices { display: flex; align-items: baseline; gap: 8px; }
.pm-special-price { font-size: 20px; font-weight: 700; color: #2DD4BF; }
.pm-original-price { font-size: 14px; color: #6B7280; text-decoration: line-through; }

/* ── Items Grid ──────────────────────────────────────────────────── */
.pm-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.pm-item-card {
    background: #1A1D1C;
    border: 1px solid #2E2E2E;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}
.pm-item-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.pm-item-img-wrap { position: relative; }
.pm-item-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}
.pm-item-badge {
    position: absolute;
    top: 8px; right: 8px;
    background: #EF4444;
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
}
.pm-item-body { padding: 12px; }
.pm-item-name { font-size: 15px; font-weight: 600; color: #FFFFFF; margin: 0 0 4px; }
.pm-item-desc { font-size: 12px; color: #9CA3AF; margin: 0 0 6px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pm-item-prep { font-size: 11px; color: #6B7280; display: inline-flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.pm-item-footer { display: flex; align-items: center; justify-content: space-between; }
.pm-item-price { font-size: 18px; font-weight: 700; color: #2DD4BF; }

/* ── Empty State ──────────────────────────────────────────────────── */
.pm-empty {
    text-align: center;
    padding: 60px 20px;
    color: #6B7280;
}
.pm-empty i { font-size: 36px; margin-bottom: 12px; }
.pm-empty p { font-size: 16px; }

/* ── Cart Bar ─────────────────────────────────────────────────────── */
.pm-cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1A1D1C;
    border-top: 1px solid #2E2E2E;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}
.pm-cart-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}
.pm-cart-count {
    background: #2DD4BF;
    color: #0F1412;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
}
.pm-cart-total { font-size: 18px; font-weight: 700; color: #FFFFFF; }
.pm-cart-toggle { color: #2DD4BF; font-size: 13px; font-weight: 500; }

/* ── Cart Panel ───────────────────────────────────────────────────── */
.pm-cart-panel {
    max-height: 0;
    overflow: hidden;
    position: fixed;
    bottom: 60px;
    left: 0;
    right: 0;
    background: #1A1D1C;
    border-top: 1px solid #2E2E2E;
    border-radius: 16px 16px 0 0;
    transition: max-height 0.3s ease, padding 0.3s ease;
    z-index: 999;
    padding: 0 20px;
}
.pm-cart-panel.pm-cart-open {
    max-height: 70vh;
    overflow-y: auto;
    padding: 20px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
}
.pm-cart-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #2E2E2E;
}
.pm-cart-panel-header h3 { margin: 0; font-size: 18px; color: #FFFFFF; }
.pm-cart-panel-header h3 i { color: #2DD4BF; margin-right: 6px; }
.pm-cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #1F2A27;
}
.pm-cart-item-info { flex: 1; }
.pm-cart-item-name { display: block; font-size: 14px; color: #E8E8E8; font-weight: 500; }
.pm-cart-item-price { font-size: 12px; color: #9CA3AF; }
.pm-cart-item-actions { display: flex; align-items: center; gap: 8px; }
.pm-cart-qty { font-size: 14px; font-weight: 600; min-width: 20px; text-align: center; }
.pm-cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    font-size: 16px;
    font-weight: 600;
    color: #FFFFFF;
    border-top: 2px solid #2E2E2E;
    margin-top: 8px;
}
.pm-cart-grand-total { color: #2DD4BF; font-size: 22px; }
.pm-cart-login-note {
    text-align: center;
    font-size: 12px;
    color: #6B7280;
    margin-top: 8px;
}
.pm-cart-login-note i { margin-right: 4px; }
.pm-cart-note {
    text-align: center;
    font-size: 12px;
    color: #2DD4BF;
    margin-top: 8px;
}
.pm-cart-note i { margin-right: 4px; }

/* ── Table Badge ───────────────────────────────────────────────────── */
.pm-table-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(45,212,191,0.15);
    color: #2DD4BF;
    border: 1px solid rgba(45,212,191,0.3);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}
.pm-table-badge i { font-size: 12px; }

/* ── Guest Checkout ──────────────────────────────────────────────── */
.pm-guest-checkout {
    max-width: 520px;
    margin: 0 auto;
    padding: 24px 20px 120px;
}
.pm-guest-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}
.pm-guest-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0;
}
.pm-guest-header h2 i { color: #2DD4BF; margin-right: 8px; }
.pm-guest-table-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(45,212,191,0.1);
    border: 1px solid rgba(45,212,191,0.25);
    border-radius: 10px;
    color: #2DD4BF;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}
.pm-guest-cart-summary {
    background: #1A1D1C;
    border: 1px solid #2E2E2E;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 24px;
}
.pm-guest-cart-summary h3 {
    font-size: 16px;
    font-weight: 600;
    color: #FFFFFF;
    margin: 0 0 12px;
}
.pm-guest-cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #1F2A27;
    font-size: 14px;
    color: #E8E8E8;
}
.pm-guest-cart-item:last-of-type { border-bottom: none; }
.pm-guest-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0 0;
    margin-top: 8px;
    border-top: 2px solid #2E2E2E;
    font-size: 18px;
    font-weight: 700;
    color: #2DD4BF;
}
.pm-guest-form {
    background: #1A1D1C;
    border: 1px solid #2E2E2E;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 16px;
}
.pm-guest-form h3 {
    font-size: 16px;
    font-weight: 600;
    color: #FFFFFF;
    margin: 0 0 16px;
}
.pm-guest-form-group {
    margin-bottom: 16px;
}
.pm-guest-form-group:last-of-type { margin-bottom: 20px; }
.pm-guest-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #9CA3AF;
    margin-bottom: 6px;
}
.pm-guest-input {
    width: 100%;
    padding: 12px 14px;
    background: #0F1412;
    border: 1px solid #2E2E2E;
    border-radius: 10px;
    color: #E8E8E8;
    font-size: 15px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.pm-guest-input::placeholder { color: #6B7280; }
.pm-guest-input:focus { border-color: #2DD4BF; box-shadow: 0 0 0 3px rgba(45,212,191,0.08); }
.pm-guest-input:disabled { opacity: 0.5; }
.pm-guest-submitting {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    color: #9CA3AF;
    font-size: 14px;
}
.pm-guest-note {
    text-align: center;
    font-size: 12px;
    color: #6B7280;
    margin: 0;
    padding: 0 20px;
}
.pm-guest-note i { margin-right: 4px; color: #4B5563; }

/* ── Bill Closed Confirmation ─────────────────────────────────────── */
.pm-confirmation .pm-btn-block {
    margin-top: 8px;
}

/* ── Confirmation Page ────────────────────────────────────────────── */
.pm-confirmation {
    max-width: 480px;
    margin: 40px auto;
    padding: 40px 24px;
    text-align: center;
}
.pm-confirm-icon {
    margin-bottom: 20px;
}
.pm-confirm-icon i {
    font-size: 72px;
    color: #2DD4BF;
}
.pm-confirmation h2 {
    font-size: 28px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0 0 4px;
}
.pm-confirm-subtitle {
    font-size: 16px;
    color: #9CA3AF;
    margin: 0 0 32px;
}
.pm-confirm-details {
    background: #1A1D1C;
    border: 1px solid #2E2E2E;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 24px;
    text-align: left;
}
.pm-confirm-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #1F2A27;
}
.pm-confirm-row:last-of-type { border-bottom: none; }
.pm-confirm-label {
    font-size: 14px;
    color: #9CA3AF;
}
.pm-confirm-value {
    font-size: 14px;
    color: #E8E8E8;
    font-weight: 500;
}
.pm-order-number {
    color: #2DD4BF;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.5px;
}
.pm-confirm-total {
    border-top: 2px solid #2E2E2E;
    margin-top: 4px;
    padding-top: 14px !important;
}
.pm-confirm-total .pm-confirm-label { font-weight: 600; color: #FFFFFF; }
.pm-confirm-total .pm-confirm-value { font-size: 20px; font-weight: 700; color: #2DD4BF; }
.pm-confirm-note {
    font-size: 13px;
    color: #9CA3AF;
    margin: 0 0 24px;
}
.pm-confirm-note i { margin-right: 4px; color: #2DD4BF; }

/* ── Active Order Bar ─────────────────────────────────────────────── */
.pm-active-order-bar {
    background: linear-gradient(135deg, #1A2B28 0%, #162420 100%);
    border-bottom: 1px solid rgba(45,212,191,0.3);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.pm-active-order-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #E8E8E8;
    font-size: 14px;
}
.pm-active-order-info i { color: #2DD4BF; font-size: 16px; }
.pm-active-order-info strong { color: #2DD4BF; }
.pm-active-order-total {
    font-weight: 700;
    color: #2DD4BF;
    font-size: 16px;
}
.pm-active-order-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Payment Method Selector ─────────────────────────────────────── */
.pm-guest-form h3 {
    font-size: 16px;
    font-weight: 600;
    color: #FFFFFF;
    margin: 0 0 16px;
}
.pm-payment-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.pm-payment-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 12px;
    background: #0F1412;
    border: 2px solid #2E2E2E;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #9CA3AF;
    font-size: 13px;
    font-weight: 600;
}
.pm-payment-btn i {
    font-size: 24px;
    color: #9CA3AF;
    transition: color 0.2s ease;
}
.pm-payment-btn:hover {
    border-color: #2DD4BF;
    background: rgba(45,212,191,0.05);
    color: #2DD4BF;
}
.pm-payment-btn:hover i { color: #2DD4BF; }
.pm-payment-btn.pm-payment-selected {
    border-color: #2DD4BF;
    background: rgba(45,212,191,0.1);
    color: #2DD4BF;
    box-shadow: 0 0 0 3px rgba(45,212,191,0.15);
}
.pm-payment-btn.pm-payment-selected i { color: #2DD4BF; }
.pm-btn-checkout:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #2E2E2E;
    color: #6B7280;
}
.pm-btn-ghost {
    background: transparent;
    border: 1px solid #2E2E2E;
    color: #9CA3AF;
}
.pm-btn-ghost:hover {
    border-color: #2DD4BF;
    color: #2DD4BF;
    background: rgba(45,212,191,0.05);
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .pm-header { padding: 16px; }
    .pm-restaurant-name { font-size: 22px; }
    .pm-restaurant-logo { width: 56px; height: 56px; }
    .pm-items-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .pm-specials-grid { grid-template-columns: 1fr; }
    .pm-section { padding: 16px; }
    .pm-guest-checkout { padding: 16px; }
    .pm-confirmation { margin: 20px auto; padding: 24px 16px; }
    .pm-confirm-icon i { font-size: 56px; }
    .pm-confirmation h2 { font-size: 24px; }
    .pm-payment-options { grid-template-columns: 1fr; }
    .pm-active-order-bar { flex-wrap: wrap; }
    .pm-active-order-info { font-size: 13px; }
}