/*
Theme Name: AutoPromAi Theme
Theme URI: https://autopromai.com/
Author: Alex
Author URI: https://autopromai.com/
Description: Tema personalizado y futurista para el marketplace AutoPromAi.
Version: 1.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: custom-theme, futuristic
Text Domain: autopromai
*/

/* ============================================ */
/* VARIABLES Y ESTILOS GLOBALES */
/* ============================================ */
:root {
    --electric-blue: #007BFF;
    --deep-purple: #6f42c1;
    --white: #FFFFFF;
    --off-white: #f8f9fa;
    --dark-bg: #0d0c1d; /* Un azul muy oscuro casi negro */
    --card-bg: #1a193d; /* Un fondo para las tarjetas */
    --text-color: #E0E0E0;
    --font-title: 'Montserrat', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--dark-bg);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden; /* Prevenir scroll horizontal */
}

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

section {
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden; /* Evita que las animaciones se salgan */
}

h1, h2, h3 {
    font-family: var(--font-title);
    font-weight: 700;
}

.section-title {
    font-size: 2.8rem;
    margin-bottom: 2rem;
    background: linear-gradient(90deg, var(--electric-blue), var(--deep-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem auto;
    color: var(--text-color);
    opacity: 0.9;
}

/* ============================================ */
/* PRODUCTOS (Página de listado - Plantilla Manual) */
/* ============================================ */
.products-page-section {
    padding-top: 150px;
    padding-bottom: 100px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 4rem;
}

.product-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    text-align: left;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 123, 255, 0.2);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.category {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--electric-blue);
    margin-bottom: 0.5rem;
    display: block;
    text-transform: uppercase;
}

.card-content h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--white);
    flex-grow: 1;
}

.price {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--off-white);
    margin-bottom: 1.5rem;
}

.buy-button {
    display: block;
    width: 100%;
    padding: 12px;
    text-align: center;
    background: transparent;
    border: 2px solid var(--electric-blue);
    color: var(--electric-blue);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease;
    margin-top: auto;
}

.buy-button:hover {
    background-color: var(--electric-blue);
    color: var(--white);
}

/* ============================================ */
/* BOTONES Y ELEMENTOS COMUNES */
/* ============================================ */
.cta-button {
    display: inline-block;
    padding: 15px 35px;
    font-size: 1rem;
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--white);
    background: linear-gradient(90deg, var(--electric-blue), var(--deep-purple));
    border: none;
    border-radius: 50px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(111, 66, 193, 0.4);
}

.cta-button:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.5);
}

/* ============================================ */
/* HEADER Y NAVEGACIÓN */
/* ============================================ */
.main-header { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; padding: 20px 0; background: rgba(13, 12, 29, 0.8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.main-header nav { display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: var(--font-title); font-size: 1.8rem; font-weight: 800; text-decoration: none; color: var(--white); }
.nav-links { list-style: none; display: flex; gap: 2.5rem; }
.nav-links a { color: var(--off-white); text-decoration: none; font-size: 1rem; position: relative; transition: color 0.3s ease; }
.nav-links a::after { content: ''; position: absolute; width: 0; height: 2px; bottom: -5px; left: 50%; transform: translateX(-50%); background: linear-gradient(90deg, var(--electric-blue), var(--deep-purple)); transition: width 0.3s ease; }
.nav-links a:hover { color: var(--electric-blue); }
.nav-links a:hover::after { width: 100%; }
.nav-cta { padding: 10px 25px; font-size: 0.9rem; }

/* ============================================ */
/* HERO, HOW IT WORKS, PRICING, CONTACT, ETC. */
/* ============================================ */
.hero-section { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding-top: 80px; }
.hero-section .animated-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(0, 123, 255, 0.1), rgba(111, 66, 193, 0.2)), var(--dark-bg); z-index: -1; overflow: hidden; }
.hero-section .animated-bg::before, .hero-section .animated-bg::after { content: ''; position: absolute; border-radius: 50%; opacity: 0.15; filter: blur(100px); will-change: transform; }
.hero-section .animated-bg::before { width: 300px; height: 300px; background: radial-gradient(circle, var(--electric-blue), transparent 60%); top: 10%; left: 20%; animation: move-glow 15s infinite alternate ease-in-out; }
.hero-section .animated-bg::after { width: 250px; height: 250px; background: radial-gradient(circle, var(--deep-purple), transparent 60%); bottom: 15%; right: 15%; animation: move-glow 20s infinite alternate ease-in-out reverse; }
@keyframes move-glow { from { transform: translate(0, 0) scale(1); } to { transform: translate(100px, 50px) scale(1.2); } }
.hero-content h1 { font-size: clamp(2.5rem, 5vw, 4rem); margin-bottom: 1.5rem; line-height: 1.2; }
.how-it-works-section, .pricing-page-section, .contact-page-section { padding-top: 150px; padding-bottom: 100px; }
.steps-container { display: flex; justify-content: space-around; gap: 2rem; margin-top: 4rem; flex-wrap: wrap; }
.step-card { background: var(--card-bg); padding: 2.5rem; border-radius: 15px; flex: 1; min-width: 280px; max-width: 350px; border: 1px solid rgba(255, 255, 255, 0.1); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.step-card:hover { transform: translateY(-10px); box-shadow: 0 10px 25px rgba(0, 123, 255, 0.15); }
.step-icon { width: 60px; height: 60px; color: var(--electric-blue); margin-bottom: 1.5rem; }
.step-card h3 { font-size: 1.5rem; margin-bottom: 1rem; color: var(--white); }
.main-footer { padding: 2.5rem 0; text-align: center; border-top: 1px solid rgba(255, 255, 255, 0.1); background: var(--dark-bg); }
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
.fade-in { transition-delay: calc(0.1s * var(--i, 0)); }
.pricing-grid { display-grid: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); display: grid; gap: 2rem; align-items: center; margin-top: 4rem; }
.pricing-plan { background: var(--card-bg); padding: 2.5rem; border-radius: 15px; border: 2px solid transparent; transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease; text-align: left; height: 100%; display: flex; flex-direction: column; }
.pricing-plan:hover { transform: translateY(-10px); border-color: var(--electric-blue); box-shadow: 0 0 25px rgba(0, 123, 255, 0.3); }
.pricing-plan.recommended { transform: scale(1.05); border-color: var(--deep-purple); position: relative; box-shadow: 0 0 30px rgba(111, 66, 193, 0.4); }
.recommended-badge { position: absolute; top: 18px; right: -32px; background: var(--deep-purple); color: var(--white); padding: 6px 35px; transform: rotate(45deg); font-size: 0.8rem; font-weight: bold; text-transform: uppercase; z-index: 1; }
.pricing-plan h3 { font-size: 1.8rem; color: var(--white); }
.plan-price { font-size: 3.5rem; font-family: var(--font-title); font-weight: 800; color: var(--white); margin: 1rem 0; }
.plan-period { font-size: 1rem; font-weight: 400; color: var(--text-color); opacity: 0.8; }
.plan-features { list-style: none; margin: 2rem 0; flex-grow: 1; }
.plan-features li { margin-bottom: 1rem; display: flex; align-items: center; gap: 10px; }
.plan-features li i { color: var(--electric-blue); width: 24px; height: 24px; flex-shrink: 0; }
.contact-wrapper { max-width: 800px; margin: 3rem auto 0; background: var(--card-bg); padding: 3rem; border-radius: 15px; border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: var(--shadow); }
.contact-form .form-group { margin-bottom: 1.5rem; text-align: left; }
.contact-form label { display: block; margin-bottom: 0.5rem; color: var(--off-white); font-weight: 500; }
.contact-form input, .contact-form textarea { width: 100%; padding: 15px; background-color: var(--dark-bg); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 8px; color: var(--white); font-family: var(--font-body); font-size: 1rem; }
.social-links { margin-top: 3rem; text-align: center; }
.social-links h3 { margin-bottom: 1.5rem; color: var(--white); }
.social-links a { color: var(--text-color); margin: 0 1rem; transition: color 0.3s ease, transform 0.3s ease; display: inline-block; }
.social-links a:hover { color: var(--electric-blue); transform: scale(1.2); }

/* ============================================ */
/* == ESTILOS FINALES PARA WOOCOMMERCE == */
/* ============================================ */

/* --- Estilos para la página de la tienda y filtros --- */
.shop-layout-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3em;
    margin-top: 4rem;
    text-align: left;
}
.shop-sidebar .widget { margin-bottom: 2.5em; }
.shop-sidebar .widget-title { font-family: var(--font-title); font-size: 1.5rem; color: var(--white); margin-bottom: 1.5em; padding-bottom: 0.5em; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.widget_product_search .woocommerce-product-search { display: flex; }
.widget_product_search input[type="search"] { width: 100%; padding: 12px 15px; background-color: var(--card-bg); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 50px 0 0 50px; color: var(--white); font-family: var(--font-body); }
.widget_product_search button { background: var(--electric-blue); color: var(--white); border: none; padding: 0 20px; border-radius: 0 50px 50px 0; cursor: pointer; }
.fl-filter--checkbox .fl-filter-item { margin-bottom: 0.75em; }
.fl-filter--checkbox .fl-filter-item label { display: flex; align-items: center; cursor: pointer; color: var(--text-color); }
.fl-filter--checkbox .fl-filter-item input[type="checkbox"] { margin-right: 10px; }
.fl-range-slider .fl-slider-ui { background: rgba(255, 255, 255, 0.1); border: none; }
.fl-range-slider .fl-slider-range { background: var(--electric-blue); }

/* --- Estilos para las tarjetas de producto de la Tienda (generadas por WooCommerce) --- */
.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.woocommerce ul.products li.product {
    background: var(--card-bg) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 15px !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    text-align: left !important;
    overflow: hidden;
}
.woocommerce ul.products li.product:hover {
    transform: translateY(-10px) !important;
    box-shadow: 0 15px 30px rgba(0, 123, 255, 0.2) !important;
}
.woocommerce ul.products li.product a { text-decoration: none !important; }
.woocommerce ul.products li.product a img { border-radius: 0 !important; margin-bottom: 0 !important; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 1.4rem !important; color: var(--white) !important; padding: 1.5rem 1.5rem 0 !important; }
.woocommerce ul.products li.product .price { font-size: 1.3rem !important; font-weight: bold !important; color: var(--electric-blue) !important; padding: 0.5rem 1.5rem !important; }
.woocommerce ul.products li.product .button { 
    margin: 1.5rem !important;
    background: transparent !important; 
    border: 2px solid var(--electric-blue) !important; 
    color: var(--electric-blue) !important; 
    border-radius: 50px !important; 
}
.woocommerce ul.products li.product .button:hover { background-color: var(--electric-blue) !important; color: var(--white) !important; }

/* --- Estilos para la página de producto individual --- */
.product-page-container { padding-top: 100px; padding-bottom: 100px; }
.autopromai-single-product-grid { display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr); gap: 4em; align-items: start; }
.product-gallery-column img { width: 100%; height: auto; border-radius: 15px; border: 1px solid rgba(255, 255, 255, 0.1); }
.product-info-column .product_title { font-size: 2.8rem; color: var(--white); font-family: var(--font-title); margin-bottom: 0.5em; line-height: 1.2; }
.product-info-column .price { font-size: 2rem; font-weight: 700; color: var(--electric-blue); margin-bottom: 1em; }
.product-info-column .woocommerce-product-details__short-description { color: var(--text-color); opacity: 0.9; margin-bottom: 1.5em; font-size: 1.1rem; }
.autopromai-purchase-block { margin-bottom: 1.5em; display: flex; flex-direction: column; }
.autopromai-purchase-block .buy_now_button { background: linear-gradient(90deg, var(--electric-blue), var(--deep-purple)) !important; color: var(--white) !important; border-radius: 50px !important; padding: 15px 35px !important; font-size: 1.1rem !important; font-weight: 500 !important; transition: transform 0.3s ease, box-shadow 0.3s ease !important; border: none !important; box-shadow: 0 5px 15px rgba(111, 66, 193, 0.4); text-shadow: none !important; text-decoration: none; display: block; width: 100%; text-align: center; margin-bottom: 1.5em; }
.autopromai-purchase-block .buy_now_button:hover { transform: scale(1.02); box-shadow: 0 8px 25px rgba(0, 123, 255, 0.5) !important; }
.autopromai-purchase-block form.cart { display: flex; align-items: center; }
.autopromai-purchase-block .quantity { margin-right: 15px; }
.autopromai-purchase-block .quantity .qty { border-radius: 50px; background-color: var(--card-bg); border: 1px solid rgba(255, 255, 255, 0.2); color: var(--white); padding: 15px !important; height: 50px !important; width: 70px; text-align: center; }
.autopromai-purchase-block .add_to_cart_icon_button { background: var(--card-bg) !important; color: var(--white) !important; border: 1px solid rgba(255, 255, 255, 0.2) !important; border-radius: 50% !important; padding: 0 !important; width: 50px !important; height: 50px !important; line-height: 50px !important; transition: all 0.3s ease !important; display: flex; align-items: center; justify-content: center; }
.autopromai-purchase-block .add_to_cart_icon_button:hover { background: var(--electric-blue) !important; border-color: var(--electric-blue) !important; }
.woocommerce-paypal-payments-product-page-button-container, #wc-stripe-payment-request-button-container { margin-top: 2em; }
.woocommerce-paypal-payments-product-page-button-container::before { content: "O paga directamente con"; display: block; text-align: center; margin-bottom: 1.5em; color: rgba(255, 255, 255, 0.5); font-style: italic; width: 100%; }
#wc-stripe-payment-request-button { background-color: #000 !important; color: #fff !important; border-radius: 50px !important; height: 48px !important; }
.autopromai-description-section { grid-column: 1 / -1; padding-top: 4em; margin-top: 4em; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.autopromai-description-section .section-title { margin-bottom: 2em; }
.autopromai-description-section .description-content { text-align: left; max-width: 800px; margin: 0 auto; color: var(--text-color); }
.autopromai-description-section .description-content h4 { font-family: var(--font-title); color: var(--white); margin-top: 1.5em; margin-bottom: 0.5em; }
.autopromai-description-section .description-content ul { list-style: none; padding-left: 0; }
.autopromai-description-section .description-content ul li { padding-left: 1.5em; position: relative; margin-bottom: 0.5em; }
.autopromai-description-section .description-content ul li::before { content: '✅'; position: absolute; left: 0; color: var(--electric-blue); }

/* ============================================ */
/* == AJUSTE FINAL PARA LAS TARJETAS DE LA TIENDA == */
/* ============================================ */

/* Aplicamos nuestro diseño de grid a la lista de productos de WooCommerce */
.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
    gap: 2.5rem !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Estilos para cada tarjeta de producto en la tienda */
.woocommerce ul.products li.product {
    background: var(--card-bg) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 15px !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    text-align: left !important;
    overflow: hidden; /* Asegura que todo se mantenga dentro de los bordes redondeados */
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-10px) !important;
    box-shadow: 0 15px 30px rgba(0, 123, 255, 0.2) !important;
}

.woocommerce ul.products li.product a {
    text-decoration: none !important;
    color: inherit; /* Hereda el color del texto */
}

.woocommerce ul.products li.product a img {
    border-radius: 0 !important; /* La imagen no necesita bordes redondeados si la tarjeta los tiene */
    margin-bottom: 0 !important;
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* Título del producto */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 1.4rem !important;
    color: var(--white) !important;
    padding: 1.5rem 1.5rem 0 !important;
}

/* Precio del producto */
.woocommerce ul.products li.product .price {
    font-size: 1.3rem !important;
    font-weight: bold !important;
    color: var(--electric-blue) !important;
    padding: 0.5rem 1.5rem !important;
}

/* Botón "Añadir al carrito" */
.woocommerce ul.products li.product .button {
    display: block !important;
    width: calc(100% - 3rem) !important; /* Ancho completo menos el padding lateral */
    margin: 1.5rem !important;
    padding: 12px !important;
    text-align: center !important;
    background: transparent !important;
    border: 2px solid var(--electric-blue) !important;
    color: var(--electric-blue) !important;
    border-radius: 50px !important;
    transition: background-color 0.3s ease, color 0.3s ease !important;
}

.woocommerce ul.products li.product .button:hover {
    background-color: var(--electric-blue) !important;
    color: var(--white) !important;
}

/* Ocultar elementos extra de WooCommerce que no queremos */
.woocommerce ul.products li.product .star-rating,
.woocommerce ul.products li.product .added_to_cart {
    display: none !important;
}

/* ============================================ */
/* == ESTILOS PARA TIENDA Y FILTROS == */
/* ============================================ */

/* --- Layout de la Página --- */
.shop-layout-grid {
    display: grid;
    grid-template-columns: 280px 1fr; /* Barra lateral de 280px y el resto para productos */
    gap: 4em;
    margin-top: 4rem;
    text-align: left;
}

/* --- Estilos de la Barra Lateral y Widgets --- */
.shop-sidebar .widget {
    margin-bottom: 2.5em;
}

.shop-sidebar .widget-title {
    font-family: var(--font-title);
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: 1.5em;
    padding-bottom: 0.5em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- Estilos para la Búsqueda --- */
.widget_product_search .woocommerce-product-search { display: flex; }
.widget_product_search input[type="search"] { width: 100%; padding: 12px 15px; background-color: var(--card-bg); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 50px 0 0 50px; color: var(--white); font-family: var(--font-body); }
.widget_product_search button { background: var(--electric-blue); color: var(--white); border: none; padding: 0 20px; border-radius: 0 50px 50px 0; cursor: pointer; }

/* --- Estilos para los Filtros de "Filter Everything" --- */
.fl-filter--checkbox .fl-filter-item { margin-bottom: 0.75em; }
.fl-filter--checkbox .fl-filter-item label { display: flex; align-items: center; cursor: pointer; color: var(--text-color); }
.fl-filter--checkbox .fl-filter-item input[type="checkbox"] { margin-right: 10px; }
.fl-range-slider .fl-slider-ui { background: rgba(255, 255, 255, 0.1); border: none; }
.fl-range-slider .fl-slider-range { background: var(--electric-blue); }

/* --- Estilos para las tarjetas de producto de la Tienda --- */
.woocommerce ul.products { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important; gap: 2.5rem !important; }
.woocommerce ul.products li.product { background: var(--card-bg) !important; border: 1px solid rgba(255, 255, 255, 0.1) !important; border-radius: 15px !important; }