/**
 * Product Layout - Frontend Styles
 * Styles for [maavelus_menu] shortcode output
 */

/* Container */
.maavelus-product-layout {
    max-width: 100%;
    margin: 0 auto;
    font-family: inherit;
    position: relative;
    /* Sticky pills require visible overflow on every ancestor — ensure ours.
       Ancestors above this in the theme are handled by JS in
       product-layout.js (forceStickyAncestors). */
    overflow: visible;
}

/* Category Tabs - Sticky via native CSS */
.layout-tabs-wrapper {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--maavelus-bg, #fff);
    margin-bottom: 24px;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s ease;
}

/* Desktop sits below the site header. Mobile uses the full top so the
   theme's mobile header (different geometry) doesn't double-occupy the area. */
@media (min-width: 1024px) {
    .layout-tabs-wrapper { top: 80px; }
}

/* Legacy is-fixed / spacer — no longer used by the JS, kept as no-ops so
   any leftover markup from a stale build doesn't visually break. */
.layout-tabs-wrapper.is-fixed {
    /* CSS sticky handles this natively now — no fixed-positioning override. */
}

.layout-tabs-spacer {
    display: none;
}

.layout-tabs {
    display: flex;
    gap: 8px;
    padding: 4px 0 4px 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.layout-tabs::-webkit-scrollbar {
    display: none;
}

.layout-tab {
    flex-shrink: 0;
    padding: 10px 20px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.layout-tab:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}

.layout-tab.active {
    background: var(--maavelus-primary, #f97316);
    border-color: var(--maavelus-primary, #f97316);
    color: #fff;
}

/* Section Title */
.layout-section {
    margin-bottom: 32px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
}

/* Products Container - List View */
.layout-list .products-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.layout-list .product-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    transition: box-shadow 0.2s ease;
}

.layout-list .product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.layout-list .product-image-wrapper {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    position: relative;
}

.layout-list .product-image,
.layout-list .product-image-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.layout-list .product-image-placeholder {
    background: #f3f4f6;
}

.layout-list .product-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.layout-list .product-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 4px 0;
}

.layout-list .product-title a {
    color: inherit;
    text-decoration: none;
}

.layout-list .product-title a:hover {
    color: var(--maavelus-primary, #f97316);
}

.layout-list .product-description {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 auto 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.layout-list .product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.layout-list .product-price {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

/* Products Container - Grid View */
.layout-grid .products-container {
    display: grid;
    grid-template-columns: repeat(var(--grid-columns, 3), 1fr);
    gap: 16px;
}

.layout-grid .product-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.layout-grid .product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.layout-grid .product-image-wrapper {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.layout-grid .product-image,
.layout-grid .product-image-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.layout-grid .product-image-placeholder {
    background: #f3f4f6;
}

.layout-grid .product-details {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.layout-grid .product-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 4px 0;
}

.layout-grid .product-description {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 auto 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.layout-grid .product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.layout-grid .product-price {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

/* Product Image Button/Link */
.product-image-btn,
.product-image-link {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}

/* Quick View Icon */
.quick-view-icon {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.product-image-btn:hover .quick-view-icon {
    opacity: 1;
}

/* Product Labels */
.product-labels {
    position: absolute;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px;
    z-index: 1;
}

.product-labels.labels-top_left { top: 0; left: 0; }
.product-labels.labels-top_right { top: 0; right: 0; }
.product-labels.labels-bottom_left { bottom: 0; left: 0; }
.product-labels.labels-bottom_right { bottom: 0; right: 0; }

.layout-list .product-labels:not([class*="labels-"]),
.layout-grid .product-labels:not([class*="labels-"]) {
    position: static;
    padding: 0;
    margin-top: 8px;
}

.product-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Add to Cart Button - Improved Design */
.add-to-cart-btn {
    padding: 10px 24px;
    background: var(--maavelus-primary, #f97316);
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-to-cart-btn:hover {
    background: var(--maavelus-primary-hover, #ea580c);
    transform: translateY(-1px);
}

.add-to-cart-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

.add-to-cart-btn.added {
    background: #10b981;
}

/* Cart quantity badge for Select button */
.cart-qty-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 6px;
    background: #fff;
    color: var(--maavelus-primary, #f97316);
    font-size: 12px;
    font-weight: 700;
    border-radius: 9px;
}

.cart-qty-badge:empty {
    display: none;
}

/* Out of Stock */
.out-of-stock-badge {
    padding: 8px 16px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    font-size: 13px;
    color: #6b7280;
}

.product-card.out-of-stock {
    opacity: 0.7;
}

.product-card.out-of-stock .product-image {
    filter: grayscale(50%);
}

/* Quantity Roller */
.quantity-roller {
    display: inline-flex;
    align-items: center;
    gap: 0;
    background: var(--maavelus-primary, #f97316);
    border-radius: 24px;
    overflow: hidden;
    position: relative;
}

.quantity-roller:not(.active) {
    background: var(--maavelus-primary, #f97316);
}

.quantity-roller.loading {
    pointer-events: none;
}

.quantity-roller.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.quantity-roller.loading .qty-btn,
.quantity-roller.loading .qty-value {
    opacity: 0.5;
}

.qty-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    font-size: 18px;
    font-weight: 500;
    color: #fff;
    cursor: pointer;
    transition: background 0.15s;
}

.qty-btn:hover {
    background: rgba(0,0,0,0.1);
}

.qty-value {
    min-width: 28px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.quantity-roller:not(.active) .qty-decrease {
    display: none;
}

.quantity-roller:not(.active) .qty-value {
    display: none;
}

.quantity-roller:not(.active) .qty-increase {
    width: auto;
    padding: 0 20px;
    font-size: 0; /* Hide the native + text */
}

.quantity-roller:not(.active) .qty-increase::before {
    content: 'Add';
    font-size: 14px;
    font-weight: 600;
}

/* Quick View Modal */
.maavelus-quick-view-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.quick-view-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.quick-view-content {
    position: relative;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.quick-view-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    font-size: 24px;
    color: #374151;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
}

.quick-view-close:hover {
    background: #f3f4f6;
}

.quick-view-inner {
    max-height: 90vh;
    overflow-y: auto;
}

.quick-view-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: var(--maavelus-primary, #f97316);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.quick-view-product {
    padding: 24px;
}

/* Legacy filter-mode rule — no longer used. Pills are scroll-spy now and
   never hide sections. Kept as a no-op so any pre-existing .hidden class on
   a section is still hidden if some other code path adds it. */
.layout-section.hidden {
    display: none;
}

/* Floating Cart Icon. Visibility is driven by `.visible` toggling via JS
   (server-rendered server-side at request time, then kept in sync after
   add_to_cart / removed_from_cart). We use opacity + visibility + transform
   instead of display:none so the icon can fade/slide in cleanly when an
   empty cart receives its first item. The mobile breakpoint in mini-cart.css
   still uses display:none !important to suppress the icon entirely there
   (the basket bar replaces it on mobile). */
.maavelus-floating-cart {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.maavelus-floating-cart.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.floating-cart-btn {
    width: 60px;
    height: 60px;
    background: var(--maavelus-primary, #f97316);
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.floating-cart-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.5);
}

.floating-cart-btn svg {
    width: 28px;
    height: 28px;
    fill: #fff;
}

.floating-cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    background: #111827;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .layout-tabs-wrapper {
        padding: 8px 0;
    }

    .layout-list .product-card {
        padding: 12px;
    }

    .layout-list .product-image-wrapper {
        width: 100px;
        height: 100px;
    }

    .layout-list .product-title {
        font-size: 15px;
    }

    .layout-list .product-description {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }

    .layout-grid .products-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .quick-view-content {
        max-width: 100%;
        max-height: 85vh;
        margin: 0 10px;
    }

    .maavelus-floating-cart {
        bottom: 16px;
        right: 16px;
    }

    .floating-cart-btn {
        width: 54px;
        height: 54px;
    }
}

@media (max-width: 480px) {
    .layout-tab {
        padding: 8px 16px;
        font-size: 13px;
    }

    .layout-list .product-image-wrapper {
        width: 80px;
        height: 80px;
    }

    .layout-list .product-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .layout-list .product-actions {
        width: 100%;
    }

    .layout-list .add-to-cart-btn,
    .layout-list .quantity-roller {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   Side Cart
   ============================================ */

.maavelus-side-cart {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    visibility: hidden;
    pointer-events: none;
}

.maavelus-side-cart.open {
    visibility: visible;
    pointer-events: auto;
}

.side-cart-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.maavelus-side-cart.open .side-cart-overlay {
    opacity: 1;
}

.side-cart-panel {
    position: absolute;
    /* Sit below the fixed site header so the panel header (and close button)
       stay visible. --maavelus-header-height has a sensible default and is
       overridden on mobile via the media query below. */
    top: var(--maavelus-header-height, 80px);
    right: 0;
    width: 100%;
    max-width: 420px;
    height: calc(100% - var(--maavelus-header-height, 80px));
    background: #fff;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
}

/* Mobile theme headers tend to be ~64px — adjust the variable so the panel
   tucks neatly under whichever header geometry the theme renders. */
@media (max-width: 1023px) {
    .side-cart-panel {
        top: var(--maavelus-header-height-mobile, 64px);
        height: calc(100% - var(--maavelus-header-height-mobile, 64px));
    }
}

.maavelus-side-cart.open .side-cart-panel {
    transform: translateX(0);
}

.side-cart-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.side-cart-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--maavelus-primary, #f97316);
    border: none;
    border-radius: 8px;
    font-size: 22px;
    line-height: 1;
    color: #fff;
    cursor: pointer;
    transition: filter 0.15s ease;
    margin-right: 12px;
}

.side-cart-close:hover {
    filter: brightness(0.9);
    color: #fff;
}

.side-cart-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.side-cart-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.side-cart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.side-cart-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: #6b7280;
    font-size: 15px;
}

.side-cart-items {
    padding: 12px 0 0 0;
}

/* Cart Item */
.side-cart-item {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.side-cart-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.side-cart-item-name {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin: 0;
    flex: 1;
}

.side-cart-item-addons {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 12px 0;
}

.side-cart-item-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.side-cart-item-qty {
    display: flex;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    overflow: hidden;
    flex-shrink: 0;
}

.side-cart-qty-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    font-size: 16px;
    color: #6b7280;
    cursor: pointer;
    transition: background 0.15s;
}

.side-cart-qty-btn:hover {
    background: #f3f4f6;
}

.side-cart-qty-value {
    min-width: 24px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.side-cart-item-price {
    flex: 1;
    font-size: 14px;
    color: #6b7280;
    text-align: right;
}

.side-cart-edit-btn {
    padding: 4px 12px;
    background: var(--maavelus-primary, #f97316);
    border: none;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.side-cart-edit-btn:hover {
    background: var(--maavelus-primary-hover, #ea580c);
}

.side-cart-delete-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    transition: color 0.2s;
}

.side-cart-delete-btn:hover {
    color: #ef4444;
}

.side-cart-delete-btn svg {
    width: 18px;
    height: 18px;
}

/* Item loading state */
.side-cart-item.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Upsells Section */
.side-cart-upsells {
    padding: 16px 20px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.side-cart-upsells:empty,
.side-cart-upsells.hidden {
    display: none;
}

.upsells-title {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    margin: 0 0 12px 0;
    text-align: center;
}

.upsells-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.upsell-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.upsell-image {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.upsell-info {
    flex: 1;
    min-width: 0;
}

.upsell-name {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upsell-price {
    font-size: 13px;
    color: #6b7280;
}

.upsell-add-btn {
    padding: 6px 14px;
    background: #fff;
    border: 1px solid var(--maavelus-primary, #f97316);
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--maavelus-primary, #f97316);
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.upsell-add-btn:hover {
    background: var(--maavelus-primary, #f97316);
    color: #fff;
}

/* Footer */
.side-cart-footer {
    padding: 16px 20px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    flex-shrink: 0;
}

.side-cart-subtotal {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.subtotal-label {
    font-size: 14px;
    color: #6b7280;
}

.subtotal-amount {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.side-cart-checkout-btn {
    display: block;
    width: 100%;
    padding: 14px 24px;
    background: var(--maavelus-primary, #f97316);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}

.side-cart-checkout-btn:hover {
    background: var(--maavelus-primary-hover, #ea580c);
    color: #fff;
}

/* Body scroll lock when side cart is open */
body.side-cart-open {
    overflow: hidden;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .side-cart-panel {
        max-width: 100%;
    }

    .side-cart-item {
        padding: 12px 16px;
    }

    .upsell-item {
        padding: 6px;
    }

    .upsell-image {
        width: 40px;
        height: 40px;
    }
}

/* Location Indicator — the "Ordering from: [BRANCH] Change" bar that
   sits at the top of the menu/ordering page. !important on display
   and visibility is defensive: themes occasionally inject
   `display: none` against generic `.maavelus-*` selectors, and the
   bar going missing leaves customers without a way to switch branch
   without browsing back to the branch picker. */
.maavelus-location-indicator {
    display: flex !important;
    visibility: visible !important;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #475569;
    /* Keep it in its own stacking context above the page background
       but well below the basket bar (z-index: 999). Without an
       explicit z-index, ancestor `transform` / `filter` rules from
       the theme can pull it behind sibling content. */
    position: relative;
    z-index: 1;
}

.maavelus-location-indicator .location-icon {
    display: flex;
    color: var(--maavelus-primary, #f97316);
}

.maavelus-location-indicator .location-text {
    flex: 1;
}

.maavelus-location-indicator .location-text strong {
    color: var(--maavelus-text, #1e293b);
}

.maavelus-location-indicator .location-change-btn {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
    color: var(--maavelus-text-light, #64748b);
    cursor: pointer;
    transition: all 0.2s ease;
}

.maavelus-location-indicator .location-change-btn:hover {
    background: #fff;
    border-color: var(--maavelus-primary, #f97316);
    color: var(--maavelus-primary, #f97316);
}

/* Quick-view (addon) modal: ensure it renders above the sticky basket bar
   (z-index 200) and that scrollable inner content clears the bar height
   on mobile so the bottom of the modal is reachable. */
.maavelus-quick-view-modal {
    z-index: 100001;
}
@media (max-width: 1023px) {
    .maavelus-quick-view-modal { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
    .quick-view-content { max-height: calc(90vh - 76px); }
    .quick-view-inner { max-height: calc(90vh - 76px); }
}

/* Back-to-top buttons (theme-provided): on mobile, lift above the basket
   bar so they don't overlap. Targets the common selectors used by major
   themes; harmless if none of these elements exist. */
@media (max-width: 1023px) {
    .scroll-to-top,
    .back-to-top,
    .et_pb_scroll_top,
    #et_smooth_scroll_to_top,
    #scroll-top,
    .scroll-top,
    .scrollup,
    a.back-top { bottom: 88px !important; }
}


/* QR-scan table-context banner. Rendered by LayoutShortcode at the
 * top of the menu page whenever a customer arrived via the table QR
 * (?table=ID query arg, or the session value set by the scan
 * resolver). Visually a soft tinted strip — distinct from the
 * branch indicator so the two stack cleanly. */
.maavelus-table-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    margin-bottom: 12px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    color: #9a3412;
    font-size: 14px;
}
.maavelus-table-banner .table-banner-icon { font-size: 18px; }
.maavelus-table-banner strong { color: #7c2d12; }

