
/* ============================================
   CORREÇÕES DE RESPONSIVIDADE MOBILE
   ============================================ */

/* Prevenir zoom no mobile */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Correções gerais para mobile */
@media (max-width: 768px) {
    /* Evitar overflow horizontal */
    body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }
    
    /* Container responsivo */
    .container {
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* Correções para produto.php */
    .product-container {
        padding: 15px;
        margin: 0;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .product-gallery {
        margin-bottom: 20px;
        max-width: 100%;
        overflow: hidden;
    }
    
    .product-info {
        padding: 0;
        max-width: 100%;
    }
    
    /* Correções para produtos relacionados */
    .related-products {
        padding: 30px 0;
        margin: 30px 0;
        overflow-x: hidden;
    }
    
    .related-products .container {
        padding: 0 15px;
    }
    
    .related-products .products-grid {
        gap: 12px;
        margin: 0;
        padding: 0;
    }
    
    .related-products .product-card {
        margin: 0;
        max-width: 100%;
        overflow: hidden;
    }
    
    /* Correções para seção de preços */
    .price-section {
        padding: 15px 0;
        margin: 15px 0;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .payment-section {
        padding: 15px;
        margin: 15px 0;
        max-width: 100%;
        overflow-x: hidden;
        border-radius: 12px;
        background: #f8f9fa;
        border: 1px solid #e9ecef;
    }
    
    .payment-methods {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin: 15px 0;
    }
    
    .payment-option {
        padding: 12px;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        background: white;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .payment-option:hover,
    .payment-option.active {
        border-color: #4CAF50;
        background: #f0f9ff;
    }
    
    .installments-list {
        max-height: 200px;
        overflow-y: auto;
        margin-top: 10px;
        padding: 10px;
        background: white;
        border: 1px solid #dee2e6;
        border-radius: 8px;
    }
    
    .installment-option {
        padding: 8px 0;
        border-bottom: 1px solid #f1f3f4;
        font-size: 14px;
        color: #333;
    }
    
    .installment-option:last-child {
        border-bottom: none;
    }
    
    /* Correções para botões */
    .btn-comprar {
        width: 100%;
        padding: 15px;
        font-size: 16px;
        font-weight: bold;
        margin: 15px 0;
        border-radius: 8px;
        border: none;
        background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
        color: white;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .btn-comprar:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    }
    
    /* Correções para tamanhos */
    .size-options {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin: 10px 0;
    }
    
    .size-option {
        padding: 10px 15px;
        border: 2px solid #dee2e6;
        border-radius: 6px;
        background: white;
        cursor: pointer;
        font-weight: 600;
        transition: all 0.3s ease;
        min-width: 50px;
        text-align: center;
    }
    
    .size-option:hover,
    .size-option.selected {
        border-color: #4CAF50;
        background: #f0f9ff;
        color: #4CAF50;
    }
    
    /* Correções para imagens */
    img {
        max-width: 100%;
        height: auto;
        display: block;
    }
    
    /* Correções para textos */
    .product-title {
        font-size: 24px;
        line-height: 1.3;
        margin-bottom: 15px;
        word-wrap: break-word;
    }
    
    .product-description {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 15px;
        word-wrap: break-word;
    }
    
    /* Correções para footer */
    .main-footer {
        overflow-x: hidden;
        max-width: 100%;
    }
    
    .footer-content {
        padding: 0 15px;
        max-width: 100%;
    }
    
    .footer-column {
        margin-bottom: 25px;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* Correções para newsletter */
    .newsletter-section {
        padding: 30px 0;
        overflow-x: hidden;
    }
    
    .newsletter-form {
        margin-top: 15px;
    }
    
    .newsletter-form input {
        width: 100%;
        margin-bottom: 10px;
        padding: 12px;
        border: 1px solid #dee2e6;
        border-radius: 6px;
    }
    
    .newsletter-form button {
        width: 100%;
        padding: 12px;
        background: #4CAF50;
        color: white;
        border: none;
        border-radius: 6px;
        font-weight: bold;
        cursor: pointer;
    }
}

/* Correções específicas para telas muito pequenas */
@media (max-width: 480px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .product-container {
        padding: 10px;
    }
    
    .related-products .products-grid {
        gap: 8px;
    }
    
    .related-products .product-card {
        min-height: auto;
    }
    
    .related-products .product-image {
        height: 180px;
    }
    
    .related-products .product-info {
        padding: 10px;
    }
    
    .payment-section {
        padding: 12px;
        margin: 12px 0;
    }
    
    .size-option {
        padding: 8px 12px;
        min-width: 45px;
        font-size: 14px;
    }
}

/* Correções para landscape em mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .product-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        align-items: start;
    }
    
    .product-gallery {
        margin-bottom: 0;
    }
    
    .related-products .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
}

/* Correções para evitar problemas de layout */
* {
    box-sizing: border-box;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* Prevenir quebras de layout */
.no-break {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Garantir que elementos não saiam da tela */
.constrain-width {
    max-width: 100%;
    overflow-x: hidden;
    word-wrap: break-word;
}
