/* ============================================
   MODAL DE DETALHES DO PRODUTO
   ============================================ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.modal-content {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    z-index: 101;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    color: var(--primary);
    margin: 0;
    font-size: 1.5rem;
}

.modal-body {
    flex-grow: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Para rolagem suave em iOS */
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 1.5rem;
    align-items: start;
}

.product-image-modal {
    background: var(--muted);
    border-radius: var(--radius);
    width: 250px;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    border: 1px solid var(--border);
    overflow: hidden;
}

.modal-product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-description {
    color: var(--muted-foreground);
    line-height: 1.6;
}

.ingredients h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.ingredients p {
    color: var(--muted-foreground);
    font-size: 0.9rem;
    line-height: 1.5;
}

.product-price-modal {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
}

.add-to-cart-btn-modal {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    padding: 0.75rem 2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.add-to-cart-btn-modal:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* Responsividade */
@media (max-width: 768px) {
    .modal-body {
    flex-grow: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Para rolagem suave em iOS */
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .product-image-modal {
        margin: 0 auto;
    }
}
/* ============================================
   MODAL DE OPÇÕES DE CONTATO
   ============================================ */
.contact-modal-content {
    display: flex;
    flex-direction: column;
    max-width: 400px; /* Um pouco menor para opções de contato */
}

.contact-options {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    grid-template-columns: 1fr; /* Força a coluna única */
}

.contact-option-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    background: white;
    color: var(--primary);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.contact-option-btn:hover {
    background: var(--primary);
    color: white;
}

.contact-option-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.contact-option-btn.cancel-btn {
    border: 1px solid var(--border);
    background: var(--muted);
    color: var(--muted-foreground);
}

.contact-option-btn.cancel-btn:hover {
    background: var(--border);
    color: var(--muted-foreground);
}

.contact-modal-content .modal-footer {
    border-top: none;
    padding-top: 0;
}

/* ============================================
   IMAGE CAROUSEL — Carrossel de fotos no modal
   ============================================ */

.img-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.img-carousel-track {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: var(--radius);
}

.img-carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s ease;
}

.img-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
    padding: 0;
    color: var(--primary);
}

.img-carousel-btn:hover:not(:disabled) {
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    transform: translateY(-50%) scale(1.1);
}

.img-carousel-prev {
    left: 4px;
}

.img-carousel-next {
    right: 4px;
}

.img-carousel-btn-disabled,
.img-carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.img-carousel-indicator {
    text-align: center;
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin-top: 6px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Ajuste do container de imagem para acomodar o carrossel */
.product-image-modal {
    flex-direction: column;
    padding: 0;
    overflow: visible;
}

#productImageCarousel {
    width: 250px;
    height: 250px;
}

@media (max-width: 768px) {
    #productImageCarousel {
        width: 100%;
        height: 220px;
    }
}
