/* style.css (Versão Melhorada) */

/* 1. VARIÁVEIS GLOBAIS E ESTILOS DE BASE
----------------------------------------------------------------*/
:root {
    --primary-color: #004D80;
    --secondary-color: #004D80; /* Usado para botões e links */
    --accent-color: #FEAE00; /* Cor de destaque para seleção */
    --background-color: #f4f6f9; /* Um cinza mais suave */
    --card-bg-color: #ffffff;
    --text-color: #333;
    --text-light-color: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 10px 20px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* 2. CABEÇALHO (HEADER)
----------------------------------------------------------------*/
header {
    background-color: var(--primary-color);
    color: var(--accent-color);
    padding: 1rem 1rem;
    text-align: center;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#company-logo {
    height: 220px;
    width: auto;
    margin-bottom: 0.5px;
}

.header-text {
    text-align: center;
}

.header-text h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 40px;;
}

.header-text p {
    opacity: 0.9;
    margin: 0;
    margin-bottom: 40px;
}

/* NOVO: Estilos do Countdown Banner */
#countdown-banner {
    background-color: #003a66;
    color: white;
    text-align: center;
    padding: 1rem;
    box-shadow: inset 0 4px 8px rgba(0,0,0,0.2);
}

#countdown-banner p {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 500;
}

#countdown-timer {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.time-block {
    display: flex;
    flex-direction: column;
}

.time-block span:first-child {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.time-block span:last-child {
    font-size: 0.8rem;
    text-transform: uppercase;
    opacity: 0.8;
}

/* 3. LAYOUT PRINCIPAL (MAIN)
----------------------------------------------------------------*/
main {
    display: flex;
    flex-wrap: wrap;
    padding: 2rem 1rem;
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

#products-section {
    flex: 3;
    min-width: 300px; /* Garante que a seção não fique muito espremida */
}

/* 3.5 NOVO: BARRA DE BUSCA
----------------------------------------------------------------*/
#search-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 1rem 0 2rem;
    padding: 0 1rem;
}

#search-input {
    width: 80%;
    max-width: 600px;
    margin: auto;
    padding: 1rem 1rem 1rem 3rem; /* Espaço à esquerda para o ícone */
    font-size: 1rem;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' fill='%23aaa'%3E%3Cpath d='M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 1rem center;
    box-shadow: var(--shadow);
    background-size: 1.2rem;
    transition: all 0.3s ease;
}

#search-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.no-results-message {
    font-size: 1.2rem;
    color: #777;
    text-align: center;
    padding: 3rem;
    width: 100%;
}

/* NOVO: Estilos da Seção de Combos */
#combo-section {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.combo-card {
    background-color: var(--card-bg-color);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    text-align: center;
    border: 2px solid transparent;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.combo-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-color);
}

.combo-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.combo-card p {
    color: #666;
    margin-bottom: 1rem;
    min-height: 48px; /* Garante alinhamento */
}

.combo-btn, .combo-card .combo-btn { /* Unificando estilo */
    background-color: var(--primary-color);
    color: var(--text-light-color);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
}

.combo-btn:hover, .combo-card .combo-btn:hover {
    background-color: #003a66;
}

/* 4. CARDS DE PRODUTO
----------------------------------------------------------------*/
.category-container {
    margin-bottom: 3rem;
}

.category-title {
    font-size: 1.75rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    text-transform: capitalize;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background-color: var(--card-bg-color);
    border-radius: 14px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.product-card.selected-in-modal {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-color), var(--shadow-hover);
}


.product-card img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
}

.product-info {
    padding: 1rem 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.product-info p {
    font-size: 0.95rem;
    color: #666;
    flex-grow: 1;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0.5rem 0 1rem 0;
}

.product-price .original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 1rem;
    margin-left: 0.5rem;
}

.add-to-cart-btn {
    background-color: var(--secondary-color);
    color: var(--text-light-color);
    border: none;
    padding: 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.3s ease;
    width: 100%;
}

.add-to-cart-btn:hover:not(:disabled) {
    background-color: #003a66; /* Um tom mais escuro do primário */
}

.add-to-cart-btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
    color: #7f8c8d;
}

/* Adicione ou atualize estas classes no seu arquivo style.css */

.product-price .item-price-combo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.3;
}

.item-price-combo .price-old {
    font-size: 0.9rem;
    color: #999;
    text-decoration: line-through;
}

.item-price-combo .price-new {
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 700;
}

/* Estilos para a área de exibição das seleções no modal de combo */
#combo-selections-display {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    text-align: left;
    max-height: 150px; /* Altura máxima antes de rolar */
    overflow-y: auto;
}

.combo-selection-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background-color: #f9f9f9;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.remove-combo-item-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    cursor: pointer;
    font-weight: bold;
    line-height: 22px;
    text-align: center;
}

/* 5. SELETORES DE TAMANHO E COR
----------------------------------------------------------------*/
.size-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem 0;
}

.size-selector button {
    flex-grow: 1;
    padding: 0.6rem;
    border: 1px solid var(--border-color);
    background-color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.size-selector button:hover {
    border-color: var(--accent-color);
}

.size-selector button.selected {
    background-color: var(--accent-color);
    color: var(--primary-color);
    border-color: var(--accent-color);
}

.color-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.color-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    border: 2px solid #ccc;
    transition: border 0.2s, box-shadow 0.2s;
}
.color-btn.selected {
    border: 2px solid var(--accent-color);
    box-shadow: 0 0 0 2px var(--accent-color);
}

/* BOTÕES DE AÇÃO */
#open-whatsapp-btn, #download-pdf-btn {
    margin-top: 1rem;
    color: #fff;
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s, box-shadow 0.2s;
    display: block;
    width: 100%;
}
#open-whatsapp-btn { background: #25d366; box-shadow: 0 2px 8px rgba(37,211,102,0.08); }
#open-whatsapp-btn:hover { background: #1ebe57; box-shadow: 0 4px 16px rgba(37,211,102,0.15); }
#download-pdf-btn { background: #004D80; box-shadow: 0 2px 8px rgba(0,77,128,0.08); }
#download-pdf-btn:hover { background: #003a66; box-shadow: 0 4px 16px rgba(0,77,128,0.15); }

/* FILTROS E MEDIDAS */
#filter-container {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    margin-top: -1rem;
    flex-wrap: wrap;
}
.filter-btn {
    background: var(--card-bg-color);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 30px;
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border 0.2s;
}
.filter-btn.active, .filter-btn:hover {
    background: var(--primary-color);
    color: #fff;
}
.medidas-btn {
    padding: 0.5rem 1.2rem;
    margin-left: 0.2rem;
    border-radius: 8px;
    border: 1.5px solid var(--accent-color);
    background: #fffbe6;
    color: var(--primary-color);
    font-size: 0.98rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border 0.2s, color 0.2s;
    box-shadow: 0 2px 8px rgba(254,174,0,0.07);
    display: inline-block;
}
.medidas-btn:hover, .medidas-btn:focus {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* 6. CARRINHO DE COMPRAS
----------------------------------------------------------------*/
#cart-section {
    flex: 1;
    min-width: 320px;
    background-color: var(--card-bg-color);
    padding: 1.5rem;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    align-self: flex-start;
    position: sticky;
    top: 20px;
    /* Linhas adicionadas/modificadas abaixo */
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 40px);
}
#cart-section h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    flex-shrink: 0;
}
#cart-section h2 svg { width: 28px; height: 28px; fill: var(--primary-color); }
#cart-items { max-height: 400px; overflow-y: auto; min-height: 50px; flex-grow: 1; }
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}
.cart-item-info { flex-grow: 1; margin-right: 1rem; }
.cart-item-info span { display: block; }
.cart-item-info .item-price { font-size: 0.9rem; color: #888; }
.cart-item-controls { display: flex; align-items: center; gap: 0.75rem; }
.quantity-btn {
    background: #f0f0f0;
    border: 1px solid #ddd;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    line-height: 26px;
    text-align: center;
}
#cart-summary {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}
#cart-summary p {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
#checkout-button {
    width: 100%;
    padding: 1rem;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
#checkout-button:hover:not(:disabled) { background-color: #0e5e2f; }

/* 7. MODAIS
----------------------------------------------------------------*/
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    overflow-y: auto; /* Permite rolagem do modal inteiro se necessário */
}
.modal-content {
    background-color: #fefefe;
    margin: 5% auto; /* Reduz margem para melhor visualização */
    padding: 1.5rem 1rem;
    border-radius: 12px;
    width: 95%;
    max-width: 600px; /* Aumenta um pouco para combos */
    position: relative;
    text-align: center;
    animation: fadeIn 0.3s;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    display: flex; /* ATUALIZADO */
    flex-direction: column; /* ATUALIZADO */
    max-height: 95vh;
}
.close-button {
    color: #aaa;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
#combo-modal .modal-content {
    max-height: 90vh;
}

#combo-modal-grid {
    gap: 1rem; /* Reduz o espaçamento entre os cards */
}

#combo-selections-display {
    max-height: 120px; /* Define uma altura máxima para a lista de itens selecionados */
}

/* ATUALIZADO: Habilita scroll na grid de produtos dentro do modal */
#poster-selection-grid, #combo-modal-grid {
    overflow-y: auto;
    padding-right: 1rem; /* Espaço para a barra de rolagem */
    margin-top: 1rem;
    flex-grow: 1; /* Faz a grid ocupar o espaço disponível */
}
.modal-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#combo-status {
    font-weight: 600;
    color: var(--primary-color);
}
#add-combo-to-cart-btn {
    background-color: var(--secondary-color);
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}
#add-combo-to-cart-btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

/* MODAL DE CONFIRMAÇÃO */
#confirmation-modal .modal-content h2 { font-size: 1.8rem; color: #27ae60; margin-bottom: 1rem; }
#confirmation-modal .modal-content p { font-size: 1rem; line-height: 1.6; margin-bottom: 0.75rem; }
#confirmation-modal .modal-content .instruction {
    font-size: 1.1rem;
    background-color: #fffbe6;
    border: 1px solid #ffe58f;
    padding: 0.75rem;
    border-radius: 8px;
    margin-top: 1rem;
    margin-bottom: 1rem;
}
.success-icon { width: 80px; height: 80px; margin: 0 auto 1.5rem auto; }
.success-icon svg { width: 100%; display: block; }
.success-icon circle { stroke-width: 4; stroke: #27ae60; stroke-dasharray: 166; stroke-dashoffset: 166; animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards; }
.success-icon path { stroke-width: 5; stroke-linecap: round; stroke: #27ae60; stroke-dasharray: 48; stroke-dashoffset: 48; animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards; }
@keyframes stroke { 100% { stroke-dashoffset: 0; } }

/* FORMULÁRIOS E PAGAMENTO */
#checkout-form { display: flex; flex-direction: column; text-align: left; gap: 1rem; }
#checkout-form input { padding: 0.8rem; border: 1px solid #ccc; border-radius: 8px; font-size: 1rem; }
#checkout-form button { padding: 1rem; background-color: var(--primary-color); color: white; border: none; border-radius: 8px; cursor: pointer; font-size: 1rem; font-weight: 600; }
#payment-details { display: flex; flex-direction: column; align-items: center; gap: 1rem; margin: 1.5rem 0; }
#copy-pix-key-btn {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
}
#copy-pix-key-btn:hover { background: #2980b9; }
.copy-feedback { opacity: 0; transition: opacity 0.3s ease; color: var(--accent-color); }
#qr-code { max-width: 250px; height: auto; margin: 1rem auto; }
#payment-link { display: inline-block; margin-top: 1rem; font-weight: bold; color: var(--secondary-color);text-decoration: underline; }
.small-text { font-size: 0.8rem; color: #777; margin-top: 1rem; }
.payment-total { font-size: 1.5rem; font-weight: 700; color: var(--primary-color); margin-bottom: 1rem; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.close-cart-button { display: none; /* Escondido por padrão */ }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.5rem; }
.form-group input { width: 100%; padding: 0.8rem; border: 1px solid var(--border-color); border-radius: 5px; }

/* 8. RESPONSIVIDADE (MOBILE)
----------------------------------------------------------------*/
@media (max-width: 992px) {
    #cart-section { position: static; }
}
@media (max-width: 768px) {
    main { flex-direction: column; }
    #products-section { padding-right: 0; }
    #cart-section {
        position: fixed; bottom: 20px; right: 20px; width: 60px; height: 60px; padding: 0;
        border-radius: 50%; display: flex; align-items: center; justify-content: center;
        cursor: pointer; z-index: 1000; transition: all 0.3s ease; overflow: hidden;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2); background-color: var(--primary-color);
        margin: 0; flex: initial; min-width: initial; align-self: initial; top: initial;
    }
    #cart-section > h2 { display: none; }
    #cart-section h2, #cart-items, #checkout-button, #cart-summary p { display: none; }
    #cart-section #cart-summary { margin: 0; padding: 0; border: none; }
    #cart-section::before {
        content: ''; display: block; width: 30px; height: 30px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 576 512' fill='white'%3E%3Cpath d='M0 24C0 10.7 10.7 0 24 0H69.5c22 0 41.5 12.8 50.6 32h411c26.3 0 45.5 25 38.6 50.4l-41 152.3c-8.5 31.4-37 53.3-69.5 53.3H170.7l5.4 28.5c2.2 11.3 12.1 19.5 23.6 19.5H488c13.3 0 24 10.7 24 24s-10.7 24-24 24H199.7c-34.6 0-64.3-24.6-70.7-58.5L77.4 54.5c-.7-3.8-4-6.5-7.9-6.5H24C10.7 48 0 37.3 0 24zM128 464a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm336-48a48 48 0 1 1 0 96 48 48 0 1 1 0-96z'/%3E%3C/svg%3E");
        background-size: contain; background-repeat: no-repeat; background-position: center;
    }
    #cart-section::after {
        content: attr(data-count); position: absolute; top: -5px; right: -5px;
        background-color: #e74c3c; color: white; border-radius: 50%; width: 25px; height: 25px;
        display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: bold;
    }
    #cart-section.cart-open::before { display: none; }
    #cart-section.cart-open {
        width: 100%; height: 85vh; bottom: 0; right: 0; border-radius: 16px 16px 0 0;
        padding: 1.5rem; background-color: var(--card-bg-color); display: block;
    }
    #cart-section.cart-open h2 { display: flex; color: var(--text-color); position: relative; padding-right: 30px; }
    #cart-section.cart-open h2 svg { fill: var(--primary-color); width: 28px; height: 28px; }
    #cart-section.cart-open #cart-items { display: block; max-height: calc(85vh - 200px); overflow-y: auto; -webkit-overflow-scrolling: touch; }
    #cart-section.cart-open #cart-summary, #cart-section.cart-open #cart-summary p, #cart-section.cart-open #checkout-button { display: block; }
    #cart-section.cart-open #cart-summary { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border-color); }
    #cart-section.cart-open #cart-summary p {display:flex;}

    .close-cart-button { display: none; }
    #cart-section.cart-open .close-cart-button {
        display: block; position: absolute; top: 15px; right: 15px; background: transparent;
        border: none; font-size: 24px; width: 30px; height: 30px; line-height: 30px;
        text-align: center; cursor: pointer; z-index: 1001; color: var(--text-color);
    }
    #cart-section.cart-open::after { display: none; }

    /* --- AJUSTE: Otimiza o padding e altura dos modais em telas pequenas --- */
    .modal-content {
        padding: 1.5rem 1rem;
        width: 95%;
        max-height: 95vh;
    }

    /* --- AJUSTE 1 & 2: Melhora a visibilidade do modal de combos e itens selecionados --- */
    #combo-modal .modal-content {
        max-height: 90vh;
    }
    #combo-modal-grid {
        gap: 1rem; /* Reduz o espaçamento entre os cards */
    }
    #combo-selections-display {
        max-height: 120px; /* Define uma altura máxima para a lista de itens selecionados */
    }

    /* --- AJUSTE 4: Redimensiona elementos no modal de pagamento --- */
    #payment-modal #qr-code {
        max-width: 180px;
        height: auto;
    }
    #payment-modal button {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }


    #cart-section.cart-open {
        /* Modificado de 'display: block' para 'display: flex' */
        display: flex;
        flex-direction: column;
        width: 100%;
        height: 85vh;
        bottom: 0;
        right: 0;
        border-radius: 16px 16px 0 0;
        padding: 1.5rem;
        background-color: var(--card-bg-color);
    }

    #cart-section.cart-open #cart-items {
        display: block;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        flex-grow: 1; /* Faz a lista de itens ocupar o espaço disponível */
        min-height: 50px; /* Garante uma altura mínima */
        max-height: none; /* Remove a altura máxima fixa que causava o problema */
    }

    #cart-section.cart-open #cart-summary {
        display: block;
        margin-top: auto; /* Empurra o sumário para a base do contêiner flex */
        padding-top: 1rem;
        border-top: 1px solid var(--border-color);
        flex-shrink: 0; /* Impede que o sumário encolha */
    }


    /* --- AJUSTE 2: Aumenta a altura da seção de itens selecionados no combo --- */
    #combo-selections-display {
        max-height: 280px; /* Aumentado de 120px para 180px para dar mais visibilidade */
    }
}

/* 9. VISUALIZADOR DE PRODUTO
----------------------------------------------------------------*/
.product-viewer {
    background-color: rgba(0,0,0,0.85);
    align-items: center;
    justify-content: center;
}
.modal-content-image {
    margin: auto; margin-top: 3%; display: block;
    max-width: 80%; max-height: 85vh; animation: zoomIn 0.3s ease-out;
}
.viewer-close-button {
    position: absolute; top: 20px; right: 35px; color: #fff;
    font-size: 45px; font-weight: bold; text-shadow: 0 1px 5px rgba(0,0,0,0.7);
}
.viewer-close-button:hover, .viewer-close-button:focus { color: #ccc; text-decoration: none; cursor: pointer; }
@keyframes zoomIn { from { transform: scale(0.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }