/**
 * Astra GREENEX — Estilos del Child Theme
 * Paleta corporativa GREENEX:
 *   Verde Bosque:  #228B22  (primario)
 *   Verde Oscuro:  #006400  (encabezados)
 *   Cal Lima:      #32CD32  (acento claro)
 *   Oro:           #FFD700  (destacados)
 *   Texto oscuro:  #2D2D2D
 */

/* ========================================
   CSS CUSTOM PROPERTIES
   ======================================== */
:root {
    --greenex-primary:    #228B22;
    --greenex-dark:       #006400;
    --greenex-light:      #32CD32;
    --greenex-accent:     #FFD700;
    --greenex-accent-alt: #FFA500;
    --greenex-text:       #2D2D2D;
    --greenex-muted:      #666666;
    --greenex-bg-light:   #E8F5E9;
    --greenex-bg-mid:     #C8E6C9;
    --greenex-white:      #FFFFFF;
    --greenex-shadow-sm:  0 2px 8px rgba(0, 0, 0, 0.05);
    --greenex-shadow-md:  0 4px 15px rgba(34, 139, 34, 0.3);
    --greenex-shadow-lg:  0 8px 25px rgba(34, 139, 34, 0.2);
    --greenex-radius-sm:  6px;
    --greenex-radius-md:  8px;
    --greenex-radius-lg:  12px;
    --greenex-radius-xl:  16px;
    --greenex-transition: 0.3s ease;
}

/* ========================================
   FULL-WIDTH LAYOUT
   ======================================== */

html,
body {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    color: var(--greenex-text);
    line-height: 1.7;
}

body #page,
body .site,
body .hfeed {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

body #content,
body .site-content,
body .ast-site-content-wrap {
    width: 100%;
    max-width: 100%;
}

body .site-header,
body .main-header-bar-wrap,
body .main-header-bar {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

body .site-footer {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

body .site-content .ast-container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

body .woocommerce,
body .woocommerce-page {
    width: 100%;
}

/* ========================================
   HEADER & NAVEGACIÓN
   ======================================== */

body .site-header,
body .main-header-bar {
    background: linear-gradient(135deg, var(--greenex-dark) 0%, var(--greenex-primary) 100%);
    box-shadow: 0 2px 10px rgba(0, 100, 0, 0.3);
}

/* Sobreescribe las variables de color de Astra en el contexto del header */
body #masthead,
body .ast-primary-header-bar {
    --ast-global-color-0: #ffffff;
    --ast-global-color-1: #FFD700;
    color: var(--greenex-white);
}

/* Todos los enlaces del header */
body .site-header a,
body .main-header-bar a,
body .ast-primary-header-bar a,
body .site-header .ast-header-account-link,
body .ast-account-nav a {
    color: var(--greenex-white);
    transition: color var(--greenex-transition);
}

/* Nav links — selectores específicos de Astra */
body .main-header-menu a.menu-link,
body .ast-nav-menu a,
body .ast-primary-menu a,
body nav.site-navigation a,
body .main-navigation a {
    color: var(--greenex-white);
}

body .site-header a:hover,
body .main-header-bar a:hover,
body .main-header-menu a.menu-link:hover,
body .ast-nav-menu a:hover {
    color: var(--greenex-accent);
}

/* Ítem de menú activo */
body .main-header-menu .current-menu-item > a,
body .main-header-menu .current-menu-ancestor > a,
body .ast-nav-menu .current-menu-item > a {
    color: var(--greenex-accent);
    font-weight: 600;
}

body .site-title a,
body .site-description {
    color: var(--greenex-white);
    font-weight: 700;
}

/* Botón hamburguesa móvil */
body .ast-mobile-header-wrap .ast-menu-toggle,
body .ast-header-break-point .ast-menu-toggle,
body #ast-mobile-header .ast-menu-toggle {
    color: var(--greenex-white);
}

body .ast-header-button,
body .ast-custom-button {
    background: linear-gradient(135deg, var(--greenex-accent) 0%, var(--greenex-accent-alt) 100%);
    color: var(--greenex-dark);
    border: none;
    padding: 12px 24px;
    border-radius: var(--greenex-radius-md);
    font-weight: 600;
    transition: all var(--greenex-transition);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

body .ast-header-button:hover,
body .ast-custom-button:hover {
    background: linear-gradient(135deg, var(--greenex-primary) 0%, var(--greenex-light) 100%);
    color: var(--greenex-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 139, 34, 0.4);
}

/* Ícono del carrito */
body .ast-cart-menu-wrap,
body .ast-site-header-cart,
body .ast-site-header-cart a,
body .ast-site-header-cart svg {
    color: var(--greenex-white);
    fill: var(--greenex-white);
    stroke: var(--greenex-white);
}

body .ast-cart-menu-wrap .count,
body .ast-cart-menu-wrap .ast-cart-count {
    background: var(--greenex-accent);
    color: var(--greenex-dark);
    font-weight: 700;
}

/* ========================================
   HERO / BANNER SECTION
   ======================================== */

.entry-header,
.ast-archive-description,
.page-header {
    background: linear-gradient(135deg, var(--greenex-dark) 0%, var(--greenex-primary) 50%, var(--greenex-light) 100%);
    padding: 60px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.entry-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><path d="M50 10 L90 30 L90 70 L50 90 L10 70 L10 30 Z" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></svg>');
    opacity: 0.3;
}

.entry-title,
.page-title,
.ast-archive-title {
    color: var(--greenex-white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-size: 3em;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.entry-header::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-image:
        radial-gradient(circle, rgba(255, 215, 0, 0.1) 1px, transparent 1px),
        radial-gradient(circle, rgba(255, 215, 0, 0.15) 1px, transparent 1px);
    background-size: 50px 50px, 80px 80px;
    background-position: 0 0, 40px 40px;
    animation: floatingParticles 20s linear infinite;
}

/* ========================================
   BOTONES
   ======================================== */

.wp-block-button__link,
.button.alt,
.woocommerce button.button,
.woocommerce a.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.single_add_to_cart_button,
.checkout-button {
    background: linear-gradient(135deg, var(--greenex-primary) 0%, var(--greenex-light) 100%);
    color: var(--greenex-white);
    border: none;
    padding: 14px 28px;
    border-radius: var(--greenex-radius-md);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all var(--greenex-transition);
    box-shadow: var(--greenex-shadow-md);
}

.wp-block-button__link:hover,
.button.alt:hover,
.woocommerce button.button:hover,
.woocommerce a.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.single_add_to_cart_button:hover {
    background: linear-gradient(135deg, var(--greenex-accent) 0%, var(--greenex-accent-alt) 100%);
    color: var(--greenex-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.button.secondary,
.ast-button-secondary {
    background: transparent;
    border: 2px solid var(--greenex-primary);
    color: var(--greenex-primary);
}

.button.secondary:hover,
.ast-button-secondary:hover {
    background: var(--greenex-primary);
    color: var(--greenex-white);
}

/* ========================================
   WOOCOMMERCE — PRODUCTOS
   ======================================== */

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    background: var(--greenex-white);
    border: 2px solid var(--greenex-bg-light);
    border-radius: var(--greenex-radius-lg);
    padding: 20px;
    transition: all var(--greenex-transition);
    box-shadow: var(--greenex-shadow-sm);
    animation: fadeInUp 0.5s ease;
}

.woocommerce ul.products li.product:hover,
.woocommerce-page ul.products li.product:hover {
    border-color: var(--greenex-primary);
    box-shadow: var(--greenex-shadow-lg);
    transform: translateY(-5px);
}

.woocommerce ul.products li.product h2,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    color: var(--greenex-text);
    font-weight: 600;
}

.woocommerce ul.products li.product .price,
.woocommerce div.product p.price,
.woocommerce div.product span.price {
    color: var(--greenex-primary);
    font-weight: 700;
    font-size: 1.4em;
    background: linear-gradient(135deg, var(--greenex-bg-light) 0%, var(--greenex-bg-mid) 100%);
    padding: 8px 16px;
    border-radius: var(--greenex-radius-sm);
    display: inline-block;
}

.woocommerce span.onsale {
    background: linear-gradient(135deg, var(--greenex-accent) 0%, var(--greenex-accent-alt) 100%);
    color: var(--greenex-dark);
    font-weight: 700;
    border-radius: 50%;
    padding: 10px;
}

.woocommerce ul.products li.product .ast-woo-product-category,
.product_meta .posted_in a {
    color: var(--greenex-primary);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.5px;
}

/* ========================================
   LINKS & TIPOGRAFÍA
   ======================================== */

a {
    color: var(--greenex-primary);
    transition: color var(--greenex-transition);
}

a:hover { color: var(--greenex-accent); }

h1, h2, h3, h4, h5, h6 {
    color: var(--greenex-text);
    font-weight: 700;
}

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

.site-footer {
    background: linear-gradient(135deg, var(--greenex-dark) 0%, #004d00 100%);
    color: var(--greenex-white);
    padding: 40px 20px;
}

.site-footer a               { color: var(--greenex-accent); }
.site-footer a:hover         { color: var(--greenex-white); }
.site-footer .widget-title   {
    color: var(--greenex-accent);
    border-bottom: 2px solid var(--greenex-accent);
    padding-bottom: 10px;
}

/* ========================================
   FORMULARIOS
   ======================================== */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
textarea,
select {
    border: 2px solid var(--greenex-bg-light);
    border-radius: var(--greenex-radius-sm);
    padding: 12px;
    transition: border-color var(--greenex-transition);
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--greenex-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 139, 34, 0.1);
}

/* ========================================
   MENSAJES WOOCOMMERCE
   ======================================== */

.woocommerce-message,
.woocommerce-info {
    border-top-color: var(--greenex-primary);
    background: var(--greenex-bg-light);
}

.woocommerce-message::before,
.woocommerce-info::before {
    color: var(--greenex-primary);
}

/* ========================================
   BREADCRUMBS
   ======================================== */

.ast-breadcrumbs-wrapper a,
.woocommerce-breadcrumb a    { color: var(--greenex-primary); }

.ast-breadcrumbs-wrapper a:hover,
.woocommerce-breadcrumb a:hover { color: var(--greenex-accent); }

/* ========================================
   BENEFITS CAROUSEL
   ======================================== */

.benefits-carousel-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
    overflow: hidden;
}

.benefits-carousel-container { position: relative; }

.benefits-title {
    text-align: center;
    font-size: 2.5em;
    color: var(--greenex-text);
    margin-bottom: 40px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--greenex-primary) 0%, var(--greenex-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.benefits-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
}

.benefits-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 10px 0;
    flex: 1;
}

.benefits-track::-webkit-scrollbar { display: none; }

.benefit-card {
    min-width: 280px;
    background: var(--greenex-white);
    border: 2px solid var(--greenex-bg-light);
    border-radius: var(--greenex-radius-xl);
    padding: 30px 20px;
    text-align: center;
    transition: all var(--greenex-transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
    animation: slideIn 0.5s ease;
}

.benefit-card:hover {
    border-color: var(--greenex-primary);
    box-shadow: 0 8px 30px rgba(34, 139, 34, 0.2);
    transform: translateY(-5px);
}

.benefit-icon {
    font-size: 3.5em;
    background: linear-gradient(135deg, var(--greenex-bg-light) 0%, var(--greenex-bg-mid) 100%);
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: all var(--greenex-transition);
}

.benefit-card:hover .benefit-icon {
    background: linear-gradient(135deg, var(--greenex-primary) 0%, var(--greenex-light) 100%);
    transform: scale(1.1) rotate(5deg);
}

.benefit-title {
    font-size: 1.3em;
    color: var(--greenex-text);
    margin-bottom: 10px;
    font-weight: 700;
}

.benefit-description {
    font-size: 0.95em;
    color: var(--greenex-muted);
    line-height: 1.6;
    margin: 0;
}

.carousel-nav {
    background: linear-gradient(135deg, var(--greenex-primary) 0%, var(--greenex-light) 100%);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--greenex-transition);
    color: var(--greenex-white);
    box-shadow: var(--greenex-shadow-md);
    flex-shrink: 0;
    z-index: 10;
}

.carousel-nav:hover {
    background: linear-gradient(135deg, var(--greenex-accent) 0%, var(--greenex-accent-alt) 100%);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.carousel-nav:active { transform: scale(0.95); }
.carousel-nav svg    { pointer-events: none; }

.carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--greenex-bg-light);
    border: 2px solid var(--greenex-primary);
    box-sizing: border-box;
    cursor: pointer;
    transition: all var(--greenex-transition);
    flex-shrink: 0;
}

.carousel-dot.active {
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, var(--greenex-primary) 0%, var(--greenex-light) 100%);
    border: none;
}

.carousel-dot:hover {
    background: var(--greenex-bg-mid);
    transform: scale(1.2);
}

/* ========================================
   ACTION BAR — BOTÓN COMPRAR
   ======================================== */

.greenex-action-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px auto 20px;
    padding: 0 20px;
}

.btn-comprar {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: var(--greenex-white);
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    transition: all var(--greenex-transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-comprar:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
    background: linear-gradient(135deg, #45a049 0%, #4CAF50 100%);
    color: var(--greenex-white);
}

.btn-comprar:active   { transform: translateY(0); }
.btn-comprar .btn-icon { width: 20px; height: 20px; flex-shrink: 0; }

/* ========================================
   ALINEACIÓN HEADER DERECHO
   ======================================== */

.site-header-primary-section-right { align-items: center; }

/* ========================================
   ÍCONO DE CUENTA EN HEADER
   ======================================== */

.header-account-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 12px;
    padding: 6px;
    border-radius: 50%;
    transition: all var(--greenex-transition);
    color: var(--greenex-white);
    text-decoration: none;
}

.header-account-icon:hover {
    color: var(--greenex-accent);
    background: rgba(255, 215, 0, 0.15);
    transform: scale(1.1);
}

.header-account-icon svg { width: 22px; height: 22px; }

/* ========================================
   HERO BANNER
   ======================================== */

.hero-banner {
    width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.hero-banner img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 600px;
    object-fit: cover;
}

/* ========================================
   ANIMACIONES
   ======================================== */

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

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

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .entry-title,
    .page-title           { font-size: 2em; }
    .entry-header,
    .ast-archive-description { padding: 40px 15px; }

    .benefits-title       { font-size: 1.8em; margin-bottom: 30px; }
    .benefits-carousel    { gap: 10px; }
    .benefit-card         { min-width: 240px; padding: 25px 15px; }
    .benefit-icon         { font-size: 2.8em; width: 70px; height: 70px; }
    .benefit-title        { font-size: 1.1em; }
    .benefit-description  { font-size: 0.9em; }
    .carousel-nav         { width: 40px; height: 40px; }
    .carousel-nav svg     { width: 20px; height: 20px; }

    .greenex-action-bar   { margin: 20px auto 15px; }
    .btn-comprar          { width: 100%; max-width: 280px; justify-content: center; font-size: 16px; padding: 12px 28px; }

    .header-account-icon      { margin-left: 8px; }
    .header-account-icon svg  { width: 20px; height: 20px; }

    .hero-banner img      { max-height: 300px; }
}

@media (max-width: 480px) {
    .carousel-nav         { display: none; }
    .benefits-carousel    { gap: 0; }
    .benefit-card         { min-width: 220px; }
    .btn-comprar          { max-width: 100%; }
}


/* ========================================
   SPRINT 1 — TRUST SIGNALS
   ======================================== */

.greenex-trust-signals {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
    padding: 14px 16px;
    background: var(--greenex-bg-light);
    border-radius: var(--greenex-radius-md);
    border: 1px solid var(--greenex-bg-mid);
}

.trust-item {
    font-size: 0.82em;
    color: var(--greenex-text);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

@media (max-width: 480px) {
    .greenex-trust-signals {
        gap: 8px;
    }
    .trust-item { font-size: 0.78em; }
}

/* ========================================
   SPRINT 1 — CARRITO VACÍO
   ======================================== */

.woocommerce-cart .cart-empty {
    text-align: center;
    padding: 20px 0 10px;
    font-size: 1.1em;
}

.woocommerce-cart .cart-empty p {
    color: var(--greenex-muted);
    font-size: 0.95em;
    margin-top: 6px;
}

.woocommerce-cart .return-to-shop {
    text-align: center;
    margin-top: 20px;
}

.woocommerce-cart .return-to-shop .button {
    background: linear-gradient(135deg, var(--greenex-primary) 0%, var(--greenex-light) 100%);
    color: var(--greenex-white);
    padding: 14px 32px;
    border-radius: var(--greenex-radius-md);
    font-weight: 600;
    font-size: 1em;
    text-decoration: none;
    display: inline-block;
    transition: all var(--greenex-transition);
}

.woocommerce-cart .return-to-shop .button:hover {
    transform: translateY(-2px);
    box-shadow: var(--greenex-shadow-md);
    color: var(--greenex-white);
}
