/* ═══════════════════════════════════════════════════
   POS Online Ordering — Storefront Styles
   Mobile-first, bright white/orange theme (matches POS)
   ═══════════════════════════════════════════════════ */

:root {
    --bg-primary: #f5f5f7;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f0f2;
    --bg-input: #ffffff;
    --bg-modal: #f5f5f7;
    --text-primary: #1a1a2e;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --accent: #ff6b2c;
    --accent-hover: #e85d20;
    --accent-dim: rgba(255, 107, 44, 0.1);
    --success: #22c55e;
    --error: #ef4444;
    --border: #e5e7eb;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 48px rgba(0,0,0,0.12);
    --transition: 0.2s ease;
}

/* ═══ RESET ═══ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; }

/* ═══ TYPOGRAPHY ═══ */
h1, h2, h3, h4 { font-weight: 600; line-height: 1.2; }

/* ═══ INPUTS ═══ */
.input {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition);
    margin-bottom: 12px;
    resize: vertical;
}
.input:focus {
    border-color: var(--accent);
}
.input::placeholder {
    color: var(--text-muted);
}

/* ═══ BUTTONS ═══ */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    background: var(--accent);
    color: #000;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--transition), transform 0.1s;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: transparent;
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition);
    margin-bottom: 12px;
}
.btn-secondary:hover {
    background: var(--accent-dim);
}

/* ═══ CLOSED OVERLAY ═══ */
.closed-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.closed-content {
    text-align: center;
    max-width: 480px;
}
.closed-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}
.closed-content h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}
.closed-next {
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 24px;
}
.closed-schedule {
    text-align: left;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 20px;
}
.closed-schedule .schedule-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.closed-schedule .schedule-row.today {
    color: var(--accent);
    font-weight: 600;
}
.closed-schedule .schedule-row.closed-day {
    color: var(--text-muted);
}
.closed-phone {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ═══ HEADER (mobile) ═══ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    max-width: 1400px;
    margin: 0 auto;
}
.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.header-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.header-name {
    font-size: 1.1rem;
    font-weight: 700;
    /* The mobile header is dark: the page text colour would be unreadable on it. */
    color: #ffffff;
}
.header-status {
    font-size: 0.8rem;
    color: var(--success);
    font-weight: 500;
}
.header-phone {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.72);
}

/* ═══ LAYOUT ═══ */
.layout {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 65px);
}

/* Desktop left sidebar */
.sidebar-left {
    display: none;
    width: 280px;
    min-width: 280px;
    border-right: 1px solid var(--border);
    padding: 24px 20px;
    position: sticky;
    top: 65px;
    height: calc(100vh - 65px);
    overflow-y: auto;
}
.sidebar-brand {
    margin-bottom: 24px;
}
.sidebar-logo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
}
.sidebar-name {
    font-size: 1.3rem;
    margin-bottom: 4px;
}
.sidebar-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}
.sidebar-categories {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sidebar-cat-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    background: transparent;
    color: var(--text-secondary);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
}
.sidebar-cat-btn:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}
.sidebar-cat-btn.active {
    background: var(--accent-dim);
    color: var(--accent);
    font-weight: 600;
}

/* Center content */
.main-content {
    flex: 1;
    min-width: 0;
    padding: 0 16px 120px;
}

/* Desktop right sidebar (cart) */
.sidebar-cart {
    display: none;
    width: 320px;
    min-width: 320px;
    border-left: 1px solid var(--border);
    position: sticky;
    top: 65px;
    height: calc(100vh - 65px);
    overflow-y: auto;
}
.cart-panel {
    padding: 24px 20px;
}
.cart-title {
    font-size: 1.2rem;
    margin-bottom: 16px;
}

/* ═══ CATEGORY PILLS (mobile) ═══ */
.category-pills {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 0;
    position: sticky;
    top: 65px;
    z-index: 50;
    background: var(--bg-primary);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.category-pills::-webkit-scrollbar { display: none; }

.cat-pill {
    flex-shrink: 0;
    padding: 8px 18px;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 24px;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}
.cat-pill:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}
.cat-pill.active {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
    font-weight: 600;
}

/* ═══ PRODUCTS ═══ */
.products-container {
    padding-top: 8px;
}
.products-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
    color: var(--text-secondary);
}
.category-section {
    margin-bottom: 32px;
}
.category-heading {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 16px;
    padding-top: 8px;
}

/* Mobile: horizontal cards */
.product-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.product-card {
    display: flex;
    gap: 14px;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 12px;
    cursor: pointer;
    transition: background var(--transition), transform 0.1s;
    border: 1px solid transparent;
}
.product-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border);
}
.product-card:active {
    transform: scale(0.99);
}
.product-card-img {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.3s;
}
.product-card-img.loaded {
    opacity: 1;
}
.product-card-placeholder {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    background: var(--bg-card-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent);
}
.product-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.product-card-name {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.product-card-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.product-card-price {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent);
}

/* ═══ CART ITEMS LIST ═══ */
.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.cart-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}
.cart-item-qty-ctrl {
    display: flex;
    align-items: center;
    gap: 6px;
}
.cart-item-qty-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    font-family: inherit;
    transition: all var(--transition);
}
.cart-item-qty-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.cart-item-qty {
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}
.cart-item-name {
    font-size: 0.9rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cart-item-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cart-item-price {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    flex-shrink: 0;
    margin-left: 12px;
}
.cart-empty {
    text-align: center;
    padding: 40px 0;
    color: var(--text-muted);
}
.cart-empty-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 8px;
}
.cart-footer {
    padding-top: 16px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
}
.cart-subtotal {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
}

/* ═══ CART FAB (mobile) ═══ */
.cart-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 90;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent);
    color: #000;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: transform 0.2s;
}
.cart-fab:hover { transform: scale(1.08); }
.cart-fab:active { transform: scale(0.95); }
.cart-fab-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--error);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

/* ═══ MODALS / BOTTOM SHEETS ═══ */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn 0.2s;
}
.modal-sheet {
    width: 100%;
    max-width: 600px;
    /* A phone's keyboard covers the bottom of the screen without making the page shorter, and
       sheet_room.js measures how much is covered. The sheet still reaches the bottom of the screen,
       but its last part is a plain border as tall as what is covered. So what scrolls ends above the
       keyboard, and a tap beside the keyboard's own floating buttons lands on the sheet, not on the
       dimmed page, which would close it. */
    border-bottom: var(--keyboard-inset, 0px) solid var(--bg-modal);
    /* Never taller than the part of the screen that is visible, plus that border. */
    max-height: calc(min(90vh, var(--sheet-room, 90vh)) + var(--keyboard-inset, 0px));
    background: var(--bg-modal);
    border-radius: 20px 20px 0 0;
    overflow-y: auto;
    /* Reaching the end of a sheet must not start scrolling the menu behind it. */
    overscroll-behavior: contain;
    animation: slideUp 0.3s ease-out;
    position: relative;
}
/* While a keyboard is up, room at the end of a sheet so that its last button can be scrolled clear of
   the keyboard's own floating buttons. */
.keyboard-open .modal-sheet::after {
    content: '';
    display: block;
    height: 56px;
}
.modal-handle {
    width: 40px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 12px auto 0;
}
.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.6rem;
    cursor: pointer;
    z-index: 5;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background var(--transition);
}
.modal-close:hover { background: var(--bg-card); }

/* Product modal */
.modal-image-wrap {
    width: 100%;
    height: 240px;
    overflow: hidden;
}
.modal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.modal-image-placeholder {
    width: 100%;
    height: 100%;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: 700;
    color: var(--accent);
}
.modal-body {
    padding: 20px 20px 28px;
}
.modal-name {
    font-size: 1.4rem;
    margin-bottom: 4px;
}
.modal-price {
    font-size: 1.1rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 8px;
}
.modal-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}
.modal-qty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 16px;
}
.qty-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}
.qty-btn:hover { border-color: var(--accent); color: var(--accent); }
.qty-value {
    font-size: 1.3rem;
    font-weight: 700;
    min-width: 36px;
    text-align: center;
}
.modal-notes {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    resize: none;
    margin-bottom: 16px;
    transition: border-color var(--transition);
}
.modal-notes:focus { border-color: var(--accent); }
.modal-notes::placeholder { color: var(--text-muted); }

.btn-add-cart { margin-top: 4px; }

/* Cart sheet */
.cart-sheet {
    padding: 0 20px 28px;
}
.cart-sheet-title {
    font-size: 1.2rem;
    padding: 20px 0 12px;
}

/* Checkout sheet */
.checkout-sheet {
    padding: 0 20px 28px;
    max-height: calc(min(95vh, var(--sheet-room, 95vh)) + var(--keyboard-inset, 0px));
}
.checkout-title {
    font-size: 1.3rem;
    padding: 20px 0 16px;
}
.checkout-step {
    margin-bottom: 20px;
}
.step-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.8rem;
}

/* Order type buttons */
.order-type-btns {
    display: flex;
    gap: 12px;
}
.type-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
}
.type-btn:hover { border-color: var(--accent); color: var(--text-primary); }
.type-btn.active {
    border-color: var(--accent);
    background: var(--accent-dim);
    color: var(--accent);
}
.type-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.type-icon { font-size: 1.5rem; }

/* Delivery quote */
.delivery-quote {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    color: var(--text-primary);
    font-weight: 500;
}

/* Tip options */
.tip-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.tip-btn {
    padding: 10px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
}
.tip-btn:hover { border-color: var(--accent); color: var(--text-primary); }
.tip-btn.active {
    border-color: var(--accent);
    background: var(--accent-dim);
    color: var(--accent);
}

/* Checkout summary */
.checkout-summary {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 20px;
}
.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.summary-total {
    padding-top: 10px;
    margin-top: 6px;
    border-top: 1px solid var(--border);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Poynt card form */
.poynt-card-form {
    min-height: 280px;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 12px;
}

.clover-secure-fields { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 16px; }
.clover-secure-fields > div { min-width: 0; font-size: 14px; }
.clover-secure-field { height: 52px; border: 1px solid #cbd5e1; border-radius: 8px; padding: 10px; margin-top: 4px; background: white; }
.clover-secure-field iframe { display: block; width: 100%; height: 30px; min-width: 0; border: 0; }
/* Clover's own footer sits under the pay button, in the place the checkout keeps for it.
   It is never raised above the sheet: there it landed on top of the pay button. */
.provider-footer .clover-footer { margin-top: 14px; padding: 6px 0 0 !important; background: transparent !important; border-radius: 0 !important; }
.cart-item-left > div:last-child { min-width: 0; }

/* Error message */
.error-msg {
    color: var(--error);
    font-size: 0.85rem;
    padding: 8px 0;
}

/* Pay button */
.btn-pay {
    font-size: 1.1rem;
    padding: 16px;
}

/* ═══ LOADING OVERLAY ═══ */
.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(10, 10, 15, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
}
.loading-content {
    text-align: center;
}

/* ═══ SPINNER ═══ */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
}
.spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0,0,0,0.2);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ═══ TOAST ═══ */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow);
    z-index: 999;
    animation: toastIn 0.3s ease-out;
    border: 1px solid var(--border);
}
/* A keyboard would cover a message down there: it moves up with the sheets, and stays clear of the
   last button of a sheet that is scrolled to its end. */
.keyboard-open .toast {
    bottom: calc(156px + var(--keyboard-inset, 0px));
}

/* ═══ UTILITY ═══ */
.hidden { display: none !important; }

/* ═══ ANIMATIONS ═══ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ═══════════════════════════════════════════════════
   DESKTOP LAYOUT (≥ 768px)
   ═══════════════════════════════════════════════════ */
@media (min-width: 768px) {
    .site-header {
        display: none;
    }

    .sidebar-left {
        display: block;
    }

    .sidebar-cart {
        display: block;
    }

    .category-pills {
        display: none;
    }

    .cart-fab {
        display: none !important;
    }

    .main-content {
        padding: 24px 32px 60px;
    }

    /* Product grid: 2-3 columns */
    .product-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 16px;
    }
    .product-card {
        flex-direction: column;
        gap: 0;
        padding: 0;
        overflow: hidden;
    }
    .product-card-img,
    .product-card-placeholder {
        width: 100%;
        height: 160px;
        border-radius: 0;
    }
    .product-card-info {
        padding: 12px 14px 14px;
    }
    .product-card-name {
        font-size: 0.95rem;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    /* Modals: centered, not bottom sheets. A keyboard takes its part off the space they have. */
    .modal-overlay {
        align-items: center;
        padding-bottom: var(--keyboard-inset, 0px);
    }
    /* With a keyboard up the box sits right above it, wherever a tablet has moved the page. */
    .keyboard-open .modal-overlay {
        align-items: flex-end;
    }
    .modal-sheet {
        border-radius: var(--radius);
        border-bottom: 0;
        max-width: 560px;
        max-height: min(85vh, var(--sheet-room, 85vh));
    }
    .modal-handle {
        display: none;
    }

    .checkout-sheet {
        max-width: 520px;
    }
}

@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
/* Clover renders the wallet button; keep its documented dimensions and the POS theme. */
.apple-pay-button { width: 100%; max-width: 300px; min-width: 200px; height: 40px; margin: 16px 0; }
#wallet-stage { border: 1px solid var(--border, #dedee3); border-radius: 12px; padding: 16px; margin-top: 16px; }
#wallet-stage p, #wallet-choice p { line-height: 1.5; }
#wallet-hint { margin-top: 8px; }
/* With Apple Pay chosen the card fields are hidden; their container keeps no empty block. */
.poynt-card-form.wallet-chosen { min-height: 0; margin-bottom: 0; }
/* While a wallet is chosen the main button leads to it, in the wallets' own black. */
.btn-pay.btn-wallet { background: #000; color: #fff; }
.btn-pay.btn-wallet:disabled { background: #555; color: #e5e5e5; }
/* Clover renders Google's button to fill this box; Google asks for at least 40px of height. */
.google-pay-button { width: 100%; max-width: 400px; min-width: 200px; height: 48px; margin: 16px 0; }
.google-pay-button iframe { display: block; width: 100%; height: 100%; border: 0; }
#google-pay-stage { border: 1px solid var(--border, #dedee3); border-radius: 12px; padding: 16px; margin-top: 16px; }
#google-pay-stage p { line-height: 1.5; }
#wallet-choice select { width: 100%; padding: 12px; font: inherit; border: 1px solid var(--border, #dedee3); border-radius: 8px; background: var(--surface, #fff); color: inherit; }
