/*
Theme Name: Audiofix Transformadores
Theme URI: https://audiofix.com.br
Author: Desenvolvedor WordPress
Author URI: https://audiofix.com.br
Description: Tema personalizado para a Audiofix Transformadores, especialista em transformadores de baixa tensão há mais de 30 anos.
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: audiofix
Tags: custom-logo, custom-menu, featured-images, threaded-comments, translation-ready

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned.
*/

/* Estilos personalizados */
:root {
    --audiofix-red: #e61c2c;
    --audiofix-footer: #082130;
    --audiofix-text: #041f30;
    --audiofix-light: #f8fafc;
    --header-height: 80px;
}

/* Reset e base */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header e navegação */
header {
    background: white;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    /*height: var(--header-height);*/
}

header nav {
    height: 100%;
}

/* Menu principal */
.primary-menu {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.primary-menu li {
    margin: 0;
    padding: 0;
}

/* Estilos para o menu dinâmico do header */
.nav-link {
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #ff0040;
}

/* Estilos para o botão destacado */
.header-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

/* Menu mobile */
.mobile-menu {
    position: relative;
    z-index: 999;
    width: 100%;
}

.mobile-menu.open {
    display: block !important;
}

.mobile-menu:not(.open) {
    display: none !important;
}

/* Botão mobile menu */
.mobile-menu-btn {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative;
    z-index: 1000;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
}

@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none !important;
    }
}

/* Corrigir problema do ">" no mobile */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.sr-only:focus {
    position: static !important;
    width: auto !important;
    height: auto !important;
    padding: 0.5rem !important;
    margin: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
}

.header-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Cores específicas para o botão */
.header-button.accent {
    background-color: #ff0040;
    color: white;
}

.header-button.accent:hover {
    background-color: #cc0033;
}

.header-button.primary {
    background-color: #182D45;
    color: white;
}

.header-button.primary:hover {
    background-color: #0f1a2b;
}

.header-button.secondary {
    background-color: #356091;
    color: white;
}

.header-button.secondary:hover {
    background-color: #2a4d73;
}

/* Menu mobile */
.mobile-menu .nav-link {
    color: #374151;
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.mobile-menu .nav-link:hover {
    background-color: #f3f4f6;
    color: #ff0040;
}

/* Botões CTA e de ação */
.bg-audiofix-red,
.bg-red-600,
a.bg-red-600,
button.bg-red-600 {
    background-color: var(--audiofix-red) !important;
    color: white !important;
}

.bg-audiofix-red:hover,
.bg-red-600:hover,
a.bg-red-600:hover,
button.bg-red-600:hover {
    background-color: #cc1827 !important;
}

/* Botão CTA do header */
header .bg-audiofix-red {
    display: inline-flex !important;
    align-items: center;
    background-color: var(--audiofix-red) !important;
    color: white !important;
}

/* Botões de ação nos produtos */
.woocommerce a.button,
.woocommerce button.button {
    background-color: var(--audiofix-red) !important;
    color: white !important;
}

/* Estilos específicos para o checkout */
.woocommerce-checkout .woocommerce-input-wrapper {
    position: relative;
}

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

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

.woocommerce-checkout label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
}

.woocommerce-checkout .form-row {
    margin-bottom: 24px;
}

.woocommerce-checkout .woocommerce-form-row {
    margin-bottom: 24px;
}

/* Estilos para campos obrigatórios */
.woocommerce-checkout .required label::after {
    content: " *";
    color: var(--audiofix-red);
    font-weight: bold;
}

/* Estilos para métodos de pagamento */
.woocommerce-checkout #payment .payment_methods {
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-checkout #payment .payment_method {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 16px;
    transition: all 0.3s ease;
}

.woocommerce-checkout #payment .payment_method:hover {
    border-color: var(--audiofix-red);
    background: #fef2f2;
}

.woocommerce-checkout #payment .payment_method input[type="radio"] {
    margin-right: 12px;
    accent-color: var(--audiofix-red);
}

.woocommerce-checkout #payment .payment_method label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 0;
    font-weight: 500;
}

.woocommerce-checkout #payment .payment_box {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-top: 12px;
}

/* Validação de campos */
.woocommerce-checkout .woocommerce-invalid input {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.woocommerce-checkout .woocommerce-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Layout específico para checkout quando usando templates do WooCommerce */
.woocommerce-checkout .woocommerce {
    background: #f9fafb !important;
    padding: 2rem 0 !important;
    min-height: 100vh;
}

.woocommerce-checkout .woocommerce .checkout {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 1rem !important;
}

.woocommerce-checkout .col2-set {
    display: grid !important;
    grid-template-columns: 2fr 1fr !important;
    gap: 2rem !important;
    margin-bottom: 0 !important;
    max-width: none !important;
    width: 100% !important;
}

.woocommerce-checkout .col-1,
.woocommerce-checkout .col-2 {
    width: 100% !important;
    float: none !important;
}

.woocommerce-checkout .col-1 {
    background: white !important;
    padding: 2rem !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid #e5e7eb !important;
}

.woocommerce-checkout #order_review_heading {
    background: white !important;
    padding: 1.5rem 2rem !important;
    border-radius: 12px 12px 0 0 !important;
    margin: 0 !important;
    border: 1px solid #e5e7eb !important;
    border-bottom: none !important;
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
}

.woocommerce-checkout #order_review {
    background: white !important;
    padding: 0 2rem 2rem 2rem !important;
    border-radius: 0 0 12px 12px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid #e5e7eb !important;
    border-top: none !important;
    float: none !important;
    width: 100% !important;
}

.woocommerce-checkout .woocommerce-checkout-review-order-table {
    width: 100% !important;
    margin-bottom: 1.5rem !important;
}

.woocommerce-checkout .woocommerce-checkout-review-order-table th,
.woocommerce-checkout .woocommerce-checkout-review-order-table td {
    padding: 0.75rem 0 !important;
    border-bottom: 1px solid #f3f4f6 !important;
}

.woocommerce-checkout .woocommerce-checkout-review-order-table .order-total {
    border-top: 2px solid #e5e7eb !important;
    font-weight: 600 !important;
}

.woocommerce-checkout .woocommerce-checkout-review-order-table .order-total .amount {
    color: var(--audiofix-red) !important;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
}

/* Botão de finalizar pedido */
.woocommerce-checkout #place_order {
    width: 100% !important;
    background: var(--audiofix-red) !important;
    color: white !important;
    padding: 1rem 1.5rem !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    margin-top: 1rem !important;
}

.woocommerce-checkout #place_order:hover {
    background: #cc1827 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(226, 28, 44, 0.3);
}

/* Corrigir largura da página */
.woocommerce-checkout .woocommerce-checkout {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 1rem !important;
}

/* Remover espaçamento extra */
.woocommerce-checkout .woocommerce-billing-fields,
.woocommerce-checkout .woocommerce-shipping-fields {
    margin-bottom: 2rem !important;
}

/* Sidebar fixa */
.woocommerce-checkout .col-2 {
    position: sticky !important;
    top: 100px !important;
    height: fit-content !important;
}

/* Corrigir overflow da página */
.woocommerce-checkout {
    overflow-x: hidden !important;
}

.woocommerce-checkout .woocommerce {
    max-width: 100vw !important;
    overflow-x: hidden !important;
}

.woocommerce-checkout .checkout {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 1rem !important;
    box-sizing: border-box !important;
}

/* Garantir que os campos não extrapolem */
.woocommerce-checkout .form-row {
    box-sizing: border-box !important;
}

.woocommerce-checkout input,
.woocommerce-checkout select,
.woocommerce-checkout textarea {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Corrigir o container principal */
.woocommerce-checkout .woocommerce-checkout {
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 1rem !important;
    box-sizing: border-box !important;
}

/* Estilo para o espaço em branco do rodapé */
.woocommerce-checkout .woocommerce::after {
    content: '';
    display: block;
    height: 2rem;
    background: #f9fafb;
}

/* Hero section personalizada */
.checkout-hero-section {
    width: 100% !important;
    max-width: 100vw !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* Ajustar body para checkout */
body.woocommerce-checkout {
    background-color: #f9fafb !important;
    overflow-x: hidden !important;
}

/* Responsividade */
@media (max-width: 1024px) {
    .woocommerce-checkout .col2-set {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .woocommerce-checkout .col-1,
    .woocommerce-checkout #order_review_heading,
    .woocommerce-checkout #order_review {
        padding: 1.5rem !important;
    }
    
    .woocommerce-checkout .col-2 {
        position: static !important;
    }
}

/* Mobile menu */
.mobile-menu {
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.mobile-menu.open {
    display: block !important;
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-open .mobile-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
}

/* Mobile menu items styling */
.mobile-menu a {
    display: block;
    padding: 12px 16px;
    color: #374151;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.mobile-menu a:hover {
    background-color: #f3f4f6;
    color: #e61c2c;
}

/* Mobile menu button animation */
[data-mobile-menu-toggle] {
    position: relative;
    z-index: 51;
}

[data-mobile-menu-toggle] .fas {
    transition: transform 0.3s ease;
}

[data-mobile-menu-toggle][aria-expanded="true"] .fas {
    transform: rotate(90deg);
}

/* Ensure mobile menu appears above other content */
.mobile-menu {
    position: relative;
    z-index: 50;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-top: 12px;
}

/* Responsive adjustments */
@media (max-width: 1023px) {
    .mobile-menu {
        display: none;
    }
    
    .mobile-menu.open {
        display: block !important;
    }
}

@media (min-width: 1024px) {
    .mobile-menu {
        display: none !important;
    }
}

/* Correção do espaço em branco */
.hero-bg,
.woocommerce-cart .hero-section,
.page-header {
    padding-top: var(--header-height);
}

/* Conteúdo principal */
main {
    margin-top: var(--header-height);
}

/* Animações */
@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    0% { transform: translateY(100px); }
    100% { transform: translateY(0); }
}

@keyframes parallax {
    0% { transform: translateY(50px); }
    100% { transform: translateY(0); }
}

/* Classes de Animação */
.animate-fade-in {
    animation: fadeIn 0.6s ease-in-out;
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out;
}

.animate-parallax {
    animation: parallax 1s ease-out;
}

/* Ajustes WordPress */
.wp-block-image img {
    max-width: 100%;
    height: auto;
}

.alignfull {
    margin: 32px calc(50% - 50vw);
    max-width: 100vw;
    width: 100vw;
}

.alignwide {
    margin: 32px calc(25% - 25vw);
    max-width: 100vw;
    width: 100vw;
}

/* Importando estilos do tema original */
.hero-bg {
    background: linear-gradient(135deg, #041f30 0%, #082130 100%);
    height: 120%;
    width: 100%;
}

/* Lazy loading for images */
img[data-src] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[data-src].loaded {
    opacity: 1;
}

/* Smooth transitions */
* {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #e61c2c;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #c41424;
}

/* WhatsApp Button Pulse Animation */
.pulse {
    animation: pulse-whatsapp 2s infinite;
}

@keyframes pulse-whatsapp {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

/* Menu WordPress */
.menu-item-has-children {
    position: relative;
}

.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    z-index: 50;
}

.menu-item-has-children:hover > .sub-menu {
    display: block;
}

/* Formulários */
.nf-form-content {
    max-width: 100% !important;
    padding: 0 !important;
}

.nf-field-label label {
    font-weight: 500 !important;
    margin: 0 0 8px !important;
}

.nf-field-element input,
.nf-field-element textarea {
    padding: 12px !important;
    border-radius: 8px !important;
    border: 1px solid #e2e8f0 !important;
}

.nf-field-element input:focus,
.nf-field-element textarea:focus {
    border-color: var(--audiofix-red) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(230, 28, 44, 0.1) !important;
}

.submit-container input[type="button"] {
    background: var(--audiofix-red) !important;
    color: white !important;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

.submit-container input[type="button"]:hover {
    background: #d11525 !important;
    transform: translateY(-1px) !important;
}

/* Widgets */
.widget {
    margin-bottom: 2rem;
}

.widget-title {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget ul li {
    margin-bottom: 0.5rem;
}

.widget ul li a {
    color: #f8fafc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.widget ul li a:hover {
    color: var(--audiofix-red);
}

/* Estilos específicos do site original */
/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--audiofix-red);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #c41424;
}

/* WhatsApp Button Pulse Animation */
.pulse {
    animation: pulse-whatsapp 2s infinite;
}

@keyframes pulse-whatsapp {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

/* Hero Background */
.hero-bg {
    background: linear-gradient(135deg, var(--audiofix-text) 0%, var(--audiofix-footer) 100%);
    height: 120%;
    width: 100%;
}

/* Lazy loading for images */
img[data-src] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[data-src].loaded {
    opacity: 1;
}

/* Smooth transitions */
* {
    scroll-behavior: smooth;
} 