/* ================================================================
   APANG'S ONLINE — style.css (COMPLETE REBUILD)
================================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Arial Black', 'Arial Bold', sans-serif; }
body { background-color: #A11C1E; color: #333; overflow-x: hidden; }
.hidden { display: none !important; }

/* ================================================================
   AUTH & LOGIN
================================================================ */
#auth-screen {
    position: fixed; inset: 0;
    background: #A11C1E;
    background-image: url('../assets/images/pictures/BG-1920x1080.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex; align-items: center; justify-content: center;
    z-index: 999; padding: 20px;
}

.auth-card {
    background: white; border-radius: 20px; padding: 30px 25px;
    width: 100%; max-width: 380px;
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    animation: fadeSlideUp 0.3s ease;
}

.auth-logo { width: 75%; max-width: 220px; margin-bottom: 4px; }
.auth-tagline { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 2px; color: #999; margin-top: -8px; }

.auth-tabs { display: flex; width: 100%; border-radius: 10px; overflow: hidden; border: 2px solid #A11C1E; }
.auth-tab { flex: 1; padding: 10px; border: none; background: transparent; color: #A11C1E; font-weight: 900; font-size: 0.75rem; text-transform: uppercase; cursor: pointer; transition: background 0.2s; }
.auth-tab.active { background: #A11C1E; color: white; }

.auth-form { width: 100%; display: flex; flex-direction: column; gap: 14px; }

/* Email/Phone Login Method Toggle */
.auth-login-method-toggle {
    display: flex;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #ddd;
    margin-bottom: 4px;
}

.auth-method-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    color: #666;
    font-weight: 900;
    font-size: 0.75rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-method-btn.active {
    background: #A11C1E;
    color: white;
}

.auth-method-btn:hover:not(.active) {
    background: #f5f5f5;
}

.auth-input { width: 100%; padding: 13px 15px; border: 1.5px solid #ddd; border-radius: 10px; font-size: 0.85rem; outline: none; transition: border-color 0.2s; }
.auth-input:focus { border-color: #A11C1E; }

.auth-submit-btn { width: 100%; padding: 14px; background: #A11C1E; color: white; border: none; border-radius: 10px; font-weight: 900; font-size: 0.85rem; text-transform: uppercase; cursor: pointer; }
.auth-error { color: #A11C1E; font-size: 0.7rem; font-weight: 700; text-align: center; }

.auth-divider { width: 100%; display: flex; align-items: center; gap: 10px; color: #ccc; font-size: 0.7rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: #eee; }

.auth-guest-btn { width: 100%; padding: 12px; background: transparent; border: 2px solid #ddd; border-radius: 10px; font-weight: 900; font-size: 0.75rem; text-transform: uppercase; color: #555; cursor: pointer; }
.auth-admin-btn { background: none; border: none; color: #bbb; font-size: 0.65rem; text-decoration: underline; cursor: pointer; font-weight: 700; }

#admin-login-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.admin-login-title { font-size: 1rem; font-weight: 900; color: #A11C1E; text-transform: uppercase; }

/* ================================================================
   ADMIN PANEL — DESKTOP ONLY (2-column layout)
================================================================ */
#admin-panel {
    position: fixed; inset: 0;
    background: #f4f4f4;
    z-index: 500; overflow: hidden;
    display: flex; flex-direction: column;
}

.admin-header {
    background: #4C4C4C; 
    padding: 20px 24px;
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    position: sticky; 
    top: 0; 
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.admin-header-title { 
    color: white; 
    font-weight: 700; 
    font-size: 0.95rem; 
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.admin-header-actions { 
    display: flex; 
    gap: 10px; 
    align-items: center; 
}
.admin-gallery-btn { 
    background: rgba(255,255,255,0.15); 
    border: 1px solid rgba(255,255,255,0.3); 
    color: white; 
    padding: 10px 18px; 
    border-radius: 8px; 
    font-size: 0.75rem; 
    font-weight: 700; 
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.admin-gallery-btn:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-1px);
}
.admin-close-btn { 
    background: rgba(255,255,255,0.2); 
    border: 1px solid rgba(255,255,255,0.3); 
    color: white; 
    padding: 10px 18px; 
    border-radius: 8px; 
    font-weight: 700; 
    font-size: 0.75rem; 
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.admin-close-btn:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-1px);
}

#admin-panel > main {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.admin-sidebar {
    width: 250px;
    background: gray;
    border-right: 2px solid #eee;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.admin-section-tabs {
    display: flex; 
    flex-direction: column; 
    gap: 6px;
    padding: 14px; 
    background: gray;
}
.admin-section-tab {
    padding: 14px 18px; 
    background: rgba(152, 171, 174, 0.467); 
    border: 1px solid black; 
    border-radius: 8px;
    color: white; 
    font-weight: 700; 
    font-size: 0.75rem; 
    text-transform: uppercase; 
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.03em;
}
.admin-section-tab:hover {
    background: #4a4f57;
}
.admin-section-tab.active { 
    background: black;
    box-shadow: 0 2px 8px rgba(161,28,30,0.3);
}

.admin-cat-tabs {
    display: flex; 
    flex-direction: column; 
    gap: 6px;
    padding: 14px; 
    overflow-y: auto;
}
.admin-cat-tab {
    padding: 12px 16px; 
    background:rgba(152, 171, 174, 0.467); 
    border: 1px solid black;
    border-radius: 8px;
    font-weight: 700; 
    font-size: 0.72rem; 
    text-transform: uppercase; 
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.03em;
    color: white;
}
.admin-cat-tab:hover {
    background: gray;
    border-color: #A11C1E;
    color: #A11C1E;
}
.admin-cat-tab.active { 
    background: black; 
    color: white;
    border-color: #A11C1E;
    box-shadow: 0 2px 6px rgba(161,28,30,0.2);
}

.admin-content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.admin-item-list {
    padding: 20px; 
    display: flex; 
    flex-direction: column; 
    gap: 16px;
    flex: 1; 
    overflow-y: auto;
    background: #f4f5f7;
}

.admin-product-row {
    background: white; 
    border-radius: 12px; 
    padding: 28px;
    display: grid;
    grid-template-columns: auto 160px 1fr auto;
    gap: 28px;
    align-items: start;
    border: 1px solid #e1e4e8;
    cursor: move;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    margin-bottom: 4px;
}
.admin-product-row:hover { 
    border-color: #A11C1E; 
    box-shadow: 0 4px 12px rgba(161,28,30,0.12); 
    transform: translateY(-1px);
}
.admin-product-row.unsaved { 
    border-color: #f59e0b; 
    background: #fffbf0; 
    box-shadow: 0 2px 8px rgba(245,158,11,0.15);
}

.admin-drag-handle {
    display: flex; 
    align-items: center; 
    justify-content: center;
    width: 40px; 
    height: 40px;
    color: #9aa0ac;
    font-size: 1.6rem; 
    font-weight: 900;
    cursor: grab; 
    user-select: none;
    transition: all 0.2s;
    border-radius: 8px;
}
.admin-drag-handle:hover { 
    color: #A11C1E; 
    background: rgba(161,28,30,0.07);
}
.admin-drag-handle:active { cursor: grabbing; }

.admin-img-col { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 12px; 
}
.admin-img-preview { 
    width: 160px; 
    height: 160px; 
    border-radius: 12px; 
    background: #f4f5f7; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    overflow: hidden;
    border: 2px solid #e1e4e8;
    transition: border-color 0.2s;
}
.admin-img-preview:hover {
    border-color: #A11C1E;
}
.admin-img-preview img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}
.no-img-label { 
    font-size: 0.7rem; 
    color: #9aa0ac; 
    font-weight: 700; 
    text-transform: uppercase; 
    text-align: center; 
    padding: 8px; 
    letter-spacing: 0.05em;
}
.admin-img-input { 
    width: 160px; 
    padding: 8px 12px; 
    font-size: 0.75rem; 
    border: 1px solid #e1e4e8; 
    border-radius: 8px; 
    text-align: center;
    transition: border-color 0.2s;
}
.admin-img-input:focus {
    outline: none;
    border-color: #A11C1E;
}
.admin-pick-img-btn { 
    width: 160px; 
    padding: 10px 12px; 
    font-size: 0.75rem; 
    font-weight: 700; 
    background: #1a73e8; 
    color: #fff; 
    border: none; 
    border-radius: 8px; 
    cursor: pointer; 
    text-align: center;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.admin-pick-img-btn:hover { 
    background: #1558b0; 
    box-shadow: 0 2px 8px rgba(26,115,232,0.25);
}

.admin-info-col { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 18px; 
    align-items: start; 
}
.admin-name-input { 
    grid-column: 1 / -1; 
    width: 100%; 
    padding: 14px 16px; 
    border: 1px solid #e1e4e8; 
    border-radius: 8px; 
    font-size: 1rem; 
    font-weight: 700;
    transition: all 0.2s;
    color: #1a1d23;
}
.admin-name-input:focus {
    outline: none;
    border-color: #A11C1E;
    box-shadow: 0 0 0 3px rgba(161,28,30,0.07);
}

.admin-price-row { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
}
.admin-price-tag { 
    color: #A11C1E; 
    font-weight: 700; 
    font-size: 0.78rem; 
    min-width: 70px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.admin-price-input { 
    flex: 1; 
    padding: 12px 14px; 
    border: 1px solid #e1e4e8; 
    border-radius: 8px; 
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
}
.admin-price-input:focus {
    outline: none;
    border-color: #A11C1E;
    box-shadow: 0 0 0 3px rgba(161,28,30,0.07);
}

.admin-lb-note { 
    grid-column: 1 / -1; 
    font-size: 0.72rem; 
    color: #A11C1E; 
    font-weight: 700; 
    text-transform: uppercase; 
    margin-top: 8px;
    letter-spacing: 0.04em;
    padding: 8px 12px;
    background: rgba(161,28,30,0.05);
    border-radius: 6px;
    border-left: 3px solid #A11C1E;
}
.admin-lb-grid { 
    grid-column: 1 / -1; 
    display: flex; 
    flex-direction: column; 
    gap: 8px; 
}
.admin-lb-row {
    display: grid;
    grid-template-columns: 80px 60px 100px;
    gap: 10px;
    align-items: center;
}
.admin-lb-row input { 
    padding: 8px 10px; 
    border: 1px solid #e1e4e8; 
    border-radius: 6px; 
    font-size: 0.75rem;
    transition: all 0.2s;
    font-weight: 600;
}
.admin-lb-row input:focus {
    outline: none;
    border-color: #A11C1E;
    box-shadow: 0 0 0 3px rgba(161,28,30,0.07);
}

.admin-actions-col { 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
    align-items: stretch; 
    min-width: 140px;
}
.admin-stock-btn { 
    padding: 10px 16px; 
    border: none; 
    border-radius: 8px; 
    font-size: 0.7rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    cursor: pointer; 
    white-space: nowrap;
    transition: all 0.2s;
    letter-spacing: 0.03em;
}
.in-stock { 
    background: #ecfdf5; 
    color: #10b981;
    border: 1px solid #a7f3d0;
}
.in-stock:hover {
    background: #d1fae5;
    box-shadow: 0 2px 6px rgba(16,185,129,0.2);
}
.out-stock { 
    background: #fdecea; 
    color: #A11C1E;
    border: 1px solid #f5c2c2;
}
.out-stock:hover {
    background: #fbd5d0;
    box-shadow: 0 2px 6px rgba(161,28,30,0.2);
}
.admin-visibility-btn {
    padding: 10px 16px; 
    border: 1px solid #e1e4e8; 
    border-radius: 8px; 
    font-size: 0.7rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    cursor: pointer; 
    white-space: nowrap;
    transition: all 0.2s;
    letter-spacing: 0.03em;
    background: white;
    color: #5c6370;
}
.admin-visibility-btn:hover {
    background: #f4f5f7;
    border-color: #A11C1E;
    color: #A11C1E;
}
.admin-delete-btn { 
    background: none; 
    border: none; 
    font-size: 1.4rem; 
    cursor: pointer; 
    opacity: 0.4;
    transition: all 0.2s;
    padding: 8px;
    border-radius: 6px;
}
.admin-delete-btn:hover { 
    opacity: 1;
    background: rgba(161,28,30,0.07);
    color: #A11C1E;
}

.admin-add-row { 
    padding: 12px 20px 16px; 
    background: #f4f5f7; 
    flex-shrink: 0;
}
.admin-add-btn { 
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px; 
    background: var(--at-accent, #A11C1E); 
    color: white; 
    border: none; 
    border-radius: 6px; 
    font-weight: 700; 
    font-size: 0.85rem; 
    cursor: pointer;
    transition: opacity 0.15s;
}
.admin-add-btn:hover {
    opacity: 0.85;
}
.admin-add-btn:active {
    opacity: 0.75;
}

/* ================================================================
   POPUP MODAL
================================================================ */
#popup-modal {
    position: fixed; inset: 0; z-index: 800;
    display: flex; align-items: flex-end; justify-content: center;
}

#box-items-editor {
    position: fixed; inset: 0; z-index: 900;
    display: flex; align-items: center; justify-content: center;
}

#box-items-editor.hidden { display: none; }

/* ================================================================
   ENTERPRISE ORDERS PIPELINE — Full B2B Dashboard Suite
================================================================ */

/* ── CSS Variables ── */
:root {
    --op-bg: #f4f5f7;
    --op-surface: #ffffff;
    --op-border: #e1e4e8;
    --op-border-subtle: #edf0f3;
    --op-text-primary: #1a1d23;
    --op-text-secondary: #5c6370;
    --op-text-muted: #9aa0ac;
    --op-accent: #A11C1E;
    --op-accent-light: rgba(161,28,30,0.07);
    --op-accent-mid: rgba(161,28,30,0.15);

    /* Pipeline status colors */
    --s-received: #3b82f6;
    --s-received-bg: #eff6ff;
    --s-received-border: #bfdbfe;
    --s-processing: #f59e0b;
    --s-processing-bg: #fffbeb;
    --s-processing-border: #fde68a;
    --s-scheduled: #8b5cf6;
    --s-scheduled-bg: #f5f3ff;
    --s-scheduled-border: #ddd6fe;
    --s-out_for_delivery: #0ea5e9;
    --s-out_for_delivery-bg: #f0f9ff;
    --s-out_for_delivery-border: #bae6fd;
    --s-completed: #10b981;
    --s-completed-bg: #ecfdf5;
    --s-completed-border: #a7f3d0;
    --s-cancelled: #6b7280;
    --s-cancelled-bg: #f9fafb;
    --s-cancelled-border: #e5e7eb;
    --s-pending: #f59e0b; /* legacy mapping */

    --op-shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --op-shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
    --op-shadow-lg: 0 10px 30px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.06);
    --op-radius: 8px;
    --op-radius-lg: 12px;
}

/* ── Overlay & Shell ── */
#orders-overlay {
    position: fixed; inset: 0; z-index: 900;
    background: rgba(10,12,18,0.65);
    backdrop-filter: blur(4px);
    display: flex; align-items: flex-start; justify-content: center;
    padding: 16px;
    overflow-y: auto;
}
#orders-overlay.hidden { display: none; }

.orders-shell {
    background: var(--op-surface);
    border-radius: var(--op-radius-lg);
    box-shadow: var(--op-shadow-lg);
    width: 100%; max-width: calc(100vw - 32px);
    min-height: min(90vh, 720px);
    display: flex; flex-direction: column;
    overflow: hidden;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    margin: auto;
}

/* ── Orders Header ── */
.orders-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--op-border);
    background: var(--op-surface);
    flex-shrink: 0;
}
.orders-header-left { display: flex; align-items: center; gap: 14px; }
.orders-header-icon {
    width: 38px; height: 38px; border-radius: 9px;
    background: var(--op-accent); color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
}
.orders-header-title {
    font-size: 1rem; font-weight: 700;
    color: var(--op-text-primary); letter-spacing: -0.01em;
}
.orders-header-sub {
    font-size: 0.72rem; color: var(--op-text-muted);
    text-transform: uppercase; letter-spacing: 0.06em;
    margin-top: 1px;
}
.orders-header-close {
    background: var(--op-bg); border: 1px solid var(--op-border);
    border-radius: 6px; padding: 7px 14px; cursor: pointer;
    font-size: 0.8rem; font-weight: 600; color: var(--op-text-secondary);
    transition: background 0.15s, color 0.15s;
}
.orders-header-close:hover { background: #e8eaed; color: var(--op-text-primary); }

/* ── Tab Navigation ── */
.orders-nav {
    display: flex; align-items: center; gap: 2px;
    padding: 10px 24px 0;
    border-bottom: 1px solid var(--op-border);
    background: var(--op-surface);
    flex-shrink: 0; overflow-x: auto;
}
.orders-nav-tab {
    padding: 9px 16px;
    font-size: 0.8rem; font-weight: 600;
    color: var(--op-text-secondary);
    border: none; background: none; cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px; white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
    display: flex; align-items: center; gap: 6px;
}
.orders-nav-tab .tab-count {
    background: var(--op-border); color: var(--op-text-secondary);
    border-radius: 10px; padding: 1px 6px; font-size: 0.68rem; font-weight: 700;
}
.orders-nav-tab:hover { color: var(--op-text-primary); }
.orders-nav-tab.active {
    color: var(--op-accent);
    border-bottom-color: var(--op-accent);
}
.orders-nav-tab.active .tab-count {
    background: var(--op-accent-light); color: var(--op-accent);
}

/* ── Main Content Body ── */
.orders-body {
    flex: 1; overflow-y: auto; background: var(--op-bg);
    padding: 20px 24px;
}

/* ── Metric Bar ── */
.orders-metrics {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px; margin-bottom: 20px;
}
.metric-card {
    background: var(--op-surface); border: 1px solid var(--op-border);
    border-radius: var(--op-radius); padding: 14px 16px;
    box-shadow: var(--op-shadow-sm);
}
.metric-label {
    font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.07em; color: var(--op-text-muted); margin-bottom: 5px;
}
.metric-value { font-size: 1.6rem; font-weight: 800; color: var(--op-text-primary); line-height: 1; }
.metric-sub { font-size: 0.72rem; color: var(--op-text-muted); margin-top: 3px; }

/* ── Section Headers ── */
.orders-section-hdr {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 10px; margin-top: 20px;
}
.orders-section-hdr:first-child { margin-top: 0; }
.orders-section-title {
    font-size: 0.73rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--op-text-secondary);
    display: flex; align-items: center; gap: 8px;
}
.orders-section-title::before {
    content: ''; display: inline-block; width: 10px; height: 10px;
    border-radius: 50%; background: currentColor;
}
.orders-section-title.status-received { color: var(--s-received); }
.orders-section-title.status-processing { color: var(--s-processing); }
.orders-section-title.status-scheduled { color: var(--s-scheduled); }
.orders-section-title.status-out_for_delivery { color: var(--s-out_for_delivery); }
.orders-section-title.status-completed { color: var(--s-completed); }
.orders-section-title.status-cancelled { color: var(--s-cancelled); }

/* ── Order Table ── */
.orders-table-wrap {
    background: var(--op-surface);
    border: 1px solid var(--op-border);
    border-radius: var(--op-radius-lg);
    overflow: hidden;
    box-shadow: var(--op-shadow-sm);
    margin-bottom: 24px;
}
.orders-table {
    width: 100%; border-collapse: collapse;
    font-size: 0.82rem;
}
.orders-table thead th {
    background: var(--op-bg);
    padding: 9px 14px;
    text-align: left;
    font-size: 0.67rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--op-text-muted);
    border-bottom: 1px solid var(--op-border);
    white-space: nowrap;
}
.orders-table tbody tr {
    border-bottom: 1px solid var(--op-border-subtle);
    transition: background 0.1s;
}
.orders-table tbody tr:last-child { border-bottom: none; }
.orders-table tbody tr:hover { background: var(--op-bg); }
.orders-table td {
    padding: 12px 14px;
    vertical-align: top;
    color: var(--op-text-primary);
}
.order-row-id {
    font-size: 0.78rem; font-weight: 700; color: var(--op-accent);
    font-variant-numeric: tabular-nums; white-space: nowrap;
}
/* Double-click-to-edit hint */
.order-row-id:not([data-editing="true"]) {
    cursor: text;
}
.order-row-id[data-editing="true"] {
    cursor: default;
}

/* ── Admin Pop-Out Button ── */
.admin-popout-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--op-text-secondary);
    background: var(--op-bg);
    border: 1px solid var(--op-border);
    border-radius: 6px;
    padding: 6px 13px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
    margin-right: 6px;
    text-decoration: none;
}
.admin-popout-btn:hover {
    background: #e8f0fe;
    color: #1a56db;
    border-color: #93c5fd;
}
.order-row-date { font-size: 0.75rem; color: var(--op-text-muted); white-space: nowrap; }
.order-row-customer { font-weight: 600; }
.order-row-contact { font-size: 0.73rem; color: var(--op-text-muted); margin-top: 2px; }
.order-row-address { font-size: 0.73rem; color: var(--op-text-secondary); margin-top: 2px; }
.order-row-total { font-weight: 700; white-space: nowrap; }
.order-row-payment { font-size: 0.73rem; color: var(--op-text-muted); }
.order-row-type { font-size: 0.73rem; color: var(--op-text-muted); }
.order-items-summary { font-size: 0.75rem; color: var(--op-text-secondary); min-width: 220px; }
.order-items-summary .item-chip {
    display: inline-block; background: var(--op-bg);
    border: 1px solid var(--op-border); border-radius: 4px;
    padding: 1px 6px; font-size: 0.68rem; margin: 1px 2px 1px 0;
    color: var(--op-text-secondary);
}
.order-items-summary .item-chip-addon {
    background: transparent;
    border-color: transparent;
    color: var(--op-text-secondary);
    opacity: 0.75;
    font-size: 0.64rem;
    margin-left: 8px;
    padding-left: 2px;
}
.scheduled-date-pill {
    display: inline-flex; align-items: center; gap: 4px;
    background: var(--s-scheduled-bg); color: var(--s-scheduled);
    border: 1px solid var(--s-scheduled-border);
    border-radius: 4px; padding: 2px 8px; font-size: 0.73rem;
    font-weight: 600; white-space: nowrap;
}

/* ── Pipeline Stepper ── */
.pipeline-stepper {
    display: flex; align-items: center; gap: 0;
    padding: 4px 0; min-width: 280px;
}
.ps-step {
    display: flex; flex-direction: column; align-items: center;
    position: relative; flex: 1;
}
.ps-step-dot {
    width: 22px; height: 22px; border-radius: 50%;
    border: 2px solid var(--op-border);
    background: var(--op-surface);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.6rem; z-index: 1;
    transition: all 0.2s;
}
.ps-step-label {
    font-size: 0.58rem; color: var(--op-text-muted);
    text-align: center; margin-top: 3px; line-height: 1.2;
    white-space: nowrap; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.04em;
}
.ps-connector {
    flex: 1; height: 2px;
    background: var(--op-border);
    margin-top: -9px; position: relative; z-index: 0;
    transition: background 0.3s;
}
.ps-step.done .ps-step-dot {
    background: var(--s-completed); border-color: var(--s-completed);
    color: white; font-weight: 700;
}
.ps-step.done .ps-step-label { color: var(--s-completed); }
.ps-step.active .ps-step-dot {
    border-width: 2px; box-shadow: 0 0 0 3px rgba(161,28,30,0.15);
}
.ps-step.active .ps-step-label { color: var(--op-text-primary); font-weight: 700; }
.ps-connector.done { background: var(--s-completed); }

/* per-status active dot color */
.ps-step.active[data-status="received"] .ps-step-dot { background: var(--s-received-bg); border-color: var(--s-received); color: var(--s-received); }
.ps-step.active[data-status="processing"] .ps-step-dot { background: var(--s-processing-bg); border-color: var(--s-processing); color: var(--s-processing); }
.ps-step.active[data-status="scheduled"] .ps-step-dot { background: var(--s-scheduled-bg); border-color: var(--s-scheduled); color: var(--s-scheduled); }
.ps-step.active[data-status="out_for_delivery"] .ps-step-dot { background: var(--s-out_for_delivery-bg); border-color: var(--s-out_for_delivery); color: var(--s-out_for_delivery); }
.ps-step.active[data-status="completed"] .ps-step-dot { background: var(--s-completed-bg); border-color: var(--s-completed); color: var(--s-completed); }

/* ── Status Badge ── */
.status-badge {
    display: inline-flex; align-items: center; gap: 5px;
    border-radius: 5px; padding: 3px 9px;
    font-size: 0.69rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    white-space: nowrap;
}
.status-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.sb-received { background: var(--s-received-bg); color: var(--s-received); border: 1px solid var(--s-received-border); }
.sb-processing { background: var(--s-processing-bg); color: var(--s-processing); border: 1px solid var(--s-processing-border); }
.sb-scheduled { background: var(--s-scheduled-bg); color: var(--s-scheduled); border: 1px solid var(--s-scheduled-border); }
.sb-out_for_delivery { background: var(--s-out_for_delivery-bg); color: var(--s-out_for_delivery); border: 1px solid var(--s-out_for_delivery-border); }
.sb-completed { background: var(--s-completed-bg); color: var(--s-completed); border: 1px solid var(--s-completed-border); }
.sb-cancelled { background: var(--s-cancelled-bg); color: var(--s-cancelled); border: 1px solid var(--s-cancelled-border); }
.sb-pending { background: var(--s-processing-bg); color: var(--s-processing); border: 1px solid var(--s-processing-border); }
.sb-pending-payment-verification { background: #fffbeb; color: #d97706; border: 1px solid #fcd34d; }

/* ── Action Controls in Table ── */
.order-actions-cell { white-space: nowrap; }
.op-action-group { display: flex; flex-direction: column; gap: 5px; }
.op-advance-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 10px; border-radius: 5px; border: 1px solid;
    font-size: 0.73rem; font-weight: 600; cursor: pointer;
    transition: all 0.15s; white-space: nowrap; background: white;
}
.op-advance-btn.btn-advance { border-color: var(--s-received); color: var(--s-received); }
.op-advance-btn.btn-advance:hover { background: var(--s-received-bg); }
.op-advance-btn.btn-cancel { border-color: var(--s-cancelled); color: var(--s-cancelled); }
.op-advance-btn.btn-cancel:hover { background: var(--s-cancelled-bg); }
.op-advance-btn.btn-schedule { border-color: var(--s-scheduled); color: var(--s-scheduled); }
.op-advance-btn.btn-schedule:hover { background: var(--s-scheduled-bg); }
.op-advance-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.op-advance-btn.btn-discount { border-color: #7c3aed; color: #7c3aed; }
.op-advance-btn.btn-discount:hover { background: #f5f0ff; }

/* ── Discounted price display in order row ── */
.order-row-discounted-total {
    font-weight: 700; font-size: 0.95em; color: #7c3aed; white-space: nowrap;
    display: flex; align-items: center; gap: 5px; margin-top: 2px;
}
.discount-badge {
    font-size: 0.65rem; font-weight: 700; background: #7c3aed; color: #fff;
    padding: 1px 5px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.5px;
}

/* ── Batch Feature Styles ── */
.order-col-check {
    width: 34px; padding: 8px 6px !important; text-align: center;
}
.order-batch-checkbox, .order-batch-checkbox-all {
    width: 16px; height: 16px; cursor: pointer; accent-color: var(--op-accent);
}
.batch-nav-tab { color: #d97706 !important; }
.batch-nav-tab.active { color: #d97706 !important; border-bottom-color: #d97706 !important; }
.batch-nav-tab.active .tab-count { background: #fef3c7 !important; color: #d97706 !important; }

/* Batch selection toolbar */
.batch-selection-toolbar {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px;
    background: #fef9c3; border: 1px solid #fcd34d; border-radius: 8px;
    margin: 0 0 14px 0;
}
.batch-selected-count { font-size: 0.82rem; font-weight: 700; color: #78350f; flex: 1; }
.batch-add-btn {
    padding: 7px 16px; background: #d97706; color: #fff; border: none;
    border-radius: 7px; font-size: 0.8rem; font-weight: 700; cursor: pointer;
    transition: background 0.15s;
}
.batch-add-btn:hover { background: #b45309; }
.batch-deselect-btn {
    padding: 7px 12px; background: transparent; color: #78350f;
    border: 1px solid #fcd34d; border-radius: 7px; font-size: 0.78rem;
    font-weight: 600; cursor: pointer;
}
.batch-deselect-btn:hover { background: #fde68a; }

/* Batch view header */
.batch-view-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    flex-wrap: wrap; gap: 12px;
    background: var(--op-surface); border: 1px solid var(--op-border);
    border-radius: var(--op-radius-lg); padding: 16px 20px;
    margin-bottom: 18px;
    box-shadow: var(--op-shadow-sm);
}
.batch-view-title { font-size: 1.1rem; font-weight: 800; color: var(--op-text-primary); }
.batch-view-meta { font-size: 0.75rem; color: var(--op-text-muted); margin-top: 3px; }
.batch-view-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.batch-action-btn {
    padding: 8px 16px; border: none; border-radius: 8px;
    font-size: 0.8rem; font-weight: 700; cursor: pointer; transition: opacity 0.15s;
}
.batch-action-btn:hover { opacity: 0.85; }
.batch-action-packing { background: #A11C1E; color: #fff; }
.batch-action-delete     { background: #fef2f2; color: #e53e3e; border: 1px solid #fca5a5; }
.batch-action-add-orders { background: #fef2f2; color: #e53e3e; border: 1px solid #fca5a5; }

/* Batch name modal */
.batch-name-modal-backdrop {
    position: fixed; inset: 0; z-index: 100010;
    background: rgba(0,0,0,0.55);
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.batch-name-modal-card {
    background: #fff; border-radius: 14px; width: 100%; max-width: 420px;
    padding: 28px; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.batch-name-modal-title { font-size: 1.1rem; font-weight: 800; color: #1a1a1a; margin-bottom: 4px; }
.batch-name-modal-sub { font-size: 0.78rem; color: #888; margin-bottom: 18px; }
.batch-name-input {
    width: 100%; padding: 12px 14px; border: 2px solid #e2e8f0;
    border-radius: 9px; font-size: 0.95rem; outline: none; transition: border-color 0.2s;
    font-family: inherit;
}
.batch-name-input:focus { border-color: #d97706; }
.batch-name-error { font-size: 0.78rem; color: #e53e3e; margin-top: 6px; min-height: 16px; }
.batch-name-footer { display: flex; gap: 10px; margin-top: 20px; justify-content: flex-end; }
.batch-name-cancel-btn {
    padding: 10px 18px; background: transparent; border: 1px solid #ddd;
    border-radius: 8px; font-size: 0.85rem; font-weight: 600; color: #666; cursor: pointer;
}
.batch-name-confirm-btn {
    padding: 10px 22px; background: #d97706; color: #fff; border: none;
    border-radius: 8px; font-size: 0.85rem; font-weight: 700; cursor: pointer;
    transition: background 0.15s;
}
.batch-name-confirm-btn:hover { background: #b45309; }
.batch-name-confirm-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Discount Modal ── */
#discount-modal-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,0.55);
    z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 20px;
}
.discount-modal-card {
    background: #fff; border-radius: 14px; width: 100%; max-width: 380px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3); overflow: hidden;
}
.discount-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; background: #7c3aed; color: #fff;
    font-size: 1rem; font-weight: 700;
}
.discount-modal-close {
    background: transparent; border: none; color: #fff; font-size: 1.1rem;
    cursor: pointer; padding: 2px 6px; border-radius: 4px; transition: background 0.15s;
}
.discount-modal-close:hover { background: rgba(255,255,255,0.2); }
.discount-modal-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.discount-modal-order-info {
    display: flex; flex-direction: column; gap: 3px;
    padding: 10px 14px; background: #f8f5ff; border-radius: 8px; border-left: 3px solid #7c3aed;
}
.discount-modal-name { font-weight: 700; font-size: 0.9rem; color: #333; }
.discount-modal-original { font-size: 0.82rem; color: #666; }
.discount-modal-label { font-size: 0.8rem; font-weight: 700; color: #555; text-transform: uppercase; letter-spacing: 0.5px; }
.discount-modal-input-row {
    display: flex; align-items: center; border: 2px solid #ddd; border-radius: 8px;
    overflow: hidden; transition: border-color 0.2s;
}
.discount-modal-input-row:focus-within { border-color: #7c3aed; }
.discount-modal-prefix {
    padding: 10px 12px; background: #f4f4f4; color: #666;
    font-weight: 700; font-size: 1rem; border-right: 1px solid #ddd;
}
.discount-modal-input {
    flex: 1; padding: 10px 12px; border: none; outline: none;
    font-size: 1.1rem; font-weight: 700; color: #333; font-family: inherit;
}
.discount-modal-preview {
    padding: 10px 14px; background: #f0fdf4; border-radius: 8px;
    border-left: 3px solid #10b981; font-size: 0.9rem; color: #333;
}
.discount-modal-preview strong { color: #10b981; font-size: 1.05rem; }
.discount-modal-remove {
    background: transparent; border: 1px solid #e53e3e; color: #e53e3e;
    padding: 8px 12px; border-radius: 7px; font-size: 0.78rem; font-weight: 700;
    cursor: pointer; transition: all 0.15s; font-family: inherit;
}
.discount-modal-remove:hover { background: #e53e3e; color: #fff; }
.discount-modal-footer {
    display: flex; gap: 10px; padding: 14px 20px;
    border-top: 1px solid #eee; justify-content: flex-end;
}
.discount-modal-cancel {
    background: transparent; border: 1px solid #ddd; color: #666;
    padding: 9px 18px; border-radius: 8px; font-size: 0.85rem; font-weight: 700;
    cursor: pointer; font-family: inherit; transition: background 0.15s;
}
.discount-modal-cancel:hover { background: #f4f4f4; }
.discount-modal-apply {
    background: #7c3aed; border: none; color: #fff;
    padding: 9px 22px; border-radius: 8px; font-size: 0.85rem; font-weight: 700;
    cursor: pointer; font-family: inherit; transition: background 0.15s;
}
.discount-modal-apply:hover { background: #6d28d9; }
.discount-modal-apply:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Schedule Modal ── */
.schedule-modal-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    z-index: 9100; display: flex; align-items: center; justify-content: center;
}
.schedule-modal-card {
    background: white; border-radius: 12px; padding: 28px;
    width: 340px; box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    font-family: 'Inter', 'Segoe UI', sans-serif;
}
.schedule-modal-title {
    font-size: 1rem; font-weight: 700; color: var(--op-text-primary);
    margin-bottom: 6px;
}
.schedule-modal-sub {
    font-size: 0.78rem; color: var(--op-text-muted); margin-bottom: 18px;
}
.schedule-modal-label {
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--op-text-secondary); margin-bottom: 6px; display: block;
}
.schedule-date-input {
    width: 100%; padding: 9px 12px;
    border: 1px solid var(--op-border); border-radius: 6px;
    font-size: 0.9rem; color: var(--op-text-primary);
    margin-bottom: 18px; outline: none;
    transition: border-color 0.15s;
}
.schedule-date-input:focus { border-color: var(--s-scheduled); box-shadow: 0 0 0 3px var(--s-scheduled-bg); }
.schedule-modal-btns { display: flex; gap: 10px; }
.schedule-confirm-btn {
    flex: 1; padding: 9px; border-radius: 6px; border: none;
    background: var(--s-scheduled); color: white;
    font-size: 0.83rem; font-weight: 700; cursor: pointer;
    transition: opacity 0.15s;
}
.schedule-confirm-btn:hover { opacity: 0.9; }
.schedule-cancel-btn {
    padding: 9px 16px; border-radius: 6px;
    border: 1px solid var(--op-border); background: white;
    color: var(--op-text-secondary); font-size: 0.83rem; font-weight: 600;
    cursor: pointer;
}
.schedule-cancel-btn:hover { background: var(--op-bg); }

/* ── Empty State ── */
.orders-empty {
    text-align: center; padding: 60px 20px;
    color: var(--op-text-muted); font-size: 0.87rem;
}
.orders-empty-icon { font-size: 2.5rem; margin-bottom: 14px; opacity: 0.5; }
.orders-empty-title { font-size: 1rem; font-weight: 700; color: var(--op-text-secondary); margin-bottom: 6px; }

/* ── Loading ── */
.orders-loading {
    text-align: center; padding: 60px 20px;
    color: var(--op-text-muted); font-size: 0.87rem;
}
.orders-loading-spinner {
    width: 32px; height: 32px; border: 3px solid var(--op-border);
    border-top-color: var(--op-accent); border-radius: 50%;
    animation: op-spin 0.8s linear infinite;
    margin: 0 auto 16px;
}
@keyframes op-spin { to { transform: rotate(360deg); } }

/* ── Responsive tweaks ── */
@media (max-width: 768px) {
    #orders-overlay { padding: 10px; }
    .orders-header { padding: 14px 16px; }
    .orders-nav { padding: 8px 16px 0; }
    .orders-body { padding: 14px 16px; }
    .orders-table thead { display: none; }
    .orders-table, .orders-table tbody, .orders-table tr, .orders-table td { display: block; width: 100%; }
    .orders-table tr { 
        border: 1px solid var(--op-border); border-radius: var(--op-radius); 
        margin-bottom: 10px; padding: 10px; background: var(--op-surface);
    }
    .orders-table td { padding: 4px 0; border: none; }
    .pipeline-stepper { min-width: 220px; }
    .orders-metrics { grid-template-columns: repeat(2, 1fr); }
}

/* legacy compat */
.orders-content {
    background: white; border-radius: 10px; max-height: 80vh; overflow-y: auto; width: 95%; max-width: 1000px;
}

.popup-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }

.popup-card {
    position: relative; z-index: 1;
    background: white; border-radius: 20px 20px 0 0;
    padding: 24px 20px 40px;
    width: 100%; max-width: 480px;
    animation: slideUp 0.25s ease;
    max-height: 88vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.popup-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.popup-title { font-size: 0.95rem; font-weight: 900; text-transform: uppercase; color: #222; }
.popup-close-btn { background: #eee; border: none; border-radius: 50%; width: 30px; height: 30px; font-size: 0.8rem; cursor: pointer; }

.popup-section-title { font-size: 0.75rem; font-weight: 900; text-transform: uppercase; color: #A11C1E; margin-bottom: 12px; margin-top: 16px; }

.popup-item-list { display: flex; flex-direction: column; gap: 8px; }
.popup-item-row { font-size: 0.75rem; color: #666; font-weight: 700; padding: 8px; background: #f9f9f9; border-radius: 6px; }

.popup-addon-list { display: flex; flex-direction: column; gap: 12px; }
.popup-addon-cat { display: flex; flex-direction: column; gap: 6px; }
.popup-addon-cat h4 { font-size: 0.7rem; font-weight: 900; text-transform: uppercase; color: #222; margin-bottom: 4px; }

.popup-addon-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f0f0f0;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
}

.popup-addon-item-name { color: #333; flex: 1; }

.popup-addon-qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.popup-addon-qty-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: #A11C1E;
    color: white;
    font-weight: 900;
    font-size: 0.8rem;
    cursor: pointer;
}

.popup-addon-qty-num {
    font-weight: 900;
    font-size: 0.8rem;
    min-width: 14px;
    text-align: center;
}

.popup-lb-options { display: flex; flex-direction: column; gap: 10px; }
.popup-lb-option-btn {
    display: flex; justify-content: space-between; align-items: center;
    background: #f7f7f7; border: 2px solid #eee;
    border-radius: 12px; padding: 14px 18px;
    cursor: pointer; width: 100%;
}
.popup-lb-option-btn:active { border-color: #A11C1E; background: #fff5f5; }
.popup-lb-label { font-size: 0.85rem; font-weight: 900; text-transform: uppercase; color: #222; }
.popup-lb-price { font-size: 0.9rem; font-weight: 900; color: #A11C1E; }

.popup-addon-btn, .popup-add-btn, .popup-back-btn {
    width: 100%; padding: 12px; border: none; border-radius: 10px;
    font-size: 0.75rem; font-weight: 900; text-transform: uppercase; cursor: pointer;
    margin-top: 12px;
}
.popup-addon-btn, .popup-add-btn { background: #A11C1E; color: white; }
.popup-back-btn { background: #ddd; color: #333; }

/* Popup Addon Editing Styles */
.popup-addon-cat {
    margin-bottom: 16px;
}
.popup-addon-cat h4 {
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
    color: #A11C1E;
    background: #fdecea;
    padding: 10px 14px;
    margin: 0 0 8px 0;
    border-radius: 8px;
    letter-spacing: 0.8px;
}
.popup-addon-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: white;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    margin-bottom: 6px;
}
.popup-addon-item-name {
    font-size: 0.75rem;
    font-weight: 900;
    color: #222;
    flex: 1;
}
.popup-addon-qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}
.popup-addon-qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    font-weight: 900;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s;
}
.popup-addon-qty-btn:active { transform: scale(0.9); }
.popup-addon-qty-btn.minus { background: #eee; color: #333; }
.popup-addon-qty-btn.plus { background: #A11C1E; color: white; }
.popup-addon-qty-num {
    font-weight: 900;
    font-size: 0.8rem;
    min-width: 20px;
    text-align: center;
}

/* ================================================================
   CART POPUP
================================================================ */
.cart-popup {
    position: fixed; inset: 0; z-index: 850;
    background: rgba(0,0,0,0.55);
    display: flex; align-items: flex-end; justify-content: center;
}

.cart-popup-header {
    background: #A11C1E; color: white; padding: 18px 20px;
    display: flex; justify-content: space-between; align-items: center;
    border-radius: 20px 20px 0 0;
    font-weight: 900; font-size: 0.9rem; text-transform: uppercase;
    flex-shrink: 0;
}

.cart-close-btn { background: rgba(255,255,255,0.2); border: none; color: white; font-size: 1.1rem; cursor: pointer; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

.cart-popup-inner {
    background: white;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.28s cubic-bezier(0.25, 1, 0.5, 1);
}

.cart-popup-content {
    background: white; padding: 16px 20px 32px;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.cart-section { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #eee; }
.cart-section h3 { font-size: 0.7rem; font-weight: 900; text-transform: uppercase; color: #A11C1E; margin-bottom: 10px; }

.cart-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0; font-size: 0.75rem; gap: 12px;
}
.cart-item-left { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.cart-item-name { font-weight: 700; color: #333; }
.cart-item-price { font-weight: 900; color: #A11C1E; font-size: 0.7rem; }
.cart-qty-controls { display: flex; align-items: center; gap: 8px; }
.cart-qty-btn { 
    width: 28px; height: 28px; border-radius: 50%; 
    border: none; font-weight: 900; font-size: 0.9rem; 
    cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.cart-qty-btn.minus { background: #eee; color: #333; }
.cart-qty-btn.plus { background: #A11C1E; color: white; }
.cart-qty-num { font-weight: 900; font-size: 0.8rem; min-width: 20px; text-align: center; }
.cart-edit-btn {
    background: transparent; border: 1px solid #ddd; color: #666;
    padding: 4px 10px; border-radius: 6px; font-size: 0.6rem;
    font-weight: 900; text-transform: uppercase; cursor: pointer;
    margin-top: 4px; width: fit-content;
}
.cart-edit-btn:active { background: #f5f5f5; border-color: #A11C1E; color: #A11C1E; }

.cart-total {
    font-weight: 900; font-size: 0.9rem; color: #A11C1E;
    text-align: right; margin-top: 16px; padding-top: 12px; border-top: 2px solid #eee;
}

.cart-empty { text-align: center; padding: 20px; color: #999; font-size: 0.75rem; font-weight: 700; }

.cart-box-wrapper { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.cart-box-addons { padding-left: 12px; margin-top: 4px; }
.cart-addon-label { font-size: 0.65rem; font-weight: 900; text-transform: uppercase; color: #999; margin-bottom: 4px; }
.cart-addon-item { 
    display: flex; justify-content: space-between; 
    font-size: 0.68rem; color: #666; padding: 2px 0; 
}
.cart-clear-btn {
    width: 100%; margin-top: 16px; padding: 12px;
    background: transparent; border: 1px solid #ddd; color: #999;
    border-radius: 10px; font-size: 0.65rem; font-weight: 900;
    text-transform: uppercase; cursor: pointer;
}
.cart-clear-btn:active { background: #f5f5f5; border-color: #A11C1E; color: #A11C1E; }
.cart-clear-confirm {
    background: #f9f9f9; border-radius: 12px; padding: 16px;
    display: flex; flex-direction: column; gap: 12px; margin-top: 16px;
}
.cart-clear-confirm span { font-size: 0.75rem; font-weight: 700; color: #333; text-align: center; }
.cart-clear-confirm-btns { display: flex; gap: 8px; }
.cart-clear-yes, .cart-clear-no {
    flex: 1; padding: 10px; border-radius: 8px;
    font-size: 0.65rem; font-weight: 900; text-transform: uppercase; cursor: pointer;
}
.cart-clear-yes { background: #A11C1E; color: white; border: none; }
.cart-clear-no { background: #f0f0f0; color: #555; border: 1px solid #ddd; }

/* ================================================================
   HEADER LOGO CENTERING FIX
================================================================ */
#main-header {
    padding: 0;
    position: sticky; top: 0; z-index: 100;
    background-color: #A11C1E;
}

.header-top-row {
    display: flex; 
    justify-content: center;
    align-items: center;
    min-height: 50px; 
    position: relative;
    padding: 0 10px;
    background-color: #A11C1E;
}

.logo-btn { 
    background: none; 
    border: none; 
    cursor: pointer; 
    padding: 0;
    display: flex;
    justify-content: center;
}

.logo-img { 
    max-height: 35px;
    width: auto;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    -webkit-font-smoothing: antialiased;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.cart-icon {
    position: absolute; 
    right: 15px; /* Pins cart to the right edge */
    width: 40px; 
    font-size: 1.4rem; 
    cursor: pointer; 
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cart-badge {
    position: absolute; top: -8px; right: -8px;
    background: white; color: #A11C1E; font-size: 0.55rem;
    font-weight: 900; width: 16px; height: 16px;
    border-radius: 50%; display: flex; justify-content: center; align-items: center;
}

.nav-buttons {
    display: flex; justify-content: center; gap: 6px; margin-top: 8px; flex-wrap: wrap;
}

.nav-buttons button {
    background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.1);
    color: white; padding: 8px 10px; border-radius: 20px;
    font-size: 0.65rem; font-weight: 900; text-transform: uppercase;
    cursor: pointer; transition: all 0.2s; flex: 1; min-width: 90px;
}

.nav-buttons button.active { background: white; color: #A11C1E; }

/* Ensure the user info doesn't push the logo if it's on the left */
#user-info-display {
    border-bottom: 1px solid rgba(255,255,255,0.15);
    background: #A11C1E;
}

/* ================================================================
   USER INFO DISPLAY
================================================================ */
.user-info-display {
    background: #A11C1E; padding: 10px 20px;
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.user-name { font-size: 0.75rem; font-weight: 900; color: white; }

.logout-btn {
    padding: 8px 14px; background: rgba(255,255,255,0.2); color: white;
    border: 1px solid rgba(255,255,255,0.3); border-radius: 8px; font-size: 0.65rem;
    font-weight: 900; text-transform: uppercase; cursor: pointer;
}

/* ================================================================
   HOME HUB
================================================================ */
@font-face {
    font-family: 'Momentz';
    src: url('../assets/fonts/Momentz.woff2') format('woff2'),
         url('../assets/fonts/Momentz.ttf') format('truetype'),
         url('../assets/fonts/Momentz.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

#home-hub {
    display: flex; flex-direction: column; padding: 40px 30px; min-height: 100vh; gap: 15px;
    background-color: #A11C1E;
    background-image: none;
    position: relative;
}

/* Soft blur overlay on background art */
#home-hub::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.08);
    pointer-events: none;
    z-index: 0;
}

/* Keep all hub children above blur layer */
#home-hub > * { position: relative; z-index: 1; }

.hub-title-container { text-align: center; margin-bottom: 30px; }
.main-logo { width: 80%; max-width: 300px; }
.hub-subtitle { color: white; opacity: 0.7; font-size: 0.6rem; text-transform: uppercase; letter-spacing: 2px; }

.hub-btn { background: white; padding: 18px; border-radius: 25px; border: none; width: 100%; cursor: pointer; }
.hub-btn span { color: #000000; font-weight: 900; text-transform: uppercase; font-size: 0.95rem; display: block; font-family: 'Inter', 'Arial Black', sans-serif; letter-spacing: 1px; }
.hub-subtitle { color: white; opacity: 0.7; font-size: 0.6rem; text-transform: uppercase; letter-spacing: 2px; font-family: 'Momentz', sans-serif; }

/* Beta disclaimer banner */
.beta-disclaimer {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 14px;
    padding: 12px 16px;
    text-align: center;
    backdrop-filter: blur(8px);
    margin-top: 4px;
}
.beta-disclaimer p {
    color: white;
    font-size: 0.7rem;
    line-height: 1.6;
    margin: 0;
    opacity: 0.9;
}
.beta-disclaimer strong {
    color: #FFD700;
    font-weight: 700;
}
.contact-btn { background: #611414 !important; opacity: 0.85; }
.contact-btn:hover { opacity: 1; }
.contact-btn span { color: white !important; }

/* Hub Intro Section */
.hub-intro-section {
    margin-top: 40px;
    padding: 24px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.hub-intro-title {
    color: white;
    font-size: 1.1rem;
    font-weight: 900;
    margin: 0 0 16px 0;
    text-align: center;
}
.hub-intro-text {
    color: white;
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0 0 20px 0;
    opacity: 0.95;
}
.hub-intro-text strong {
    font-weight: 900;
    color: #FFD700;
}
.hub-intro-swipe {
    text-align: center;
    color: white;
    opacity: 0.8;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    padding: 12px;
    transition: all 0.3s;
}
.hub-intro-swipe:active {
    opacity: 1;
    transform: translateY(-2px);
}
.hub-intro-arrow {
    font-size: 1.5rem;
    margin-top: 8px;
    animation: bounce 2s infinite;
}
.hub-legal-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 28px;
    padding: 10px 0 4px;
    flex-wrap: wrap;
}
.hub-legal-bar a {
    color: rgba(255,255,255,0.55);
    font-size: 0.72rem;
    text-decoration: none;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 500;
    transition: color 0.2s;
}
.hub-legal-bar a:hover {
    color: rgba(255,255,255,0.9);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.hub-legal-sep {
    color: rgba(255,255,255,0.25);
    font-size: 0.7rem;
    user-select: none;
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* ================================================================
   BUILD YOURS VIEW (with sticky category bar & animations)
================================================================ */
#build-yours-view { background: #f9f9f9; min-height: 100vh; padding-bottom: 120px; }

.build-category-bar {
    background: white; 
    padding: 12px 20px;
    border-bottom: 2px solid #eee;
    margin: 0;
}

.build-cat-bar-container { display: flex; flex-direction: column; gap: 0; }

.build-cat-bar-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px; background: white;
    border-radius: 10px; border: 2px solid #A11C1E;
    width: 100%;
    cursor: pointer;
    transition: background 0.2s;
}

.build-cat-bar-header:active { background: #f5f5f5; }

.build-cat-bar-title { font-size: 0.8rem; font-weight: 900; text-transform: uppercase; color: #222; flex: 1; text-align: left; }

.build-cat-arrow { font-size: 1rem; color: #A11C1E; font-weight: 900; }

.build-cat-grid-wrapper {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 8px; padding: 12px 0; margin-top: 8px;
    animation: slideDown 0.25s ease;
}

.build-cat-btn {
    padding: 12px 16px; background: #f0f0f0;
    border: none; border-radius: 10px;
    font-size: 0.7rem; font-weight: 900; text-transform: uppercase; cursor: pointer;
}

.build-cat-btn.active { background: #A11C1E; color: white; }

.build-item-list { padding: 15px; display: flex; flex-direction: column; gap: 12px; }

.product-row {
    background: white; padding: 12px; border-radius: 15px;
    display: flex; align-items: center; gap: 12px; border: 1px solid #eee;
}

.product-img-slot { width: 55px; height: 55px; background: #eee; border-radius: 10px; flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.product-img-slot img { width: 100%; height: 100%; object-fit: cover; }
.img-placeholder { width: 100%; height: 100%; background: #e4e4e4; border-radius: 10px; }

.product-info { flex-grow: 1; display: flex; flex-direction: column; gap: 2px; }
.product-name { font-size: 0.8rem; font-weight: 900; text-transform: uppercase; color: #222; }
.product-price { font-size: 0.7rem; color: #85bb85; font-weight: 900; }

.out-of-stock-badge { font-size: 0.55rem; font-weight: 900; text-transform: uppercase; color: #A11C1E; background: #fdecea; padding: 2px 6px; border-radius: 4px; width: fit-content; }

.qty-controls { display: flex; align-items: center; gap: 10px; }
.qty-btn { width: 30px; height: 30px; border-radius: 50%; border: none; font-weight: 900; cursor: pointer; font-size: 1rem; }
.qty-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.minus { background: #eee; color: #333; }
.plus { background: #A11C1E; color: white; }
.qty-num { font-weight: 900; font-size: 0.9rem; min-width: 16px; text-align: center; }

.out-of-stock-row { opacity: 0.55; }
.build-empty-msg { text-align: center; padding: 40px 20px; color: #aaa; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }

/* ================================================================
   SPECIALTY VIEW
================================================================ */
#specialty-view { background: #f9f9f9; min-height: 100vh; padding-bottom: 120px; padding: 15px; }

.specialty-grid { display: flex; flex-direction: column; gap: 12px; }

.specialty-card {
    background: white; border-radius: 16px; padding: 14px;
    display: flex; align-items: center; gap: 14px; border: 1px solid #eee;
}

.specialty-img-slot { width: 70px; height: 70px; background: #eee; border-radius: 12px; flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.specialty-img-slot img { width: 100%; height: 100%; object-fit: cover; }

.specialty-info { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.specialty-name { font-size: 0.85rem; font-weight: 900; text-transform: uppercase; color: #222; }
.specialty-desc { font-size: 0.7rem; color: #888; font-weight: 700; }
.specialty-price { font-size: 0.75rem; color: #85bb85; font-weight: 900; }
.in-cart { font-size: 0.6rem; color: #A11C1E; font-weight: 900; text-transform: uppercase; }

.specialty-qty-controls { display: flex; align-items: center; gap: 8px; }
.specialty-qty-btn { width: 32px; height: 32px; border-radius: 50%; border: none; font-weight: 900; cursor: pointer; font-size: 1rem; }
.specialty-qty-btn.minus { background: #eee; color: #333; }
.specialty-qty-btn.plus { background: #A11C1E; color: white; }

/* ================================================================
   WHOLESALE VIEW (with sticky category bar)
================================================================ */
#wholesale-view { background: #f9f9f9; min-height: 100vh; padding-bottom: 120px; }

.wholesale-category-bar {
    background: white; 
    padding: 12px 20px;
    border-bottom: 2px solid #eee;
    margin: 0;
}

.wholesale-cat-bar-container { display: flex; flex-direction: column; gap: 0; }

.wholesale-cat-bar-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px; background: white;
    border-radius: 10px; border: 2px solid #A11C1E;
    width: 100%;
    cursor: pointer;
    transition: background 0.2s;
}

.wholesale-cat-bar-header:active { background: #f5f5f5; }

.wholesale-cat-bar-title { font-size: 0.8rem; font-weight: 900; text-transform: uppercase; color: #222; flex: 1; text-align: left; }

.wholesale-cat-arrow { font-size: 1rem; color: #A11C1E; font-weight: 900; }

.wholesale-cat-grid-wrapper {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 8px; padding: 12px 0; margin-top: 8px;
    animation: slideDown 0.25s ease;
}

.wholesale-cat-btn {
    padding: 12px 16px; background: #f0f0f0;
    border: none; border-radius: 10px;
    font-size: 0.7rem; font-weight: 900; text-transform: uppercase; cursor: pointer;
}

.wholesale-cat-btn.active { background: #A11C1E; color: white; }

.wholesale-item-list { padding: 15px; display: flex; flex-direction: column; gap: 12px; }

.wholesale-item {
    background: white; border-radius: 15px; padding: 12px;
    display: flex; align-items: center; gap: 12px; border: 1px solid #eee;
    /* Reset any column layout from desktop */
    flex-direction: row !important;
    overflow: visible !important;
    box-shadow: none !important;
    transform: none !important;
}
.wholesale-item:hover { transform: none !important; box-shadow: none !important; border-color: #eee !important; }

.wholesale-img-slot {
    width: 55px !important; height: 55px !important;
    background: #eee; border-radius: 10px; flex-shrink: 0;
    overflow: hidden; display: flex !important; align-items: center; justify-content: center;
    border-radius: 10px !important;
}
.wholesale-img-slot img { width: 100%; height: 100%; object-fit: cover; }

.wholesale-info {
    flex-grow: 1; display: flex; flex-direction: column; gap: 2px;
    padding: 0 !important;
}
.wholesale-name { font-size: 0.8rem; font-weight: 900; text-transform: uppercase; color: #222; }
.wholesale-item-price, .wholesale-price {
    font-size: 0.7rem; color: #85bb85; font-weight: 900;
    padding: 0 !important;
}

.wholesale-add-btn {
    width: 36px; height: 36px; border-radius: 50%;
    background: #A11C1E; color: white; border: none;
    font-size: 1.3rem; font-weight: 900; cursor: pointer; flex-shrink: 0;
    /* Reset desktop overrides */
    margin: 0 !important;
    display: flex !important;
    align-items: center; justify-content: center;
    box-shadow: none !important;
    letter-spacing: 0 !important;
}
.wholesale-add-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* Single-option controls — mobile: flat row like qty-controls */
.ws-single-qty-controls {
    display: flex; align-items: center; gap: 10px;
    padding: 0 !important; flex-shrink: 0;
}
.ws-single-qty-controls .qty-btn {
    width: 30px; height: 30px; border-radius: 50%; border: none;
    font-weight: 900; cursor: pointer; font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
}
.ws-single-qty-controls .qty-btn.minus { background: #eee; color: #333; }
.ws-single-qty-controls .qty-btn.plus  { background: #A11C1E; color: white; }
.ws-single-qty-controls .qty-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.ws-single-qty-controls .qty-num {
    font-weight: 900; font-size: 0.9rem; min-width: 16px; text-align: center; color: #222;
}

/* Multi-option button — mobile: just the round + button, no hint text on mobile */
.ws-multi-btn {
    width: 36px !important; height: 36px !important;
    border-radius: 50% !important;
    display: flex !important; align-items: center; justify-content: center;
    padding: 0 !important; gap: 0 !important;
    font-size: 1.3rem !important;
}
.ws-multi-btn-hint { display: none; }
.ws-multi-btn-plus { font-size: 1.3rem; font-weight: 900; }

.wholesale-add-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.wholesale-empty-msg { text-align: center; padding: 40px 20px; color: #aaa; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }

/* ================================================================
   MISC & FOOTER
================================================================ */
.section-placeholder-title { color: white; text-align: center; padding-top: 60px; font-size: 1.3rem; text-transform: uppercase; }

#main-footer {
    position: fixed; bottom: 0; width: 100%;
    background: #222; padding: 15px;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 100;
}

.tally-info { display: flex; align-items: center; gap: 10px; }
.tally-text { display: flex; flex-direction: column; }
.tally-label { color: #777; font-size: 0.55rem; font-weight: 900; text-transform: uppercase; margin-bottom: -4px; }
#live-tally { color: white; font-size: 1.4rem; font-weight: 900; }

.growing-box-container { width: 40px; height: 40px; background: rgba(255,255,255,0.1); border-radius: 10px; display: flex; justify-content: center; align-items: center; transition: transform 0.2s, background 0.2s; }
.box-grow { transform: scale(1.2); background: #A11C1E; }

.footer-nav-actions { display: flex; gap: 8px; }
#footer-back-btn { background: #444; color: white; border: none; padding: 10px 15px; border-radius: 10px; font-size: 0.6rem; font-weight: 900; text-transform: uppercase; cursor: pointer; }
#footer-next-btn { background: #A11C1E; color: white; border: none; padding: 10px 15px; border-radius: 10px; font-size: 0.6rem; font-weight: 900; text-transform: uppercase; cursor: pointer; }

/* Wholesale Footer (mobile) */
#ws-footer {
    position: fixed; bottom: 0; width: 100%;
    background: #222; padding: 15px;
    display: flex;
    justify-content: space-between; align-items: center;
    z-index: 100;
}
#ws-footer.hidden { display: none; }
#ws-live-tally { color: white; font-size: 1.4rem; font-weight: 900; }
#ws-footer .tally-label { color: #777; }
#ws-footer .footer-nav-actions button {
    background: #444; color: white; border: none; 
    padding: 10px 15px; border-radius: 10px; 
    font-size: 0.6rem; font-weight: 900; 
    text-transform: uppercase; cursor: pointer;
}
#ws-footer .footer-nav-actions button:last-child {
    background: #A11C1E;
}

/* ================================================================
   ANIMATIONS
================================================================ */
@keyframes fadeSlideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

@keyframes slideInRight {
    from { transform: translateX(60px); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}
@keyframes slideInLeft {
    from { transform: translateX(-60px); opacity: 0; }
    to   { transform: translateX(0);     opacity: 1; }
}
@keyframes slideOutLeft {
    from { transform: translateX(0);     opacity: 1; }
    to   { transform: translateX(-60px); opacity: 0; }
}
@keyframes slideOutRight {
    from { transform: translateX(0);    opacity: 1; }
    to   { transform: translateX(60px); opacity: 0; }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-12px); }
}

/* ----------------------------------------------------------------
   SMOOTH SECTION TRANSITIONS
---------------------------------------------------------------- */
#app-viewport {
    position: relative;
    overflow: hidden;
}

#app-viewport section {
    width: 100%;
}

/* Entry classes applied by JS */
.section-enter-right {
    animation: slideInRight 0.38s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}
.section-enter-left {
    animation: slideInLeft 0.38s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}
.section-enter-up {
    animation: fadeIn 0.32s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

/* Exit: outgoing section overlays briefly, then hides */
.section-exit-left {
    animation: slideOutLeft 0.28s cubic-bezier(0.5, 0, 0.75, 0) forwards;
    position: absolute; top: 0; left: 0; width: 100%; pointer-events: none;
}
.section-exit-right {
    animation: slideOutRight 0.28s cubic-bezier(0.5, 0, 0.75, 0) forwards;
    position: absolute; top: 0; left: 0; width: 100%; pointer-events: none;
}
.section-exit-down {
    animation: fadeOut 0.22s cubic-bezier(0.5, 0, 0.75, 0) forwards;
    position: absolute; top: 0; left: 0; width: 100%; pointer-events: none;
}

/* Ensure home hub & sub-views stack properly during transitions */
#app-viewport { display: block; }

/* Category bars in header - no longer sticky */
.build-category-bar, .wholesale-category-bar {
    background: white;
}

/* ----------------------------------------------------------------
   ADDON PANEL — inline inside popup
---------------------------------------------------------------- */

/* "Add-Ons" trigger button inside specialty popup */
.popup-addon-trigger-btn {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 13px 16px; margin-top: 14px;
    background: #fff5f5; border: 2px solid #A11C1E;
    border-radius: 12px; cursor: pointer;
    font-size: 0.75rem; font-weight: 900; text-transform: uppercase;
    color: #A11C1E; transition: background 0.18s;
}
.popup-addon-trigger-btn:hover { background: #fdecea; }
.addon-trigger-left { display: flex; align-items: center; gap: 8px; }
.addon-trigger-badge {
    background: #A11C1E; color: white;
    font-size: 0.6rem; font-weight: 900;
    padding: 2px 7px; border-radius: 20px;
    min-width: 22px; text-align: center;
}
.addon-chevron { font-size: 0.75rem; transition: transform 0.2s; }
.addon-chevron.open { transform: rotate(180deg); }

/* Collapsible addon panel that expands below the trigger */
.addon-panel {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.25s ease;
}
.addon-panel.expanded {
    max-height: 9999px; /* uncapped — popup card scroll handles it */
    overflow: visible;
    opacity: 1;
}

.addon-panel-inner {
    margin-top: 10px;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: visible;
}

/* Category header inside addon panel */
.addon-cat-header {
    background: #fdecea; padding: 9px 14px;
    font-size: 0.65rem; font-weight: 900; text-transform: uppercase;
    color: #A11C1E; border-bottom: 1px solid #f5c6c6;
    letter-spacing: 0.8px;
}
/* Each addon item row */
.addon-item-row {
    display: flex; align-items: center;
    padding: 10px 14px; gap: 10px;
    border-bottom: 1px solid #f0f0f0;
    background: white;
}
.addon-item-row:last-child { border-bottom: none; }
.addon-item-info { flex: 1; }
.addon-item-name { font-size: 0.75rem; font-weight: 900; color: #222; display: block; }
.addon-item-price { font-size: 0.65rem; color: #85bb85; font-weight: 700; }

.addon-qty-wrap { display: flex; align-items: center; gap: 8px; }
.addon-qty-btn {
    width: 26px; height: 26px; border-radius: 50%; border: none;
    font-weight: 900; font-size: 0.85rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.1s;
}
.addon-qty-btn:active { transform: scale(0.9); }
.addon-qty-btn.minus { background: #eee; color: #333; }
.addon-qty-btn.plus  { background: #A11C1E; color: white; }
.addon-qty-num { font-weight: 900; font-size: 0.85rem; min-width: 18px; text-align: center; }

/* "Add to Box" CTA — appears only when addons > 0 */
.addon-commit-btn {
    display: none;
    width: 100%; padding: 13px; margin-top: 12px;
    background: #222; color: white;
    border: none; border-radius: 10px;
    font-size: 0.75rem; font-weight: 900; text-transform: uppercase;
    cursor: pointer; transition: background 0.2s;
    animation: fadeIn 0.2s ease;
}
.addon-commit-btn.visible { display: block; }
.addon-commit-btn:hover { background: #111; }

/* Summary line under the trigger showing what's been committed */
.addon-summary-line {
    font-size: 0.65rem; font-weight: 700; color: #888;
    padding: 4px 0 0;
    display: none;
}
.addon-summary-line.visible { display: block; }

/* ----------------------------------------------------------------
   CATEGORY ITEM LIST TRANSITIONS
---------------------------------------------------------------- */
@keyframes listEnterRight {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes listEnterLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes listExitLeft {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(-30px); }
}
@keyframes listExitRight {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(30px); }
}

.list-enter-right { animation: listEnterRight 0.28s cubic-bezier(0.25, 1, 0.5, 1) forwards; }
.list-enter-left  { animation: listEnterLeft  0.28s cubic-bezier(0.25, 1, 0.5, 1) forwards; }
.list-exit-left   { animation: listExitLeft   0.18s ease forwards; }
.list-exit-right  { animation: listExitRight  0.18s ease forwards; }

/* ----------------------------------------------------------------
   CART — addon label
---------------------------------------------------------------- */
.cart-addon-label {
    font-size: 0.6rem;
    font-weight: 900;
    text-transform: uppercase;
    color: #A11C1E;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    margin-top: 2px;
}
.cart-box-wrapper {
    margin-bottom: 4px;
}
.cart-box-main {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0;
    font-size: 0.75rem;
}
.cart-box-name { font-weight: 700; color: #333; }
.cart-box-price { font-weight: 900; color: #A11C1E; }

.cart-box-addons {
    padding: 4px 0 4px 12px;
    border-left: 2px solid #f0d0d0;
    margin-left: 4px;
    display: flex; flex-direction: column; gap: 4px;
}
.cart-addon-item {
    display: flex; justify-content: space-between;
    font-size: 0.68rem; color: #888; font-weight: 700;
}
.cart-addon-item span:last-child { color: #A11C1E; }


/* ================================================================
   LOADING SCREEN
================================================================ */
#loading-screen {
    position: fixed; inset: 0; z-index: 9999;
    background: white;
    display: flex; align-items: center; justify-content: center;
}
#loading-screen.hidden { display: none; }
.loading-inner {
    display: flex; flex-direction: column; align-items: center; gap: 20px;
}
.loading-logo { width: 160px; opacity: 0.9; }
.loading-spinner {
    width: 36px; height: 36px;
    border: 3px solid #f0d0d0;
    border-top-color: #A11C1E;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 0.75rem; color: #999; font-weight: 700; letter-spacing: 1px; }

/* ================================================================
   ADMIN TOAST NOTIFICATION
================================================================ */
.admin-toast {
    position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
    background: #222; color: white;
    padding: 10px 20px; border-radius: 20px;
    font-size: 0.75rem; font-weight: 900;
    z-index: 9999; animation: fadeIn 0.2s ease;
    white-space: nowrap;
}
.admin-toast.error { background: #A11C1E; }
.admin-toast.hidden { display: none; }

/* ================================================================
   ADMIN SAVE BUTTON
================================================================ */
.admin-save-btn {
    background: #222; color: white; border: none;
    padding: 6px 12px; border-radius: 8px;
    font-size: 0.65rem; font-weight: 900; cursor: pointer;
    transition: background 0.2s;
}
.admin-save-btn:hover { background: #444; }

/* ================================================================
   V2 FIXES
================================================================ */

/* ── 1. Category button animated red outline — fires as soon as button is rendered ── */
@keyframes pulseOutline {
    0%   { box-shadow: 0 0 0 0 rgba(161,28,30,0.7); }
    50%  { box-shadow: 0 0 0 8px rgba(161,28,30,0.12); }
    100% { box-shadow: 0 0 0 0 rgba(161,28,30,0); }
}


/* ── 2. Clear cart button — lives inside cart popup ── */
.cart-clear-btn {
    width: 100%;
    margin-top: 14px;
    padding: 12px;
    background: none;
    border: 1.5px solid #ddd;
    border-radius: 10px;
    color: #999;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}
.cart-clear-btn:hover { border-color: #A11C1E; color: #A11C1E; }

/* ── 3. Auth — remember me + forgot password ── */
.auth-options-row {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 8px;
    margin-bottom: 12px;
    padding: 0 2px;
}
.auth-remember {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.75rem; color: #666; cursor: pointer;
}
.auth-remember input[type="checkbox"] { 
    accent-color: #A11C1E;
    cursor: pointer;
    width: 16px;
    height: 16px;
}
.auth-forgot-btn {
    background: none; border: none; color: #A11C1E;
    font-size: 0.75rem; font-weight: 700; cursor: pointer;
    padding: 0; text-decoration: underline;
}

/* ── 4. Nav — Agent on top, modes below ── */
.nav-buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 12px 8px;
}

.nav-agent-top {
    width: 100%;
    background: #1a1a2e;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.2s;
}
.nav-agent-top:hover { background: #2a2a4e; }

.nav-modes-row {
    display: flex;
    gap: 6px;
}
.nav-modes-row button { flex: 1; }

/* ── 5. iOS blue text fix ── */
button, input:not([type="checkbox"]), select, textarea {
    appearance: none;
    -webkit-appearance: none;
    color: inherit;
}
input[type="checkbox"] {
    appearance: auto;
    -webkit-appearance: checkbox;
    width: 16px; height: 16px;
    accent-color: #A11C1E;
    cursor: pointer;
    flex-shrink: 0;
}
.build-cat-bar-header,
.build-cat-btn,
.wholesale-cat-bar-header,
.wholesale-cat-btn {
    color: #222 !important;
    -webkit-text-fill-color: #222 !important;
}
.build-cat-btn.active,
.wholesale-cat-btn.active {
    color: white !important;
    -webkit-text-fill-color: white !important;
}

/* ── 6. Desktop — full width, presentable grid layout ── */

/* ── Swipe hint indicator dots ── */
.swipe-dots {
    display: flex; justify-content: center; gap: 6px;
    padding: 6px 0 2px;
}
.swipe-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: #ddd; transition: background 0.2s, transform 0.2s;
}
.swipe-dot.active { background: #A11C1E; transform: scale(1.3); }

/* ── Custom clear cart confirmation (replaces browser confirm) ── */
.cart-clear-confirm {
    margin-top: 14px;
    padding: 14px;
    border: 1.5px solid #A11C1E;
    border-radius: 10px;
    background: #fff5f5;
}
.cart-clear-confirm span {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}
.cart-clear-confirm-btns {
    display: flex;
    gap: 8px;
}
.cart-clear-yes {
    flex: 1; padding: 9px;
    background: #A11C1E; color: white;
    border: none; border-radius: 8px;
    font-size: 0.7rem; font-weight: 900;
    cursor: pointer;
}
.cart-clear-no {
    flex: 1; padding: 9px;
    background: #eee; color: #555;
    border: none; border-radius: 8px;
    font-size: 0.7rem; font-weight: 900;
    cursor: pointer;
}

/* ================================================================
   V0.3 NEW STYLES
================================================================ */

/* ── Phone number input row ── */
.auth-phone-row { display: flex; align-items: center; width: 100%; gap: 0; border: 1.5px solid #ddd; border-radius: 10px; overflow: hidden; transition: border-color 0.2s; }
.auth-phone-row:focus-within { border-color: #A11C1E; }
.auth-phone-prefix { background: #f5f5f5; padding: 13px 10px; font-size: 0.8rem; font-weight: 900; color: #555; white-space: nowrap; border-right: 1.5px solid #ddd; }
.auth-phone-input { border: none !important; border-radius: 0 !important; flex: 1; }

/* ── Wholesale header ── */
#ws-header { padding: 0; position: sticky; top: 0; z-index: 100; background-color: #A11C1E; }
.ws-header-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px 12px; background-color: #A11C1E; }
.ws-header-title { color: white; font-size: 1rem; font-weight: 900; text-transform: uppercase; }
.ws-back-btn { background: rgba(255,255,255,0.2); border: none; color: white; padding: 6px 14px; border-radius: 8px; font-size: 0.7rem; font-weight: 900; cursor: pointer; }

/* ── Meat sub-category bar ── */
.meat-subcat-bar { display: flex; gap: 6px; padding: 8px 12px; background: #fdf0f0; border-bottom: 1px solid #f0d0d0; overflow-x: auto; flex-shrink: 0; }
.meat-subcat-btn { padding: 7px 16px; border: 1.5px solid #ddd; border-radius: 20px; background: white; font-size: 0.7rem; font-weight: 900; color: #555; cursor: pointer; white-space: nowrap; transition: all 0.15s; }
.meat-subcat-btn.active { background: #A11C1E; color: white; border-color: #A11C1E; }

/* ── Admin hide button ── */
.admin-hide-btn { background: #eee; color: #777; border: none; padding: 6px 10px; border-radius: 8px; font-size: 0.6rem; font-weight: 900; cursor: pointer; transition: background 0.15s; }
.admin-hide-btn.hidden-on { background: #ffe0e0; color: #A11C1E; }

/* ── Admin unsaved card outline ── */
.admin-product-row.unsaved { outline: 2px solid #A11C1E; outline-offset: 2px; border-radius: 12px; }

/* ── Admin meat sub-header ── */
.admin-meat-sub-header { font-size: 0.75rem; font-weight: 900; text-transform: uppercase; color: #A11C1E; padding: 12px 4px 6px; border-bottom: 1px solid #f0d0d0; margin-bottom: 8px; }

/* ── Admin category ID label ── */
.admin-cat-id-label { font-size: 0.6rem; color: #bbb; font-weight: 700; }

/* ── Admin Gallery overlay ── */
/* ================================================================
   IMAGE GALLERY OVERLAY — matches Orders & Stock panel style
================================================================ */
#admin-gallery-overlay {
    position: fixed; inset: 0; z-index: 900;
    background: rgba(10,12,18,0.65);
    backdrop-filter: blur(4px);
    display: flex; align-items: flex-start; justify-content: center;
    padding: 20px; overflow-y: auto;
}
#admin-gallery-overlay.hidden { display: none; }

.gallery-shell {
    background: var(--op-surface);
    border-radius: var(--op-radius-lg);
    box-shadow: var(--op-shadow-lg);
    width: 100%; max-width: 1160px;
    min-height: min(90vh, 720px);
    display: flex; flex-direction: column;
    overflow: hidden;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    margin: auto;
}

/* ── Gallery Header ── */
.gallery-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--op-border);
    background: var(--op-surface);
    flex-shrink: 0;
}
.gallery-header-left { display: flex; align-items: center; gap: 14px; }
.gallery-header-icon {
    width: 38px; height: 38px; border-radius: 9px;
    background: var(--op-accent); color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; flex-shrink: 0;
}
.gallery-header-title {
    font-size: 1rem; font-weight: 700;
    color: var(--op-text-primary); letter-spacing: -0.01em;
}
.gallery-header-sub {
    font-size: 0.72rem; color: var(--op-text-muted);
    text-transform: uppercase; letter-spacing: 0.06em;
    margin-top: 1px;
}
.gallery-header-close {
    background: var(--op-bg); border: 1px solid var(--op-border);
    border-radius: 6px; padding: 7px 14px; cursor: pointer;
    font-size: 0.8rem; font-weight: 600; color: var(--op-text-secondary);
    transition: background 0.15s, color 0.15s;
}
.gallery-header-close:hover { background: #e8eaed; color: var(--op-text-primary); }

/* ── Gallery Body ── */
.gallery-body {
    flex: 1; overflow-y: auto;
    background: var(--op-bg);
    padding: 20px 24px;
    display: flex; flex-direction: column; gap: 16px;
}

/* ── Dropzone ── */
.gallery-dropzone {
    border: 2px dashed var(--op-border);
    border-radius: var(--op-radius-lg);
    padding: 32px 24px;
    text-align: center;
    background: var(--op-surface);
    transition: border-color 0.2s, background 0.2s;
    flex-shrink: 0;
}
.gallery-dropzone.drag-over {
    border-color: var(--op-accent);
    background: var(--op-accent-light);
}
.gallery-dropzone-icon {
    font-size: 2rem; margin-bottom: 10px; display: block;
    color: var(--op-text-muted);
}
.gallery-dropzone p {
    font-size: 0.82rem; color: var(--op-text-secondary);
    font-weight: 600; margin: 0;
}
.gallery-file-label {
    color: var(--op-accent);
    text-decoration: underline;
    cursor: pointer;
    font-weight: 700;
}
.gallery-file-label input { display: none; }

/* ── Grid Section Header ── */
.gallery-section-hdr {
    display: flex; align-items: center; justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--op-border);
}
.gallery-section-title {
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--op-text-secondary);
    display: flex; align-items: center; gap: 8px;
}
.gallery-count-badge {
    background: var(--op-border); color: var(--op-text-secondary);
    border-radius: 10px; padding: 1px 7px;
    font-size: 0.68rem; font-weight: 700;
}

/* ── Image Grid ── */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
    align-content: start;
}

.gallery-card {
    background: var(--op-surface);
    border: 1px solid var(--op-border);
    border-radius: var(--op-radius);
    overflow: hidden;
    position: relative;
    box-shadow: var(--op-shadow-sm);
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.gallery-card:hover {
    border-color: var(--op-accent);
    box-shadow: var(--op-shadow-md);
    transform: translateY(-2px);
}
.gallery-card img {
    width: 100%; height: 130px;
    object-fit: cover; display: block;
    background: var(--op-bg);
}
.gallery-card-footer {
    padding: 8px 10px 6px;
    display: flex; flex-direction: column; gap: 6px;
}
.gallery-filename {
    font-size: 0.62rem; color: var(--op-text-muted);
    word-break: break-all; line-height: 1.3;
    font-family: 'Inter', monospace;
    display: block;
}
.gallery-card-actions {
    display: flex; gap: 6px;
}
.gallery-use-btn {
    flex: 1; padding: 5px 8px;
    background: var(--op-accent); color: white;
    border: none; border-radius: 5px;
    cursor: pointer; font-size: 0.68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.04em;
    transition: opacity 0.15s;
    font-family: 'Inter', sans-serif;
}
.gallery-use-btn:hover { opacity: 0.85; }
.gallery-delete-btn {
    width: 28px; height: 28px; border-radius: 5px;
    background: var(--at-red-bg, #fef2f2);
    border: 1px solid #fecaca;
    color: var(--at-red, #ef4444);
    cursor: pointer; font-size: 0.75rem;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}
.gallery-delete-btn:hover { background: #fee2e2; }

/* ── Pick-mode Banner ── */
#gallery-pick-banner {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: var(--op-radius);
    padding: 10px 16px;
    font-weight: 600; font-size: 0.82rem;
    color: #065f46;
    display: flex; align-items: center; gap: 8px;
}

/* ── Nav — only build/specialty on main header ── */
#section-nav .nav-modes-row { flex: 1; }

/* ── Custom Modal ── */
#custom-modal { position:fixed;inset:0;z-index:9000;display:flex;align-items:center;justify-content:center;padding:20px; }
.cm-backdrop { position:absolute;inset:0;background:rgba(0,0,0,0.55); }
.cm-card { position:relative;background:white;border-radius:18px;padding:28px 24px;width:100%;max-width:360px;display:flex;flex-direction:column;gap:12px;animation:fadeSlideUp 0.2s ease; }
.cm-title { font-size:0.9rem;font-weight:900;color:#222;text-transform:uppercase; }
.cm-message { font-size:0.8rem;color:#555;font-weight:600;line-height:1.4; }
.cm-input { display:none;width:100%; }
.cm-btns { display:flex;gap:10px;margin-top:4px; }
.cm-cancel { flex:1;padding:12px;background:#f0f0f0;color:#555;border:none;border-radius:10px;font-size:0.75rem;font-weight:900;cursor:pointer; }
.cm-confirm { flex:1;padding:12px;background:#A11C1E;color:white;border:none;border-radius:10px;font-size:0.75rem;font-weight:900;cursor:pointer; }

/* ── Admin Category Rows ── */
.admin-cat-add-row { padding:0 0 14px; }
.admin-cat-row { display:flex;align-items:center;justify-content:space-between;background:white;border-radius:12px;padding:14px 16px;margin-bottom:8px;gap:12px;border:1.5px solid #eee; }
.admin-cat-row.unsaved { border-color:#A11C1E; }
.admin-cat-name-wrap { flex:1;display:flex;flex-direction:column;gap:4px; }
.admin-cat-name-input { font-size:0.9rem;font-weight:900;color:#222;border:none;border-bottom:1.5px solid #eee;padding:4px 0;outline:none;background:transparent;width:100%; }
.admin-cat-name-input:focus { border-bottom-color:#A11C1E; }
.admin-cat-id-label { font-size:0.6rem;color:#bbb;font-weight:700; }
.admin-cat-actions { display:flex;align-items:center;gap:6px;flex-shrink:0; }
.admin-cat-toggle-btn { padding:6px 10px;border:none;border-radius:8px;font-size:0.65rem;font-weight:900;cursor:pointer; }
.admin-cat-toggle-btn.cat-visible { background:#e6f4ea;color:#2d7a47; }
.admin-cat-toggle-btn.cat-hidden  { background:#fdecea;color:#A11C1E; }
.admin-cat-save-btn { background:#222;color:white;border:none;border-radius:8px;padding:6px 10px;font-size:0.7rem;cursor:pointer; }
.admin-cat-del-btn  { background:#fdecea;color:#A11C1E;border:none;border-radius:8px;padding:6px 10px;font-size:0.7rem;cursor:pointer; }

/* ── Admin LB options ── */
.admin-lb-row { display:flex;gap:6px;align-items:center;margin-bottom:6px; }
.admin-lb-row input { flex:1;min-width:0; }
.admin-lb-remove-btn { background:#fdecea;color:#A11C1E;border:none;border-radius:6px;padding:4px 8px;font-size:0.7rem;font-weight:900;cursor:pointer;flex-shrink:0; }
.admin-lb-add-btn { margin-top:8px;background:#f0f0f0;color:#555;border:none;border-radius:8px;padding:8px 14px;font-size:0.7rem;font-weight:900;cursor:pointer;width:100%; }
.admin-lb-add-btn:hover { background:#e0e0e0; }
.admin-ws-cat-row { display:flex;align-items:center;gap:6px;margin:4px 0; }

/* ── Add Category button in sidebar ── */
.admin-cat-tab-add-btn {
    width: 100%;
    margin-top: 4px;
    padding: 10px 14px;
    background: transparent;
    border: 2px dashed #bbb;
    border-radius: 6px;
    color: #888;
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    text-align: center;
}
.admin-cat-tab-add-btn:hover {
    border-color: #A11C1E;
    color: #A11C1E;
    background: #fff5f5;
}

/* ── Admin meat sub-category selector ── */
.admin-meat-sub-select {
    flex: 1;
    padding: 6px 10px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #333;
    background: white;
    cursor: pointer;
    appearance: auto;
    -webkit-appearance: auto;
}
.admin-meat-sub-select:focus { border-color: #A11C1E; outline: none; }

/* ── Admin wholesale meat sub-header ── */
.admin-ws-sub-header {
    font-size: 0.65rem; font-weight: 900; text-transform: uppercase;
    color: #888; padding: 8px 4px 4px; letter-spacing: 0.5px;
    border-bottom: 1px solid #f0f0f0; margin-bottom: 6px;
}

/* ── Category scope dropdown on card ── */
.admin-cat-scope-select {
    font-size: 0.65rem; font-weight: 700; color: #555;
    border: 1.5px solid #ddd; border-radius: 6px;
    padding: 4px 8px; background: white; cursor: pointer;
    appearance: auto; -webkit-appearance: auto;
    margin-top: 4px; width: 100%;
}
.admin-cat-scope-select:focus { border-color: #A11C1E; outline: none; }

/* ================================================================
   💎 DESKTOP V2 — CLEAN MODERN UI (ONLY DESKTOP)
================================================================ */

/* ================================================================
   DESKTOP — ≥ 768px  (single clean block, no conflicts)
================================================================ */
/* ================================================================
   TEAM PAGE STYLES
================================================================ */
#team {
    background-image: url('../assets/images/pictures/BG-1920x1080.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    padding: 20px;
    overflow-y: auto;
}

.team-content {
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 80px;
}

.team-main-title {
    color: white;
    font-size: 2rem;
    font-weight: 900;
    text-align: center;
    margin: 20px 0 30px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.team-section {
    background: white;
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.team-section-title {
    color: #A11C1E;
    font-size: 1.3rem;
    font-weight: 900;
    margin: 0 0 16px 0;
}

.team-text {
    color: #000000;
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 16px;
    opacity: 0.95;
}

.team-text:last-child {
    margin-bottom: 0;
}

.team-text strong {
    font-weight: 900;
    color: #A11C1E;
}

.team-social {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    margin-bottom: 20px;
}

.team-social h3 {
    color: white;
    font-size: 1rem;
    font-weight: 900;
    margin: 0 0 10px 0;
}

.team-social p {
    color: white;
    font-size: 0.85rem;
    margin: 0;
    opacity: 0.9;
}

.team-tagline {
    text-align: center;
    padding: 20px;
    margin-bottom: 20px;
}

.team-tagline p {
    color: white;
    font-size: 1.1rem;
    font-weight: 900;
    margin: 0;
}

.team-back-btn {
    width: 100%;
    padding: 15px;
    background: white;
    color: #A11C1E;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
}

.team-back-btn:active {
    transform: scale(0.98);
    background: #f5f5f5;
}

/* Desktop Team Page */
@media (min-width: 768px) {
    .team-main-title {
        font-size: 2.5rem;
    }
    
    .team-section-title {
        font-size: 1.5rem;
    }
    
    .team-text {
        font-size: 1rem;
    }
    
    .team-back-btn:hover {
        background: #f5f5f5;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }
}/* ════════════════════════════════════════════════════════════════════
   CHECKOUT - WORKING DESIGN
════════════════════════════════════════════════════════════════════ */

#checkout-view {
    padding-bottom: 100px;
    background: white;
    min-height: 100vh;
}

#ws-checkout-view {
    padding-bottom: 100px;
    background: white;
    min-height: 100vh;
}

/* PROGRESS BAR IN HEADER */
.checkout-header-progress {
    padding: 20px;
    margin-bottom: 20px;
}

.checkout-progress-container {
    position: relative;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.checkout-progress-bar-track {
    position: absolute;
    width: 100%;
    height: 3px;
    background: #f0f0f0;
    border-radius: 2px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 0;
}

.checkout-progress-bar-fill {
    position: absolute;
    height: 100%;
    background: #A11C1E;
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
}

.checkout-progress-steps {
    display: flex;
    justify-content: space-between;
    width: 100%;
    position: relative;
    z-index: 1;
}

.checkout-progress-step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 2px solid #ddd;
    color: #999;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-progress-step.active {
    background: #A11C1E;
    color: white;
    border-color: #A11C1E;
}

/* CARD DESIGN */
.checkout-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin: 0 20px 20px;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.checkout-card-title {
    font-size: 1rem;
    font-weight: 900;
    text-transform: uppercase;
    color: #A11C1E;
    margin-bottom: 20px;
    text-align: center;
}

/* CART CONTENT - EXACT SAME */
.checkout-cart-content {
    margin-bottom: 20px;
}

.cart-section {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.cart-section h3 {
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    color: #A11C1E;
    margin-bottom: 10px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 0.75rem;
    gap: 12px;
}

.cart-item-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cart-item-name {
    font-weight: 700;
    color: #333;
}

.cart-item-price {
    font-weight: 900;
    color: #A11C1E;
    font-size: 0.7rem;
}

.cart-qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    font-weight: 900;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-qty-btn.minus {
    background: #eee;
    color: #333;
}

.cart-qty-btn.plus {
    background: #A11C1E;
    color: white;
}

.cart-qty-num {
    font-weight: 900;
    font-size: 0.8rem;
    min-width: 20px;
    text-align: center;
}

.cart-edit-btn {
    background: transparent;
    border: 1px solid #ddd;
    color: #666;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.6rem;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 4px;
    width: fit-content;
}

.cart-edit-btn:active {
    background: #f5f5f5;
    border-color: #A11C1E;
    color: #A11C1E;
}

.cart-box-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.cart-box-addons {
    padding-left: 12px;
    margin-top: 4px;
}

.cart-addon-label {
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 4px;
}

.cart-addon-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.68rem;
    color: #666;
    padding: 2px 0;
}

.cart-empty {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 0.75rem;
    font-weight: 700;
}

/* TOTAL */
.checkout-card-totals {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 2px solid #eee;
    margin-bottom: 16px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    padding: 6px 0;
    color: #666;
}

.total-row span:last-child {
    font-weight: 700;
}

.total-row.total-final {
    font-size: 1rem;
    font-weight: 900;
    color: #A11C1E;
    border-top: 1px solid #f0f0f0;
    padding-top: 10px;
    margin-top: 8px;
}

/* METHOD SELECTION */
.checkout-method-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.checkout-method-card {
    background: white;
    border: 2px solid #ddd;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #333;
    transition: all 0.2s;
}

.checkout-method-card:active {
    border-color: #A11C1E;
    background: #f9f9f9;
}

/* Disabled checkout method card — grayed out, not clickable */
.checkout-method-card--disabled {
    opacity: 0.45;
    background: #f0f0f0;
    border-color: #ddd;
    cursor: not-allowed;
    pointer-events: none;
    color: #999;
}
.checkout-method-card--disabled .method-icon {
    filter: grayscale(1);
}

.method-icon {
    font-size: 2rem;
}

/* ================================================================
   DELIVERY / PICKUP ADMIN SECTION
================================================================ */

.dl-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dl-section-title {
    font-size: 0.85rem;
    font-weight: 900;
    text-transform: uppercase;
    color: #A11C1E;
    letter-spacing: 0.5px;
}

.dl-section-sub {
    font-size: 0.72rem;
    color: #888;
    margin-top: -8px;
}

/* Toggle cards */
.dl-toggle-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.dl-toggle-card {
    border-radius: 12px;
    border: 2px solid #eee;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    transition: all 0.2s;
}

.dl-toggle-card.dl-enabled {
    border-color: #28a745;
    background: #f0fff4;
}

.dl-toggle-card.dl-disabled {
    border-color: #ccc;
    background: #f9f9f9;
    opacity: 0.85;
}

.dl-toggle-icon {
    font-size: 2rem;
}

.dl-toggle-label {
    font-size: 0.8rem;
    font-weight: 900;
    text-transform: uppercase;
    color: #333;
}

.dl-toggle-status {
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 3px 10px;
    border-radius: 20px;
}

.dl-enabled .dl-toggle-status {
    background: #28a745;
    color: white;
}

.dl-disabled .dl-toggle-status {
    background: #aaa;
    color: white;
}

.dl-toggle-btn {
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
    width: 100%;
    transition: opacity 0.2s;
}
.dl-toggle-btn:hover { opacity: 0.85; }

.dl-btn-disable {
    background: #f44336;
    color: white;
}

.dl-btn-enable {
    background: #28a745;
    color: white;
}

/* Location rows */
.dl-location-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dl-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 12px 14px;
}

.dl-row-fields {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
}

.dl-field-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dl-field-price {
    min-width: 90px;
}

.dl-label {
    font-size: 0.6rem;
    font-weight: 900;
    text-transform: uppercase;
    color: #A11C1E;
    letter-spacing: 0.3px;
}

.dl-input {
    padding: 7px 10px;
    border: 1.5px solid #ddd;
    border-radius: 7px;
    font-size: 0.75rem;
    outline: none;
    transition: border-color 0.2s;
    background: white;
}
.dl-input:focus { border-color: #A11C1E; }

.dl-input-wide { min-width: 200px; }
.dl-input-price { width: 90px; }

.dl-row-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.dl-save-btn {
    padding: 7px 14px;
    background: #A11C1E;
    color: white;
    border: none;
    border-radius: 7px;
    font-size: 0.65rem;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
}
.dl-save-btn:hover { background: #8e1719; }

.dl-delete-btn {
    padding: 7px 14px;
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 7px;
    font-size: 0.75rem;
    cursor: pointer;
}
.dl-delete-btn:hover { background: #fee; color: #c00; border-color: #f99; }

.dl-add-btn {
    padding: 10px 18px;
    background: transparent;
    border: 2px dashed #A11C1E;
    color: #A11C1E;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    align-self: flex-start;
}
.dl-add-btn:hover { background: #A11C1E; color: white; }

/* Responsive: stack on mobile */
@media (max-width: 520px) {
    .dl-toggle-grid { grid-template-columns: 1fr 1fr; }
    .dl-row { flex-direction: column; align-items: stretch; }
    .dl-row-actions { flex-direction: row; }
    .dl-input-wide { min-width: 0; width: 100%; }
}


/* FORMS */
.checkout-card-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkout-form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.checkout-form-field label {
    font-weight: 700;
    font-size: 0.75rem;
    color: #333;
    text-transform: uppercase;
}

.optional {
    font-weight: 400;
    color: #999;
    font-size: 0.65rem;
    text-transform: none;
}

.checkout-form-field input,
.checkout-form-field select,
.checkout-form-field textarea {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.8rem;
    font-family: inherit;
    background: white;
}

.checkout-form-field input:focus,
.checkout-form-field select:focus,
.checkout-form-field textarea:focus {
    outline: none;
    border-color: #A11C1E;
    box-shadow: 0 0 0 2px rgba(161, 28, 30, 0.1);
}

.checkout-form-field textarea {
    min-height: 80px;
    resize: vertical;
}

.checkout-phone-field {
    display: flex;
    gap: 8px;
}

.checkout-phone-field span {
    font-weight: 700;
    font-size: 0.75rem;
    color: #666;
    white-space: nowrap;
    min-width: 70px;
}

.checkout-phone-field input {
    flex: 1;
}

.checkout-divider {
    height: 1px;
    background: #f0f0f0;
}

.checkout-payment-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.checkout-payment-btn {
    padding: 10px 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 700;
    text-align: center;
    transition: all 0.2s;
}

.checkout-payment-btn:active,
.checkout-payment-btn.active {
    border-color: #A11C1E;
    background: #A11C1E;
    color: white;
}

.checkout-disclaimer {
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 12px;
}

.checkout-disclaimer label {
    display: flex;
    gap: 8px;
    cursor: pointer;
    align-items: flex-start;
    font-weight: 400;
    font-size: 0.7rem;
    color: #666;
    line-height: 1.3;
}

.checkout-disclaimer input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: #A11C1E;
}

/* BUTTONS */
.checkout-card-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.checkout-btn-primary {
    width: 100%;
    padding: 12px;
    background: #A11C1E;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
}

.checkout-btn-primary:active {
    background: #8b1618;
}

.checkout-btn-secondary {
    width: 100%;
    padding: 12px;
    background: transparent;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
}

.checkout-btn-secondary:active {
    background: #f5f5f5;
    border-color: #A11C1E;
    color: #A11C1E;
}

/* ADDON POPUP */
#addon-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 16px 16px 0 0;
    padding: 20px;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 900;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
}

.checkout-addon-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.checkout-addon-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: #333;
}

.checkout-addon-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkout-addon-save {
    width: 100%;
    padding: 12px;
    background: #A11C1E;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 16px;
}

.checkout-addon-cancel {
    width: 100%;
    padding: 12px;
    background: transparent;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 8px;
}

#checkout-view #main-footer,
#checkout-view #ws-footer {
    display: none !important;
}
/* HEADER - CLEAN VERSION */
#main-header {
    background-color: #A11C1E;
    padding: 12px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    display: block !important;
}

#main-header.hidden {
    display: none !important;
}

.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 50px;
}

.header-whatsapp-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
}

.header-logo-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    flex: 1;
    display: flex;
    justify-content: center;
}

.header-logo {
    height: 40px;
    width: auto;
}

.header-right-section {
    display: flex;
    align-items: center;
}

.header-cart-icon {
    position: relative;
    cursor: pointer;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    transition: transform 0.2s, background 0.2s;
}

.header-cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #A11C1E;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 900;
}

.header-title-bar {
    text-align: center;
    padding: 10px 0;
    border-top: 1px solid rgba(255,255,255,0.2);
    color: white;
    background-color: #A11C1E;
}

.header-page-title {
    font-size: 1rem;
    font-weight: 900;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    padding: 0;
}
/* ════════════════════════════════════════════════════════════════════
   BANK TRANSFER PAYMENT STYLING
════════════════════════════════════════════════════════════════════ */

.bank-transfer-details {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.transfer-instruction {
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #333;
    font-weight: 600;
}

.bank-details-box {
    background: white;
    border: 2px solid #A11C1E;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 700;
    color: #666;
    min-width: 120px;
}

.detail-value {
    font-weight: 700;
    color: #A11C1E;
    text-align: right;
    flex: 1;
}

.transfer-amount-box {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.amount-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.9rem;
    color: #333;
}

.amount-total {
    border-top: 2px solid #A11C1E;
    padding-top: 12px;
    margin-top: 8px;
    font-weight: 900;
    font-size: 1.1rem;
    color: #A11C1E;
}

.transfer-warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #856404;
    line-height: 1.4;
}

.bank-transfer-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.receipt-upload-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.upload-receipt-btn {
    padding: 15px 20px;
    background: white;
    border: 2px dashed #A11C1E;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    color: #A11C1E;
    text-transform: uppercase;
    transition: all 0.2s;
}

.upload-receipt-btn:hover {
    background: #f9f9f9;
    border-color: #8b1618;
}

.receipt-preview {
    margin-top: 10px;
    border-radius: 8px;
    overflow: hidden;
    background: #f9f9f9;
    padding: 10px;
}

.receipt-preview img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* STOCK MANAGEMENT */
/* Stock Management — mirrors Orders panel style */
#stock-management-overlay {
    position: fixed; inset: 0; z-index: 900;
    background: rgba(10,12,18,0.65);
    backdrop-filter: blur(4px);
    display: flex; align-items: flex-start; justify-content: center;
    padding: 20px; overflow-y: auto;
}
#stock-management-overlay.hidden { display: none; }
/* stock-tab active state — reuses orders-nav-tab */
.stock-tab.active {
    color: var(--op-accent) !important;
    border-bottom-color: var(--op-accent) !important;
}
/* STICKY CATEGORY WRAPPER */
.sticky-category-wrapper {
    position: sticky;
    top: 0;
    z-index: 50;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ================================================================
   ENTERPRISE ADMIN TABLES — Software Suite
================================================================ */

:root {
    --at-bg: #f4f5f7;
    --at-surface: #ffffff;
    --at-border: #e1e4e8;
    --at-border-sub: #edf0f3;
    --at-text: #1a1d23;
    --at-text-2: #5c6370;
    --at-text-3: #9aa0ac;
    --at-accent: #A11C1E;
    --at-accent-bg: rgba(161,28,30,0.06);
    --at-green: #10b981;
    --at-green-bg: #ecfdf5;
    --at-amber: #f59e0b;
    --at-amber-bg: #fffbeb;
    --at-red: #ef4444;
    --at-red-bg: #fef2f2;
    --at-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --at-r: 8px;
}
.at-wrap { font-family:'Inter','Segoe UI',sans-serif; color:var(--at-text); }
.at-section-hdr {
    display:flex; align-items:center; justify-content:space-between;
    margin:0 0 12px; padding-bottom:10px; border-bottom:1px solid var(--at-border);
}
.at-section-title {
    font-size:0.72rem; font-weight:700; text-transform:uppercase;
    letter-spacing:0.08em; color:var(--at-text-2);
    display:flex; align-items:center; gap:8px;
}
.at-section-count {
    background:var(--at-border); color:var(--at-text-2);
    border-radius:10px; padding:1px 7px; font-size:0.68rem; font-weight:700;
}
.at-add-btn {
    display:inline-flex; align-items:center; gap:5px;
    padding:6px 12px; background:var(--at-accent); color:white;
    border:none; border-radius:6px; font-size:0.75rem; font-weight:700;
    cursor:pointer; transition:opacity 0.15s;
}
.at-add-btn:hover { opacity:0.85; }
.at-table-wrap {
    background:var(--at-surface); border:1px solid var(--at-border);
    border-radius:var(--at-r);
    box-shadow:var(--at-shadow); margin-bottom:24px;
}
.at-table { width:100%; border-collapse:collapse; font-size:1.1rem; }
.at-table thead th {
    background:var(--at-bg); padding:14px 20px;
    text-align:left; font-size:0.85rem; font-weight:700;
    text-transform:uppercase; letter-spacing:0.08em; color:var(--at-text-3);
    border-bottom:1px solid var(--at-border); white-space:nowrap;
}
.at-table thead th.th-right { text-align:right; }
.at-table tbody tr {
    border-bottom:1px solid var(--at-border-sub);
    transition:background 0.1s; position:relative;
}
.at-table tbody tr:last-child { border-bottom:none; }
.at-table tbody tr:hover { background:#fafbfc; }
.at-table tbody tr.at-dirty {
    border-left:3px solid var(--at-amber);
    background:var(--at-amber-bg) !important;
}
.at-table td { padding:18px 20px; vertical-align:middle; }
.at-table td.td-right { text-align:right; }
.at-thumb {
    width:80px; height:80px; border-radius:8px;
    object-fit:cover; display:block;
    border:1px solid var(--at-border); background:var(--at-bg);
}
.at-thumb-empty {
    width:80px; height:80px; border-radius:8px;
    background:var(--at-bg); border:1px dashed var(--at-border);
    display:flex; align-items:center; justify-content:center;
    font-size:0.85rem; color:var(--at-text-3); cursor:pointer;
}
/* ── Stock +/− mode toggle button ── */
.stock-mode-btn {
    width: 32px; height: 32px;
    border-radius: 6px;
    border: 1px solid;
    font-size: 1.15rem; font-weight: 700;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
    line-height: 1;
}
.stock-mode-btn.add {
    background: #ecfdf5; color: #10b981; border-color: #a7f3d0;
}
.stock-mode-btn.add:hover  { background: #d1fae5; }
.stock-mode-btn.deduct {
    background: #fdecea; color: #A11C1E; border-color: #f5c2c2;
}
.stock-mode-btn.deduct:hover { background: #fbd5d0; }
.stock-apply-btn {
    width: 32px; height: 32px;
    border-radius: 6px; border: none;
    background: #A11C1E; color: #fff;
    font-size: 0.9rem; font-weight: 700;
    cursor: pointer; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}
.stock-apply-btn:hover { background: #8a1618; }
.stock-mode-label {
    font-size: 0.68rem; color: #888; margin-top: 3px;
}
.stock-set-cell {
    display: flex; align-items: center; gap: 4px;
}

.at-img-remove-btn {
    display: block;
    width: 80px;
    margin-top: 4px;
    padding: 3px 0;
    font-size: 0.7rem;
    font-weight: 700;
    color: #A11C1E;
    background: #fdecea;
    border: 1px solid #f5c2c2;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s;
}
.at-img-remove-btn:hover {
    background: #fbd5d0;
}
.at-input {
    border:1px solid var(--at-border); border-radius:6px;
    padding:9px 14px; font-size:1rem; color:var(--at-text);
    background:white; width:100%; outline:none; font-family:inherit;
    transition:border-color 0.15s;
}
.at-input:focus { border-color:var(--at-accent); box-shadow:0 0 0 2px var(--at-accent-bg); }
.at-input.at-input-sm { width:90px; }
.at-input.at-input-md { width:160px; }
.at-input.at-input-price { width:110px; text-align:right; }
.at-select {
    border:1px solid var(--at-border); border-radius:6px;
    padding:9px 10px; font-size:0.95rem; color:var(--at-text);
    background:white; outline:none; font-family:inherit;
    transition:border-color 0.15s; cursor:pointer;
}
.at-select:focus { border-color:var(--at-accent); }
.at-badge {
    display:inline-flex; align-items:center; gap:5px;
    border-radius:6px; padding:5px 14px;
    font-size:0.85rem; font-weight:700; white-space:nowrap; cursor:pointer;
    border:1px solid;
}
.at-badge.stock-in { background:var(--at-green-bg); color:var(--at-green); border-color:#a7f3d0; }
.at-badge.stock-out { background:var(--at-red-bg); color:var(--at-red); border-color:#fecaca; }
.at-badge.vis-on { background:#eff6ff; color:#3b82f6; border-color:#bfdbfe; }
.at-badge.vis-off { background:var(--at-bg); color:var(--at-text-3); border-color:var(--at-border); }
.at-act-btn {
    display:inline-flex; align-items:center; justify-content:center;
    width:44px; height:44px; border-radius:7px; border:1px solid var(--at-border);
    background:white; cursor:pointer; font-size:1.1rem;
    color:var(--at-text-2); transition:all 0.15s;
}
.at-act-btn:hover { background:var(--at-bg); border-color:var(--at-text-3); }
.at-act-btn.save { border-color:#bfdbfe; color:#3b82f6; }
.at-act-btn.save:hover { background:#eff6ff; }
.at-act-btn.del { border-color:#fecaca; color:var(--at-red); }
.at-act-btn.del:hover { background:var(--at-red-bg); }
.at-act-btn.img { border-color:var(--at-border); color:var(--at-text-3); font-size:0.85rem; width:auto; padding:0 12px; }
.at-actions-cell { display:flex; align-items:center; gap:8px; white-space:nowrap; }
/* Sub-group header inside table */
.at-sub-group-row td {
    background:var(--at-bg) !important;
    padding:6px 12px;
    font-size:0.67rem; font-weight:700; text-transform:uppercase;
    letter-spacing:0.08em; color:var(--at-accent);
    border-top:1px solid var(--at-border);
}
/* LB Options matrix */
.at-lb-matrix { display:flex; flex-direction:column; gap:4px; min-width:280px; }
.at-lb-row { display:flex; align-items:center; gap:6px; }
.at-lb-row .at-input { font-size:0.75rem; }
.at-lb-remove { width:22px; height:22px; border-radius:4px; border:1px solid #fecaca;
    background:var(--at-red-bg); color:var(--at-red); cursor:pointer; font-size:0.7rem;
    display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.at-lb-add { margin-top:4px; padding:3px 8px; border:1px dashed var(--at-border);
    border-radius:4px; background:none; color:var(--at-text-2); font-size:0.72rem;
    cursor:pointer; display:block; }
.at-lb-add:hover { border-color:var(--at-accent); color:var(--at-accent); }
/* Pre-selected items for specialty */
.at-preitem-list { display:flex; flex-direction:column; gap:4px; }
.at-preitem-row { display:flex; align-items:center; gap:5px; }
.at-preitem-select { border:1px solid var(--at-border); border-radius:4px;
    padding:3px 5px; font-size:0.73rem; flex:1; min-width:0; color:var(--at-text);
    background:white; outline:none; }
.at-preitem-qty { width:46px; border:1px solid var(--at-border); border-radius:4px;
    padding:3px 5px; font-size:0.73rem; text-align:right; outline:none; }
.at-preitem-del { width:20px; height:20px; border-radius:4px; border:1px solid #fecaca;
    background:var(--at-red-bg); color:var(--at-red); cursor:pointer; font-size:0.65rem;
    display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.at-preitem-add { padding:3px 8px; border:1px dashed var(--at-border);
    border-radius:4px; background:none; color:var(--at-text-2);
    font-size:0.72rem; cursor:pointer; margin-top:3px; }
.at-preitem-add:hover { border-color:var(--at-accent); color:var(--at-accent); }
/* Category panel table */
.at-scope-select { min-width:160px; }
.at-id-code { font-size:0.68rem; font-family:monospace;
    background:var(--at-bg); border-radius:3px; padding:1px 5px; color:var(--at-text-3); }
/* Delivery Hub */
.at-dl-section { margin-bottom:28px; }
.at-toggle-row { display:flex; align-items:center; gap:10px; padding:12px 0; border-bottom:1px solid var(--at-border-sub); }
.at-toggle-label { flex:1; font-size:0.85rem; font-weight:600; }
.at-toggle-sub { font-size:0.73rem; color:var(--at-text-2); margin-top:1px; }
.at-toggle-switch {
    position:relative; width:44px; height:24px;
    background:var(--at-border); border-radius:12px; cursor:pointer;
    transition:background 0.2s; flex-shrink:0; border:none;
}
.at-toggle-switch.on { background:var(--at-green); }
.at-toggle-switch::after {
    content:''; position:absolute; top:3px; left:3px;
    width:18px; height:18px; border-radius:9px; background:white;
    transition:transform 0.2s; box-shadow:0 1px 3px rgba(0,0,0,0.2);
}
.at-toggle-switch.on::after { transform:translateX(20px); }
.at-drag-handle { cursor:grab; color:var(--at-text-3); padding:0 2px; font-size:0.9rem; }
.at-drag-handle:active { cursor:grabbing; }

/* ================================================================
   FINANCE PANEL
   ================================================================ */
#finance-overlay {
    position: fixed; inset: 0; z-index: 900;
    background: rgba(10,12,18,0.65);
    backdrop-filter: blur(4px);
    display: flex; align-items: flex-start; justify-content: center;
    padding: 20px;
    overflow-y: auto;
}
#finance-overlay.hidden { display: none; }

.finance-charts-row {
    display: flex;
    gap: 20px;
    margin: 20px 24px;
    flex-wrap: wrap;
}

.finance-chart-card {
    background: var(--op-surface);
    border: 1px solid var(--op-border);
    border-radius: 8px;
    padding: 20px;
    flex: 1;
    min-width: 300px;
}

.finance-chart-card .orders-section-title {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--op-border);
}

@media (max-width: 768px) {
    .finance-charts-row {
        flex-direction: column;
    }
    .finance-chart-card {
        min-width: 100%;
    }
}
/* ================================================================
   DESKTOP — min-width: 1024px
   FRESH BUILD — complete desktop skin, zero mobile carry-over
================================================================ */

@media (min-width: 1024px) {

/* ── Root tokens ── */
:root {
    --red:        #A11C1E;
    --red-dark:   #7d1517;
    --red-glow:   rgba(161,28,30,0.22);
    --cream:      #FDF8F3;
    --ink:        #1A1005;
    --ink-mid:    #4a3f35;
    --ink-light:  #9e8e82;
    --border:     #ece5df;
    --surface:    #ffffff;
    --bg:         #F5EEE8;
    --sidebar-w:  240px;
    --cart-w:     320px;
    --header-h:   64px;
    --radius:     14px;
    --radius-lg:  20px;
    --shadow-sm:  0 1px 4px rgba(0,0,0,0.07);
    --shadow-md:  0 4px 16px rgba(0,0,0,0.10);
    --shadow-lg:  0 12px 40px rgba(0,0,0,0.14);
}

/* ── Google font for desktop ── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=DM+Sans:wght@400;500;700&display=swap');

/* ── Body & app shell ── */
body {
    background: var(--red);
    font-family: 'DM Sans', 'Arial Black', sans-serif;
}
#main-app {
    background: #A11C1E;
    min-height: 100vh;
    height: 100vh;
    font-family: 'DM Sans', 'Arial Black', sans-serif;
    display: flex;
    flex-direction: column;
}


/* ================================================================
   AUTH SCREEN — split panel
================================================================ */
#auth-screen {
    background: var(--red);
    background-image: url('../assets/images/pictures/BG-1920x1080.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    min-height: 100vh;
}

/* Dark overlay over full background */
#auth-screen::before {
    content: '';
    display: block;
    background: rgba(0,0,0,0.45);
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* Auth card — centered floating card */
.auth-card {
    background: var(--surface);
    border-radius: 24px;
    width: 100%;
    max-width: 460px;
    min-height: unset;
    padding: 48px 52px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.40), 0 4px 16px rgba(0,0,0,0.20);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    z-index: 1;
    position: relative;
    grid-column: unset;
    justify-content: flex-start;
    max-height: 90vh;
    overflow-y: auto;
    animation: fadeSlideUp 0.35s cubic-bezier(0.25,1,0.5,1);
}
.auth-logo {
    width: 160px;
    max-width: 100%;
    margin-bottom: 8px;
}
.auth-tagline {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--ink-light);
    margin-top: -12px;
}
.auth-tabs {
    width: 100%;
    border-radius: 12px;
    border: 2px solid var(--red);
}
.auth-tab {
    font-size: 0.72rem;
    padding: 12px;
    letter-spacing: 1px;
}
.auth-input {
    padding: 14px 18px;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    font-size: 0.88rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-input:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px var(--red-glow);
    outline: none;
}
.auth-submit-btn {
    border-radius: 12px;
    padding: 15px;
    font-size: 0.82rem;
    letter-spacing: 1.5px;
    box-shadow: 0 6px 20px var(--red-glow);
    transition: background 0.18s, transform 0.18s, box-shadow 0.18s;
}
.auth-submit-btn:hover {
    background: var(--red-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px var(--red-glow);
}
.auth-guest-btn {
    border-radius: 12px;
    padding: 14px;
    font-size: 0.75rem;
    letter-spacing: 1px;
    transition: border-color 0.15s, color 0.15s;
}
.auth-guest-btn:hover { border-color: var(--red); color: var(--red); }

/* ================================================================
   DESKTOP LAYOUT FRAME
================================================================ */
.desktop-content-row {
    display: flex;
    align-items: stretch;
    flex: 1;
    min-height: 0;
    background: #A11C1E;
    overflow: hidden;
}
#app-viewport {
    flex: 1;
    min-width: 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    background: transparent;
    display: flex;
    flex-direction: column;
}

/* ================================================================
   HEADER — slim, refined
================================================================ */
#main-header,
#ws-header {
    background: var(--red) !important;
    background-color: var(--red) !important;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    padding: 0 48px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 200;
}
.header-top-row {
    max-width: 1600px;
    margin: 0 auto;
    min-height: var(--header-h);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.header-logo {
    max-height: 40px;
    height: 40px;
    width: auto;
}
.header-logo-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.header-title-bar {
    max-width: 1600px;
    margin: 0 auto;
    padding: 8px 0;
    border-top: 1px solid rgba(255,255,255,0.15);
}
.header-page-title {
    font-size: 0.65rem;
    letter-spacing: 3.5px;
    color: rgba(255,255,255,0.75);
    text-transform: uppercase;
    font-weight: 700;
}

/* WhatsApp button in header */
.header-whatsapp-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.header-whatsapp-btn:hover { background: rgba(255,255,255,0.15); }

/* Cart icon - hidden on desktop (sidebar replaces) */
#cart-header-icon,
#ws-cart-icon { display: none; }
.header-right-section { display: flex; align-items: center; }

/* ── User info bar ── */
#user-info-display {
    background: var(--red-dark);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 8px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: none;
    margin: 0;
    border-radius: 0;
}
.user-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255,255,255,0.85);
    letter-spacing: 0.5px;
}
.logout-btn {
    background: none;
    color: rgba(255,255,255,0.9);
    border: 1.5px solid rgba(255,255,255,0.5);
    border-radius: 8px;
    padding: 6px 16px;
    font-size: 0.65rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 1px;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.logout-btn:hover {
    background: rgba(255,255,255,0.15);
    border-color: white;
    color: white;
}

/* Section nav — inside header top row */
#section-nav {
    max-width: 1600px;
    margin: 0 auto;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 0 0 12px;
}
.nav-modes-row {
    flex: 1;
    order: 1;
    gap: 6px;
}
.nav-modes-row button {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--ink-mid);
    -webkit-text-fill-color: var(--ink-mid);
    border-radius: 10px;
    padding: 8px 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: auto;
    flex: 0 0 auto;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}
.nav-modes-row button:hover {
    background: var(--cream);
    border-color: var(--red);
    color: var(--red);
    -webkit-text-fill-color: var(--red);
    transform: translateY(-1px);
}
.nav-modes-row button.active {
    background: var(--red);
    border-color: var(--red);
    color: white;
    -webkit-text-fill-color: white;
    box-shadow: 0 3px 10px var(--red-glow);
}
.nav-agent-top {
    order: 4;
    margin-left: auto;
    width: auto;
    background: var(--ink);
    border: none;
    border-radius: 10px;
    padding: 9px 22px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    color: white;
    -webkit-text-fill-color: white;
    transition: background 0.15s, transform 0.15s;
}
.nav-agent-top:hover { background: #2a2a4e; transform: translateY(-1px); }
.swipe-dots { display: none; }

/* ── Wholesale header overrides ── */
#ws-header { background: var(--surface); }
.ws-header-bar { max-width: 1600px; margin: 0 auto; }
.ws-header-title { color: var(--ink); }
.ws-back-btn {
    background: none;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 8px 18px;
    color: var(--ink-mid);
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.ws-back-btn:hover { background: var(--cream); border-color: var(--red); color: var(--red); }

/* ── Hide mobile-only ── */
#cart-popup,
#ws-cart-popup { display: none !important; }
#main-footer,
#ws-footer { display: none !important; }

/* ================================================================
   HOME HUB — full-viewport cinematic layout
   DOM: .hub-title-container + 4x.hub-btn + .beta-disclaimer + .hub-intro-section
================================================================ */
#home-hub {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: calc(100vh - var(--header-h));
    height: calc(100vh - var(--header-h));
    overflow: hidden;
    background: #A11C1E;
    display: block;
}

/* Blurred background only on left (art) side */
#home-hub::before {
    content: '';
    position: absolute;
    top: -4px;
    bottom: -4px;
    left: -4px;
    right: 336px; /* stops at white panel edge */
    background-image: none;
    background-color: #A11C1E;
    background-size: cover;
    background-position: center;
    filter: none;
    z-index: 0;
}

/* White right panel — stops before bottom footer strip, capped at 340px wide */
#home-hub::after {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    width: 340px;
    height: calc(100% - 180px); /* leaves exactly 180px for footer cards */
    background: #ffffff;
    border-left: 2px solid rgba(200,200,200,0.6);
    box-shadow: -6px 0 28px rgba(0,0,0,0.20);
    z-index: 2;
    pointer-events: none;
}

/* Every child sits above overlays */
#home-hub > * { position: absolute; z-index: 3; }

/* ── Logo — centered in left (art) panel ── */
#home-hub .hub-title-container {
    top: 50%;
    left: calc(50% - 170px); /* center within left art panel */
    transform: translate(-50%, -50%);
    width: auto;
    background: none !important;
    background-image: none !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    text-align: center;
    position: absolute;
    height: auto;
    overflow: visible;
    z-index: 4;
    margin-top: -40px;
}
#home-hub .hub-title-container::before { display: none; }
#home-hub .hub-title-container::after { display: none; }
#home-hub .hub-title-container > * { position: relative; z-index: 1; }

.main-logo {
    width: 380px;
    max-width: 40vw;
    filter: drop-shadow(0 2px 0 rgba(0,0,0,0.8)) drop-shadow(0 4px 24px rgba(0,0,0,0.5));
    margin-bottom: 0;
}
.hub-subtitle {
    color: rgba(255,255,255,0.5);
    font-size: 0.62rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-top: 12px;
}

/* ── Nav buttons — sit on white right panel ── */
#home-hub .hub-btn:nth-of-type(1) { top: 60px;  right: 40px; }
#home-hub .hub-btn:nth-of-type(2) { top: 168px; right: 40px; }
#home-hub .hub-btn:nth-of-type(3) { top: 276px; right: 40px; }
#home-hub .hub-btn:nth-of-type(4) { top: 384px; right: 40px; }

.hub-btn {
    position: absolute;
    background: #A11C1E;
    border: none;
    border-radius: 50px;
    padding: 28px 36px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    width: 260px;
    text-align: left;
    box-shadow: 0 4px 16px rgba(161,28,30,0.35);
    backdrop-filter: none;
    z-index: 5;
}
.hub-btn:hover {
    background: #7d1517;
    transform: translateX(-6px);
    box-shadow: 0 8px 28px rgba(161,28,30,0.50);
}
.hub-btn span {
    color: white !important;
    -webkit-text-fill-color: white !important;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    font-family: 'Inter', 'Arial Black', sans-serif;
}

/* WhatsApp / A-Gent button */
.contact-btn {
    background: rgba(37,211,102,0.08) !important;
    border-color: rgba(37,211,102,0.35) !important;
}
.contact-btn:hover {
    background: rgba(37,211,102,0.18) !important;
    border-color: rgba(37,211,102,0.65) !important;
}
.contact-btn span {
    color: #1a9946 !important;
    -webkit-text-fill-color: #1a9946 !important;
}

/* ── Bottom footer strip — spans full width across both panels ── */
#home-hub .beta-disclaimer,
#home-hub .hub-intro-section {
    position: absolute;
    bottom: 0;
    width: 50%;
    height: 180px;
    border-radius: 0;
    border: none;
    padding: 28px 48px;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 6; /* above white panel (z-index 2) and buttons (z-index 5) */
}

/* Early access — bottom LEFT — dark tint over background art */
#home-hub .beta-disclaimer {
    left: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,0.14);
    border-right: 1px solid rgba(255,255,255,0.07);
}
.beta-disclaimer p {
    color: rgba(255,255,255,0.65);
    font-size: 0.72rem;
    line-height: 1.65;
    text-align: left;
    margin: 0;
}
.beta-disclaimer strong {
    color: rgba(255,255,255,0.9);
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    margin-bottom: 8px;
}

/* Hello Nice to Meat You — bottom RIGHT — fully opaque dark red, no white bleed-through */
#home-hub .hub-intro-section {
    right: 0;
    background: #4a0406;
    backdrop-filter: none;
    border-top: 1px solid rgba(255,255,255,0.14);
    border-left: 1px solid rgba(255,255,255,0.07);
    cursor: pointer;
    transition: background 0.2s;
    flex: unset;
}
#home-hub .hub-intro-section:hover {
    background: rgba(100,8,10,0.85);
}
/* "Click to read more" cue */
#home-hub .hub-intro-section::after {
    content: 'Read more ↗';
    position: absolute;
    top: 14px;
    right: 20px;
    font-size: 0.58rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    font-weight: 700;
    transition: color 0.2s;
}
#home-hub .hub-intro-section:hover::after {
    color: rgba(255,255,255,0.90);
}
.hub-intro-title {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.55);
    font-weight: 700;
    background: none;
    -webkit-text-fill-color: rgba(255,255,255,0.55);
    margin-bottom: 8px;
    font-family: 'DM Sans', sans-serif;
    text-transform: uppercase;
    letter-spacing: 3px;
}
.hub-intro-text {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.90);
    line-height: 1.65;
    font-weight: 400;
}
.hub-intro-text strong { color: #ffb3b3; -webkit-text-fill-color: #ffb3b3; }
.hub-intro-swipe { display: none; }

/* ================================================================
   BUILD YOURS — sidebar + product grid
================================================================ */
#build-yours-view {
    display: flex;
    flex-direction: row;
    background: var(--bg);
    flex: 1;
    min-height: 0;
    padding: 0;
    margin: 0;
    max-width: none;
    overflow: hidden;
}

/* sticky-category-wrapper becomes the left sidebar column */
#build-yours-view .sticky-category-wrapper {
    width: var(--sidebar-w);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--surface);
    border-right: 1px solid var(--border);
    z-index: 10;
    position: static;
    box-shadow: none;
    overflow-y: auto;
}

#build-category-bar {
    flex-shrink: 0;
    background: var(--surface);
    border-right: none;
    padding: 24px 12px 12px;
    min-height: 0;
    height: unset;
    position: static;
    overflow-y: visible;
}
#build-category-bar::-webkit-scrollbar { width: 3px; }
#build-category-bar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* Meat subcat bar — sits directly below category list in sidebar */
#meat-subcat-bar {
    grid-column: unset;
    grid-row: unset;
    flex-shrink: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 10px 14px;
    background: #fdf0f0;
    border-top: 1px solid #f0d0d0;
    border-bottom: none;
    overflow-y: visible;
}
#meat-subcat-bar.hidden { display: none; }
.meat-subcat-btn {
    padding: 7px 12px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: white;
    font-size: 0.71rem;
    font-weight: 700;
    color: var(--ink-mid);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
    width: 100%;
    text-align: left;
}
.meat-subcat-btn:hover:not(.active) { background: var(--bg); border-color: var(--ink-light); }
.meat-subcat-btn.active {
    background: var(--red);
    color: white;
    border-color: var(--red);
    box-shadow: 0 2px 8px var(--red-glow);
}

.build-cat-bar-header { display: none; }
.build-cat-grid-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: none;
    padding: 0;
    border-radius: 0;
}
.build-cat-btn {
    text-align: left;
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 0.73rem;
    font-weight: 700;
    justify-content: flex-start;
    background: transparent;
    border: 1px solid transparent;
    color: var(--ink-mid);
    -webkit-text-fill-color: var(--ink-mid);
    transition: background 0.15s, transform 0.12s, color 0.15s;
    cursor: pointer;
    width: 100%;
    letter-spacing: 0.3px;
}
.build-cat-btn:hover:not(.active) {
    background: var(--bg);
    color: var(--ink);
    -webkit-text-fill-color: var(--ink);
    transform: translateX(3px);
}
.build-cat-btn.active {
    background: var(--red);
    border-color: var(--red);
    color: white;
    -webkit-text-fill-color: white;
    box-shadow: 0 3px 10px var(--red-glow);
}

#build-item-list {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    padding: 20px;
    align-content: start;
    background: var(--bg);
    overflow-y: auto;
}

/* Product card — JS renders: .product-row > .product-img-slot + .product-info + .qty-controls */
.product-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    border-radius: var(--radius);
    padding: 0 !important;
    background: var(--surface);
    border: 1px solid var(--border);
    gap: 0;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    cursor: pointer;
    overflow: hidden;
}
.product-row:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(161,28,30,0.22);
}

/* Image slot — full width card image */
.product-row .product-img-slot {
    width: 100% !important;
    height: 160px !important;
    border-radius: 0 !important;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--bg);
    display: block !important;
}
.product-row .product-img-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    display: block;
    transition: transform 0.2s;
}
.product-row:hover .product-img-slot img { transform: scale(1.04); }
.product-row .img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0e8e0, #e8ddd4);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Info block */
.product-row .product-info {
    width: 100%;
    text-align: left;
    padding: 12px 14px 6px !important;
    flex-grow: 1;
}
.product-name {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 4px;
    line-height: 1.3;
    text-transform: uppercase;
}
.product-price {
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--red);
    margin-bottom: 0;
}

/* Qty controls */
.product-row .qty-controls {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px 14px !important;
    gap: 0;
}
.qty-btn {
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
    font-size: 1rem !important;
    font-weight: 900;
    cursor: pointer;
    border: none;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, box-shadow 0.15s;
}
.qty-btn.minus { background: var(--bg) !important; color: var(--ink-mid) !important; }
.qty-btn.minus:hover { background: #e0d8d0 !important; }
.qty-btn.plus {
    background: var(--red) !important;
    color: white !important;
    box-shadow: 0 2px 8px var(--red-glow);
}
.qty-btn.plus:hover { background: var(--red-dark) !important; transform: scale(1.09); }
.qty-num {
    min-width: 32px;
    font-size: 0.95rem;
    font-weight: 900;
    text-align: center;
    color: var(--ink);
}

/* ================================================================
   SPECIALTY VIEW
================================================================ */
#specialty-view {
    padding: 24px 24px 80px;
    background: var(--bg);
    min-height: calc(100vh - var(--header-h));
    max-width: none;
    margin: 0;
}
.specialty-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.specialty-box {
    border-radius: var(--radius);
    padding: 0;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    cursor: pointer;
    overflow: hidden;
}
.specialty-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: rgba(161,28,30,0.2);
}
.specialty-box-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0;
    margin-bottom: 0;
    display: block;
}
.specialty-box-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 6px;
    padding: 16px 18px 0;
}
.specialty-box-price {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--red);
    margin-bottom: 14px;
    padding: 0 18px;
}
.specialty-box-btn {
    width: calc(100% - 36px);
    margin: 0 18px 18px;
    padding: 13px;
    font-size: 0.78rem;
    border-radius: 10px;
    box-shadow: 0 3px 10px var(--red-glow);
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
    display: block;
}
.specialty-box-btn:hover { background: var(--red-dark); transform: translateY(-1px); }

/* ── Specialty cards (actual JS-rendered class) on desktop ── */
.specialty-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    border-radius: var(--radius);
    padding: 0 !important;
    gap: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    cursor: pointer;
}
.specialty-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: rgba(161,28,30,0.2);
}
.specialty-card .specialty-img-slot {
    width: 100% !important;
    height: 200px !important;
    border-radius: 0 !important;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--bg);
    display: block !important;
}
.specialty-card .specialty-img-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    display: block;
    transition: transform 0.2s;
}
.specialty-card:hover .specialty-img-slot img { transform: scale(1.04); }
.specialty-card .specialty-info {
    padding: 14px 18px 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.specialty-card .specialty-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink);
    text-transform: uppercase;
}
.specialty-card .specialty-desc {
    font-size: 0.8rem;
    color: var(--ink-mid);
}
.specialty-card .specialty-price {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--red);
    margin-top: 2px;
}
.specialty-card .specialty-qty-controls {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px 16px !important;
    gap: 0;
    flex-shrink: 0;
}
.specialty-card .specialty-qty-btn {
    width: 36px !important;
    height: 36px !important;
    border-radius: 10px !important;
    font-size: 1rem;
    font-weight: 900;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, box-shadow 0.15s;
    flex-shrink: 0;
}
.specialty-card .specialty-qty-btn.minus {
    background: var(--bg) !important;
    color: var(--ink-mid) !important;
}
.specialty-card .specialty-qty-btn.minus:hover { background: #e0d8d0 !important; }
.specialty-card .specialty-qty-btn.plus {
    background: var(--red) !important;
    color: white !important;
    box-shadow: 0 2px 8px var(--red-glow);
}
.specialty-card .specialty-qty-btn.plus:hover {
    background: var(--red-dark) !important;
    transform: scale(1.09);
}
.specialty-card .qty-num {
    min-width: 32px;
    font-size: 0.95rem;
    font-weight: 900;
    text-align: center;
    color: var(--ink);
}

/* ================================================================
   WHOLESALE VIEW — sidebar + grid
================================================================ */
#wholesale-view {
    display: flex;
    flex-direction: row;
    background: var(--bg);
    min-height: calc(100vh - var(--header-h));
    padding: 0;
    margin: 0;
    max-width: none;
    overflow: hidden;
}

/* Sticky-category-wrapper is the sidebar for wholesale */
#wholesale-view .sticky-category-wrapper {
    width: var(--sidebar-w);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--surface);
    border-right: 1px solid var(--border);
    z-index: 10;
    position: static;
    box-shadow: none;
    overflow-y: auto;
}

#wholesale-category-bar {
    flex-shrink: 0;
    background: var(--surface);
    border-right: none;
    padding: 24px 12px 12px;
    min-height: 0;
    height: unset;
    position: static;
    overflow-y: visible;
    box-shadow: none;
    border-radius: 0;
    /* Remove grid placement */
    grid-column: unset;
    grid-row: unset;
}
.wholesale-cat-bar-header { display: none; }
.wholesale-cat-grid-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: none;
    padding: 0;
}
.wholesale-cat-btn {
    width: 100%;
    text-align: left;
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 0.73rem;
    font-weight: 700;
    background: transparent;
    border: 1px solid transparent;
    color: var(--ink-mid);
    -webkit-text-fill-color: var(--ink-mid);
    transition: background 0.15s, transform 0.12s;
    cursor: pointer;
    letter-spacing: 0.3px;
}
.wholesale-cat-btn:hover:not(.active) {
    background: var(--bg);
    color: var(--ink);
    -webkit-text-fill-color: var(--ink);
    transform: translateX(3px);
}
.wholesale-cat-btn.active {
    background: var(--red);
    border-color: var(--red);
    color: white;
    -webkit-text-fill-color: white;
    box-shadow: 0 3px 10px var(--red-glow);
}

/* ws-meat-subcat-bar — sits right below the category list in sidebar */
#ws-meat-subcat-bar {
    flex-shrink: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 10px 14px;
    background: #fdf0f0;
    border-top: 1px solid #f0d0d0;
    /* Remove old grid placement */
    grid-column: unset;
    grid-row: unset;
}
#ws-meat-subcat-bar.hidden { display: none; }

#wholesale-item-list {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    padding: 20px;
    align-content: start;
    background: var(--bg);
    overflow-y: auto;
    max-height: 100vh;
    width: 100%;
}

/* JS renders: .wholesale-item > .wholesale-img-slot + .wholesale-info + .wholesale-add-btn */
/* Desktop card layout — only applies at 768px+ */
@media (min-width: 768px) {
.wholesale-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    border-radius: var(--radius);
    padding: 0 !important;
    background: var(--surface);
    border: 1px solid var(--border);
    gap: 0;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    overflow: hidden;
}
.wholesale-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(161,28,30,0.2);
}
.wholesale-item .wholesale-img-slot {
    width: 100% !important;
    height: 140px !important;
    background: var(--bg);
    border-radius: 0 !important;
    overflow: hidden;
    flex-shrink: 0;
    display: block !important;
}
.wholesale-item .wholesale-img-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
    border-radius: 0;
    display: block;
}
.wholesale-item:hover .wholesale-img-slot img { transform: scale(1.05); }
.wholesale-item .img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0e8e0, #e8ddd4);
    border-radius: 0;
}
/* Info wrapper */
.wholesale-item .wholesale-info {
    padding: 12px 14px 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
    align-items: center;
    text-align: center;
}
.wholesale-name {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.3;
    text-transform: uppercase;
}
.in-cart {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--red);
}
.wholesale-item-price,
.wholesale-price {
    font-size: 1rem;
    font-weight: 900;
    color: #85bb65;
    padding: 0 14px 8px;
    text-align: center;
}
.wholesale-add-btn {
    width: calc(100% - 28px) !important;
    margin: 0 14px 14px !important;
    height: 38px;
    border-radius: 10px;
    font-size: 0.76rem;
    font-weight: 700;
    background: var(--red) !important;
    color: white !important;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px var(--red-glow);
    transition: background 0.15s, transform 0.15s;
    letter-spacing: 0.5px;
    display: block !important;
    flex-shrink: 0;
}
.wholesale-add-btn:hover:not(:disabled) { background: var(--red-dark) !important; transform: translateY(-1px); }
.wholesale-add-btn:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; transform: none; }

/* Single-option controls — desktop: centered below info */
.ws-single-qty-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 10px 14px 14px;
    flex-shrink: 0;
}
.ws-single-qty-controls .qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    font-weight: 900;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ws-single-qty-controls .qty-btn.minus {
    background: var(--bg, #F5EEE8);
    color: var(--ink-mid, #4a3f35);
}
.ws-single-qty-controls .qty-btn.plus {
    background: var(--red, #A11C1E);
    color: white;
}
.ws-single-qty-controls .qty-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.ws-single-qty-controls .qty-num {
    font-weight: 900;
    font-size: 1rem;
    min-width: 20px;
    text-align: center;
    color: var(--ink, #1A1005);
}

/* Multi-option button — desktop: show hint text only, no + span */
.ws-multi-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 0;
    border-radius: 10px !important;
    width: calc(100% - 28px) !important;
    height: 38px !important;
}
.ws-multi-btn-plus { display: none; }
.ws-multi-btn-hint {
    display: inline !important;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
} /* end @media (min-width: 768px) wholesale cards */

/* ================================================================
   DESKTOP CART SIDEBAR
================================================================ */
#desktop-cart {
    display: flex;
    flex-direction: column;
    width: var(--cart-w);
    flex-shrink: 0;
    background: var(--surface);
    border-left: 1px solid var(--border);
    position: sticky;
    top: 0;
    height: 100%;
    align-self: flex-start;
    max-height: 100%;
    overflow: hidden;
    box-shadow: -2px 0 16px rgba(0,0,0,0.06);
}
#desktop-cart.hidden { display: none; }

.desktop-cart-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* Cart header strip */
.desktop-cart-inner > h3 {
    flex-shrink: 0;
    background: var(--cream);
    color: var(--ink);
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    padding: 18px 20px;
    margin: 0;
    border-bottom: 1px solid var(--border);
}

/* Scrollable items */
#desktop-cart-items {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
}
#desktop-cart-items::-webkit-scrollbar { width: 3px; }
#desktop-cart-items::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* Cart item card */
#desktop-cart-items .d-cart-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color 0.15s, background 0.15s;
}
#desktop-cart-items .d-cart-item:hover {
    border-color: rgba(161,28,30,0.25);
    background: white;
}
#desktop-cart-items .d-cart-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.3;
}
#desktop-cart-items .d-cart-price {
    font-size: 0.82rem;
    font-weight: 900;
    color: var(--red);
}
#desktop-cart-items .d-cart-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}
#desktop-cart-items button {
    border: none;
    cursor: pointer;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.15s;
    flex-shrink: 0;
}
#desktop-cart-items .d-cart-qty-btn.minus,
#desktop-cart-items button:not(.d-cart-qty-btn):first-of-type {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: #e8e0d8;
    color: var(--ink-mid);
    font-size: 1rem;
}
#desktop-cart-items .d-cart-qty-btn.minus:hover { background: #d8cfc4; }
#desktop-cart-items .d-cart-qty-btn.plus {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--red);
    color: white;
    font-size: 1rem;
    box-shadow: 0 2px 6px var(--red-glow);
}
#desktop-cart-items .d-cart-qty-btn.plus:hover { background: var(--red-dark); transform: scale(1.09); }
#desktop-cart-items .d-cart-qty-num {
    font-size: 0.84rem;
    font-weight: 900;
    color: var(--ink);
    min-width: 20px;
    text-align: center;
}
#desktop-cart-items .d-cart-edit-btn {
    background: transparent;
    border: 1px solid var(--border) !important;
    color: var(--ink-light);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    margin-top: 2px;
    width: 100%;
    transition: border-color 0.15s, color 0.15s;
}
#desktop-cart-items .d-cart-edit-btn:hover { border-color: var(--red) !important; color: var(--red); }
#desktop-cart-items .d-cart-empty {
    text-align: center;
    padding: 40px 8px;
    color: var(--ink-light);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.8;
}

/* Cart footer */
.desktop-cart-footer {
    flex-shrink: 0;
    border-top: 1px solid var(--border);
    background: var(--surface);
}
.desktop-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 14px 18px 8px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}
.desktop-cart-total > span:first-child {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--ink-light);
}
#desktop-cart-total {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--red);
    letter-spacing: -0.5px;
}
.desktop-cart-clear {
    display: block;
    width: calc(100% - 28px);
    margin: 0 14px 4px;
    padding: 9px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--ink-light);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
    flex-shrink: 0;
}
.desktop-cart-clear:hover { border-color: var(--red); color: var(--red); }
.desktop-cart-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 14px 18px;
    flex-shrink: 0;
}
.desktop-cart-nav-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border: none;
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.desktop-cart-next-btn {
    background: var(--red);
    color: white;
    box-shadow: 0 4px 14px var(--red-glow);
}
.desktop-cart-next-btn:hover:not(:disabled) {
    background: var(--red-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--red-glow);
}
.desktop-cart-next-btn:disabled { background: #ddd; color: #aaa; cursor: not-allowed; box-shadow: none; }
.desktop-cart-back-btn {
    background: transparent;
    border: 1.5px solid var(--border) !important;
    color: var(--ink-mid);
}
.desktop-cart-back-btn:hover { background: var(--bg); border-color: var(--ink-light) !important; }

/* ================================================================
   POPUP MODAL — centered, refined
================================================================ */
#popup-modal { align-items: center; backdrop-filter: blur(6px); }
.popup-card {
    border-radius: var(--radius-lg);
    max-width: 520px;
    box-shadow: var(--shadow-lg);
    background: var(--surface);
}
.popup-lb-option-btn:hover { border-color: var(--red); background: #fff6f6; }
.popup-close-btn:hover { background: var(--bg); transform: rotate(90deg); }
.popup-addon-btn:hover, .popup-add-btn:hover { background: var(--red-dark); transform: translateY(-1px); }

/* Cart qty controls in popup */
.cart-qty-controls { display: flex; align-items: center; gap: 6px; }
.cart-qty-btn { width: 26px; height: 26px; border-radius: 50%; border: none; font-weight: 900; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.cart-qty-btn.minus { background: var(--bg); color: var(--ink-mid); }
.cart-qty-btn.plus { background: var(--red); color: white; }
.cart-qty-num { font-weight: 900; font-size: 0.8rem; min-width: 18px; text-align: center; }

/* ================================================================
   CHECKOUT
================================================================ */
#checkout-view,
#ws-checkout-view {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    overflow-y: auto;
    padding-bottom: 80px;
    padding-top: calc(var(--header-h) + 80px);
    z-index: 150;
}
.checkout-header-progress {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    z-index: 350;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
}
.checkout-progress-container { max-width: 600px; margin: 0 auto; }

/* Desktop: header has two rows (~98px total), override progress bar position */
@media (min-width: 768px) {
    .checkout-header-progress {
        top: 98px;
    }
    #checkout-view,
    #ws-checkout-view {
        padding-top: 178px;
    }
}
.checkout-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 64px 72px;
    box-shadow: var(--shadow-md);
    margin: 30px auto;
    max-width: 1200px;
    border: 1px solid var(--border);
}
.checkout-progress-step {
    transition: background 0.2s, transform 0.2s;
}
.checkout-progress-step.active {
    box-shadow: 0 3px 10px var(--red-glow);
    transform: scale(1.1);
}
.checkout-method-card {
    border-radius: var(--radius);
    transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.checkout-method-card:hover { border-color: var(--red); background: #fff6f6; transform: translateY(-2px); }
.checkout-card-buttons { display: flex; flex-direction: row-reverse; gap: 12px; margin-top: 20px; }
.upload-receipt-btn:hover { background: #fff6f6; border-color: var(--red-dark); }

/* ================================================================
   TEAM PAGE
================================================================ */
#team { padding: 48px 80px 80px; }
.team-content { max-width: 900px; margin: 0 auto; }
.team-main-title { font-size: 2.6rem; font-family: 'Playfair Display', Georgia, serif; }
.team-section {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}
.team-section:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.team-section-title { font-size: 1.4rem; }
.team-text { font-size: 1rem; }
.team-back-btn:hover { background: #f0ebe5; transform: translateY(-2px); box-shadow: var(--shadow-sm); }

/* ================================================================
   ADMIN PANEL
================================================================ */
#admin-panel { width: 100%; max-width: 100%; }

} /* END @media (min-width: 1024px) */

/* ================================================================
   DESKTOP ZOOM FIX — applies ONLY at min-width: 1024px
   Fixes content clipping when user zooms in with Ctrl+Scroll.
   Zero impact on mobile — every rule is inside this media query.
================================================================ */
@media (min-width: 1024px) {

    /* ── 1. Admin panel — was position:fixed/overflow:hidden ─────── */
    #admin-panel {
        position: relative !important;
        inset: unset !important;
        width: 100%;
        min-height: 100vh;
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }
    #admin-panel > main {
        overflow: visible !important;
        min-height: 0;
    }
    .admin-content-area {
        overflow: visible !important;
        height: auto !important;
    }
    .admin-item-list {
        overflow-y: visible !important;
        height: auto !important;
        max-height: none !important;
    }
    #orders-body-content {
        overflow: visible !important;
        height: auto !important;
    }
    .orders-table-wrap {
        overflow-x: auto !important;
    }
    #finance-overlay {
        overflow-y: auto !important;
    }

    /* ── 2. Customer app shell — was height:100vh clipping ──────── */
    #main-app {
        height: auto !important;
        min-height: 100vh;
    }
    .desktop-content-row {
        overflow: visible !important;
        align-items: flex-start;
    }
    #app-viewport {
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }

    /* ── 2b. Home hub — fill viewport, but allow growth at zoom ─── */
    #home-hub {
        height: auto !important;
        min-height: calc(100vh - var(--header-h)) !important;
    }
    /* White right panel — always full hub height minus footer strip */
    #home-hub::after {
        height: calc(100% - 180px) !important;
    }
    /* 4th button can sit below 384px if hub grows — keep right:40px, don't clip */
    #home-hub .hub-btn:nth-of-type(4) {
        top: 384px;
    }

    /* ── 3. Desktop cart sidebar ─────────────────────────────────── */
    #desktop-cart:not(.hidden) {
        position: sticky !important;
        top: 0 !important;
        height: 100vh !important;
        max-height: 100vh !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
    }
    .desktop-cart-inner {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }
    #desktop-cart-items {
        flex: 1 !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }
    .desktop-cart-footer {
        flex-shrink: 0 !important;
    }

    /* ── 4. Build-Yours view — was overflow:hidden ───────────────── */
    #build-yours-view {
        overflow: visible !important;
        min-height: calc(100vh - var(--header-h));
    }
    #build-yours-view .sticky-category-wrapper {
        height: auto !important;
        min-height: calc(100vh - var(--header-h));
        position: sticky !important;
        top: 0 !important;
        align-self: flex-start;
        overflow-y: auto !important;
        max-height: 100vh;
    }
    #build-category-bar {
        overflow-y: visible !important;
        height: auto !important;
        max-height: none !important;
    }

    /* ── 5. Wholesale view — was overflow:hidden + height:100% ────── */
    #wholesale-view {
        overflow: visible !important;
        min-height: calc(100vh - var(--header-h));
    }
    #wholesale-view .sticky-category-wrapper {
        height: auto !important;
        min-height: calc(100vh - var(--header-h));
        position: sticky !important;
        top: 0 !important;
        align-self: flex-start;
        overflow-y: auto !important;
        max-height: 100vh;
    }
    #wholesale-category-bar {
        overflow-y: visible !important;
        height: auto !important;
    }
    #wholesale-item-list {
        overflow-y: visible !important;
        max-height: none !important;
    }
    #ws-meat-subcat-bar {
        overflow: visible !important;
    }

    /* ── 6. Checkout views — fixed, sits below sticky header ──────── */
    #checkout-view,
    #ws-checkout-view {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        padding-top: 178px !important;
        overflow-y: auto !important;
        z-index: 150 !important;
    }
    .checkout-header-progress {
        position: fixed !important;
        top: 98px !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 160 !important;
    }

    /* ── 7. Modals — keep fixed but allow internal scroll at zoom ── */
    #discount-modal-backdrop,
    .schedule-modal-backdrop,
    #custom-modal {
        overflow-y: auto !important;
        align-items: flex-start !important;
        padding-top: 40px !important;
    }

}
/* END DESKTOP ZOOM FIX */
/* ================================================================
   INVOICES OVERLAY
   ================================================================ */
#invoices-overlay {
    position: fixed; inset: 0; z-index: 900;
    background: rgba(10,12,18,0.65);
    backdrop-filter: blur(4px);
    display: flex; align-items: flex-start; justify-content: center;
    padding: 20px;
    overflow-y: auto;
}
#invoices-overlay.hidden { display: none; }

/* Email settings input focus style */
#_inv-new-email:focus {
    border-color: #A11C1E !important;
    box-shadow: 0 0 0 3px rgba(161,28,30,0.12);
}
/* ================================================================
   BOX INFO POPUP (specialty card click → what's in this box)
   ================================================================ */

/* Backdrop */
.bip-overlay {
    position: fixed;
    inset: 0;
    z-index: 10100;
    background: rgba(10, 5, 0, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    display: flex;
    align-items: flex-end;          /* mobile: bottom sheet */
    justify-content: center;
    opacity: 0;
    transition: opacity 0.22s ease;
    padding: 0;
}
.bip-overlay.bip-visible { opacity: 1; }

/* Sheet */
.bip-sheet {
    position: relative;
    background: var(--surface, #fff);
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 480px;
    max-height: 88dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 -8px 40px rgba(0,0,0,0.18);
    transform: translateY(40px);
    transition: transform 0.28s cubic-bezier(0.34, 1.28, 0.64, 1);
    display: flex;
    flex-direction: column;
}
.bip-overlay.bip-visible .bip-sheet { transform: translateY(0); }

/* Close button */
.bip-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: var(--bg, #F5EEE8);
    color: var(--ink-mid, #4a3f35);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.15s;
    z-index: 2;
    flex-shrink: 0;
}
.bip-close:hover { background: #ece5df; transform: scale(1.08); }

/* Image */
.bip-img-wrap {
    width: 100%;
    height: 200px;
    overflow: hidden;
    flex-shrink: 0;
}
.bip-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Body */
.bip-body {
    padding: 20px 20px 8px;
    flex: 1;
}
.bip-title {
    font-size: 1.1rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--ink, #1A1005);
    margin: 0 0 4px 0;
    padding-right: 40px;   /* don't overlap X button */
    letter-spacing: 0.02em;
}
.bip-desc {
    font-size: 0.78rem;
    color: var(--ink-mid, #4a3f35);
    margin: 0 0 16px 0;
    line-height: 1.45;
}
.bip-section-label {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-light, #9e8e82);
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border, #ece5df);
    padding-bottom: 6px;
}
.bip-items-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}
.bip-item-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--bg, #F5EEE8);
    border-radius: 10px;
}
.bip-item-dot {
    color: var(--red, #A11C1E);
    font-size: 1.1rem;
    line-height: 1;
    flex-shrink: 0;
}
.bip-item-name {
    flex: 1;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--ink, #1A1005);
    text-transform: uppercase;
    letter-spacing: 0.01em;
}
.bip-item-qty {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--red, #A11C1E);
    background: rgba(161,28,30,0.1);
    padding: 2px 8px;
    border-radius: 20px;
    flex-shrink: 0;
}
.bip-empty {
    font-size: 0.8rem;
    color: var(--ink-light, #9e8e82);
    text-align: center;
    padding: 16px;
    margin: 0;
}
.bip-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0 4px;
    border-top: 1px solid var(--border, #ece5df);
}
.bip-price-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-mid, #4a3f35);
}
.bip-price-value {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--red, #A11C1E);
}

/* Footer / Add to Cart */
.bip-footer {
    padding: 12px 20px 20px;
    background: var(--surface, #fff);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bip-add-btn {
    width: 100%;
    padding: 15px;
    background: var(--red, #A11C1E);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(161,28,30,0.3);
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.bip-add-btn:hover:not(:disabled) {
    background: var(--red-dark, #7d1517);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(161,28,30,0.38);
}
.bip-add-btn:active:not(:disabled) { transform: translateY(0); }
.bip-btn-disabled,
.bip-add-btn:disabled {
    background: #ccc !important;
    color: #888 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}

/* ── Desktop: centered dialog instead of bottom sheet ─────────── */
@media (min-width: 768px) {
    .bip-overlay {
        align-items: center;
        padding: 20px;
    }
    .bip-sheet {
        border-radius: 20px;
        max-width: 420px;
        max-height: 82vh;
        transform: scale(0.94) translateY(10px);
    }
    .bip-overlay.bip-visible .bip-sheet {
        transform: scale(1) translateY(0);
    }
    .bip-img-wrap { height: 220px; }
}

/* Cursor hint on clickable card zones */
.specialty-card-clickable { cursor: pointer; }
/* ================================================================
   TRANSFER RECEIPTS OVERLAY — same positioning as finance overlay
   ================================================================ */
#transfer-receipts-overlay {
    position: fixed; inset: 0; z-index: 900;
    background: rgba(10,12,18,0.65);
    backdrop-filter: blur(4px);
    display: flex; align-items: flex-start; justify-content: center;
    padding: 20px;
    overflow-y: auto;
}
#transfer-receipts-overlay.hidden { display: none; }

@media (max-width: 600px) {
    #transfer-receipts-overlay { padding: 10px; }
}
/* ── Trash nav tab ────────────────────────────────── */
.trash-nav-tab { color: #e53e3e !important; }
.trash-nav-tab.active { color: #e53e3e !important; border-bottom-color: #e53e3e !important; }
.trash-nav-tab.active .tab-count { background: #fef2f2 !important; color: #e53e3e !important; }

/* ── Batch rename button ───────────────────────────── */
.batch-rename-btn {
    background: transparent; border: none; cursor: pointer;
    font-size: 0.9rem; padding: 2px 6px; border-radius: 5px;
    opacity: 0.55; transition: opacity 0.15s;
    vertical-align: middle; margin-left: 4px;
}
.batch-rename-btn:hover { opacity: 1; background: #f3f4f6; }

/* ── Batch picker modal options ────────────────────── */
.batch-picker-option {
    display: block; width: 100%; text-align: left;
    padding: 10px 14px; background: #f8f9fb;
    border: 1.5px solid #e2e8f0; border-radius: 8px;
    font-size: 0.88rem; font-weight: 600; cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.batch-picker-option:hover { background: #fef3c7; border-color: #fcd34d; }

/* ── Add orders to batch — row labels ──────────────── */
.batch-add-order-row {
    display: flex; align-items: center; padding: 7px 8px;
    border-radius: 6px; cursor: pointer; font-size: 0.85rem;
    transition: background 0.1s;
}
.batch-add-order-row:hover { background: #f0f9ff; }
/* ── Product Info Popup additions ─────────────────────────────────── */
.product-desc {
    font-size: 0.73rem;
    color: var(--ink-mid, #4a3f35);
    line-height: 1.4;
    margin: 2px 0 4px 0;
    display: block;
    opacity: 0.85;
}
.bip-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0 4px 0;
    border-top: 1.5px solid var(--border, #e8ddd5);
    margin-top: 12px;
    gap: 12px;
}
.bip-footer-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--ink-dark, #1a1208);
    letter-spacing: -0.01em;
}
.bip-footer-qty {
    display: flex;
    align-items: center;
    gap: 6px;
}
.bip-add-btn {
    background: var(--accent, #8b1a1a);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.15s;
}
.bip-add-btn:disabled { opacity: 0.45; cursor: default; }
.bip-add-btn:not(:disabled):hover { opacity: 0.88; }

/* ── Admin description textarea ───────────────────────────────────── */
.at-desc-input {
    margin-top: 5px;
    width: 100%;
    resize: vertical;
    font-size: 0.78rem;
    min-height: 46px;
    line-height: 1.4;
    color: var(--ink-mid, #4a3f35);
}