        :root {
            color-scheme: light;
        }

        html, body {
            color-scheme: light;
        }

        body {
            margin: 0;
            font-family: Arial, Helvetica, sans-serif;
            background: linear-gradient(#d9f3a2, #f6e27f);
            background-color: #d9f3a2;
            color: #0a5c2f;
            padding-bottom: calc(var(--footer-h) + 18px + env(safe-area-inset-bottom));
        }

        @media (prefers-color-scheme: dark) {
            :root {
                color-scheme: light;
            }

            html, body {
                color-scheme: light;
            }

            body {
                background: linear-gradient(#d9f3a2, #f6e27f);
                background-color: #d9f3a2;
                color: #0a5c2f;
            }
        }

        :root {
            --verde: #0a5c2f;
            --amarelo: #fefecf;
            --price-w: 120px;
            --footer-h: 86px;
        }

        @media (max-width: 480px) {
            :root {
                --price-w: 140px;
            }
        }

        header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px 30px;
            color: #0a5c2f;
            font-weight: bold;
        }

        #pdvLabel {
            display: none;
        }

        .brand {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            min-height: 48px;
        }

        .brand img {
            height: 48px;
            max-width: 180px;
            object-fit: contain;
            display: none;
        }

        .search-bar {
            margin: 10px auto;
            width: 92%;
        }

        .search-bar input {
            width: 94%;
            padding: 10px;
            font-size: 14px;
            border-radius: 20px;
            border: none;
        }

        .banner {
            width: 92%;
            max-width: 1600px;
            margin: 20px auto;
            border-radius: 20px;
            overflow: hidden;
            aspect-ratio: 8 / 3;
            background: var(--amarelo);
            position: relative;
        }

        .banner img {
            width: 100%;
            height: 100%;
            display: block;
            object-fit: contain;
            object-position: center;
        }

        #bannerFallback {
            position: absolute;
            inset: 0;
            display: none;
            align-items: center;
            justify-content: center;
            text-align: center;
            padding: 14px 16px;
            box-sizing: border-box;
            font-weight: 900;
            letter-spacing: 0.5px;
            color: var(--verde);
            background: rgba(254, 254, 207, 0.92);
        }

        .section-title {
            font-weight: bold;
            text-align: center;
            width: 87%;
            margin: 0 auto 12px;
            padding: 12px 14px;
            border-radius: 20px;
            border: 2px solid rgba(10, 92, 47, 0.9);
            background: #0a5c2f;
            color: #fefecf;
        }

        .cards {
            display: flex;
            justify-content: space-around;
            padding: 20px 0;
            width: 88%;
            margin: 0 auto;
            flex-wrap: wrap;
        }

        .card {
            background: #fefecf;
            border-radius: 20px;
            width: 220px;
            height: 220px;
            padding: 15px;
            text-align: center;
            margin: 10px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        .card img {
            width: 100%;
            border-radius: 15px;
        }

        .price-btn {
            margin-top: 10px;
            background: #0a5c2f;
            color: white;
            padding: 10px;
            border-radius: 20px;
            cursor: pointer;
            font-weight: bold;
        }

        .product-price {
            margin-top: 8px;
            font-weight: 900;
            color: var(--verde);
            opacity: 0.92;
        }

        .price-btn[aria-disabled="true"],
        .add-btn[aria-disabled="true"] {
            opacity: 0.5;
            cursor: not-allowed;
            pointer-events: none;
        }

        .product-list {
            width: 92%;
            margin: 0 auto;
            padding-bottom: 18px;
        }

        .product {
            display: grid;
            grid-template-columns: 96px 1fr auto;
            align-items: center;
            background: #fefecf;
            border-radius: 20px;
            padding: 15px;
            margin-bottom: 15px;
            position: relative;
            gap: 12px;
        }

        .product img {
            width: 96px;
            height: 96px;
            border-radius: 12px;
            align-self: center;
            object-fit: cover;
            cursor: pointer;
        }

        .product-info {
            flex: 1 1 auto;
            margin-left: 0;
            min-width: 0;
            padding-right: 0;
            display: flex;
            flex-direction: column;
            justify-content: center;
            gap: 6px;
            align-self: stretch;
        }

        .product-actions {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: flex-start;
            gap: 10px;
            margin-top: 6px;
            width: auto;
        }

        .product-title {
            font-weight: bold;
            display: block;
            margin-top: -2px;
            line-height: 1.15;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            color: var(--verde);
            font-size: 18px;
        }

        .product-title {
            margin-bottom: 4px;
        }

        .product-desc {
            margin-top: 12px;
            opacity: 0.9;
            line-height: 1.2;
            overflow-wrap: anywhere;
            word-break: break-word;
        }

        .product-desc-btn {
            margin-top: 10px;
            margin-right: 10px;
            background: rgba(10, 92, 47, 0.08);
            border: 1px solid rgba(10, 92, 47, 0.35);
            color: var(--verde);
            padding: 8px 12px;
            border-radius: 12px;
            font-size: 13px;
            font-weight: bold;
            white-space: nowrap;
            cursor: pointer;
            align-self: flex-start;
        }

        button.product-desc-btn {
            margin-top: 10px;
            margin-right: 10px;
            background: rgba(10, 92, 47, 0.08);
            border: 1px solid rgba(10, 92, 47, 0.35);
            color: var(--verde);
            padding: 8px 12px;
            border-radius: 12px;
            font-size: 13px;
            font-weight: bold;
            white-space: nowrap;
            cursor: pointer;
            align-self: flex-start;
        }

        .product-desc.product-desc-clamp {
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 2;
            line-clamp: 2;
            overflow: hidden;
        }

        .card-title {
            font-weight: bold;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .add-btn {
            background: #0a5c2f;
            color: white;
            padding: 10px 10px;
            border-radius: 12px;
            cursor: pointer;
            white-space: nowrap;
            width: auto;
            min-width: 132px;
            text-align: center;
            flex: 0 0 auto;
            position: static;
            transform: none;
            align-self: center;
            min-height: 44px;
            font-size: 14px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            box-sizing: border-box;
            line-height: 1.1;
        }

        .add-btn span {
            display: block;
            width: 100%;
            text-align: center;
        }

        @media (max-width: 480px) {
            .add-btn {
                height: auto;
                min-height: 44px;
                font-size: 14px;
                min-width: 140px;
            }

            .product {
                grid-template-columns: 96px 1fr;
                grid-template-rows: auto auto;
                align-items: center;
            }

            .product img {
                grid-column: 1;
                grid-row: 1 / span 2;
                align-self: center;
                justify-self: center;
            }

            .product-info {
                grid-column: 2;
                grid-row: 1;
                align-items: center;
                text-align: center;
                justify-content: center;
            }

            .product-actions {
                grid-column: 2;
                grid-row: 2;
                margin-top: 0;
                width: 100%;
                align-items: center;
                justify-content: center;
            }

            .product-title {
                text-align: center;
                width: 100%;
            }

            .product-price {
                margin-top: 6px;
                display: block;
                text-align: center;
                background: transparent;
                border: none;
                padding: 0;
            }
        }

        .detail-img {
            width: 100%;
            max-width: 420px;
            aspect-ratio: 1 / 1;
            object-fit: cover;
            border-radius: 16px;
            border: 2px solid rgba(10, 92, 47, 0.25);
            background: rgba(10, 92, 47, 0.06);
        }

        .detail-actions {
            margin-top: 14px;
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            align-items: center;
            justify-content: flex-start;
        }

        .next-step-blink {
            background: #ff7a00 !important;
            border-color: #ff7a00 !important;
            color: #ffffff !important;
            animation: next-step-blink 1.05s ease-in-out infinite;
        }

        .next-step-blink svg {
            fill: currentColor !important;
        }

        @keyframes next-step-blink {
            0%, 100% {
                box-shadow: 0 0 0 0 rgba(255, 122, 0, 0.0);
                transform: translateZ(0) scale(1);
                filter: brightness(1);
            }
            50% {
                box-shadow: 0 0 0 5px rgba(255, 122, 0, 0.38);
                transform: translateZ(0) scale(1.04);
                filter: brightness(1.06);
            }
        }

        .detail-qty {
            display: inline-flex;
            gap: 10px;
            align-items: center;
        }

        .detail-qty button {
            padding: 10px 14px;
            border-radius: 12px;
        }

        .detail-qty .detail-qty-value {
            min-width: 34px;
            text-align: center;
            font-weight: 900;
            font-size: 18px;
        }

        .detail-add-btn {
            background: #0a5c2f;
            color: white;
            padding: 10px 16px;
            border-radius: 12px;
            cursor: pointer;
            white-space: nowrap;
        }

        .add-btn.flash-added,
        .price-btn.flash-added {
            background: var(--amarelo) !important;
            color: var(--verde) !important;
        }

        .flash-added {
            background: #f0b429 !important;
            color: #1d1d1d !important;
        }

        .add-btn:active,
        .price-btn:active {
            transform: translateY(-50%) scale(0.98);
        }

        #appFooterCredit {
            width: 92%;
            margin: 16px auto 0;
            text-align: center;
            color: var(--verde);
            font-weight: 800;
            padding: 6px 0;
            margin-bottom: 10px;
        }

        #bottomBar {
            position: fixed;
            left: 0;
            right: 0;
            bottom: 0;
            height: var(--footer-h);
            background: var(--verde);
            z-index: 998;
            display: none;
            align-items: center;
            padding: 10px 12px;
            padding-bottom: calc(10px + env(safe-area-inset-bottom));
            box-sizing: border-box;
        }

        #bottomBarInner {
            width: min(920px, 92%);
            margin: 0 auto;
            display: flex;
            gap: 10px;
            align-items: center;
            justify-content: stretch;
        }

        .bottom-action {
            flex: 1 1 0;
            min-width: 0;
            background: var(--amarelo);
            color: var(--verde);
            border: none;
            border-radius: 14px;
            height: 46px;
            padding: 0 10px;
            font-size: 16px;
            font-weight: 900;
            cursor: pointer;
            box-shadow: 0 10px 22px rgba(0,0,0,0.18);
            user-select: none;
            -webkit-tap-highlight-color: transparent;
            white-space: nowrap;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            box-sizing: border-box;
        }

        #whatsFooter {
            display: none;
            text-decoration: none;
            flex: 1.35 1 0;
        }

        #bottomHome {
            flex: 0 0 auto;
            padding: 0 8px;
        }

        #whatsFooterInner {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            width: auto;
            min-width: 0;
            padding: 0 6px;
            box-sizing: border-box;
        }

        #whatsFooter svg {
            width: 24px;
            height: 24px;
            display: block;
            fill: currentColor;
            color: var(--verde);
            flex: 0 0 auto;
        }

        .category-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .category-list .pill {
            width: 100%;
            text-align: left;
            padding: 14px 16px;
            border-radius: 16px;
        }

        .floating-actions {
            display: none;
        }

        button {
            background: #0a5c2f;
            color: white;
            padding: 15px 30px;
            border: none;
            border-radius: 20px;
            font-size: 16px;
            cursor: pointer;
        }

        #comprovanteFile::file-selector-button {
            background: #f0b429;
            color: #1d1d1d;
            border: none;
            border-radius: 12px;
            padding: 12px 14px;
            font-weight: 900;
            font-size: 16px;
            cursor: pointer;
        }

        #comprovanteFile::-webkit-file-upload-button {
            background: #f0b429;
            color: #1d1d1d;
            border: none;
            border-radius: 12px;
            padding: 12px 14px;
            font-weight: 900;
            font-size: 16px;
            cursor: pointer;
        }

        #comprovanteFile {
            width: 100%;
            font-size: 15px;
            padding: 6px 0;
        }

        .btn-comprovante {
            width: 100%;
            padding: 16px 18px;
            border-radius: 18px;
            font-size: 18px;
            font-weight: 900;
            background: #2f9e44;
            color: white;
        }

        .pill {
            background: var(--amarelo);
            border: 1px solid rgba(10, 92, 47, 0.35);
            color: var(--verde);
            border-radius: 999px;
            padding: 8px 12px;
            cursor: pointer;
            font-weight: bold;
        }

        .pill.active {
            background: var(--verde);
            color: white;
        }

        .toolbar {
            width: 90%;
            margin: 0 auto;
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            align-items: center;
            justify-content: space-between;
        }

        .category-row {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            align-items: center;
        }

        #categoriasRow {
            display: none;
        }


        .modal-backdrop {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.45);
            display: none;
            align-items: center;
            justify-content: center;
            padding: 16px;
            z-index: 999;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }

        .modal {
            width: min(720px, 100%);
            background: var(--amarelo);
            border-radius: 18px;
            border: 2px solid rgba(10, 92, 47, 0.35);
            padding: 16px;
            max-height: calc(100vh - 32px);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .modal.status-pendente {
            background: #cfe2ff;
            border-color: #0d6efd;
        }

        .modal.status-em-atendimento {
            background: #fff3cd;
            border-color: #f0b429;
        }

        .modal.status-respondida {
            background: #d4edda;
            border-color: #2f9e44;
        }

        .modal.status-rejeitada {
            background: #f8d7da;
            border-color: #e03131;
        }

        .modal-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 10px;
        }

        #modalBody {
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            max-height: calc(100vh - 140px);
            flex: 1;
            min-height: 0;
        }

        .modal-title {
            font-weight: bold;
            color: var(--verde);
            font-size: 18px;
        }

        .modal-close {
            background: transparent;
            color: var(--verde);
            border: 1px solid rgba(10, 92, 47, 0.35);
            border-radius: 12px;
            padding: 8px 10px;
        }

        .modal-close.is-back {
            background: var(--verde);
            color: #ffffff;
            border-color: var(--verde);
            font-weight: 900;
        }

        .cart-row {
            display: grid;
            grid-template-columns: 1fr auto auto;
            gap: 10px;
            align-items: center;
            padding: 10px 0;
            border-bottom: 1px solid rgba(10, 92, 47, 0.2);
        }

        .cart-row {
            background: rgba(255, 255, 255, 0.5);
            border-radius: 12px;
            padding: 10px 10px;
            margin: 8px 0;
        }

        .qty {
            display: inline-flex;
            gap: 8px;
            align-items: center;
        }

        .qty button {
            padding: 8px 12px;
            border-radius: 12px;
        }

        .muted {
            opacity: 0.75;
        }

        .status {
            font-weight: bold;
        }

        #whatsFloat {
            position: fixed;
            right: 16px;
            bottom: calc(86px + var(--footer-h) + env(safe-area-inset-bottom));
            z-index: 998;
            display: none;
            align-items: center;
            gap: 10px;
            padding: 0;
            border-radius: 999px;
            text-decoration: none;
            color: white;
            background: #25D366;
            box-shadow: 0 10px 24px rgba(0,0,0,0.22);
            font-weight: 800;
            width: 56px;
            height: 56px;
            justify-content: center;
        }

        #whatsFloat svg {
            width: 22px;
            height: 22px;
            display: block;
            fill: currentColor;
        }

        /* Botões de escolha expostos (entrega/retirada, pagamento) */
        .choice-row {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            margin: 8px 0 12px;
        }
        .choice-btn {
            flex: 1 1 0;
            min-width: 120px;
            padding: 12px 10px;
            border: 1px solid rgba(10, 92, 47, 0.35);
            border-radius: 12px;
            background: rgba(255,255,255,0.55);
            color: #0a5c2f;
            font-size: 15px;
            font-weight: 800;
            cursor: pointer;
            transition: all 0.15s;
            text-align: center;
        }
        .choice-btn.active {
            background: #0a5c2f;
            color: #fff;
            border-color: #0a5c2f;
        }
        .choice-btn:disabled,
        .choice-btn.soon {
            opacity: 0.55;
            cursor: not-allowed;
        }
        .online-options {
            margin-top: 10px;
            padding-left: 12px;
            border-left: 3px solid #0a5c2f;
        }

        @media (max-width: 768px) {
            :root {
                --footer-h: 66px;
                --price-w: 92px;
            }

            #whatsFloat {
                bottom: calc(76px + var(--footer-h) + env(safe-area-inset-bottom));
            }

            #bottomBarInner {
                width: 92%;
                gap: 6px;
            }

            #bottomHome {
                padding: 0 7px;
            }

            .bottom-action {
                height: 42px;
                font-size: 12.5px;
                padding: 0 8px;
                gap: 6px;
                border-radius: 12px;
            }

            #whatsFooterInner {
                gap: 6px;
                padding: 0 6px;
            }

            #whatsFooter svg {
                width: 18px;
                height: 18px;
            }

            .search-bar {
                width: 92%;
            }

            .search-bar input {
                padding: 12px;
                font-size: 16px;
            }

            .banner {
                margin: 15px auto;
            }

            .cards {
                padding: 12px;
                gap: 8px;
                justify-content: flex-start;
                flex-wrap: nowrap;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }

            .card {
                width: calc((100% - 16px) / 3);
                min-width: 105px;
                height: auto;
                min-height: 165px;
                flex: 0 0 auto;
                margin: 0;
                padding: 6px;
                border-radius: 13px;
                display: flex;
                flex-direction: column;
                justify-content: flex-start;
                gap: 2px;
            }

            .card img {
                width: 100%;
                flex: 0 0 auto;
                max-height: 95px;
                min-height: 70px;
                object-fit: cover;
                border-radius: 9px;
            }

            .card p {
                margin: 2px 0 0;
                font-size: 10px;
                line-height: 1.1;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }

            .product-price {
                font-size: 11px;
                margin-top: 2px;
            }

            .price-btn {
                margin-top: 4px;
                flex: 0 0 auto;
                min-height: 32px;
                padding: 4px 8px;
                font-size: 10px;
                white-space: nowrap;
                border-radius: 10px;
            }

            .modal-title {
                font-weight: bold;
                color: var(--verde);
                font-size: 18px;
            }

            .product-list {
                width: 92%;
            }

            .product {
                gap: 10px;
            }
        }

        @media (max-width: 360px) {
            .bottom-action {
                font-size: 12px;
                padding: 0 7px;
                gap: 5px;
            }

            #bottomHome {
                padding: 0 6px;
            }

            #whatsFooterInner {
                gap: 5px;
                padding: 0 6px;
            }
        }

        /* ---------------------------------------------------------------------------
         * Tela de pagamento PIX (Fase 1A)
         * --------------------------------------------------------------------------- */

        .payment-box {
            background: #fffbe6;
            border: 2px solid #d4c05e;
            border-radius: 18px;
            padding: 22px;
            max-width: 560px;
            margin: 18px auto 0;
            box-shadow: 0 6px 24px rgba(0,0,0,0.12);
        }

        .payment-header {
            font-weight: bold;
            font-size: 16px;
            color: #0a5c2f;
            margin-bottom: 12px;
            text-align: center;
        }

        .payment-amount {
            font-size: 22px;
            font-weight: bold;
            color: #0a5c2f;
            text-align: center;
            margin-bottom: 12px;
        }

        .post-order-summary {
            background: #ffffff;
            border: 1px solid rgba(10, 92, 47, 0.2);
            border-radius: 14px;
            padding: 16px;
            margin: 0 auto 16px;
            max-width: 560px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.04);
        }

        .post-order-summary h3 {
            margin: 0 0 12px;
            font-size: 16px;
            color: #0a5c2f;
            text-align: center;
        }

        .post-order-summary .summary-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 6px 0;
            border-bottom: 1px solid rgba(10, 92, 47, 0.1);
            font-size: 14px;
        }

        .post-order-summary .summary-row:last-child {
            border-bottom: none;
        }

        .post-order-summary .summary-total {
            font-weight: bold;
            font-size: 15px;
            color: #0a5c2f;
        }

        .post-order-summary .summary-delivery {
            margin-top: 10px;
            padding-top: 10px;
            border-top: 1px solid rgba(10, 92, 47, 0.1);
            font-size: 13px;
            color: #555;
            line-height: 1.4;
        }

        .qr-panel {
            background: #ffffff;
            border: 1px solid rgba(10, 92, 47, 0.25);
            border-radius: 12px;
            padding: 14px;
            margin: 10px 0;
            text-align: center;
        }

        .qr-panel img {
            max-width: 260px;
            width: 100%;
            border-radius: 8px;
        }

        .qr-payload {
            width: 100%;
            box-sizing: border-box;
            padding: 10px;
            border: 1px solid rgba(10, 92, 47, 0.25);
            border-radius: 8px;
            font-family: monospace;
            font-size: 12px;
            word-break: break-all;
            background: #f6f6f6;
            color: #333;
        }

        .payment-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            justify-content: center;
            margin-top: 14px;
        }

        .payment-actions button {
            min-width: 140px;
        }

        .payment-countdown {
            text-align: center;
            font-size: 14px;
            margin-top: 8px;
            color: #6b6b20;
        }

        .payment-hint {
            font-size: 13px;
            text-align: center;
            margin-top: 10px;
            opacity: 0.85;
        }

        .qr-fallback {
            display: none;
            text-align: center;
        }

        .qr-fallback-qr {
            width: 170px;
            height: 170px;
            margin: 0 auto 12px;
            border-radius: 8px;
            background-color: #fff;
            background-image:
                linear-gradient(45deg, #000 25%, transparent 25%),
                linear-gradient(-45deg, #000 25%, transparent 25%),
                linear-gradient(45deg, transparent 75%, #000 75%),
                linear-gradient(-45deg, transparent 75%, #000 75%);
            background-size: 10px 10px;
            background-position: 0 0, 0 5px, 5px -5px, -5px 0;
        }

        .qr-fallback p {
            font-size: 12px;
            color: #c0392b;
            margin: 0;
            line-height: 1.4;
        }

        .post-order-actions {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
            margin-bottom: 12px;
        }

        .post-order-actions button,
        .post-order-footer button {
            padding: 10px 18px;
            border-radius: 12px;
            font-size: 15px;
            font-weight: 800;
            flex: 1 1 0;
            min-width: 120px;
            text-align: center;
        }

        .post-order-footer {
            display: flex;
            justify-content: center;
            margin: 18px auto 0;
            max-width: 560px;
        }

        .btn-accent {
            background: #f0c24b;
            color: #0b2b0b;
            border: 1px solid #d4a93b;
        }

        .btn-danger {
            background: rgba(192,57,43,0.12);
            color: #c0392b;
            border: 1px solid rgba(192,57,43,0.35);
        }

        @media (max-width: 768px) {
            .payment-box {
                /* QR acompanha a rolagem normal: itens do pedido ficam acessíveis ao rolar */
                position: relative;
                z-index: 100;
            }
        }
