/* ===== VARIÁVEIS GLOBAIS ===== */
:root {
    --primary-green: #0f2a1f;
    --primary-red: #8b0000;
    --primary-red-light: #aa0808;
    --white: #ffffff;
    --gray-light: #f9f9f9;
    --gray-medium: #f7f7f7;
    --gray-border: #e3e3e3;
    --text-dark: #222;
    --text-gray: #666;
    --shadow: rgba(0, 0, 0, 0.08);
    --shadow-strong: rgba(0, 0, 0, 0.35);
    --border-radius: 9px;
    --border-radius-lg: 14px;
    --transition: 0.25s ease;
}

/* ===== POP-UP UNIFICADO ===== */
.popup-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 42, 31, 0.97);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: clamp(8px, 2vw, 12px);
    min-height: 100dvh;
}

.popup-overlay.active {
    display: flex;
    opacity: 1;
}

/* ===== CONTAINER ===== */
.popup-container {
    background: var(--white);
    width: 100%;
    max-width: 730px;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 18px 40px var(--shadow-strong);
    position: relative;
    overflow: hidden;
    animation: popupAppear 0.28s ease;
    display: flex;
    flex-direction: column;
    max-height: min(95vh, 900px);
    max-height: min(95dvh, 900px);
}

@keyframes popupAppear {
    from {
        transform: scale(0.96) translateY(12px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Botão fechar */
.popup-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--primary-red);
    color: var(--white);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition);
}

.popup-close:hover {
    transform: scale(1.1);
}

/* ===== CONTEÚDO ===== */
.popup-content {
    display: flex;
    flex: 1;
    min-height: 0;
}

/* ===== LADO ESQUERDO ===== */
.popup-left {
    flex: 1;
    background: var(--primary-green);
    padding: clamp(16px, 3vw, 22px) clamp(16px, 3vw, 20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.popup-left::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 70%;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--primary-red), transparent);
}

.popup-image {
    width: 100%;
    max-width: min(220px, 30vw);
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: var(--border-radius-lg);
    border: 4px solid var(--primary-red);
    margin-bottom: clamp(10px, 2vh, 14px);
}

.popup-basic-info {
    text-align: center;
    color: var(--white);
}

.popup-item-name {
    font-size: clamp(18px, 4vw, 20px);
    font-weight: 800;
    margin-bottom: 6px;
    line-height: 1.25;
}

.popup-item-price {
    font-size: clamp(20px, 4vw, 22px);
    font-weight: 900;
    background: var(--white);
    color: var(--primary-red);
    padding: 6px clamp(12px, 3vw, 16px);
    border-radius: var(--border-radius);
    border: 2px solid var(--primary-red);
    display: inline-block;
}

/* ===== LADO DIREITO ===== */
.popup-right {
    flex: 1.15;
    padding: clamp(16px, 3vw, 22px);
    display: flex;
    flex-direction: column;
    min-width: 0;
    /* Previne overflow em mobile */
}

/* Sabor */
.popup-flavor-section {
    margin-bottom: clamp(10px, 2vh, 14px);
    padding-bottom: clamp(6px, 1vh, 8px);
    border-bottom: 2px solid var(--primary-green);
}

.popup-flavor-section h3 {
    font-size: clamp(16px, 3vw, 17px);
    margin-bottom: 4px;
}

.popup-flavor-description {
    font-size: clamp(13px, 2.5vw, 13.5px);
    color: #444;
    font-style: italic;
}

/* ===== OPÇÕES COM SCROLL ===== */
.popup-options {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 6px;
    max-height: 50dvh;
    position: relative;
}

.popup-options::-webkit-scrollbar {
    width: 6px;
}

.popup-options::-webkit-scrollbar-thumb {
    background: #c7c7c7;
    border-radius: 6px;
}

.popup-options::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.popup-options::before,
.popup-options::after {
    content: "";
    position: sticky;
    left: 0;
    right: 0;
    height: 12px;
    pointer-events: none;
    z-index: 2;
}

.popup-options::before {
    top: 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.95), transparent);
}

.popup-options::after {
    bottom: 0;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.95), transparent);
}

/* Grupos de opções */
.option-group,
#adicionais-doces {
    padding: clamp(10px, 2vh, 12px);
    margin-bottom: clamp(10px, 2vh, 12px);
    border-radius: var(--border-radius);
    background: var(--gray-light);
    border: 1px solid var(--gray-border);
}

.option-label {
    font-size: clamp(13px, 2.5vw, 14px);
    margin-bottom: 8px;
}

.option-checkbox {
    width: 17px;
    height: 17px;
    margin-right: 8px;
    accent-color: var(--primary-red);
}

.option-text {
    font-size: clamp(12px, 2.5vw, 14px);
    font-weight: 700;
}

.option-select {
    width: 100%;
    padding: clamp(6px, 1.5vh, 8px) clamp(8px, 2vw, 10px);
    font-size: clamp(13px, 2.5vw, 13.5px);
    border-radius: 7px;
    border: 1px solid #ddd;
}

/* Adicionais doces */
#adicionais-doces .option-label {
    display: flex;
    align-items: center;
    gap: 4px;
    border-radius: 7px;
    cursor: pointer;
    transition: background var(--transition), transform 0.15s ease;
}

#adicionais-doces .option-label:hover {
    background: #f1f1f1;
    transform: translateX(2px);
}

#adicionais-doces .option-checkbox {
    width: 12px;
    height: 12px;
}

/* Controle de quantidade */
.quantidade-controle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(12px, 3vw, 16px);
}

.quantidade-controle button {
    width: clamp(32px, 8vw, 36px);
    height: clamp(32px, 8vw, 36px);
    border-radius: 50%;
    border: none;
    background: var(--primary-red);
    color: var(--white);
    font-size: clamp(18px, 4vw, 20px);
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity var(--transition);
}

.quantidade-controle button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

#qtd-valor {
    font-size: clamp(16px, 3vw, 18px);
    font-weight: 800;
    min-width: 20px;
    text-align: center;
}

/* Observações */
.option-textarea {
    width: 100%;
    min-height: 60px;
    padding: 8px;
    font-size: clamp(13px, 2.5vw, 13.5px);
    border-radius: 7px;
    border: 1px solid #ddd;
    resize: none;
    font-family: inherit;
}

.option-textarea:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 2px rgba(139, 0, 0, 0.1);
}

.observacoes-counter {
    display: block;
    text-align: right;
    font-size: clamp(11px, 2vw, 11.5px);
    color: #666;
}

/* ===== COMBOS ===== */
.combo-bloco {
    border: 2px dashed #cfcfcf;
    border-radius: var(--border-radius-lg);
    padding: clamp(10px, 2vh, 12px);
    margin-bottom: 6px;
    background: var(--white);
    transition: var(--transition);
}

.combo-bloco.erro {
    border-color: #c62828;
    background: #fff5f5;
}

.combo-bloco.ok {
    border-color: #1e8e3e;
    background: #f1faf4;
}

.combo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    gap: 8px;
    flex-wrap: wrap;
}

.combo-header span:first-child {
    font-size: clamp(14px, 2.5vw, 15px);
    font-weight: 800;
    color: var(--text-dark);
}

.combo-contador {
    font-size: clamp(12px, 2.5vw, 13px);
    font-weight: 700;
    padding: 4px clamp(8px, 2vw, 10px);
    border-radius: 999px;
    background: #eee;
}

.combo-select {
    width: 100%;
    padding: clamp(8px, 1.5vh, 10px) clamp(10px, 2vw, 12px);
    margin-bottom: 8px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: clamp(13px, 2.5vw, 14px);
    font-weight: 600;
    background: var(--white);
}

.combo-select:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 2px rgba(139, 0, 0, 0.1);
}

/* ===== ESFIHAS ===== */
.esfiha-qtd-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: clamp(8px, 1.5vh, 10px) clamp(10px, 2vw, 12px);
    border-radius: 10px;
    background: #f8f8f8;
    margin-bottom: 8px;
    transition: background var(--transition);
    gap: clamp(6px, 1vw, 8px);
}

.esfiha-qtd-row:hover {
    background: #f0f0f0;
}

.esfiha-nome {
    font-size: clamp(13px, 2.5vw, 14px);
    font-weight: 700;
    color: #333;
}

.esfiha-controle {
    display: flex;
    align-items: center;
    gap: clamp(6px, 1.5vw, 8px);
}

.esfiha-controle button {
    width: clamp(24px, 6vw, 28px);
    height: clamp(24px, 6vw, 28px);
    border-radius: 6px;
    border: none;
    background: var(--primary-red);
    color: var(--white);
    font-size: clamp(14px, 3vw, 16px);
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.esfiha-controle button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.esfiha-qtd {
    min-width: 18px;
    text-align: center;
    font-size: clamp(13px, 2.5vw, 14px);
    font-weight: 800;
}

/* ===== RESUMO ===== */
.popup-summary {
    margin-top: auto;
    position: sticky;
    bottom: 0;
    background: var(--white);
    padding-top: clamp(8px, 1.5vh, 10px);
    box-shadow: 0 -4px 12px var(--shadow);
    z-index: 5;
}

.summary-details {
    padding: clamp(10px, 2vh, 12px);
    border-radius: var(--border-radius);
    background: #f8f8f8;
}

.summary-details p {
    font-size: clamp(12px, 2.2vw, 13px);
    margin: 5px 0;
    display: flex;
    justify-content: space-between;
}

.total-price {
    font-size: clamp(16px, 3vw, 18px) !important;
    font-weight: 800;
}

#final-price {
    font-size: clamp(17px, 3.5vw, 19px);
    color: var(--primary-red);
}

/* ===== BOTÃO ADICIONAR ===== */
.btn-add-to-cart {
    margin-top: clamp(8px, 2vh, 12px);
    width: 100%;
    padding: clamp(6px, 1.5vh, 8px) clamp(10px, 2vw, 12px);
    font-size: clamp(13px, 2.5vw, 14px);
    font-weight: 800;
    border-radius: var(--border-radius);
    background: linear-gradient(135deg, var(--primary-red), var(--primary-red-light));
    color: var(--white);
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
}

.btn-add-to-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.3);
}

.cart-price {
    font-size: clamp(14px, 2.8vw, 15px);
    padding: 4px clamp(6px, 1.5vw, 9px);
    background: var(--white);
    color: var(--primary-red);
    border-radius: 7px;
    border: 2px solid var(--primary-red);
}

/* ===== CARRINHO ===== */
.cart-popup {
    padding: clamp(20px, 4vw, 30px);
    max-height: 90vh;
    overflow-y: auto;
}

.cart-title {
    font-size: clamp(28px, 6vw, 38px);
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 15px;
    text-align: center;
}

.cart-section-title {
    font-size: clamp(20px, 4vw, 24px);
    font-weight: 700;
    margin-bottom: clamp(6px, 1.5vh, 8px);
    color: var(--primary-green);
}

.cart-grid {
    display: grid;
    grid-template-columns: 1.3fr 1px 0.9fr;
    gap: clamp(20px, 3vw, 30px);
}

/* Preview da pizza */
.pizza-normal-img {
    width: min(260px, 40vw);
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 20px;
    display: none;
    margin: 0 auto 20px;
}

.pizza-preview {
    width: min(260px, 40vw);
    aspect-ratio: 1/1;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    display: none;
    background: #e6c79c;
    margin: 0 auto 20px;
}

.pizza-half {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.pizza-half.left {
    clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
}

.pizza-half.right {
    clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
}

/* Divisor central */
.cart-grid::before {
    content: "";
    grid-column: 2;
    background: #e5e5e5;
}

/* ===== LADO ESQUERDO - ITENS ===== */
.cart-left {
    background: var(--gray-medium);
    padding: clamp(18px, 3vw, 22px);
    border-radius: 16px;
    max-height: min(420px, 50vh);
    overflow-y: auto;
    grid-column: 1;
}

.cart-left::-webkit-scrollbar {
    width: 6px;
}

.cart-left::-webkit-scrollbar-thumb {
    background: #c2c2c2;
    border-radius: 4px;
}

.cart-empty {
    text-align: center;
    color: #777;
    font-size: 15px;
    margin-top: 60px;
}

.cart-item {
    background: var(--white);
    border-radius: 12px;
    padding: clamp(10px, 2vh, 12px);
    margin-bottom: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    display: flex;
    gap: clamp(10px, 2vw, 12px);
    align-items: center;
}

.cart-item img {
    width: clamp(50px, 10vw, 64px);
    height: clamp(50px, 10vw, 64px);
    border-radius: 10px;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-info h4 {
    font-size: clamp(14px, 2.5vw, 15px);
    margin-bottom: 4px;
    color: var(--text-dark);
}

.cart-item-info p {
    font-size: clamp(12px, 2.2vw, 13px);
    color: var(--text-gray);
}

.cart-item-info span {
    font-weight: bold;
    color: var(--primary-red);
    font-size: clamp(13px, 2.3vw, 14px);
}

.remove-item {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #aaa;
    padding: 0 4px;
    transition: color var(--transition);
}

.remove-item:hover {
    color: var(--primary-red);
}

/* ===== LADO DIREITO - FRETE E TOTAIS ===== */
.cart-right {
    display: flex;
    flex-direction: column;
    gap: clamp(16px, 3vh, 22px);
    grid-column: 3;
}

.frete-box h4 {
    font-size: clamp(16px, 3vw, 18px);
    margin-bottom: clamp(8px, 1.5vh, 10px);
}

.frete-box input {
    width: 100%;
    padding: clamp(8px, 1.5vh, 10px) clamp(10px, 2vw, 12px);
    border-radius: 8px;
    border: 1px solid #ccc;
    margin-bottom: 8px;
    font-size: clamp(13px, 2.5vw, 14px);
}

.frete-box button {
    width: 100%;
    padding: clamp(8px, 1.5vh, 10px);
    border-radius: 8px;
    background: var(--primary-green);
    color: var(--white);
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: background var(--transition);
}

.frete-box button:hover {
    background: #1f4d3a;
}

.endereco-extra {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(8px, 2vw, 10px);
    margin-top: 10px;
}

.endereco-extra input {
    padding: clamp(8px, 1.5vh, 10px) clamp(10px, 2vw, 12px);
}

#freteValor {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    font-weight: 600;
}

.totais p {
    font-size: clamp(14px, 2.5vw, 15px);
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
}

.totais hr {
    margin: 12px 0;
    border: none;
    border-top: 1px solid #ddd;
}

.total-final {
    font-size: clamp(20px, 4vw, 22px);
    font-weight: 800;
    color: var(--primary-red);
}

/* ===== RETIRADA NO LOCAL ===== */
.retirada-local {
    padding: clamp(10px, 2vh, 12px);
    margin-bottom: 12px;
    border-radius: var(--border-radius);
    background: var(--gray-light);
    border: 1px solid var(--gray-border);
}

.retirada-local label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.retirada-local input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-red);
}

.retirada-local span {
    font-size: clamp(13px, 2.5vw, 14px);
    font-weight: 700;
    color: var(--text-dark);
}

/* ===== ENDEREÇO DROPDOWN ===== */
.endereco-accordion {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 10px 0;
}

.endereco-item {
    border-radius: 8px;
    border: 1px solid #ddd;
    overflow: hidden;
    background: var(--gray-light);
}

.endereco-toggle {
    width: 100%;
    padding: clamp(10px, 2vh, 12px);
    background: var(--white);
    border: none;
    font-size: clamp(13px, 2.5vw, 14px);
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.endereco-toggle::after {
    content: "▾";
    transition: transform 0.3s ease;
}

.endereco-item.active .endereco-toggle::after {
    transform: rotate(180deg);
}

.endereco-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f7f7f7;
}

.endereco-item.active .endereco-content {
    max-height: 80px;
}

.endereco-content input {
    width: 100%;
    padding: clamp(8px, 1.5vh, 10px) clamp(10px, 2vw, 12px);
    border: none;
    border-top: 1px solid #ddd;
    font-size: clamp(13px, 2.5vw, 14px);
    background: transparent;
}

/* ===== BOTÕES PRINCIPAIS ===== */
.btn-enviar-pedido {
    padding: clamp(12px, 2.5vh, 14px);
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, var(--primary-red), var(--primary-red-light));
    color: var(--white);
    font-size: clamp(15px, 3vw, 16px);
    font-weight: 700;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
}

.btn-enviar-pedido:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 25px rgba(139, 0, 0, 0.35);
}

.btn-whatsapp {
    display: inline-block;
    padding: clamp(10px, 2vh, 12px) clamp(20px, 4vw, 26px);
    border-radius: 999px;
    background: #25d366;
    color: var(--white);
    font-size: clamp(15px, 3vw, 16px);
    font-weight: 600;
    text-decoration: none;
    transition: transform var(--transition);
}

.btn-whatsapp:hover {
    transform: scale(1.05);
}

/* ===== RESPONSIVO - TABLET ===== */
@media (max-width: 1024px) {
    .cart-grid {
        grid-template-columns: 1.2fr 1px 1fr;
        gap: 20px;
    }

    .cart-left {
        max-height: 380px;
    }
}

/* ===== RESPONSIVO - NOTEBOOKS PEQUENOS (1366x768 e similares) ===== */
@media (max-width: 1366px) and (min-width: 769px) {
    .popup-container {
        max-height: 95dvh;
    }

    .popup-options {
        max-height: 45dvh;
    }

    .cart-title {
        font-size: 30px;
        margin: 70px 20px 0;
    }

    .cart-section-title {
        margin-bottom: -14px !important;
    }

    .cart-left {
        max-height: 340px;
    }

    .btn-enviar-pedido {
        margin-bottom: 150px;
    }
}

/* ===== RESPONSIVO - TABLET/MOBILE GRANDE ===== */
@media (max-width: 768px) {
    .popup-overlay {
        padding: 15px 12px 12px;
        align-items: flex-start;
    }

    .popup-content {
        flex-direction: column;
        overflow: visible;
    }

    .popup-container {
        max-height: 95dvh;
        overflow-y: auto;
        scrollbar-width: thin;
    }

    /* Scroll mobile padronizado */
    .popup-container::-webkit-scrollbar {
        width: 4px;
    }

    .popup-container::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.2);
        border-radius: 4px;
    }

    .popup-left::after {
        display: none;
    }

    .popup-left {
        padding: 20px;
    }

    .popup-image {
        max-width: 180px;
    }

    .popup-options {
        max-height: none;
        overflow: visible;
    }

    .combo-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .combo-contador {
        align-self: flex-end;
    }

    .esfiha-qtd-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .esfiha-controle {
        justify-content: space-between;
    }

    .esfiha-controle button {
        width: 36px;
        height: 36px;
    }

    /* Carrinho mobile */
    .cart-grid {
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    .cart-grid::before {
        display: none;
    }

    .cart-title {
        font-size: 24px;
        margin: 40px 0 12px;
    }

    .cart-left {
        max-height: none;
        padding: 0;
        background: transparent;
    }

    .cart-items-toggle {
        width: 100%;
        background: var(--gray-medium);
        border: 1px solid #ddd;
        border-radius: 12px;
        padding: 14px;
        font-size: 16px;
        font-weight: 700;
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
    }

    .cart-items-toggle .arrow {
        transition: transform 0.25s ease;
    }

    .cart-left.open .arrow {
        transform: rotate(180deg);
    }

    .cart-items-content {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.35s ease, opacity 0.25s ease;
        margin-top: 12px;
    }

    .cart-items-content.open {
        max-height: 280px;
        opacity: 1;
        overflow-y: auto;
    }

    .cart-items-content::-webkit-scrollbar {
        width: 5px;
    }

    .cart-items-content::-webkit-scrollbar-thumb {
        background: #bbb;
        border-radius: 4px;
    }

    .cart-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 10px;
        margin: 0;
        height: fit-content;
    }

    .cart-item img {
        width: 72px;
        height: 72px;
        margin-bottom: 6px;
    }

    .cart-item-info h4 {
        font-size: 13px;
    }

    .cart-item-info p {
        font-size: 12px;
    }

    .cart-right {
        margin-top: 8px;
    }

    .btn-enviar-pedido {
        position: sticky;
        bottom: 10px;
        z-index: 5;
        margin-top: 16px;
    }

    .btn-add-to-cart {
        position: sticky;
        bottom: 10px;
        z-index: 5;
    }
}

/* ===== RESPONSIVO - MOBILE PEQUENO ===== */
@media (max-width: 650px) {
    .popup-overlay {
        padding: 3dvh 8px 8px;
        overflow: hidden;
    }

     .popup-options {
        max-height: 45dvh;
        overflow-y: auto;
    }

    .popup-image {
        max-width: 150px;
    }

    .popup-item-name {
        font-size: 18px;
    }

    .popup-item-price {
        font-size: 18px;
    }

    .cart-items-content {
        grid-template-columns: 1fr;
    }

    .cart-item {
        flex-direction: row;
        text-align: left;
    }

    .cart-item img {
        width: 60px;
        height: 60px;
        margin-bottom: 0;
    }

    .endereco-extra {
        grid-template-columns: 1fr;
    }

    .combo-header {
        align-items: center;
    }

    .combo-contador {
        align-self: center;
    }
}

/* ===== AJUSTES POR ALTURA ===== */
@media (max-height: 750px) {
    .popup-container {
        max-height: 98dvh;
    }

    .popup-options {
        max-height: 42dvh;
    }
}

@media (max-height: 620px) {
    .popup-container {
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .popup-content {
        padding-bottom: 90px;
    }

    .popup-summary {
        position: sticky;
        bottom: 0;
    }
}

@media (min-height: 900px) {
    .popup-container {
        max-height: 85vh;
    }

    .popup-options {
        max-height: 50vh;
    }
}

/* ===== UTILITÁRIOS ===== */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.text-center {
    text-align: center;
}

.w-100 {
    width: 100%;
}