.app-header {
    padding: 24px 16px;
    text-align: center;
}

.logo-text {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-text .highlight {
    color: var(--color-primary);
}

.category-nav {
    position: sticky;
    top: 0;
    z-index: var(--z-floating);
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    padding: 12px 16px;
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none;
}

.category-nav::-webkit-scrollbar {
    display: none;
}

.cat-pill {
    white-space: nowrap;
    padding: 8px 16px;
    border-radius: 20px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cat-pill.active {
    background: var(--color-primary);
    color: var(--color-surface);
    border-color: var(--color-primary);
}

.state-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 16px;
    text-align: center;
    color: var(--color-text-muted);
}

.loader {
    width: 48px;
    height: 48px;
    border: 4px solid var(--color-surface);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.category-section {
    padding-top: 24px;
    margin-bottom: 32px;
}

.category-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.category-desc {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 600px) {
    .products-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.product-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--color-border);
    background: linear-gradient(135deg, var(--color-surface), var(--color-background));
}

.product-info {
    padding: 12px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--color-text);
}

.product-desc {
    font-size: 12px;
    color: var(--color-text-muted);
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-box {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.badge-destaque {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--color-primary);
    color: var(--color-surface);
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 8px;
    text-transform: uppercase;
}

.badge-unavailable {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: var(--color-surface);
    font-size: 12px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    text-align: center;
    width: 80%;
    z-index: 10;
}

@media (min-width: 600px) {
    .modal-backdrop {
        align-items: center;
    }
    .modal-content {
        border-radius: 24px;
        transform: scale(0.95) translateY(20px);
        opacity: 0;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }
    .modal-backdrop[data-state="open"] .modal-content {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.group-counter {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-muted);
    background: var(--color-surface);
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
}

.option-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding-left: 32px;
}

.option-content .item-name {
    color: var(--color-text);
    font-weight: 500;
}

.option-content .item-price {
    color: var(--color-text-muted);
    font-weight: 600;
}

.w-100 {
    width: 100%;
}

.cart-bar {
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    background: var(--color-primary);
    border-radius: 12px;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-surface);
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(249, 115, 22, 0.4);
    z-index: 900;
    transition: transform 0.2s ease, opacity 0.3s ease;
}

@media (min-width: 600px) {
    .cart-bar {
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 32px);
        max-width: 1200px;
    }
}

.cart-bar:active {
    transform: scale(0.98);
}

@media (min-width: 600px) {
    .cart-bar:active {
        transform: translateX(-50%) scale(0.98);
    }
}

.cart-bar-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-subtotal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
}

.cart-subtotal-val {
    color: var(--color-primary);
}

.modality-note {
    display: block;
    color: var(--color-text-muted);
    font-size: 11px;
    line-height: 1.35;
    margin-top: 2px;
}

.option-label:has(input[value="retirada"]) {
    flex-wrap: wrap;
}

.option-label:has(input[value="retirada"]) .modality-note {
    order: 3;
    flex-basis: 100%;
    padding-left: 36px;
}

.summary-error-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.app-header {
    background: var(--color-text);
    height: 70px;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.header-inner {
    width: 100%;
    max-width: 1200px;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-img { height: 44px; object-fit: contain; }

.header-actions { display: flex; align-items: center; gap: 16px; }

.store-status { display: flex; align-items: center; gap: 6px; }

.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--color-success); box-shadow: 0 0 6px var(--color-success)99; }

.status-text { font-size: 0.75rem; font-weight: 700; color: var(--color-surface); text-transform: uppercase; letter-spacing: 0.5px; }

.header-cart-btn {
    background: var(--color-primary);
    color: var(--color-surface);
    border: none;
    border-radius: 20px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.header-cart-btn:hover { background: var(--color-primary-hover); }

.desktop-only { display: none; }

@media(min-width: 768px) {
    .desktop-only { display: block; }
    .store-status { margin-right: 16px; }
}

@media(min-width: 768px) { .cart-bar { display: none !important; } }


.product-card {
    display: flex;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
    position: relative;
}

.product-card:active {
    transform: scale(0.98);
}

.product-card.unavailable {
    opacity: 0.6;
    filter: grayscale(100%);
    cursor: not-allowed;
}

.product-image {
    width: 120px;
    height: 200px;
    background-color: var(--color-surface);
    flex-shrink: 0;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-image-container {
    width: 100%;
    height: 250px;
    background-color: var(--color-background);
}

.modal-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-image-container .product-img-placeholder {
    font-size: 64px;
}

.options-fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 8px;
    width: 100%;
}

.modal-options-section {
    margin-bottom: 24px;
}

.options-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.options-list li, .option-label {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.section-title.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-badge {
    background: var(--color-surface);
    color: var(--color-primary);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
}

.cart-drawer {
    background: var(--color-surface);
    width: 100%;
    max-width: 450px;
    height: 100%;
    position: absolute;
    right: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
}

.modal-backdrop[data-state="open"] .cart-drawer {
    transform: translateX(0);
}

.cart-drawer-header {
    padding: 24px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-drawer-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
}

.cart-items-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cart-drawer-footer {
    padding: 24px;
    border-top: 1px solid var(--color-border);
    background: rgba(30, 41, 59, 0.95);
}

.cart-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-item.invalid-item {
    border-color: var(--color-danger);
    background: rgba(239, 68, 68, 0.05);
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.cart-item-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
}

.cart-item-price {
    font-weight: 700;
    color: var(--color-text);
}

.cart-item-details {
    font-size: 12px;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.cart-item-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.product-image {
    height: 180px;
}

.product-card {
    background: var(--color-surface);
    box-shadow: 0 2px 16px rgba(0,0,0,0.1);
    border: none;
    overflow: hidden;
}

.product-content h3 { font-weight: 800; font-size: 1.1rem; }

.product-content .product-desc { font-size: 0.85rem; }

.modal-image-container { height: 350px; }


/* UTILITIES / EXTRACTED FROM INLINE */
.form-label { display: block; margin-bottom: 8px; font-weight: 600; }
.form-label-regular { display: block; margin-bottom: 8px; color: var(--text-main); }
.form-label-large { display: block; font-weight: 600; margin-bottom: 4px; font-size: 16px; }
.form-input-glass { width: 100%; padding: 12px; border-radius: 8px; border: 1px solid var(--glass-border); background: var(--glass-bg); color: var(--text-main); }
.flex-1 { flex: 1; }
.uppercase { text-transform: uppercase; }
.w-100 { width: 100%; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.flex-between { display: flex; justify-content: space-between; }
.mb-12 { margin-bottom: 12px; }
.items-center { align-items: center; }
.flex-gap-16 { display: flex; gap: 16px; }
.flex-gap-8 { display: flex; gap: 8px; }
.flex-center { display: flex; align-items: center; }
.gap-8 { gap: 8px; }
.flex-col { display: flex; flex-direction: column; }
.gap-12 { gap: 12px; }
.mb-24 { margin-bottom: 24px; }
.p-24 { padding: 24px; }
.text-center { text-align: center; }
.pb-80 { padding-bottom: 80px; }
.p-16 { padding: 16px; }
.px-16 { padding-left: 16px; padding-right: 16px; }
.py-8 { padding-top: 8px; padding-bottom: 8px; }
.px-20 { padding-left: 20px; padding-right: 20px; }
.font-600 { font-weight: 600; }
.mt-16 { margin-top: 16px; }
.mt-32 { margin-top: 32px; }
.text-left { text-align: left; }
.my-32 { margin-top: 32px; margin-bottom: 32px; }
.mr-16 { margin-right: 16px; }
.flex-shrink-0 { flex-shrink: 0; }
.text-20 { font-size: 20px; }
.block { display: block; }
.mb-4 { margin-bottom: 4px; }
.font-700 { font-weight: 700; }
.text-primary { color: var(--primary-color); }
.text-24 { font-size: 24px; }
.text-18 { font-size: 18px; }
.text-main { color: var(--text-main); }
.text-16 { font-size: 16px; }
.text-success { color: var(--success); }
.text-14 { font-size: 14px; }
.mt-8 { margin-top: 8px; }
.text-muted { color: var(--text-muted); }
.text-13 { font-size: 13px; }
.mt-neg8 { margin-top: -8px; }
.text-12 { font-size: 12px; }
.font-400 { font-weight: 400; }
.text-11 { font-size: 11px; }
.mt-2 { margin-top: 2px; }
.capitalize { text-transform: capitalize; }
.text-danger { color: var(--danger); }
.overflow-y-auto { overflow-y: auto; }
.flex-2 { flex: 2; }
.pos-relative { position: relative; }
.top-0 { top: 0; }
.right-0 { right: 0; }
.d-none { display: none; }
.z-index-1004 { z-index: 1004; }
.inline-block { display: inline-block; }
.glass-card { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 8px; }
.pointer { cursor: pointer; }
.flex-start { justify-content: flex-start; }
.word-break { word-break: break-all; }
.mono { font-family: monospace; }
.select-all { user-select: all; }
.bg-white { background: white; }
.radius-12 { border-radius: 12px; }
.divider { height: 1px; background: var(--glass-border); }
.btn-link-danger { background: none; border: none; color: var(--danger); cursor: pointer; text-decoration: underline; }
.link-primary { color: var(--primary-color); text-decoration: underline; cursor: pointer; }
.spinner-custom { margin: 0 auto; width: 32px; height: 32px; border: 4px solid rgba(255,255,255,0.1); border-top-color: var(--primary-color); border-radius: 50%; animation: spin 1s linear infinite; }
.mx-auto { margin-left: auto; margin-right: auto; }
.w-200 { width: 200px; }
.h-200 { height: 200px; }
.alert-warning { background: rgba(255, 170, 0, 0.1); border: 1px solid rgba(255, 170, 0, 0.3); border-radius: 8px; }
.text-warning { color: #ffaa00; }

/* ================================================================
   RESTART BURGER — PUBLIC VISUAL SYSTEM
   Functional hooks remain unchanged; this layer is presentation-only.
   ================================================================ */

html { background: var(--color-background); color-scheme: dark; }

body {
    background: var(--color-background);
    color: var(--color-text);
    padding-bottom: calc(104px + env(safe-area-inset-bottom));
    letter-spacing: -0.01em;
}

#app-container { max-width: 1440px; }

.public-footer {
    box-sizing: border-box;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
    color: var(--text-muted);
    line-height: 1.5;
    text-align: center;
    overflow-wrap: anywhere;
}

.public-footer p { margin: 0; }

.public-footer-credit { font-size: 12px; }
.public-footer-label { color: var(--text-muted); }
.public-footer-name { margin-left: 4px; font-weight: 700; }
.public-footer-url { margin-top: 2px !important; font-size: 11px; }

.geoapify-attribution {
    margin-top: 10px !important;
    color: var(--text-muted);
    font-size: 10px;
    opacity: 0.82;
}

.public-footer a {
    color: var(--text-main);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.public-footer a:hover,
.public-footer a:focus-visible { color: var(--color-primary); }

#main-content {
    max-width: 1240px;
    margin: 0 auto;
    padding: 28px 20px 56px;
}

.app-header {
    height: 76px;
    padding: 0;
    background: rgba(17, 18, 20, 0.96);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    box-shadow: var(--shadow-header);
    backdrop-filter: blur(16px);
}

.header-inner { max-width: 1240px; padding: 0 20px; }
.logo-img { width: 126px; height: 54px; object-fit: cover; object-position: center 40%; }
.header-actions { gap: 14px; }
.store-status { color: var(--color-text-muted); }
.status-text { color: var(--color-text-muted); font-size: 11px; letter-spacing: 0.08em; }
.status-dot { width: 8px; height: 8px; box-shadow: 0 0 12px rgba(76, 175, 80, 0.6); }

.header-cart-btn {
    min-height: 42px;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    background: var(--color-primary);
    box-shadow: 0 8px 18px rgba(215, 25, 32, 0.22);
}

.header-cart-btn:hover { background: var(--color-primary-hover); transform: translateY(-1px); }

.cart-badge-count {
    min-width: 22px;
    min-height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.16);
    color: #fff;
}

.category-nav {
    top: 76px;
    z-index: calc(var(--z-header) - 1);
    max-width: 1240px;
    margin: 0 auto;
    padding: 14px 20px;
    gap: 10px;
    background: rgba(17, 18, 20, 0.94);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    backdrop-filter: blur(16px);
}

.cat-pill {
    padding: 9px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    background: #1b1d20;
    color: var(--color-text-muted);
    transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.cat-pill:hover, .cat-pill:focus-visible { color: var(--color-text); border-color: #6a6e75; }
.cat-pill.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; box-shadow: 0 6px 16px rgba(215, 25, 32, 0.22); }

.category-section { padding-top: 22px; margin-bottom: 42px; }
.category-title { margin-bottom: 6px; color: var(--color-text); font-size: clamp(22px, 3vw, 30px); letter-spacing: -0.04em; }
.category-desc { max-width: 640px; margin-bottom: 20px; color: var(--color-text-muted); line-height: 1.6; }
.products-grid { gap: 18px; }

.product-card {
    display: grid;
    grid-template-columns: minmax(132px, 42%) 1fr;
    min-height: 218px;
    background: var(--color-surface);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.product-card:hover, .product-card:focus-within { border-color: rgba(215,25,32,0.7); box-shadow: 0 16px 34px rgba(0,0,0,0.3); transform: translateY(-2px); }
.product-card:active { transform: translateY(0) scale(0.99); }
.product-image { width: 100%; height: 100%; min-height: 218px; background: #181a1d; }
.product-image img { object-fit: cover; transition: transform 0.45s ease; }
.product-card:hover .product-image img { transform: scale(1.04); }
.product-info { min-width: 0; padding: 22px 20px; background: var(--color-surface); }
.product-name, .product-content h3 { color: var(--color-text); font-size: 17px; line-height: 1.25; }
.product-desc, .product-content .product-desc { color: var(--color-text-muted); line-height: 1.55; }
.product-footer { align-items: flex-end; gap: 12px; }
.price-current { color: var(--color-text); font-size: 18px; font-weight: 800; line-height: 1.2; }
.price-old { color: #ef5a60; text-decoration: line-through; font-size: 12px; line-height: 1.2; }
.price-box .price-current { font-size: 18px; }
.price-box .price-old { font-size: 12px; }
.modal-price-box .price-current { color: var(--color-text); font-size: 22px; }
.modal-price-box .price-old { color: #ef5a60; font-size: 13px; }
.cart-promotion { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.cart-promotion .price-current { color: var(--color-text); font-size: 15px; }
.cart-promotion .price-old { color: #ef5a60; }
.badge-destaque { top: 14px; left: 14px; background: var(--color-primary); border-radius: 999px; padding: 5px 10px; letter-spacing: 0.06em; }
.product-img-placeholder { background: #181a1d; color: #4e5258; }

.cart-bar {
    left: 16px;
    right: 16px;
    bottom: calc(14px + env(safe-area-inset-bottom));
    min-height: 58px;
    padding: 14px 18px;
    border-radius: var(--radius-lg);
    background: var(--color-primary);
    box-shadow: var(--shadow-cart-bar);
}

.cart-bar:hover { background: var(--color-primary-hover); }
.cart-bar-info { gap: 10px; }
.cart-badge { min-width: 26px; min-height: 26px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.18); color: #fff; border-radius: 999px; }

button, input, select, textarea { outline-color: var(--color-primary); }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .option-label:has(input:focus-visible) { outline: 3px solid rgba(215,25,32,0.34); outline-offset: 2px; }

.btn-primary, .btn-outline { min-height: 50px; border-radius: var(--radius-md); padding: 14px 18px; transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast), opacity var(--transition-fast); }
.btn-primary { background: var(--color-primary); color: #fff; box-shadow: 0 8px 18px rgba(215,25,32,0.18); }
.btn-primary:hover:not(:disabled) { background: var(--color-primary-hover); }
.btn-primary:active:not(:disabled), .btn-outline:active:not(:disabled) { transform: translateY(1px); }
.btn-outline { background: #191b1e; border: 1px solid #555960; color: var(--color-text); }
.btn-outline:hover:not(:disabled) { background: #2a2d31; border-color: #7b8088; }
.btn-primary:disabled, .btn-primary.btn-disabled, .btn-outline:disabled { background: #34373c; border-color: #34373c; color: #858991; box-shadow: none; opacity: 0.58; }

.form-input, .form-input-glass, select, textarea, input[type="text"], input[type="tel"], input[type="email"] {
    width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid #44484f; border-radius: var(--radius-md); background: #181a1d; color: var(--color-text); caret-color: var(--color-primary);
}

.form-input::placeholder, .form-input-glass::placeholder, textarea::placeholder, input::placeholder { color: #777b82; }
.form-input:focus, .form-input-glass:focus, select:focus, textarea:focus { border-color: var(--color-primary); background: #1c1f22; box-shadow: 0 0 0 3px rgba(215,25,32,0.14); }
.form-label, .form-label-large, .form-label-regular { color: var(--color-text); }
.text-muted, .text-13, .text-14, .text-12 { color: var(--color-text-muted); }
.error-msg { color: #ff7b80; }

.modal-backdrop { align-items: flex-end; background: var(--color-overlay); backdrop-filter: blur(8px); }
.modal-content, .cart-drawer { background: #202225; color: var(--color-text); border: 1px solid rgba(255,255,255,0.08); }
.modal-content { width: min(100%, 620px); max-height: min(90dvh,760px); border-radius: var(--radius-xl) var(--radius-xl) 0 0; box-shadow: var(--shadow-modal); }
.modal-header, .cart-drawer-header { border-bottom-color: rgba(255,255,255,0.08); }
.modal-title, .cart-drawer-header h2, .section-title { color: var(--color-text); }
.modal-desc, .category-desc { color: var(--color-text-muted); }
.modal-close, .cart-drawer-close { color: var(--color-text); }
.modal-footer, .cart-drawer-footer { background: #202225; border-top-color: rgba(255,255,255,0.08); }
.cart-drawer { max-width: 560px; border-radius: var(--radius-xl) 0 0 var(--radius-xl); box-shadow: var(--shadow-drawer); }
.cart-drawer-header { min-height: 72px; padding: 18px 22px; }
.cart-drawer-header h2 { font-size: 21px; }
.cart-items-container, .cart-items-content { padding: 22px; }
.cart-item, .option-label, .glass-card { background: #292c30; border-color: #41454c; color: var(--color-text); }
.option-label:has(input:checked) { background: rgba(215,25,32,0.14); border-color: var(--color-primary); }
.option-content .item-name, .option-content .item-price, .cart-item-name, .cart-item-price { color: var(--color-text); }
.cart-drawer-footer { padding: 18px 22px calc(18px + env(safe-area-inset-bottom)); }
.cart-subtotal-row { color: var(--color-text); }
.cart-subtotal-val, .text-primary { color: #ff5a5f !important; }
.qty-control { background: #181a1d; border: 1px solid #41454c; }
.qty-btn { color: #ff5a5f; }
[data-role="product-added-confirmation"] .modal-footer { gap: 10px; }
[data-role="product-added-confirmation"] .modal-footer > button { min-height: 52px; }
[data-role="summary-content"] .cart-item, [data-role="summary-footer"] { background: #202225; }
[data-role="summary-total"] { color: #ff5a5f !important; font-size: 22px; }

@media (max-width: 767px) {
    .desktop-only { display: none !important; }
    .app-header { height: 62px; }
    .header-inner { padding: 0 14px; }
    .logo-img { width: 102px; height: 42px; }
    .store-status { display: none; }
    .category-nav { top: 62px; padding: 8px 12px; gap: 8px; }
    .cat-pill { padding: 7px 12px; font-size: 12px; }
    #main-content { padding: 14px 12px 42px; }
    .category-section { padding-top: 14px; margin-bottom: 24px; }
    .category-title { font-size: 20px; margin-bottom: 4px; }
    .category-desc { margin-bottom: 12px; line-height: 1.4; }
    .products-grid { gap: 10px; }
    .product-card { grid-template-columns: 40% 60%; min-height: 154px; border-radius: 14px; }
    .product-image { min-height: 154px; }
    .product-info { padding: 13px 12px; }
    .product-name, .product-content h3 { font-size: 15px; }
    .product-desc, .product-content .product-desc { font-size: 12px; }
    .price-current { font-size: 16px; }
    .price-box .price-current { font-size: 16px; }
    .price-box .price-old { font-size: 11px; }
    .summary-error-actions { flex-direction: column; align-items: stretch; }
    .summary-error-actions > button { width: 100%; }
    .modality-note { font-size: 10px; }
    .cart-drawer { width: 100%; max-width: none; height: min(92dvh,760px); max-height: calc(100dvh - 8px); border-radius: var(--radius-xl) var(--radius-xl) 0 0; transform: translateY(100%); }
    .modal-backdrop[data-state="open"] .cart-drawer { transform: translateY(0); }
    .cart-drawer-header { min-height: 64px; padding: 16px 18px; }
    .cart-items-container, .cart-items-content { padding: 18px; }
    .cart-drawer-footer { padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); }
    .modal-content { max-height: 92dvh; border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
}

@media (min-width: 768px) {
    body { padding-bottom: 36px; }
    .public-footer { padding-bottom: 20px; }
    .category-nav { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
    .cart-bar { display: none !important; }
    .modal-backdrop { align-items: center; justify-content: flex-end; }
    .modal-backdrop:has(> .modal-content) { justify-content: center; }
    .modal-content { border-radius: var(--radius-xl); max-height: 86dvh; }
    .cart-drawer { height: 100%; max-height: 100%; }
}

@media (min-width: 1500px) {
    #main-content, .header-inner, .category-nav { max-width: 1360px; }
}

/* PUBLIC MENU REFINEMENT */
body {
    padding-bottom: calc(88px + env(safe-area-inset-bottom));
}

.header-cart-btn {
    background: #292c30;
    color: var(--color-primary);
    border: 1px solid #41454c;
    box-shadow: none;
}

.header-cart-btn:hover {
    background: #34373c;
}

.header-cart-btn .cart-badge-count {
    background: var(--color-primary);
    color: #fff;
    min-width: 20px;
    min-height: 20px;
    font-size: 11px;
}

.product-card {
    border: 1px solid #3b3f45;
    box-shadow: 0 8px 22px rgba(0,0,0,0.18);
}

.product-info {
    min-height: 154px;
    display: flex;
    flex-direction: column;
}

.product-name, .product-content h3 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-desc, .product-content .product-desc {
    -webkit-line-clamp: 2;
    margin-bottom: 8px;
}

.product-footer {
    margin-top: auto;
}

.modal-content {
    max-height: min(88dvh, 760px);
}

.modal-image-container {
    height: min(42vh, 300px);
    max-height: 42vh;
}

.modal-body {
    padding: 20px;
}

.modal-header {
    margin-bottom: 18px;
}

.modal-title {
    font-size: 21px;
    margin-bottom: 6px;
}

.modal-desc {
    margin-bottom: 10px;
    line-height: 1.45;
}

.modal-price-box {
    margin-bottom: 18px;
}

.modal-close {
    width: 32px;
    height: 32px;
    top: 12px;
    right: 12px;
    font-size: 20px;
}

[data-role="product-groups"] .options-fieldset {
    margin-bottom: 20px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}

[data-role="product-groups"] .options-fieldset:last-child {
    margin-bottom: 0;
}

[data-role="product-groups"] .section-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    border-bottom: 0;
    padding: 0;
    margin: 0 0 10px;
}

[data-role="product-groups"] .section-title > div {
    min-width: 0;
    flex: 1 1 auto;
}

[data-role="product-groups"] .section-title .group-counter {
    flex: 0 0 auto;
    margin-top: 1px;
    white-space: nowrap;
    text-align: right;
}

[data-role="product-groups"] .options-list {
    gap: 0;
    margin: 0;
    padding: 4px 10px 10px;
    background: #24272b;
    border: 1px solid #35393f;
    border-radius: 14px;
}

[data-role="product-groups"] .option-label {
    min-height: 50px;
    padding: 8px 10px;
    border: 0;
    border-top: 1px solid #35393f;
    border-radius: 0;
    background: transparent;
}

[data-role="product-groups"] .option-label:first-child {
    border-top: 0;
}

[data-role="product-groups"] .option-content {
    padding-left: 28px;
}

[data-role="product-added-confirmation"] {
    align-items: center;
    justify-content: center;
    padding: 16px;
}

[data-role="product-added-confirmation"] .modal-content {
    width: min(88%, 420px);
    max-height: none;
    border-radius: 14px;
}

[data-role="product-added-confirmation"] .modal-body {
    padding: 24px 20px 12px;
}

[data-role="product-added-confirmation"] .modal-footer {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 12px 20px 20px;
}

[data-role="product-added-confirmation"] .modal-footer > button {
    min-height: 54px;
    margin: 0;
}

[data-role="checkout-step"] .cart-drawer {
    height: auto;
    max-height: min(92dvh, 760px);
}

[data-role="checkout-step"] .cart-items-container {
    padding: 20px;
    gap: 12px;
}

[data-role="checkout-step"][data-step="cliente"] .cart-items-container,
[data-role="checkout-step"][data-step="modalidade"] .cart-items-container,
[data-role="checkout-step"][data-step="resumo"] .cart-items-container {
    flex-grow: 0;
}

[data-role="checkout-step"][data-step="cliente"] .cart-drawer,
[data-role="checkout-step"][data-step="modalidade"] .cart-drawer,
[data-role="checkout-step"][data-step="resumo"] .cart-drawer {
    min-height: 0;
}

[data-role="checkout-step"][data-step="resumo"] .cart-items-container {
    padding: 16px 20px;
}

[data-role="summary-content"] .glass-card {
    margin-bottom: 0;
    padding: 14px;
}

[data-role="summary-footer"] {
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
}

[data-role="summary-total"] {
    color: var(--color-text) !important;
    font-size: 22px;
}

[data-role="error-resumo"] {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    padding: 12px 4px 4px;
}

[data-role="error-resumo"]::before {
    content: "!";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid #ef5a60;
    border-radius: 50%;
    color: #ef5a60;
    font-weight: 800;
}

.summary-error-actions {
    width: 100%;
    justify-content: center;
}

.summary-error-actions > button {
    min-height: 54px;
}

#btn-alterar-endereco {
    order: -1;
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

#btn-resumo-retry {
    background: #191b1e;
    border: 1px solid #555960;
    color: var(--color-text);
}

@media (max-width: 767px) {
    .app-header { height: 72px; }
    .logo-img { width: 104px; height: 44px; }
    .category-nav { top: 72px; padding: 7px 16px; }
    .cat-pill { min-height: 34px; padding: 6px 12px; }
    #main-content { padding: 16px 16px 40px; }
    .product-card { grid-template-columns: 40% 60%; min-height: 150px; }
    .product-image { min-height: 150px; }
    .product-info { min-height: 150px; padding: 12px; }
    .modal-image-container { height: min(42vh, 280px); }
    [data-role="product-groups"] .options-fieldset { margin-bottom: 18px; }
    [data-role="product-groups"] .section-title { gap: 8px; margin-bottom: 9px; }
    [data-role="product-groups"] .section-title .group-counter { font-size: 11px; }
    [data-role="product-groups"] .options-list { padding: 3px 8px 8px; }
    [data-role="checkout-step"] .cart-drawer { max-height: calc(100dvh - 24px); }
    [data-role="checkout-step"][data-step="cliente"] .cart-drawer,
    [data-role="checkout-step"][data-step="modalidade"] .cart-drawer,
    [data-role="checkout-step"][data-step="resumo"] .cart-drawer { border-radius: 14px; }
    [data-role="checkout-step"][data-step="cliente"] .cart-items-container,
    [data-role="checkout-step"][data-step="modalidade"] .cart-items-container { padding: 16px; }
    [data-role="checkout-step"][data-step="modalidade"] .option-label { min-height: 54px; padding: 10px; }
    [data-role="checkout-step"][data-step="modalidade"] .cart-drawer-footer { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
}

/* HOME MOBILE CARD REFINEMENT */
@media (max-width: 767px) {
    .category-nav {
        padding: 6px 16px;
        gap: 8px;
    }

    .cat-pill {
        min-height: 32px;
        padding: 5px 11px;
        border-radius: 10px;
        box-shadow: none;
    }

    .cat-pill.active {
        box-shadow: 0 3px 10px rgba(215, 25, 32, 0.16);
    }

    .products-grid {
        gap: 8px;
    }

    .product-card {
        grid-template-columns: 40% 60%;
        min-height: 0;
        border-radius: 14px;
        box-shadow: 0 5px 16px rgba(0, 0, 0, 0.16);
    }

    .product-image {
        width: 100%;
        height: auto;
        min-height: 0;
        aspect-ratio: 1 / 1;
        align-self: stretch;
    }

    .product-info {
        min-height: 0;
        padding: 10px 11px;
    }

    .product-name,
    .product-content h3 {
        margin-bottom: 3px;
        line-height: 1.18;
    }

    .product-desc,
    .product-content .product-desc {
        margin-bottom: 5px;
        line-height: 1.3;
    }

    .product-footer {
        gap: 4px;
    }

    .price-box {
        gap: 1px;
    }

    .price-box .price-old {
        font-size: 10px;
    }

    .price-box .price-current {
        font-size: 16px;
    }

    .product-info {
        display: flex;
        flex-direction: column;
    }

    .product-name,
    .product-content h3 {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        letter-spacing: -0.01em;
    }

    .product-desc,
    .product-content .product-desc {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        margin: 0 0 6px;
        line-height: 1.25;
        font-size: 12px;
    }

    .product-footer {
        margin-top: auto;
        padding-top: 3px;
    }

    .price-box {
        align-items: baseline;
        line-height: 1.12;
    }

    .price-box .price-old {
        line-height: 1.1;
    }

    .price-box .price-current {
        line-height: 1.1;
    }
}

/* PUBLIC MENU UX REFINEMENT */
.most-ordered-section {
    margin: 0 0 24px;
    padding-top: 8px;
}

.most-ordered-title {
    margin: 0 0 12px;
    color: var(--color-text);
    font-size: 20px;
    letter-spacing: -0.03em;
}

.most-ordered-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 2px 2px 8px;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
}

.most-ordered-list::-webkit-scrollbar {
    display: none;
}

.most-ordered-card {
    flex: 0 0 188px;
    min-height: 214px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    scroll-snap-align: start;
    border: 1px solid #3b3f45;
    border-radius: 14px;
    background: #202225;
    box-shadow: 0 5px 16px rgba(0,0,0,0.16);
    cursor: pointer;
}

.most-ordered-card:focus-visible {
    outline: 3px solid rgba(215,25,32,0.34);
    outline-offset: 2px;
}

.most-ordered-image {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #181a1d;
}

.most-ordered-image img,
.most-ordered-image .product-img-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.most-ordered-info {
    min-height: 70px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 6px;
    padding: 10px 12px;
}

.most-ordered-info strong {
    display: -webkit-box;
    overflow: hidden;
    color: var(--color-text);
    font-size: 13px;
    line-height: 1.25;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.most-ordered-info .price-box {
    gap: 1px;
}

.most-ordered-info .price-current {
    color: var(--color-text);
    font-size: 15px;
}

.most-ordered-info .price-old {
    color: #ef5a60;
    font-size: 10px;
}

.address-details[data-state="closed"] {
    display: none !important;
}

[data-role="product-modal"] .modal-options-section .options-list {
    margin: 0;
    padding: 4px 10px 10px;
    background: #24272b;
    border: 1px solid #35393f;
    border-radius: 14px;
}

[data-role="product-modal"] .option-label {
    min-height: 50px;
    padding: 10px 12px;
    border: 1px solid #41454c;
    border-radius: 10px;
    background: #292c30;
}

[data-role="product-modal"] .option-label + .option-label {
    margin-top: 8px;
}

[data-role="product-modal"] .option-label .radio-custom,
[data-role="product-modal"] .option-label .checkbox-custom {
    left: 14px;
    width: 18px;
    height: 18px;
    border: 2px solid #747a83;
    background: transparent;
}

[data-role="product-modal"] .option-label input[type="radio"],
[data-role="product-modal"] .option-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

[data-role="product-modal"] .option-label .radio-custom {
    border-radius: 50%;
}

[data-role="product-modal"] .option-label .checkbox-custom {
    border-radius: 4px;
}

[data-role="product-modal"] .option-label input:checked ~ .radio-custom,
[data-role="product-modal"] .option-label input:checked ~ .checkbox-custom {
    border-color: var(--color-primary);
}

[data-role="product-modal"] .option-label input[type="checkbox"]:checked ~ .checkbox-custom {
    background: var(--color-primary);
}

[data-role="product-modal"] .option-label .checkbox-custom::after {
    content: "";
    display: none;
    width: 8px;
    height: 4px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: translate(-50%, -65%) rotate(-45deg);
}

[data-role="product-modal"] .option-label .radio-custom::after {
    width: 8px;
    height: 8px;
    background: var(--color-primary);
}

[data-role="product-modal"] .option-content {
    padding-left: 28px;
}

[data-role="product-modal"] .item-name {
    line-height: 1.2;
}

[data-role="product-modal"] .item-price {
    margin-left: 10px;
    white-space: nowrap;
    font-size: 12px;
    line-height: 1.2;
}

[data-role="product-modal"] .option-label input[type="radio"]:checked ~ .radio-custom::after {
    transform: translate(-50%, -50%);
}

[data-role="product-modal"] .option-label input[type="checkbox"]:checked ~ .checkbox-custom::after {
    display: block;
}

[data-role="product-modal"] .option-label input:focus-visible ~ .radio-custom,
[data-role="product-modal"] .option-label input:focus-visible ~ .checkbox-custom {
    outline: 2px solid rgba(215, 25, 32, 0.5);
    outline-offset: 2px;
}

[data-role="checkout-step"][data-step="endereco"] .address-details {
    gap: 0;
}

[data-role="checkout-step"][data-step="endereco"] .form-group {
    margin-bottom: 13px;
}

[data-role="checkout-step"][data-step="endereco"] .flex-gap-16 {
    gap: 12px;
    margin-bottom: 13px;
}

[data-role="checkout-step"][data-step="endereco"] .form-input {
    min-height: 44px;
}

[data-role="product-added-confirmation"] .modal-body {
    padding-bottom: 16px;
}

[data-role="product-added-confirmation"] .modal-footer {
    display: flex !important;
    gap: 16px;
    padding-top: 16px;
}

@media (max-width: 767px) {
    .category-nav {
        padding: 5px 16px;
        gap: 7px;
    }

    .cat-pill {
        min-height: 30px;
        padding: 5px 10px;
        border-radius: 8px;
        font-size: 11px;
        line-height: 1;
    }

    .cat-pill.active {
        box-shadow: 0 2px 7px rgba(215, 25, 32, 0.14);
    }

    .product-card {
        grid-template-columns: 40% 60%;
        border-radius: 12px;
    }

    .product-info {
        padding: 9px 10px;
    }

    .product-name,
    .product-content h3 {
        font-size: 14px;
    }

    .product-desc,
    .product-content .product-desc {
        font-size: 11px;
    }

    .price-box .price-current {
        font-size: 15px;
    }

    [data-role="product-modal"] .option-label {
        min-height: 46px;
        padding: 9px 10px;
    }

    [data-role="product-modal"] .option-label + .option-label {
        margin-top: 6px;
    }

    [data-role="product-modal"] .modal-options-section .options-list {
        padding: 3px 8px 8px;
    }
}

@media (max-width: 767px) {
    .most-ordered-section {
        margin-bottom: 20px;
    }

    .most-ordered-list {
        margin-right: -16px;
        padding-right: 16px;
    }

    .most-ordered-card {
        flex-basis: 164px;
        min-height: 190px;
    }

    .most-ordered-info {
        min-height: 62px;
        padding: 9px 10px;
    }
}
