/*
Theme Name: GeneratePress Child
Theme URI: https://generatepress.com
Author: Tom Usborne
Author URI: https://tomusborne.com
Description: Child theme for GeneratePress
Template: generatepress
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: generatepress-child
*/

/* ====== PALETA DE CORES TÁ FIT - COMIDA SAUDÁVEL ====== */
:root {
    /* Cores principais da identidade */
    --bg-header: #7A9C2C;         /* verde folha (cabeçalho, destaques) */
    --bg-menu-header: #3C4A0C;    /* verde oliva escuro (menus, fundo sólido) */
    --menu-color: #F2E5C2;        /* bege claro (texto dos menus) */
    --menu-hover: #C62828;        /* vermelho tomate (hover/menu ativo) */
    --bg-footer: #2C1E1B;         /* marrom escuro (rodapé, base forte) */
    --font-color-header: #FFFFFF; /* branco (contraste principal) */
    --bs-link-color-rgb: 122,156,44;

    /* Cores estendidas para botões e destaques */
    --color-primary: #7A9C2C;     /* principal */
    --color-secondary: #3C4A0C;   /* escuro base */
    --color-accent: #C62828;      /* chamada para ação */
    --color-light: #F2E5C2;       /* fundos e textos suaves */
    --color-dark: #2C1E1B;        /* texto escuro ou fundo forte */

    /* Botões */
    --btn-primary-bg: var(--color-primary);
    --btn-primary-color: #FFFFFF;
    --btn-primary-hover-bg: #688723;

    --btn-secondary-bg: var(--color-secondary);
    --btn-secondary-color: #FFFFFF;
    --btn-secondary-hover-bg: #2E3A0B;

    --btn-accent-bg: var(--color-accent);
    --btn-accent-color: #FFFFFF;
    --btn-accent-hover-bg: #A91F1F;

    /* Fundos alternativos */
    --bg-light: #FFFDF8;          /* fundo claro para seções */
    --bg-alt: #F2E5C2;            /* fundo bege neutro */
    --bg-hover-highlight: #FDECEC; /* hover suave vermelho claro */

    /* Estados e alertas */
    --success-bg: #C6EBC5;        /* verde claro para sucesso */
    --warning-bg: #FFF4C1;        /* amarelo claro para aviso */
    --error-bg: #F9D6D5;          /* vermelho suave para erro */

    /* Bordas e separadores */
    --border-color: #E0D7BF;
}

p{
    width: 100% !important;
}

/* Estilos para otimização de imagens */
.woocommerce-product-gallery.optimized {
    opacity: 1 !important;
    transition: none !important;
}

body.scrolling .woocommerce-product-gallery__wrapper {
    transition: none !important;
    will-change: auto !important; /* Desativa will-change durante scroll para melhor performance */
}

body.scrolling .flex-control-thumbs img {
    transition: none !important;
}

/* Layout skeleton para melhorar LCP */
.woocommerce-product-gallery__wrapper::before {
    content: '';
    display: block;
    width: 100%;
    padding-top: 100%; /* Preserva a proporção */
    background-color: #f9f9f9;
}

.woocommerce-product-gallery__wrapper.loaded::before {
    display: none;
}

/* Otimização específica para imagens de produto */
.woocommerce-product-gallery__image {
    position: relative;
    transition: opacity 0.3s ease;
}

.woocommerce-product-gallery__image img {
    opacity: 1 !important;
    transition: opacity 0.2s ease-in-out;
}

.woocommerce-product-gallery.loading .woocommerce-product-gallery__image img {
    opacity: 0.7 !important; /* Efeito sutil enquanto carrega */
}

/* Otimização para mobile */
@media (max-width: 768px) {
    .woocommerce-product-gallery .flex-control-thumbs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 10px;
        margin-bottom: 10px;
        scroll-snap-type: x mandatory;
    }

    .woocommerce-product-gallery .flex-control-thumbs li {
        flex: 0 0 auto;
        scroll-snap-align: start;
    }
}

/* Melhorias nas miniaturas */
@media (min-width: 768px) {
    .woocommerce-product-gallery .flex-control-thumbs {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 10px !important;
    }
    
    .woocommerce-product-gallery .flex-control-thumbs li {
        width: 70px !important;
        height: 70px !important;
        overflow: hidden;
    }
    
    .woocommerce-product-gallery .flex-control-thumbs li img {
        height: 100%;
        width: 100%;
        object-fit: cover;
    }
}

/* Evita flash durante o carregamento */
img.attachment-woocommerce_thumbnail,
img.attachment-woocommerce_single,
img.attachment-shop_catalog {
    background-color: #f9f9f9; /* Cor de fundo enquanto carrega */
    transition: opacity 0.3s ease;
}

/* Remove loader de produtos */
.woocommerce ul.products li.product a img {
    margin: 0;
}

/* Otimização de carregamento de imagens */
body.images-preloaded .woocommerce-product-gallery::before {
    display: none !important;
    opacity: 0 !important;
}

/* Melhora o carregamento inicial */
.woocommerce-product-gallery {
    min-height: 400px;
    background-color: #fff;
}

/* ====== ESTILOS PERSONALIZADOS DO CHECKOUT ====== */

/* Layout geral do checkout */
.woocommerce-checkout {
    background-color: var(--bg-light);
    min-height: 100vh;
    padding: 40px 0;
}

.woocommerce-checkout .site-content {
    background-color: transparent;
}

/* Container principal do checkout */
.woocommerce-checkout form.checkout {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 0;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
}

/* Header do checkout */
.checkout-header {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    padding: 30px 40px;
    text-align: center;
    position: relative;
}

.checkout-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
}

.checkout-header::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 10px solid var(--color-secondary);
}

/* Layout em duas colunas */
.checkout-container {
    display: grid;
    grid-template-columns: 1fr 480px;
    gap: 0;
    min-height: 600px;
}

/* Coluna esquerda - Formulários */
.checkout-left {
    padding: 40px;
    background-color: #ffffff;
}

/* Coluna direita - Resumo do pedido */
.checkout-right {
    background-color: #f8f9fa;
    border-left: 1px solid #e9ecef;
    padding: 30px;
    position: sticky;
    top: 0;
    height: fit-content;
    min-width: 450px;
}

/* Seções do formulário */
.checkout-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e9ecef;
}

/* Oculta seções vazias ou só com título */
.checkout-section:empty,
.checkout-section:has(h3:only-child) {
    display: none;
}

.checkout-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.checkout-section h3 {
    color: var(--color-secondary);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkout-section h3::before {
    content: '';
    width: 24px;
    height: 24px;
    background-color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
    font-weight: bold;
}

.woocommerce-billing-fields h3::before {
    content: '1';
}

.woocommerce-shipping-fields h3::before {
    content: '2';
}

.woocommerce-additional-fields h3::before {
    content: '3';
}

/* Campos do formulário */
.woocommerce-checkout .form-row {
    margin-bottom: 20px;
}

.woocommerce-checkout .form-row label {
    color: var(--color-secondary);
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 8px;
    display: block;
}

.woocommerce-checkout .form-row .required {
    color: var(--color-accent);
}

.woocommerce-checkout input[type="text"],
.woocommerce-checkout input[type="email"],
.woocommerce-checkout input[type="tel"],
.woocommerce-checkout input[type="password"],
.woocommerce-checkout select,
.woocommerce-checkout textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #ffffff;
}

.woocommerce-checkout input[type="text"]:focus,
.woocommerce-checkout input[type="email"]:focus,
.woocommerce-checkout input[type="tel"]:focus,
.woocommerce-checkout input[type="password"]:focus,
.woocommerce-checkout select:focus,
.woocommerce-checkout textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(122, 156, 44, 0.1);
    outline: none;
}

/* Grid para campos em linha */
.checkout-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.checkout-row-3 {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 20px;
}

/* Resumo do pedido */
#order_review {
    background-color: transparent;
    border: none;
    padding: 0;
}

#order_review_heading {
    color: var(--color-secondary);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--color-primary);
}

/* Seção do cupom dentro do resumo */
.woocommerce-checkout .checkout-right .checkout_coupon,
.woocommerce-checkout #order_review .checkout_coupon {
    background: white;
    border: 2px dashed var(--color-primary);
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    text-align: center;
}

.woocommerce-checkout .checkout-right .checkout_coupon h3,
.woocommerce-checkout #order_review .checkout_coupon h3 {
    margin-bottom: 15px;
    font-size: 14px;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.woocommerce-checkout .checkout-right .checkout_coupon .form-row,
.woocommerce-checkout #order_review .checkout_coupon .form-row {
    justify-content: center;
    max-width: 300px;
    margin: 0 auto;
}

/* Tabela de revisão do pedido */
.shop_table {
    border: none;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.shop_table thead {
    background-color: var(--color-primary);
}

.shop_table thead th {
    color: white;
    font-weight: 600;
    padding: 15px;
    border: none;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.shop_table tbody td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.shop_table tbody tr:hover {
    background-color: #f8f9fa;
}

.shop_table .product-name {
    font-weight: 500;
}

.shop_table .product-total {
    text-align: right;
    font-weight: 600;
    color: var(--color-primary);
}

.shop_table tfoot {
    background-color: #f8f9fa;
}

.shop_table tfoot th,
.shop_table tfoot td {
    padding: 15px;
    border: none;
    font-weight: 600;
}

.shop_table .order-total th,
.shop_table .order-total td {
    background-color: var(--color-secondary);
    color: white;
    font-size: 18px;
    font-weight: bold;
}

/* Métodos de pagamento */
.wc_payment_methods {
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    width: 100%;
}

.wc_payment_method {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    width: 100%;
}

.wc_payment_method:hover {
    border-color: var(--color-primary);
}

.wc_payment_method input[type="radio"]:checked + label {
    background: linear-gradient(135deg, var(--bg-alt), var(--color-light));
    border-left: 4px solid var(--color-primary);
    color: var(--color-secondary);
}

.wc_payment_method label {
    display: block;
    padding: 0;
    cursor: pointer;
    font-weight: 500;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

.payment_box {
    padding: 18px;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    width: 100%;
    box-sizing: border-box;
}

/* Campos do cartão de crédito */
.payment_box input[type="text"],
.payment_box input[type="email"],
.payment_box input[type="tel"],
.payment_box input[type="password"],
.payment_box select {
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px 14px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 15px;
    margin-bottom: 10px;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.payment_box input:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.1);
}

/* Layout dos campos do cartão em linha */
.payment_box .form-row {
    margin-bottom: 10px;
    width: 100%;
}

.payment_box .form-row-first,
.payment_box .form-row-last {
    width: 48% !important;
    float: left;
    margin-right: 4%;
}

.payment_box .form-row-last {
    margin-right: 0 !important;
}

.payment_box .clear {
    clear: both;
}

/* Ajustes específicos para campos do cartão */
.woocommerce-checkout #payment div.form-row{
    padding: 0 !important;
}
.payment_box p {
    margin-bottom: 10px;
}

.payment_box label {
    font-weight: 500;
    color: var(--color-secondary);
    margin-bottom: 5px;
    display: block;
    font-size: 14px;
}

/* Botões */
.woocommerce-checkout .wc-proceed-to-checkout .checkout-button,
.woocommerce-checkout #place_order {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: white;
    border: none;
    padding: 18px 40px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.woocommerce-checkout .wc-proceed-to-checkout .checkout-button:hover,
.woocommerce-checkout #place_order:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(122, 156, 44, 0.3);
}

/* Cupom de desconto */
.checkout_coupon {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #dee2e6;
    border-left: 4px solid var(--color-primary);
}

.checkout_coupon h3 {
    color: var(--color-secondary);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkout_coupon h3::before {
    content: "🎫";
    font-size: 20px;
}

.checkout_coupon .form-row {
    display: flex;
    gap: 15px;
    align-items: end;
    margin-bottom: 0;
}

.checkout_coupon input[type="text"] {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.checkout_coupon input[type="text"]:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(122, 156, 44, 0.1);
}

.checkout_coupon .button {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
}

.checkout_coupon .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(122, 156, 44, 0.3);
}

/* Cupom aplicado */
.woocommerce-remove-coupon {
    color: var(--color-accent);
    text-decoration: none;
    font-size: 12px;
    margin-left: 10px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.woocommerce-remove-coupon:hover {
    opacity: 1;
}

/* Checkbox personalizado */
.woocommerce-checkout .woocommerce-form__label-for-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
}

.woocommerce-checkout .woocommerce-form__input-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid #e9ecef;
    border-radius: 3px;
    margin: 0;
}

.woocommerce-checkout .woocommerce-form__input-checkbox:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

/* Seções do checkout */

/* Responsividade */
@media (max-width: 1200px) {
    .checkout-container {
        grid-template-columns: 1fr 420px;
    }
    
    .checkout-right {
        min-width: 400px;
        padding: 25px;
    }
    
    .woocommerce-checkout .coupon-section .coupon-form {
        max-width: 280px;
    }
}

@media (max-width: 768px) {
    .checkout-container {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .checkout-left,
    .checkout-right {
        padding: 20px;
        min-width: auto;
    }
    
    .checkout-right {
        border-left: none;
        border-top: 1px solid #e9ecef;
        position: static;
    }
    
    .checkout-row,
    .checkout-row-3 {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .checkout-header {
        padding: 20px;
    }
    
    .checkout-header h1 {
        font-size: 22px;
    }
    
    /* Campos do cartão em mobile */
    .payment_box .form-row-first,
    .payment_box .form-row-last {
        width: 100% !important;
        float: none;
        margin-right: 0;
        margin-bottom: 8px;
    }
    
    .payment_box {
        padding: 15px;
    }
    
    .payment_box input[type="text"],
    .payment_box input[type="email"],
    .payment_box input[type="tel"],
    .payment_box input[type="password"],
    .payment_box select {
        padding: 10px 12px;
        font-size: 16px; /* Evita zoom no iOS */
        margin-bottom: 8px;
    }
    
    /* Cupom em mobile */
    .woocommerce-checkout .coupon-section .coupon-form {
        flex-direction: column;
        gap: 15px;
        max-width: 100%;
    }
    
    .woocommerce-checkout .coupon-section .form-row-first,
    .woocommerce-checkout .coupon-section .form-row-last {
        width: 100%;
    }
    
    .woocommerce-checkout .coupon-section .coupon-form-wrapper {
        padding: 20px;
    }
}

/* Melhorias específicas para área do cartão */
.woocommerce-checkout .payment_box {
    background-color: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-top: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Espaçamentos entre grupos de campos */
.payment_box .form-row + .form-row {
    margin-top: -5px; /* Reduz espaço entre linhas adjacentes */
}

/* Campos menores para CVV e data */
.payment_box .form-row-first input,
.payment_box .form-row-last input {
    text-align: center;
}

/* Placeholder mais elegante */
.payment_box input::placeholder {
    color: #adb5bd;
    font-style: italic;
    opacity: 0.8;
}

/* Ícones de cartão de crédito */
.payment_box .card-icons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.payment_box .card-icons img {
    height: 30px;
    width: auto;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    padding: 5px;
    background: white;
}

/* Segurança do cartão */
.payment_box .security-info {
    background-color: #f0f8f0;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 12px;
    margin-top: 15px;
    font-size: 14px;
    color: #155724;
    text-align: center;
}

.payment_box .security-info::before {
    content: "🔒";
    margin-right: 8px;
}

/* Estados de validação */
.woocommerce-checkout .woocommerce-invalid input,
.woocommerce-checkout .woocommerce-invalid select {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.1);
}

.woocommerce-checkout .woocommerce-validated input,
.woocommerce-checkout .woocommerce-validated select {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

/* Seções do formulário de cobrança */
.billing-section,
.shipping-section {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--color-primary);
}

.billing-section h4,
.shipping-section h4 {
    color: var(--color-secondary);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.billing-section h4::before,
.shipping-section h4::before {
    content: '';
    width: 20px;
    height: 20px;
    background-color: var(--color-primary);
    border-radius: 50%;
    display: block;
}

.billing-section.personal-info h4::before,
.shipping-section.personal-info h4::before {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3e%3cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px;
}

.billing-section.company-info h4::before,
.shipping-section.company-info h4::before {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3e%3cpath d='M12 7V3H2v18h20V7H12zM6 19H4v-2h2v2zm0-4H4v-2h2v2zm0-4H4V9h2v2zm0-4H4V5h2v2zm4 12H8v-2h2v2zm0-4H8v-2h2v2zm0-4H8V9h2v2zm0-4H8V5h2v2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8v10zm-2-8h-2v2h2v-2zm0 4h-2v2h2v-2z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px;
}

.billing-section.address-info h4::before,
.shipping-section.address-info h4::before {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3e%3cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px;
}

.billing-section.additional-info h4::before,
.shipping-section.additional-info h4::before {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3e%3cpath d='M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px;
}

.billing-section.address-info,
.billing-section.additional-info,
.billing-section.company-info,
.shipping-section.address-info,
.shipping-section.additional-info,
.shipping-section.company-info {
    display: none !important;
}

/* Melhorias no resumo do pedido com imagens */
.shop_table .product-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.shop_table .product-image {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.shop_table .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shop_table .product-details {
    flex: 1;
}

.shop_table .product-title {
    display: block;
    font-size: 16px;
    line-height: 1.3;
    margin-bottom: 5px;
    color: var(--color-secondary);
}

.shop_table .product-quantity {
    font-size: 14px;
    color: #666;
    display: block;
    margin-bottom: 5px;
}

.shop_table .product-meta {
    font-size: 12px;
    color: #999;
}

.shop_table .product-meta p {
    margin: 0;
}

/* Melhorias nos cupons */
.shop_table .coupon-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.shop_table .remove-coupon {
    font-size: 12px;
    color: var(--color-accent);
    text-decoration: none;
    margin-left: 10px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.shop_table .remove-coupon:hover {
    opacity: 1;
}

/* Linha do cupom na tabela */
.shop_table .cart-discount {
    background-color: #f0f8f0 !important;
    border-left: 4px solid #28a745;
}

.shop_table .cart-discount th {
    color: #155724;
    font-weight: 600;
    position: relative;
}

.shop_table .cart-discount th::before {
    content: "🎫";
    margin-right: 8px;
}

.shop_table .cart-discount td {
    color: #28a745;
    font-weight: bold;
}

/* Seção do cupom - nova estrutura */
.woocommerce-checkout .coupon-section {
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
}

.woocommerce-checkout .coupon-section .woocommerce-form-coupon-toggle .woocommerce-info {
    background: linear-gradient(135deg, #e8f5e8, #f0f8f0);
    border: 2px dashed #28a745;
    padding: 15px 20px;
    margin: 0;
    border-radius: 8px;
    text-align: center;
    color: #155724;
    font-weight: 500;
}

.woocommerce-checkout .coupon-section .showcoupon {
    color: #28a745;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dashed #28a745;
    transition: all 0.3s ease;
}

.woocommerce-checkout .coupon-section .showcoupon:hover {
    color: #155724;
    border-bottom-color: #155724;
}

.woocommerce-checkout .coupon-section .coupon-icon {
    font-size: 18px;
    margin-right: 8px;
}

/* Formulário do cupom expandido */
.woocommerce-checkout .coupon-section .checkout_coupon {
    background: white;
    border: 2px solid #28a745;
    border-radius: 8px;
    padding: 0;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.1);
}

.woocommerce-checkout .coupon-section .coupon-form-wrapper {
    padding: 25px;
    text-align: center;
}

.woocommerce-checkout .coupon-section .coupon-form-wrapper h4 {
    color: #155724;
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 600;
}

.woocommerce-checkout .coupon-section .coupon-description {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 20px;
    font-style: italic;
}

.woocommerce-checkout .coupon-section .coupon-form {
    display: flex;
    gap: 15px;
    max-width: 320px;
    margin: 0 auto;
    align-items: end;
}

.woocommerce-checkout .coupon-section .form-row-first {
    flex: 1;
    margin: 0;
}

.woocommerce-checkout .coupon-section .form-row-last {
    margin: 0;
}

.woocommerce-checkout .coupon-section input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.woocommerce-checkout .coupon-section input[type="text"]:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.woocommerce-checkout .coupon-section .coupon-button {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.woocommerce-checkout .coupon-section .coupon-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    background: linear-gradient(135deg, #20c997, #28a745);
}

.woocommerce-checkout .coupon-section .button-text {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.woocommerce-checkout .coupon-section .button-text::after {
    content: "✓";
    font-size: 14px;
}

/* Indicação de impostos incluídos */
.shop_table .includes_tax {
    display: block;
    font-size: 12px;
    color: #666;
    font-weight: normal;
    margin-top: 3px;
}

/* Mensagens de erro e sucesso */
.woocommerce-error,
.woocommerce-message {
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.woocommerce-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.woocommerce-message {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

/* Loading states */
.woocommerce-checkout.processing {
    pointer-events: none;
}

.woocommerce-checkout.processing::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Spinner de loading */
.checkout-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ====== ESTILOS ADICIONAIS PARA JAVASCRIPT ====== */

/* Loading overlay global */
.checkout-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.checkout-loading-overlay p {
    margin-top: 20px;
    font-size: 18px;
    color: var(--color-secondary);
    font-weight: 500;
}

/* Estados focados nos campos */
.form-row.focused {
    transform: scale(1.02);
    transition: transform 0.2s ease;
}

.form-row.focused input,
.form-row.focused select,
.form-row.focused textarea {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(122, 156, 44, 0.15);
}

/* Estados de loading nos campos */
.form-row.loading {
    position: relative;
    opacity: 0.7;
}

.form-row.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 15px;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Mensagens de erro de campo */
.field-error {
    display: block;
    color: var(--color-accent);
    font-size: 12px;
    margin-top: 5px;
    font-weight: 500;
}

/* Animações suaves para métodos de pagamento */
.wc_payment_method {
    transition: all 0.3s ease;
}

.wc_payment_method:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.wc_payment_method input[type="radio"]:checked + label {
    background: linear-gradient(135deg, var(--bg-alt), var(--color-light));
    border-left: 4px solid var(--color-primary);
}

/* Melhorias para mobile */
@media (max-width: 768px) {
    .progress-step {
        width: 40px;
        height: 40px;
    }
    
    .progress-step .step-number {
        font-size: 14px;
    }
    
    .progress-step .step-label {
        font-size: 9px;
        bottom: -22px;
    }
    
    .form-row.focused {
        transform: none; /* Remove escala em mobile para evitar problemas de layout */
    }
    
    .checkout-loading-overlay p {
        font-size: 16px;
        text-align: center;
        padding: 0 20px;
    }
}

/* Suporte para animações reduzidas */
@media (prefers-reduced-motion: reduce) {
    .progress-step,
    .wc_payment_method,
    .form-row.focused {
        transition: none;
    }
    
    .checkout-spinner,
    .form-row.loading::after {
        animation: none;
    }
}
