/*
Theme Name: Tesla Concursos - Astra Child
Description: Child theme do Astra para Tesla Concursos Públicos para Engenharia
Author: Tesla Concursos
Template: astra
Version: 1.0.0
Text Domain: tesla-concursos-child
*/

/* Importa o style do tema pai */
@import url("../astra/style.css");

/* === Personalizações Tesla Concursos === */

/* Cores da marca Tesla Concursos */
:root {
    /* Cor diferencial da marca (baseada na imagem oficial) */
    --tesla-primary: #4682b4;
    
    /* Paleta institucional derivada */
    --tesla-secondary: #2d5a87;        /* Tom mais escuro do azul principal */
    --tesla-light-blue: #6ba3d0;       /* Tom mais claro do azul principal */
    --tesla-accent: #4682b4;           /* Usar a mesma cor como accent */
    
    /* Cores neutras institucionais */
    --tesla-dark: #2c3e50;             /* Azul escuro para textos principais */
    --tesla-gray: #7f8c8d;             /* Cinza médio para textos secundários */
    --tesla-light-gray: #bdc3c7;       /* Cinza claro para divisores */
    --tesla-background: #ffffff;       /* Fundo branco padrão */
    --tesla-light: #f8f9fa;            /* Fundo cinza muito claro */
    --tesla-pastel-bg: #f7f9fc;        /* Azul pastel suave para fundo */
    
    /* Estados e alertas */
    --tesla-success: #27ae60;          /* Verde institucional */
    --tesla-warning: #f39c12;          /* Laranja para avisos */
    --tesla-danger: #e74c3c;           /* Vermelho para erros */
}

/* === WooCommerce Customizations === */
/* Pastel background e containers maiores (desktop) */
body {
    background: var(--tesla-pastel-bg);
}

@media (min-width: 1200px) {
    .ast-container, .site-content .ast-container, .woocommerce .ast-container, .entry-content .ast-container {
        max-width: 1240px;
    }
}

/* Estilização dos botões WooCommerce */
.woocommerce .single_add_to_cart_button,
.woocommerce .button.alt {
    background-color: var(--tesla-primary) !important;
    border-color: var(--tesla-primary) !important;
    color: white !important;
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.woocommerce .single_add_to_cart_button:hover,
.woocommerce .button.alt:hover {
    background-color: var(--tesla-secondary) !important;
    border-color: var(--tesla-secondary) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(70, 130, 180, 0.3);
}

/* Preços dos produtos */
.woocommerce .price {
    color: var(--tesla-primary);
    font-weight: bold;
}

.woocommerce .price del {
    color: var(--tesla-gray);
}

/* Título do produto */
.woocommerce div.product .product_title {
    color: var(--tesla-dark);
    font-weight: 700;
    margin-bottom: 20px;
}

/* Breadcrumb personalizado */
.woocommerce .woocommerce-breadcrumb {
    background: var(--tesla-background);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.woocommerce .woocommerce-breadcrumb a {
    color: var(--tesla-primary);
    text-decoration: none;
}

.woocommerce .woocommerce-breadcrumb a:hover {
    color: var(--tesla-secondary);
}

/* Tabs do produto */
.woocommerce div.product .woocommerce-tabs ul.tabs li a {
    color: var(--tesla-dark);
    border-radius: 8px 8px 0 0;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
    background: var(--tesla-primary);
    color: white;
}

/* Galeria de imagens */
.woocommerce div.product div.images {
    border-radius: 12px;
    overflow: hidden;
}



/* === TESLA FOOTER === */

.tesla-footer {
    background-color: var(--tesla-dark);
    color: white;
    padding: 40px 0 20px 0;
}

.tesla-footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.tesla-footer-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Seção Principal com 3 colunas */
.tesla-footer-main {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    align-items: start;
    margin-top: 40px;
}

/* Brand Section */
.tesla-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tesla-footer-logo {
    max-height: 40px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.tesla-footer-title {
    color: white;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.tesla-footer-description {
    color: #ccc;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 300px;
}

/* Navigation Section */
.tesla-footer-nav {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tesla-footer-heading {
    color: white;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.tesla-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tesla-footer-links li {
    margin: 0;
}

.tesla-footer-links a {
    color: #ccc;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 6px 0;
    display: inline-block;
    transition: all 0.3s ease;
    transform: scale(1);
}

.tesla-footer-links a:hover {
    color: var(--tesla-primary);
    transform: translateX(5px);
}

/* Bottom Section */
.tesla-footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #555;
}

.tesla-footer-bottom p {
    color: #999;
    font-size: 0.85rem;
    margin: 0;
}

/* MARKDEV Credit Styling */
.tesla-markdev-credit {
    margin-top: 10px !important;
    font-size: 0.8rem !important;
}

.tesla-markdev-highlight {
    color: #666;
    font-weight: 600;
    position: relative;
    cursor: pointer;
    transition: color 0.3s ease;
}

.tesla-markdev-highlight::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--tesla-primary), var(--tesla-light-blue));
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
}

.tesla-markdev-highlight:hover {
    color: white;
}

.tesla-markdev-highlight:hover::after {
    width: 100%;
    box-shadow: 0 0 8px rgba(70, 130, 180, 0.6);
}

/* Responsive */
@media (max-width: 768px) {
    .tesla-footer-main {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
        margin-top: 20px;
    }
    
    .tesla-footer-brand {
        align-items: center;
    }
    
    .tesla-footer-description {
        max-width: none;
        text-align: center;
    }
    
    .tesla-footer-nav {
        align-items: center;
    }
    
    .tesla-footer-links {
        align-items: center;
    }
}

@media (max-width: 480px) {
    .tesla-footer-main {
        gap: 25px;
        margin-top: 15px;
    }
    
    .tesla-footer-heading {
        font-size: 1rem;
    }
    
    .tesla-footer-links a {
        font-size: 0.85rem;
        padding: 4px 0;
    }
    
    .tesla-footer {
        padding: 30px 0 15px 0;
    }
}

/* === ANIMAÇÕES DE BOTÕES GLOBAIS === */

/* Botões padrão do tema */
.wp-block-button .wp-block-button__link,
.ast-button,
button,
input[type="submit"],
input[type="button"],
.button,
.btn {
    transition: all 0.3s ease;
    transform: scale(1);
    position: relative;
    overflow: hidden;
}

.wp-block-button .wp-block-button__link:hover,
.ast-button:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.button:hover,
.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Botões WooCommerce */
.woocommerce .single_add_to_cart_button,
.woocommerce .button.alt,
.woocommerce .button {
    transition: all 0.3s ease !important;
    transform: scale(1);
}

.woocommerce .single_add_to_cart_button:hover,
.woocommerce .button.alt:hover,
.woocommerce .button:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 6px 20px rgba(70, 130, 180, 0.4) !important;
}

/* Botões Gutenberg com cores Tesla */
.wp-block-button .has-tesla-primary-background-color:hover {
    background-color: var(--tesla-secondary) !important;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(70, 130, 180, 0.3);
}

/* Links que parecem botões */
a.button,
a.btn {
    display: inline-block;
    transition: all 0.3s ease;
    transform: scale(1);
}

a.button:hover,
a.btn:hover {
    transform: scale(1.05);
    text-decoration: none;
}

/* === LAYOUT DE CURSOS === */

/* Layout alinhado à esquerda para produtos curso */
body.tesla-course-product.single-product .woocommerce {
    max-width: none !important;
    width: 100% !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Remove espaço estrutural da featured image e outros espaços */
body.tesla-course-product.single-product .woocommerce::before,
body.tesla-course-product.single-product .woocommerce::after {
    display: none !important;
}

body.tesla-course-product.single-product .woocommerce div.product::before,
body.tesla-course-product.single-product .woocommerce div.product::after {
    display: none !important;
}

/* Remove espaços após o produto */
body.tesla-course-product.single-product .woocommerce-tabs,
body.tesla-course-product.single-product .related,
body.tesla-course-product.single-product .upsells,
body.tesla-course-product.single-product .cross-sells,
body.tesla-course-product.single-product .woocommerce-output-related-products {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Remove espaçamento de containers WooCommerce */
body.tesla-course-product.single-product .woocommerce-page,
body.tesla-course-product.single-product .woocommerce-breadcrumb {
    margin: 0 auto !important;
    padding: 0 !important;
    max-width: 800px !important;
}

/* Container específico para o produto */
body.tesla-course-product.single-product .woocommerce div.product {
    display: block !important;
    width: 100% !important;
    max-width: 800px !important;
    margin: 0 auto !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    /* Remove layout em grid/colunas do WooCommerce */
    grid-template-columns: none !important;
    flex-wrap: nowrap !important;
}

body.tesla-course-product.single-product .woocommerce div.product .summary {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin: 0 auto !important;
    padding: 0 !important;
    display: block !important;
    left: 0 !important;
    right: 0 !important;
    position: relative !important;
}

/* Alinha especificamente os blocos personalizados à esquerda */
body.tesla-course-product .tesla-course-header,
body.tesla-course-product .tesla-pricing-table,
body.tesla-course-product .tesla-course-description,
body.tesla-course-product .tesla-course-ementa-box,
body.tesla-course-product .tesla-course-gallery-grid {
    width: 100% !important;
    max-width: 800px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

body.tesla-course-product.single-product .woocommerce div.product .woocommerce-product-gallery {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Remove qualquer espaço reservado para imagens */
body.tesla-course-product.single-product .woocommerce-product-gallery__wrapper,
body.tesla-course-product.single-product .woocommerce-product-gallery__image,
body.tesla-course-product.single-product .flex-viewport {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Seção WhatsApp dentro do summary */
body.tesla-course-product .tesla-contact-section {
    max-width: 800px !important;
    margin: 30px 0 0 0 !important;
    width: 100% !important;
    display: block !important;
    height: auto !important;
}

/* Garante que o container após o produto se alinhe à esquerda */
body.tesla-course-product.single-product .woocommerce > *:not(.product) {
    max-width: 800px !important;
    margin: 0 auto !important;
    width: auto !important;
    display: block !important;
}

/* Remove espaçamento específico do hook after_single_product_summary */
body.tesla-course-product.single-product .woocommerce .woocommerce-tabs-wrapper,
body.tesla-course-product.single-product .woocommerce .wc-tabs-wrapper,
body.tesla-course-product.single-product .woocommerce .single-product-summary + *,
body.tesla-course-product.single-product .woocommerce .product + * {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Remove container restrictions */
body.tesla-course-product.single-product .entry-content {
    max-width: none !important;
}

body.tesla-course-product.single-product .ast-container {
    max-width: 100% !important;
}

/* Header do curso */
.tesla-course-header {
    text-align: center;
    margin: 0 0 15px 0;
    padding: 20px 15px;
    background: linear-gradient(135deg, var(--tesla-primary), var(--tesla-secondary));
    color: white;
    border-radius: 10px;
    max-width: 100%;
}

.tesla-course-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
    color: white !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    line-height: 1.3;
}

/* Descrição do curso */
.tesla-course-description {
    background: #f8f9fa;
    padding: 15px 25px;
    border-radius: 8px;
    margin: 0 auto 15px auto;
    border-left: 3px solid var(--tesla-primary);
    max-width: 700px;
}

.tesla-course-description p {
    font-size: 1rem;
    color: var(--tesla-dark);
    margin: 0;
    line-height: 1.6;
    text-align: justify;
}

/* === EMENTA BOX === */

.tesla-course-ementa-box {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.tesla-course-ementa-box h3 {
    color: var(--tesla-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.tesla-course-ementa-box h3 i {
    margin-right: 10px;
    color: var(--tesla-secondary);
}

.tesla-ementa-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tesla-ementa-item {
    background: linear-gradient(135deg, var(--tesla-light-blue), var(--tesla-primary));
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tesla-ementa-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(70, 130, 180, 0.3);
}

/* === PRICING TABLE === */

.tesla-pricing-table {
    margin: 20px auto 25px auto;
    max-width: 1000px;
}

.tesla-pricing-table h3 {
    text-align: center;
    font-size: 1.5rem;
    color: var(--tesla-dark);
    margin-bottom: 20px;
    font-weight: 600;
}

.tesla-pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    max-width: 960px;
    margin: 0 auto;
}

.tesla-pricing-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 0;
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
    margin-bottom: 16px;
}

.tesla-sale-badge {
    position:absolute; bottom:-12px; left:50%; transform:translateX(-50%);
    background:#e11d48; color:#fff; font-weight:700;
    padding:6px 12px; border-radius:999px;
    box-shadow:0 6px 16px rgba(225,29,72,.25);
    font-size:.8rem; letter-spacing:.3px;
    z-index:3; pointer-events:none;
}

/* Wrapper com preço original pequeno acima e promocional em destaque */
.tesla-price-wrapper { display:flex; flex-direction:column; align-items:center; }
.tesla-price-regular { color:#e11d48; font-size:.85rem; text-decoration:line-through; opacity:.9; margin-bottom:2px; line-height:1; }
.tesla-price-regular .amount { font-size:.85rem !important; color:#e11d48 !important; font-weight:600; }
.tesla-price-sale { font-size:2.1rem; color:var(--tesla-primary); font-weight:700; line-height:1; }

.tesla-pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.tesla-pricing-card.featured {
    border-color: var(--tesla-primary);
    transform: scale(1.04);
    box-shadow: 0 18px 40px rgba(70, 130, 180, 0.22);
    position: relative;
    z-index: 2;
}

.tesla-featured-badge {
    background: linear-gradient(135deg, var(--tesla-primary), var(--tesla-secondary));
    color: white;
    text-align: center;
    padding: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.tesla-pricing-header {
    padding: 22px 22px 16px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-bottom: 1px solid #eef2f5;
}

.tesla-pricing-header h4 {
    font-size: 1.2rem;
    color: var(--tesla-dark);
    margin: 0 0 12px 0;
    font-weight: 600;
}

.tesla-pricing-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
}

/* Compatível com Woo price_html */
.tesla-pricing-price del { color: var(--tesla-gray); margin-right:6px; }
.tesla-pricing-price ins { text-decoration:none; }
.tesla-pricing-price .amount, .tesla-pricing-price ins .amount { font-size: 2.1rem; color: var(--tesla-primary); font-weight: 700; }

.tesla-pricing-features {
    padding: 18px;
}

.tesla-pricing-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tesla-pricing-features li {
    padding: 6px 0;
    font-size: 0.9rem;
    color: var(--tesla-dark);
    line-height: 1.4;
}

.tesla-pricing-features li:not(:last-child) {
    border-bottom: 1px solid #f1f3f4;
}

.tesla-pricing-button {
    padding: 18px;
    padding-top: 0;
}

.tesla-pricing-button a {
    display: block;
    text-align: center;
    padding: 16px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    border: 2px solid;
}

.tesla-btn-basico {
    background: white;
    color: var(--tesla-primary);
    border-color: var(--tesla-primary);
}

.tesla-btn-basico:hover {
    background: white;
    color: black;
    border-color: var(--tesla-primary);
}

.tesla-btn-pro {
    background: var(--tesla-primary);
    color: white;
    border-color: var(--tesla-primary);
}

.tesla-btn-pro:hover {
    background: white;
    color: black;
    border-color: var(--tesla-primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(70, 130, 180, 0.32);
}

.tesla-btn-premium {
    background: linear-gradient(135deg, var(--tesla-secondary), var(--tesla-dark));
    color: white;
    border-color: var(--tesla-secondary);
}

.tesla-btn-premium:hover {
    background: white;
    color: black;
    border-color: var(--tesla-secondary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(44, 62, 80, 0.3);
}

/* Estados dos botões Add to Cart */
.tesla-add-to-cart.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.tesla-add-to-cart.loading:after {
    content: "...";
    animation: dots 1.5s infinite;
}

.tesla-add-to-cart.added {
    background: var(--tesla-success) !important;
    border-color: var(--tesla-success) !important;
    color: white !important;
}

@keyframes dots {
    0%, 20% { content: "."; }
    40% { content: ".."; }
    60%, 100% { content: "..."; }
}

/* === SEÇÃO DE CONTATO WHATSAPP === */

.tesla-contact-section {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.tesla-contact-section h3 {
    color: var(--tesla-primary);
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 15px 0;
}

.tesla-contact-section p {
    color: var(--tesla-gray);
    font-size: 1rem;
    margin: 0 0 25px 0;
    line-height: 1.6;
}

.tesla-whatsapp-button-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.tesla-whatsapp-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    border: none;
}

.tesla-whatsapp-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
    color: white;
    text-decoration: none;
}

.tesla-whatsapp-button .whatsapp-icon {
    font-size: 1.3rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* === GALERIA EM GRID DO CURSO === */

.tesla-course-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin: 30px 0 25px 0;
    max-width: 450px;
}

.tesla-gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.tesla-gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.tesla-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.tesla-gallery-item:hover img {
    transform: scale(1.05);
}

.tesla-gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(70, 130, 180, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tesla-gallery-item:hover .tesla-gallery-overlay {
    opacity: 1;
}

.tesla-gallery-icon {
    font-size: 24px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* === LIGHTBOX === */

.tesla-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    cursor: pointer;
}

.tesla-lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    box-sizing: border-box;
}

.tesla-lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.tesla-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    z-index: 10001;
    transition: color 0.3s ease;
}

.tesla-lightbox-close:hover {
    color: var(--tesla-primary);
}

.tesla-lightbox-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    transform: translateY(-50%);
    z-index: 10000;
}

.tesla-lightbox-prev,
.tesla-lightbox-next {
    background: rgba(70, 130, 180, 0.9);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tesla-lightbox-prev:hover,
.tesla-lightbox-next:hover {
    background: var(--tesla-secondary);
    transform: scale(1.1);
}

.tesla-lightbox-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 16px;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 16px;
    border-radius: 20px;
    z-index: 10000;
}

.tesla-lightbox-open {
    overflow: hidden;
}

/* Responsividade da galeria */
@media (max-width: 768px) {
    .tesla-course-gallery-grid {
        max-width: 100%;
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 8px;
        margin: 20px 0 15px 0;
    }
    
    .tesla-gallery-item {
        border-radius: 6px;
    }
    
    .tesla-gallery-icon {
        font-size: 20px;
    }
    
    .tesla-lightbox-content {
        padding: 20px;
    }
    
    .tesla-lightbox-close {
        top: 10px;
        right: 15px;
        font-size: 30px;
    }
    
    .tesla-lightbox-nav {
        padding: 0 10px;
    }
    
    .tesla-lightbox-prev,
    .tesla-lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .tesla-lightbox-counter {
        bottom: 20px;
        font-size: 14px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .tesla-course-gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 6px;
    }
    
    .tesla-gallery-item {
        border-radius: 4px;
    }
    
    .tesla-gallery-icon {
        font-size: 18px;
    }
    
    .tesla-lightbox-content {
        padding: 15px;
    }
    
    .tesla-lightbox-close {
        top: 5px;
        right: 10px;
        font-size: 28px;
    }
    
    .tesla-lightbox-nav {
        padding: 0 5px;
    }
    
    .tesla-lightbox-prev,
    .tesla-lightbox-next {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .tesla-lightbox-counter {
        bottom: 15px;
        font-size: 13px;
        padding: 5px 10px;
    }
}

/* Responsividade */
@media (max-width: 768px) {
    .tesla-contact-section {
        padding: 20px 15px;
        margin: 0 -15px;
        border-radius: 0;
    }
    
    .tesla-contact-section h3 {
        font-size: 1.2rem;
    }
    
    .tesla-whatsapp-button {
        padding: 12px 25px;
        font-size: 1rem;
        width: 100%;
        justify-content: center;
    }
    
}

/* === RESPONSIVIDADE === */

/* Layout responsivo para cursos */
@media (max-width: 768px) {
    body.tesla-course-product.single-product .woocommerce div.product {
        margin-left: 15px !important;
        max-width: calc(100% - 30px) !important;
    }
    
    body.tesla-course-product .tesla-course-header,
    body.tesla-course-product .tesla-pricing-table,
    body.tesla-course-product .tesla-course-description,
    body.tesla-course-product .tesla-course-ementa-box,
    body.tesla-course-product .tesla-course-gallery-grid {
        max-width: 100% !important;
    }
    
    body.tesla-course-product .tesla-contact-section {
        margin: 20px 0 0 0 !important;
        max-width: 100% !important;
    }
}

@media (max-width: 768px) {
    .tesla-course-header {
        margin: -15px -15px 20px -15px;
        padding: 30px 15px;
        border-radius: 0;
    }
    
    .tesla-course-title {
        font-size: 1.8rem;
    }
    
    .tesla-course-description {
        margin: 0 -15px 20px -15px;
        border-radius: 0;
        padding: 15px 20px;
        max-width: 100%;
    }
    
    .tesla-course-description p {
        text-align: left;
    }
    
    .tesla-course-ementa-box {
        margin: 0 -15px 30px -15px;
        border-radius: 0;
        padding: 20px 15px;
    }
    
    .tesla-pricing-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 15px;
    }
    
    .tesla-pricing-card.featured {
        transform: none;
    }
    
    .tesla-pricing-table h3 {
        font-size: 1.6rem;
        padding: 0 15px;
    }
    
    .tesla-ementa-grid {
        gap: 8px;
    }
    
    .tesla-ementa-item {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .tesla-pricing-header {
        padding: 20px 15px;
    }
    
    .tesla-pricing-price .amount {
        font-size: 2rem;
    }
    
    .tesla-pricing-features {
        padding: 20px 15px;
    }
    
    .tesla-pricing-button {
        padding: 20px 15px 15px;
    }
}

/* === LAYOUT CUSTOMIZADO SINGLE-PRODUCT === */

/* Override completo para template personalizado */
.tesla-custom-course-layout {
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    display: block !important;
    /* Remove grid layout padrão do WooCommerce */
    grid-template-columns: none !important;
}

.tesla-course-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 15px;
}

.tesla-course-hero-section {
    width: 100%;
    margin-bottom: 0;
}

.tesla-hero-content {
    width: 100%;
}

.tesla-hero-text {
    width: 100%;
    max-width: none;
}

/* Remove elementos desnecessários que podem aparecer */
.tesla-custom-course-layout .woocommerce-product-gallery,
.tesla-custom-course-layout .images {
    display: none !important;
}

/* Seção de conteúdo adicional */
.tesla-course-content-section {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Garantir que elementos dentro do summary se comportem corretamente */
.tesla-custom-course-layout .summary.entry-summary {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Responsividade para o novo layout */
@media (max-width: 768px) {
    .tesla-course-container {
        padding: 15px 10px;
    }
    
    .tesla-course-content-section {
        padding: 0 10px;
    }
}

/* Customizações específicas serão adicionadas aqui */
/* Neste Curso - cards com check */
.tesla-course-features { background:#f8f9ff; border:2px solid #e3e7ff; border-radius:14px; padding:16px; margin:14px 0 20px; box-shadow: 0 4px 16px rgba(70,130,180,.08); }
.tesla-course-features .tesla-features-title { margin:0 0 12px; color:#6a5acd; font-size:1.15rem; font-weight:700; letter-spacing:.2px; text-shadow:0 1px 0 rgba(255,255,255,.6); }
.tesla-features-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap:12px; }
.tesla-feature-card { display:flex; align-items:center; gap:10px; padding:12px 14px; border-radius:12px; border:1px solid #e1e5ee; background:#eef2f7; color:#49535f; font-weight:600; transition: all .25s ease; box-shadow: inset 0 1px 0 rgba(255,255,255,.9); }
.tesla-feature-card .check { width:24px; height:24px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; background:#c7ced6; color:#fff; font-weight:800; }
.tesla-feature-card.active { background:#2D5A87; color:#fff; border-color:#2D5A87; box-shadow: 0 8px 20px rgba(45,90,135,.25); }
.tesla-feature-card.active .check { background:#1f4164; }
.tesla-feature-card:hover { 
    transform: translateY(-2px);
    background:#2D5A87; 
    color:#fff; 
    border-color:#2D5A87; 
    box-shadow: 0 8px 20px rgba(45,90,135,.25);
}
.tesla-feature-card:hover .check { background:#1f4164; color:#fff; }
/* Handout / Collections layout */
.tesla-handout-header .product_title { color: var(--tesla-dark); font-weight: 700; margin-bottom: 8px; }
.tesla-handout-short { background: #f8f9fa; border-left: 3px solid var(--tesla-primary); padding: 12px 16px; border-radius: 8px; margin: 10px 0 15px; }
.tesla-handout-samples { margin-top: 20px; }
.tesla-handout-samples h3 { color: var(--tesla-primary); font-size: 1.1rem; margin: 0 0 10px; }
.tesla-handout-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.tesla-handout-thumb { border: 1px solid #e9ecef; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.tesla-handout-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.tesla-handout-thumb:hover img { transform: scale(1.03); }

/* Reduz imagem destacada e oculta meta em handout/coleções */
body.tesla-handout-product.single-product .woocommerce div.product div.images {
    max-width: 360px;
}
body.tesla-handout-product.single-product .sku_wrapper,
body.tesla-handout-product.single-product .posted_in,
body.tesla-handout-product.single-product .tagged_as {
    display: none !important;
}
/* Floating WhatsApp Button */
.tesla-wa-float-btn {
    position: fixed;
    bottom: 18px;
    right: 18px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #fff;
    padding: 12px 16px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(18, 140, 126, 0.35);
    z-index: 9999;
    transform: translateY(0);
    transition: transform .25s ease, box-shadow .25s ease, opacity .25s ease;
}

.tesla-wa-float-btn.left { left: 18px; right: auto; }

.tesla-wa-float-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(18, 140, 126, 0.45);
}

.tesla-wa-icon { font-size: 18px; }
.tesla-wa-text { font-size: 14px; }

@media (max-width: 768px) {
    .tesla-wa-float-btn {
        padding: 12px 14px;
        gap: 8px;
        bottom: 14px;
        right: 14px;
    }
    .tesla-wa-float-btn.left { left: 14px; }
    .tesla-wa-icon { font-size: 18px; }
    .tesla-wa-text { font-size: 13px; }
}