/* Customer workspace: the same palette and spacing as the staff/admin screens.
   Loaded after the legacy kiosk styles so responsive rules have one owner. */
/* Keep product browsing, cart and checkout on the shared dark workspace palette. */
html[data-theme="dark"] body.customer-theme :is(.hero.featured-carousel, .category-card, .product-card, .order-search, .order-category, .cart-bar, .cart-items-section, .cart-item, .empty-cart, .order-modal, .fulfillment-option, .info-panel, .more-hero, .more-card, .service-info-dialog) {
    background: #1a293d;
    color: #e1eafb;
    border-color: #425d7b;
}
html[data-theme="dark"] body.customer-theme :is(.product-slide-visual, .product-slide-placeholder, .product-image, .modal-product-image, .cart-item-image, .checkout-item, .checkout-pinned-location, .checkout-delivery-note, .visit-hours) {
    background: #132236;
    color: #a9bad2;
    border-color: #3b526d;
}
html[data-theme="dark"] body.customer-theme :is(.product-category, .cart-item-category, .category-icon, .fulfillment-icon, .fulfillment-option.selected .fulfillment-icon) { background: #29415e; color: #c3e3ff; }
html[data-theme="dark"] body.customer-theme :is(.product-slide-copy p, .slide-price span, .category-card p, .product-stock, .cart-stock, .cart-item-info p, .empty-cart p, .quantity-hint, .fulfillment-option span, .schedule-description, .checkout-item span, .summary-row, .checkout-summary-line, .contact-item p, .more-card p, .hero-text p, .hours-details p, .checkout-header p, .brand p, .sidebar-footer, #productCount) { color: #a9bad2; }
html[data-theme="dark"] body.customer-theme :is(.slide-price, .product-price, .modal-product-info p, .subtotal-section, .cart-item-subtotal, .cart-item-quantity span, .summary-row span:last-child, .summary-total span, .checkout-total span, .checkout-summary-line span:last-child) { color: #e1eafb; }
html[data-theme="dark"] body.customer-theme .product-slide-copy .slide-eyebrow { color: #ffdc89 !important; }
html[data-theme="dark"] body.customer-theme :is(.carousel-arrows button, .quantity-button, .cart-item-quantity button, .cart-item-remove, .view-cart-button, .continue-shopping, .back-cart-button, .cancel-button, .modal-close) { background: #22364e; color: #e1eafb; border-color: #536d8a; }
html[data-theme="dark"] body.customer-theme :is(.carousel-arrows button:hover, .category-card:hover, .order-category:hover, .quantity-button:hover, .cart-item-quantity button:hover, .cart-item-remove:hover, .continue-shopping:hover, .cancel-button:hover) { background: #233b55; }
html[data-theme="dark"] body.customer-theme :is(.order-category.selected, .fulfillment-option.selected) { background: #294b70; color: #e1eafb; border-color: #8bc6ff; }
html[data-theme="dark"] body.customer-theme .product-slide-copy .slide-cta { background: #294b70; color: #e1eafb; }
html[data-theme="dark"] body.customer-theme .carousel-indicator { background: #536d8a; }
html[data-theme="dark"] body.customer-theme .carousel-indicator.active { background: #8bc6ff; }
html[data-theme="dark"] body.customer-theme :is(.summary-divider, .checkout-divider) { background: #3b526d; }
html[data-theme="dark"] body.customer-theme :is(.modal-product, .quantity-section, .subtotal-section, .checkout-item, .cart-item, .services-grid, .service-dialog-header) { border-color: #3b526d; }
/* More-page icons and secondary copy have their own legacy light-mode colors. */
html[data-theme="dark"] body.customer-theme .more-main :is(.service-icon, .service-arrow, .services-heading-icon, .contact-icon, .hours-icon, .calendar-icon, .about-icon, .card-arrow, .hero-label) { color: #8bc6ff; }
html[data-theme="dark"] body.customer-theme .more-main :is(.service-link small, .about-panel p, .faq-panel details p, .hours-status, .more-footer) { color: #a9bad2; }
html[data-theme="dark"] body.customer-theme .more-main .faq-panel summary { color: #e1eafb; }
html[data-theme="dark"] body.customer-theme .more-main :is(.service-link, .faq-panel details) { border-color: #3b526d; }
html[data-theme="dark"] body.customer-theme .more-main :is(.service-link:hover, .service-dialog-close:hover) { background: #233b55; }
html[data-theme="dark"] body.customer-theme .more-main :is(.service-link:focus-visible, .service-dialog-close:focus-visible) { outline-color: #8bc6ff; }
html[data-theme="dark"] body.customer-theme .more-main .map-link { color: #8bc6ff !important; }
html[data-theme="dark"] body.customer-theme .more-main .status-dot { background: #94e6b3; }
html[data-theme="dark"] body.customer-theme .more-hero .hero-image { background: #132236; }
:root {
    --customer-sidebar: 240px;
    --customer-ink: #211d25;
    --customer-muted: #726d78;
    --customer-line: #e7e4e9;
    --customer-accent: #f4cf55;
}

html, body, .app { background: #faf9fb; color: var(--customer-ink); }
body { line-height: 1.5; }
.app { display: block; height: auto; min-height: 100vh; overflow: visible; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: not-allowed; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid #9a6a00;
    outline-offset: 3px;
}
.sidebar {
    width: var(--customer-sidebar);
    height: 100vh;
    height: 100dvh;
    padding: 18px 14px;
    overflow-y: auto;
    background: #1f1f1f;
    color: #fff;
    z-index: 1000;
}
.brand { height: auto; min-height: 84px; gap: 12px; padding: 0 2px 18px; }
.customer-brand-logo { width: 56px; height: 56px; flex: 0 0 56px; object-fit: contain; }
.brand > div { min-width: 0; }
.brand h2 { display: block; font-size: 14px; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; }
.brand p { margin-top: 3px; font-size: 11px; color: #bdb9c1; }
.navigation { margin-top: 24px; gap: 8px; }
.nav-item { min-height: 46px; gap: 12px; padding: 10px 12px; font-size: 14px; border-radius: 8px; }
.nav-item span { display: inline; }
.nav-item.active { background: #444; color: #fff; }
.nav-item.active .customer-nav-icon { color: var(--customer-accent); }
.customer-nav-icon { width: 20px; height: 20px; flex: 0 0 20px; }
.customer-account { padding: 24px 4px 0; margin-top: auto; }
.customer-info { margin: 0 0 16px; gap: 10px; }
.customer-icon { width: 36px; height: 36px; background: #444; color: var(--customer-accent); font-weight: 700; }
.customer-details strong { color: #fff; max-width: 150px; }
.customer-details small { color: #c2bec7; }
.customer-logout { width: 100%; min-height: 44px; border: 1px solid #555; background: transparent; }
.customer-logout:hover { background: #444; }
.sidebar-footer { margin-top: 16px; padding: 0 4px; font-size: 10px; color: #bdb9c1; }
.main-content { width: auto; margin-left: var(--customer-sidebar); height: auto; min-height: 100vh; overflow: visible; padding: 28px 32px 48px; background: #faf9fb; }
.customer-page-heading { margin-bottom: 24px; }
.customer-page-heading h1, .cart-page-header h1, .checkout-header h1 { font-size: clamp(24px, 3vw, 28px); color: var(--customer-ink); }
.customer-page-heading p, .cart-page-header p, .checkout-header p { margin-top: 6px; color: var(--customer-muted); font-size: 14px; }
.topbar { height: auto; min-height: 44px; margin-bottom: 20px; border: 0; }
.page-title { font-size: 28px; font-weight: 700; color: var(--customer-ink); }
.order-content { padding-bottom: 150px; }
.order-top { padding: 0; gap: 16px; }
.order-search { width: min(100%, 520px); height: 46px; border: 1px solid #d5d1da; border-radius: 8px; }
.order-search input { min-width: 0; font-size: 16px; }
.order-categories { gap: 8px; margin: 20px 0 0; flex-wrap: wrap; overflow: visible; }
.order-category { height: auto; min-height: 44px; padding: 8px 18px; border-color: var(--customer-line); border-radius: 8px; font-size: 14px; }
.order-category.selected { background: #211d25; border-color: #211d25; }
.product-heading { margin: 24px 0 0; gap: 12px; flex-wrap: wrap; }
.product-heading h2, .section-heading h2 { font-size: 20px; color: var(--customer-ink); }
.order-products { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding: 20px 0; }
@media (max-width: 1100px) { .order-products { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.product-card { display: flex; flex-direction: column; min-width: 0; min-height: 0; border: 1px solid var(--customer-line); border-radius: 12px; overflow: hidden; }
.product-image { height: 190px; flex-shrink: 0; background: #f1eff3; }
.product-info { display: flex; flex-direction: column; align-items: flex-start; flex: 1; padding: 18px; }
.product-info h3 { font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; color: var(--customer-ink); }
.product-category { background: #f1eff3; color: #61596b; }
.product-price { color: var(--customer-ink); }
.product-stock { margin-bottom: 16px; }
.add-product { width: 100%; margin-top: auto; }
.add-product, .cart-button, .checkout-button, .cart-checkout-button, .place-order-button, .empty-cart button {
    min-height: 44px;
    height: auto;
    padding: 10px 16px;
    border: 1px solid var(--customer-accent);
    border-radius: 8px;
    background: var(--customer-accent);
    color: #211d25;
    font-size: 14px;
    font-weight: 700;
}
.add-product:hover, .cart-button:hover, .checkout-button:hover, .cart-checkout-button:hover, .place-order-button:hover, .empty-cart button:hover {
    background: #eac13c;
    color: #211d25;
    border-color: #eac13c;
}
.hero.featured-carousel { height: auto; min-height: 0; margin-top: 0; border-radius: 12px; border-color: var(--customer-line); background: #fff; }
.product-slide { min-width: 0; }
.product-slide h1 { font-size: clamp(26px, 3vw, 40px); color: var(--customer-ink); overflow-wrap: anywhere; }
.product-slide-visual { border-radius: 12px; background: #f7f5f8; }
.product-slide-copy .slide-eyebrow { color: #79600c !important; }
.product-slide-copy .slide-cta { background: var(--customer-accent); color: #211d25; border-radius: 8px; padding: 12px 18px; }
.carousel-indicator.active { background: #8b6c00; }
.carousel-arrows button { width: 44px; height: 44px; }
.carousel-controls { bottom: 12px; }
.categories { margin-top: 28px; }
.category-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.category-card { min-height: 175px; padding: 20px; border-color: var(--customer-line); border-radius: 12px; }
.category-icon { background: #fff7d8; color: #79600c; width: 44px; height: 44px; }
.category-card h3 { font-size: 16px; }
.category-card p { font-size: 13px; }
.heading-line { background: var(--customer-line); }
.cart-bar { left: calc(var(--customer-sidebar) + 32px); right: 32px; bottom: 16px; border-color: var(--customer-line); border-radius: 12px; padding: 14px 18px; gap: 16px; }
.cart-total { min-width: 0; padding: 0; }
.cart-total strong { overflow-wrap: anywhere; }
.cart-actions { flex-wrap: wrap; }
.view-cart-button, .continue-shopping, .back-cart-button, .cancel-button { min-height: 44px; height: auto; padding: 10px 14px; border: 1px solid #d5d1da; border-radius: 8px; background: #fff; color: var(--customer-ink); }
.cart-page, .checkout-page { padding: 0; }
.cart-page-header, .checkout-header { gap: 16px; flex-wrap: wrap; }
.cart-layout, .checkout-layout { gap: 24px; grid-template-columns: minmax(0, 1fr) 300px; }
.cart-items-section, .cart-summary, .checkout-card, .checkout-summary, .info-panel { min-width: 0; border: 1px solid var(--customer-line); border-radius: 12px; background: #fff; padding: 24px; }
.cart-item { grid-template-columns: 72px minmax(0, 1fr); gap: 16px; }
.cart-item-image { width: 72px; height: 72px; border-radius: 8px; }
.cart-item-info { min-width: 0; }
.cart-item-info h3 { overflow-wrap: anywhere; }
.cart-item-quantity { grid-column: 2; justify-content: flex-start; }
.cart-item-quantity button { width: 44px; height: 44px; border-radius: 8px; }
.cart-item-subtotal { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; text-align: left; }
.remove-cart-item { min-height: 44px; padding: 8px; border: 0; background: transparent; color: #b32638; text-decoration: underline; }
.checkout-field input, .checkout-field textarea { min-height: 46px; font-size: 16px; border-radius: 8px; }
.checkout-field, .checkout-form, .customer-fields > *, .checkout-item > * { min-width: 0; }
.fulfillment-option { text-align: left; font: inherit; background: #fff; }
.fulfillment-option.selected { border-color: #9a780e; background: #fffbeb; box-shadow: inset 3px 0 0 #9a780e; }
.fulfillment-option.selected .fulfillment-icon { background: #f4cf55; color: #211d25; }
.checkout-summary-line, .checkout-total, .summary-row, .summary-total { gap: 12px; flex-wrap: wrap; }
.checkout-item strong { overflow-wrap: anywhere; }
.checkout-summary { padding: 0; border: 0; background: transparent; }
.checkout-total strong, .summary-total strong { color: var(--customer-ink); }
.more-main { padding: 0; min-height: 0; background: transparent; color: var(--customer-ink); }
.more-hero { border-radius: 12px; margin-bottom: 24px; }
.more-hero .hero-image { display: grid; place-items: center; background: #f4f2f6; padding: 20px; }
.more-hero .hero-image img { width: 140px; height: 140px; object-fit: contain; }
.more-main .hero-label, .more-main .contact-icon, .more-main .map-pin,
.more-main .map-link, .more-main .about-icon, .more-main .services-heading-icon, .more-main .service-arrow { color: #79600c; }
.more-info-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.6fr); grid-template-rows: auto auto; }
.contact-panel { grid-column: 1; grid-row: 1; }
.location-panel { grid-column: 2; grid-row: 1; }
.store-map, .store-map iframe { min-height: 360px; }
.contact-item strong, .contact-item p { overflow-wrap: anywhere; }
.services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.more-main .service-link { width: 100%; border: 0; border-right: 1px solid var(--customer-line); background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.more-main .service-link:last-child { border-right: 0; }
.more-main .service-link:focus-visible, .service-dialog-close:focus-visible { outline: 3px solid #79600c; outline-offset: 3px; }
.service-info-dialog { width: min(560px, calc(100% - 32px)); max-height: min(80vh, 680px); padding: 0; border: 1px solid var(--customer-line); border-radius: 12px; color: var(--customer-ink); box-shadow: 0 20px 60px rgb(25 25 35 / 25%); }
.service-info-dialog { position: fixed; inset: 50% auto auto 50%; transform: translate(-50%, -50%); margin: 0; overflow-y: auto; }
.service-info-dialog::backdrop { background: rgb(20 22 28 / 55%); }
.service-dialog-header { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 64px 20px 22px; border-bottom: 1px solid var(--customer-line); }
.service-dialog-header h2 { margin: 0; font-size: 20px; }
.service-dialog-close { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 6px; background: transparent; color: var(--customer-ink); font-size: 28px; line-height: 1; cursor: pointer; }
.service-dialog-content { padding: 20px 22px 24px; font-size: 14px; line-height: 1.65; }
.service-dialog-content[hidden] { display: none; }
.service-dialog-content p { margin: 0 0 14px; }
.service-dialog-content p:last-child { margin-bottom: 0; }
.service-dialog-content ul { margin: 0 0 14px; padding-left: 22px; }
.service-dialog-content li + li { margin-top: 6px; }
.service-dialog-content a { color: #79600c; text-decoration: underline; text-underline-offset: 2px; }
.order-modal-overlay { padding: 16px; overflow-y: auto; }
.order-modal { width: 520px; max-height: calc(100dvh - 32px); overflow-y: auto; padding: 28px; border-radius: 16px; }
.modal-product { gap: 18px; padding-right: 20px; }
.modal-product-image { width: 96px; height: 96px; border-radius: 10px; }
.modal-product-info { min-width: 0; }
.modal-product-info h2 { font-size: 20px; overflow-wrap: anywhere; }
.modal-product-info p { font-size: 18px; color: var(--customer-ink); }
.modal-close { width: 44px; height: 44px; top: 4px; right: 4px; }
.quantity-section label { display: block; font-weight: 700; margin-bottom: 12px; }
.quantity-controls { gap: 12px; justify-content: flex-start; }
.quantity-button { width: 46px; height: 46px; flex: 0 0 46px; border: 1px solid #d5d1da; border-radius: 8px; }
#quantity { width: 100px; min-width: 0; height: 46px; border: 1px solid #bcb5c3; border-radius: 8px; background: #fff; color: #211d25; font: 600 18px Arial, sans-serif; }
#quantity[aria-invalid="true"] { border-color: #b32638; }
.quantity-hint, .quantity-error { font-size: 13px; margin-top: 10px; }
.quantity-hint { color: var(--customer-muted); }
.quantity-error { color: #b32638; }
.quantity-error:empty { display: none; }
body.customer-modal-open { overflow: hidden; }

@media (max-width: 1180px) {
    .cart-layout, .checkout-layout { grid-template-columns: minmax(0, 1fr); }
    .cart-summary, .checkout-summary { position: static; }
    .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fulfillment-options, .customer-fields { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 800px) {
    .more-info-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; }
    .contact-panel, .location-panel { grid-column: auto; grid-row: auto; }
    .location-panel { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; }
    .location-panel > h2, .location-panel .visit-hours, .location-panel .store-map, .location-panel .map-link { grid-column: 1; grid-row: auto; }
    .location-panel .visit-hours { min-height: 0; flex-direction: row; align-items: center; justify-content: space-between; }
    .store-map, .store-map iframe { min-height: 300px; }
    .sidebar { position: static; width: 100%; height: auto; padding: 14px 16px; overflow: visible; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; }
    .brand { min-height: 0; padding: 0; border: 0; justify-content: flex-start; gap: 10px; }
    .customer-brand-logo { width: 40px; height: 40px; flex-basis: 40px; }
    .brand h2 { font-size: 13px; }
    .brand p { font-size: 10px; }
    .navigation { grid-column: 1 / -1; grid-row: 2; display: flex; flex-direction: row; flex-wrap: wrap; gap: 6px; margin: 0; }
    .nav-item { flex: 1 1 auto; width: auto; justify-content: center; gap: 8px; min-height: 46px; padding: 10px; font-size: 13px; }
    .nav-item span { display: inline; }
    .customer-account { grid-column: 2; grid-row: 1; margin: 0; padding: 0; }
    .customer-info, .sidebar-footer { display: none; }
    .customer-logout { width: auto; min-height: 44px; padding: 8px 12px; font-size: 12px; }
    .main-content { margin-left: 0; min-height: 0; padding: 24px 20px 40px; }
    .order-content { padding-bottom: 180px; }
    .cart-bar { left: 16px; right: 16px; bottom: max(12px, env(safe-area-inset-bottom)); }
    .hero.featured-carousel { padding: 24px 20px 72px; }
    .product-slide { grid-template-columns: minmax(0, 1fr); }
    .product-slide-visual { height: 220px; }
    .hero .product-slide h1 { font-size: 30px; }
    .product-slide-copy .slide-price { font-size: 22px; }
}
@media (max-width: 480px) {
    .main-content { padding: 20px 16px 32px; }
    .order-content { padding-bottom: 190px; }
    .order-products { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .product-image { height: 200px; }
    .order-category { padding: 8px 12px; }
    .cart-bar { display: none; padding: 12px; gap: 8px; flex-direction: column; align-items: stretch; }
    .cart-bar.show { display: flex; }
    .cart-total { flex-direction: row; align-items: center; justify-content: space-between; }
    .cart-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 8px; }
    .cart-actions button { padding: 10px 8px; font-size: 12px; }
    .category-grid, .more-info-grid, .services-grid { grid-template-columns: minmax(0, 1fr); }
    .category-card { min-height: 0; align-items: flex-start; padding: 20px; }
    .cart-items-section, .cart-summary, .checkout-card, .checkout-summary, .info-panel { padding: 18px; }
    .checkout-summary { padding: 0; }
    .cart-page-header, .checkout-header { align-items: flex-start; flex-direction: column; }
    .cart-item { grid-template-columns: 56px minmax(0, 1fr); gap: 12px; }
    .cart-item-image { width: 56px; height: 56px; }
    .modal-product-image { width: 64px; height: 64px; }
    .order-modal { padding: 24px 18px; }
    .modal-product-info h2 { font-size: 18px; }
    .modal-product-info p { font-size: 16px; }
    .modal-actions { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
