/*
Theme Name: Moana Editorial Personalizaciones
Theme URI: https://moanaeditorial.com
Description: Estilos personalizados y correcciones críticas de accesibilidad visual, contraste y simetría de logotipos para Moana Editorial. Inmune a saltos visuales y protección geométrica de emblemas.
Version: 1.7.1
Author: CTO Virtual - Moana Editorial
*/

/* ==========================================================================
1. VARIABLES Y DISEÑO GLOBAL (FONDO BORGOÑA Y TEXTOS)
========================================================================== */
body, .site-container, #page {
  background: radial-gradient(circle at center, #350614 0%, #170208 100%) !important;
  color: #F7F4EF !important;
  font-family: 'Playfair Display', 'Georgia', serif;
}

/* Tipografía cursiva elegante para "desde adentro" */
em, i, .serif-italic, .font-italic {
  font-family: 'Playfair Display', 'Georgia', serif !important;
  font-style: italic !important;
  color: #F5E2C3 !important; /* Tono champagne de alta visibilidad */
}

/* ==========================================================================
2. ARMONIZACIÓN DE BLOQUES DE NAVEGACIÓN SECUNDARIOS (GUTENBERG)
========================================================================== */
/* Asegura que si se usan bloques de navegación de WordPress en páginas internas, 
   respeten las mismas proporciones de la cabecera principal sin causar saltos */
.wp-block-navigation a,
.main-navigation a,
.nav-menu a {
  color: #F7F4EF !important;
  font-family: 'Montserrat', sans-serif !important;
  font-size: 14px !important; /* Sincronizado con header.php */
  font-weight: 600 !important;
  letter-spacing: 1.8px !important;
  text-transform: uppercase !important;
  transition: all 0.3s ease !important;
  text-decoration: none !important;
}

.wp-block-navigation a:hover,
.main-navigation a:hover,
.nav-menu a:hover {
  color: #F5E2C3 !important;
}

/* ==========================================================================
3. BOTONES PRINCIPALES DE ACCIÓN (HERO SECTION)
========================================================================== */
/* Botón Principal (Rojo Borgoña) */
.btn-primary,
.wp-block-button__link.wp-element-button,
a[href="libros"] {
  background-color: #7A0C2E !important;
  color: #F7F4EF !important;
  font-family: 'Montserrat', sans-serif !important;
  text-transform: uppercase !important;
  letter-spacing: 2px !important;
  padding: 14px 28px !important;
  border-radius: 4px !important;
  border: 2px solid #7A0C2E !important;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.btn-primary:hover,
.wp-block-button__link.wp-element-button:hover,
a[href*="libros"]:hover {
  background-color: #F5E2C3 !important;
  color: #170208 !important;
  border-color: #F5E2C3 !important;
  box-shadow: 0 6px 16px rgba(245, 226, 195, 0.25) !important;
  transform: translateY(-2px) !important;
}

/* Botón Secundario (Borde Dorado Transparente) */
.btn-secondary,
.wp-block-button.is-style-outline .wp-block-button__link,
a[href="obra"] {
  background-color: transparent !important;
  color: #F5E2C3 !important;
  font-family: 'Montserrat', sans-serif !important;
  text-transform: uppercase !important;
  letter-spacing: 2px !important;
  padding: 14px 28px !important;
  border-radius: 4px !important;
  border: 2px solid #F5E2C3 !important;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.btn-secondary:hover,
.wp-block-button.is-style-outline .wp-block-button__link:hover,
a[href*="obra"]:hover {
  background-color: rgba(245, 226, 195, 0.08) !important;
  color: #F7F4EF !important;
  border-color: #F7F4EF !important;
  transform: translateY(-2px) !important;
}

/* ==========================================================================
4. CONTROL DE SIMETRÍA Y GEOMETRÍA (EVITAR LOGOS ACHATADOS)
========================================================================== */
/* 4.1 EL EMBLEMA REDONDO CENTRAL (Proporción exacta vertical 600x780) */
.entry-content .wp-block-image:first-of-type img,
.site-main .wp-block-image:first-of-type img,
main .wp-block-image:first-of-type img,
#content .wp-block-image:first-of-type img,
img[src="1e5b47" i],
img[src*="emblema" i],
img[src*="vertical" i],
img[src*="alto-contraste" i],
img[class*="emblema" i],
svg:has(#Emblema) {
  aspect-ratio: 600 / 780 !important; /* Fuerza la geometría circular simétrica */
  width: 100% !important;
  max-width: 320px !important;         /* Establecido en los 320px perfectos */
  max-height: none !important;         
  height: auto !important;
  min-height: auto !important;         /* Evita alturas fijas impuestas por maquetadores */
  object-fit: contain !important;
  align-self: center !important;       /* Evita estiramiento por Flexbox */
  margin: 0 auto !important;
  display: block !important;
}

/* Forzar la caja contenedora de Gutenberg a respetar el tamaño de 320px */
.wp-block-image:has(img[src="1e5b47" i]),
.wp-block-image:has(img[src*="emblema" i]),
.wp-block-image:has(img[src*="vertical" i]),
.wp-block-image:has(img[src*="alto" i]),
.entry-content .wp-block-image:first-of-type,
.site-main .wp-block-image:first-of-type {
  width: 100% !important;
  max-width: 320px !important;
  height: auto !important;
  margin: 0 auto 2.5rem auto !important;
}

/* 4.2 EL LOGOTIPO HORIZONTAL DE CABECERA (Proporción exacta horizontal 1200x350) */
img[src="horizontal" i],
img[src*="cabecera" i],
svg:has(#Emblema-Circulo) {
  aspect-ratio: 1200 / 350 !important;
  width: 100% !important;
  max-width: 220px !important;
  height: auto !important;
  object-fit: contain !important;
}

/* 4.3 ESTABILIZACIÓN GENERAL DE CONTENEDORES PADRES */
.wp-block-image,
.custom-logo-link,
.site-logo {
  height: auto !important;
  min-height: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* ==========================================================================
5. OPTIMIZACIÓN DE TEXTO "NUEVA ZELANDA · ESPAÑA" (CONTRASTE Y TAMAÑO)
========================================================================== */
/* Busca el texto de ubicación directamente posterior al emblema central */
.wp-block-image:has(img[src="1e5b47" i]) ~ p,
.wp-block-image:has(img[src*="emblema" i]) ~ p,
.wp-block-image:has(img[src*="vertical" i]) ~ p,
.entry-content .wp-block-image:first-of-type ~ p,
.entry-content .wp-block-image:first-of-type ~ h2,
.entry-content .wp-block-image:first-of-type ~ h3,
.entry-content .wp-block-image:first-of-type ~ h4,
.site-main .wp-block-image:first-of-type ~ p,
.location-subtitle,
.custom-location-text {
  color: #F5E2C3 !important; /* Tono champagne de alta visibilidad */
  font-size: 20px !important;  
  font-weight: 600 !important; /* Peso semi-bold */
  letter-spacing: 12px !important; /* Espaciado elegante expandido */
  text-transform: uppercase !important;
  font-family: 'Montserrat', sans-serif !important;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.7) !important; 
  margin-top: 2rem !important;
  margin-bottom: 2.5rem !important;
  text-align: center !important;
  display: block !important;
}

/* ==========================================================================
6. PARCHE QUIRÚRGICO DE NEWSLETTER: ALTO CONTRASTE UNIFICADO Y ANTI-ROTURAS
========================================================================== */
.newsletter-bar .newsletter-form-container {
  max-width: 540px !important;
  margin: 0 auto !important;
  display: block !important;
}

.newsletter-bar .newsletter-form {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  width: 100% !important;
  gap: 0 !important;
}

.newsletter-bar .newsletter-input-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  width: 100% !important;
  height: 54px !important;
  border: 2px solid #fcd573 !important;
  border-radius: 4px !important;
  overflow: hidden !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
  box-sizing: border-box !important;
  margin-bottom: 24px !important;
}

/* Entrada de Email: Blanco puro sólido con tipografía interna oscura */
.newsletter-bar .newsletter-form input[type="email"] {
  flex: 1 !important;
  min-width: 0 !important;
  background-color: #ffffff !important;
  color: #1e0208 !important;
  font-size: 16px !important;
  padding: 0 20px !important;
  border: none !important;
  outline: none !important;
  height: 100% !important;
  box-sizing: border-box !important;
}

.newsletter-bar .newsletter-form input[type="email"]::placeholder {
  color: #555555 !important;
  opacity: 1 !important;
  font-weight: 500 !important;
}

/* Botón "SUSCRIBIRME": Fondo Crema Oscuro Mate */
html body .newsletter-bar .newsletter-form-container .newsletter-form .newsletter-input-row button,
html body .newsletter-bar .newsletter-form-container .newsletter-form .newsletter-input-row button[type="submit"],
html body .newsletter-bar .newsletter-form-container .newsletter-form .newsletter-input-row input[type="submit"],
.newsletter-bar .newsletter-input-row button {
  background: #e6ded4 !important;
  background-color: #e6ded4 !important;
  color: #1e0208 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 2px !important;
  padding: 0 28px !important;
  border: none !important;
  height: 100% !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
}

html body .newsletter-bar .newsletter-form-container .newsletter-form .newsletter-input-row button:hover,
html body .newsletter-bar .newsletter-form-container .newsletter-form .newsletter-input-row button[type="submit"]:hover,
html body .newsletter-bar .newsletter-form-container .newsletter-form .newsletter-input-row input[type="submit"]:hover,
.newsletter-bar .newsletter-input-row button:hover {
  background-color: #910d28 !important;
  color: #fcfaf7 !important;
}

/* Bloque Legal inferior apilado y alineado */
.newsletter-bar .newsletter-gdpr-wrap {
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  text-align: left !important;
}

.newsletter-bar .newsletter-gdpr-label {
  display: flex !important;
  align-items: flex-start !important;
  gap: 12px !important;
  width: 100% !important;
  cursor: pointer !important;
}

.newsletter-bar .newsletter-gdpr-label input[type="checkbox"] {
  margin-top: 3px !important;
  flex-shrink: 0 !important;
  width: 18px !important;
  height: 18px !important;
  accent-color: #910d28 !important;
}

.newsletter-bar .newsletter-gdpr-text {
  color: #e6ded4 !important;
  font-size: 13.5px !important;
  line-height: 1.5 !important;
}

.newsletter-bar .newsletter-gdpr-text a {
  color: #fcfaf7 !important;
  text-decoration: underline !important;
  text-underline-offset: 2px;
}

/* Caja informativa legal: Cumplimiento AAA opaco con tipografías crema */
.newsletter-bar .newsletter-gdpr-info {
  font-size: 13.5px !important;
  color: #fcfaf7 !important;
  line-height: 1.6 !important;
  background: #110105 !important;
  padding: 16px !important;
  border-radius: 4px !important;
  border: 1px solid rgba(252, 213, 115, 0.25) !important;
  opacity: 1 !important;
}

.newsletter-bar .newsletter-gdpr-info strong {
  color: #fcfaf7 !important;
  font-weight: 700 !important;
}

.moana-screen-reader-trap {
  position: absolute !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  height: 1px !important;
  width: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
}

/* Oculta el título pequeño repetido en la Tienda y archivos de WooCommerce */
.woocommerce-products-header .section-label,
.archive.woocommerce .section-label,
.woocommerce-page .page-header .section-label {
    display: none !important;
}

/* ==========================================================================
7. CORRECCIONES FINALES DE PASARELA Y ELIMINACIÓN DE RUIDO VISUAL
========================================================================== */
/* 7.1 Control estricto de la miniatura de la membresía en el Checkout */
.woocommerce-checkout .product-name img,
.woocommerce-checkout .wc-block-components-product-image,
.woocommerce-checkout .wc-block-components-product-image img,
.product-thumbnail img,
.wc-block-components-checkout-order-summary .wc-block-components-product-image {
    max-width: 65px !important;
    height: auto !important;
    border-radius: 4px !important;
    display: inline-block !important;
}

/* 7.2 Eliminación total de widgets por defecto y pies de página extra */
.widget_search, 
.widget_pages, 
.widget_archive, 
.widget_categories,
.sidebar,
#sidebar,
#secondary,
.widget-area,
.custom-background-parent-widgets {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Asegurar que el formulario de pago aproveche el ancho del contenedor */
.woocommerce-checkout .container--narrow,
.woocommerce-checkout #customer_details,
.woocommerce-checkout main {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
}

/* 7.3 Control de escala del emblema circular en la página de producto */
.single-product div.product .woocommerce-product-gallery,
.single-product .wc-block-components-product-image {
    max-width: 350px !important; 
    margin: 0 auto !important;
    float: none !important;
}

/* Reequilibrar la estructura para que los textos fluyan correctamente */
@media (min-width: 768px) {
    .single-product div.product {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 60px !important;
    }
    .single-product div.product .summary {
        float: none !important;
        width: auto !important;
        flex: 1 !important;
    }
}

/* ==========================================================================
8. OPTIMIZACIÓN ESTRUCTURAL Y ALTO CONTRASTE AAA PARA EL CHECKOUT CLÁSICO
========================================================================== */
/* 8.1 Alignment e Input styling */
.woocommerce-checkout form .form-row {
    display: block !important;
    width: 100% !important;
    margin-bottom: 22px !important;
    float: none !important;
    clear: both !important;
}

@media (min-width: 768px) {
    .woocommerce-checkout form .form-row-first {
        width: 48% !important;
        float: left !important;
        clear: none !important;
        margin-right: 4% !important;
    }
    .woocommerce-checkout form .form-row-last {
        width: 48% !important;
        float: right !important;
        clear: none !important;
        margin-right: 0 !important;
    }
    .woocommerce-checkout form::after {
        content: "" !important;
        display: table !important;
        clear: both !important;
    }
}

.woocommerce-checkout form .form-row label {
    display: block !important;
    color: #F7F4EF !important; 
    font-family: 'Montserrat', sans-serif !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    letter-spacing: 1.5px !important;
    margin-bottom: 8px !important;
    text-transform: uppercase !important;
}

.woocommerce-checkout form .form-row input.input-text,
.woocommerce-checkout form .form-row select {
    width: 100% !important;
    box-sizing: border-box !important;
    background-color: #ffffff !important; 
    color: #170208 !important;           
    border: 2px solid rgba(245, 226, 195, 0.2) !important;
    border-radius: 4px !important;
    padding: 14px 16px !important;
    font-size: 16px !important;
    font-family: 'Montserrat', sans-serif !important;
    height: auto !important;
}

/* 8.2 Error High Contrast formatting */
.woocommerce-error {
    background-color: #F7F4EF !important; 
    color: #170208 !important;           
    border-left: 6px solid #7A0C2E !important; 
    padding: 18px 24px !important;
    border-radius: 4px !important;
    list-style: none !important;
    margin-bottom: 35px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 600 !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4) !important;
}

.woocommerce-error li {
    color: #170208 !important;
    margin-bottom: 6px !important;
}
.woocommerce-error li:last-child {
    margin-bottom: 0 !important;
}
.woocommerce-error a {
    color: #7A0C2E !important;
    text-decoration: underline !important;
    font-weight: 700 !important;
}

.woocommerce-checkout form .form-row.woocommerce-invalid input.input-text {
    border: 2px solid #fcd573 !important; 
    background-color: #FFFDF9 !important;
    box-shadow: 0 0 10px rgba(252, 213, 115, 0.4) !important;
}

.woocommerce-checkout form .form-row.woocommerce-invalid label {
    color: #fcd573 !important; 
}

.woocommerce-checkout .payment_methods .payment_box {
    color: #1c1917 !important; 
}

.woocommerce-checkout .payment_methods .payment_box p {
    color: #292524 !important; 
}

.woocommerce-checkout .payment_methods .payment_box label {
    color: #1c1917 !important; 
    text-transform: none !important; 
    font-weight: 500; 
}

/* ==========================================================================
9. PARCHE PROTECTOR DE ALTA ESPECIFICIDAD: ELIMINACIÓN DE CÁPSULAS DE LOGOS
========================================================================== */
/* Forzamos que el contenedor del logo de cabecera sea 100% transparente y plano */
html body .logo-container {
  background-color: transparent !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

/* CORRECCIÓN DEFINITIVA DE REVERSIÓN: Neutraliza el óvalo crema heredado de la Home */
html body .hero-badge-container {
  background-color: transparent !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

/* ==========================================================================
   SANEAMIENTO VISUAL DE LA TIENDA (MOANA EDITORIAL)
   ========================================================================== */

/* 1. Ocultar la cesta secundaria que duplica la de la cabecera */
.woocommerce-shop .shop-header .cart-contents,
.woocommerce-shop .woocommerce-products-header .moana-cart-button,
.post-type-archive-product .shop-actions .cart-link,
.woocommerce-shop div:not(header) > .cart-contents {
    display: none !important;
}

/* 2. Si la cesta secundaria es un enlace independiente bajo el título */
.woocommerce-shop .moana-secondary-cart,
.woocommerce-shop .header-cart-duplicate {
    display: none !important;
}

/* ==========================================================================
   COMPACTACIÓN ARMÓNICA DE LA CABECERA DE LA TIENDA (MOANA EDITORIAL)
   ========================================================================== */

/* Anular el exceso de margen y relleno bajo el título de la tienda */
html body.woocommerce-shop .page-header {
    padding-bottom: 0px !important;
    margin-bottom: 0px !important;
}

/* Reducir el margen inferior de la línea divisoria dorada */
html body.woocommerce-shop .page-header .divider {
    margin-bottom: 8px !important;
}

/* Ajustar el inicio de la cuadrícula de productos */
html body.woocommerce-shop .section {
    padding-top: 16px !important;
}

/* ==========================================================================
   FICHA DE PRODUCTO EDITORIAL ACCESIBLE (MOANA EDITORIAL)
   ========================================================================== */

/* 1. Estructura principal en dos columnas (Grid) para escritorio */
@media (min-width: 860px) {
    .single-product div.product {
        display: grid !important;
        grid-template-columns: 420px 1fr !important;
        grid-template-areas:
            "galeria resumen"
            "pestanas pestanas" !important;
        gap: 50px 70px !important;
        max-width: 1200px !important;
        margin: 40px auto !important;
        padding: 0 24px !important;
        box-sizing: border-box !important;
    }

    .single-product div.product .woocommerce-product-gallery {
        grid-area: galeria !important;
        width: 100% !important;
        float: none !important;
        margin: 0 !important;
    }

    .single-product div.product .summary.entry-summary {
        grid-area: resumen !important;
        width: 100% !important;
        float: none !important;
        margin: 0 !important;
    }

    .single-product div.product .woocommerce-tabs {
        grid-area: pestanas !important;
        width: 100% !important;
        clear: both !important;
        margin-top: 50px !important;
        border-top: 1px solid rgba(245, 226, 195, 0.15) !important;
        padding-top: 40px !important;
    }
}

/* 2. Adaptación a dispositivos móviles */
@media (max-width: 859px) {
    .single-product div.product {
        display: flex !important;
        flex-direction: column !important;
        gap: 30px !important;
        padding: 20px 16px !important;
    }

    .single-product div.product .woocommerce-product-gallery,
    .single-product div.product .summary.entry-summary,
    .single-product div.product .woocommerce-tabs {
        width: 100% !important;
        float: none !important;
    }
}

/* 3. Tipografía y jerarquía en la columna de compra (Resumen) */
.single-product .summary h1.product_title {
    font-family: 'Playfair Display', Georgia, serif !important;
    color: #F5E2C3 !important;
    font-size: 34px !important;
    line-height: 1.25 !important;
    margin: 0 0 12px 0 !important;
}

.single-product .summary p.price,
.single-product .summary span.price {
    font-size: 26px !important;
    color: #F5E2C3 !important;
    font-weight: 700 !important;
    margin-bottom: 20px !important;
}

.single-product .summary .woocommerce-product-details__short-description {
    font-family: 'Georgia', serif !important;
    font-size: 16px !important;
    line-height: 1.7 !important;
    color: #E0DCD5 !important;
    margin-bottom: 30px !important;
    max-width: 650px !important;
}

/* 4. Botón de reserva en preventa destacado */
.single-product .summary form.cart {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    margin: 25px 0 35px 0 !important;
}

.single-product .summary form.cart .button {
    background-color: #7A0C2E !important;
    color: #F7F4EF !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    padding: 15px 32px !important;
    border: 2px solid #7A0C2E !important;
    border-radius: 4px !important;
    transition: all 0.3s ease !important;
}

.single-product .summary form.cart .button:hover {
    background-color: #F5E2C3 !important;
    color: #170208 !important;
    border-color: #F5E2C3 !important;
}

/* 5. Integración armónica de las pestañas en el tema oscuro */
.woocommerce-tabs ul.tabs {
    background: transparent !important;
    border-bottom: 1px solid rgba(245, 226, 195, 0.2) !important;
    padding: 0 !important;
    margin: 0 0 30px 0 !important;
    display: flex !important;
    gap: 10px !important;
}

.woocommerce-tabs ul.tabs::before,
.woocommerce-tabs ul.tabs::after {
    display: none !important;
}

.woocommerce-tabs ul.tabs li {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.woocommerce-tabs ul.tabs li a {
    color: rgba(247, 244, 239, 0.7) !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 14px !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
    padding: 12px 20px !important;
    display: inline-block !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

.woocommerce-tabs ul.tabs li.active a {
    color: #F5E2C3 !important;
    border-bottom: 2px solid #F5E2C3 !important;
}

.woocommerce-tabs .panel {
    background: transparent !important;
    color: #E0DCD5 !important;
    font-family: 'Georgia', serif !important;
    font-size: 16px !important;
    line-height: 1.8 !important;
    padding: 0 !important;
}

.woocommerce-tabs .panel h2 {
    display: none !important; /* Oculta el encabezado repetido 'Descripción' */
}

/* ==========================================================================
   SUPRESIÓN DEL FORMULARIO DE CUPÓN EN EL CARRITO (MOANA EDITORIAL)
   ========================================================================== */
.woocommerce-cart .coupon,
.woocommerce-cart table.cart td.actions .coupon {
    display: none !important;
}

/* Reajustar el botón de actualizar carrito si quedara descolocado */
.woocommerce-cart table.cart td.actions {
    text-align: right !important;
}

/* ==========================================================================
   ESTILIZACIÓN ACCESIBLE DEL CUPÓN EN CHECKOUT
   ========================================================================== */
.woocommerce-checkout form.checkout_coupon,
.woocommerce-checkout .woocommerce-form-coupon {
    background-color: rgba(245, 226, 195, 0.04) !important;
    border: 1px solid rgba(245, 226, 195, 0.15) !important;
    border-radius: 4px !important;
    padding: 20px !important;
    margin-bottom: 30px !important;
    display: flex !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
    align-items: center !important;
}

/* Campo de texto para escribir el código */
.woocommerce-checkout form.checkout_coupon input[type="text"] {
    background-color: #110105 !important;
    border: 1px solid #F5E2C3 !important;
    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF !important;
    caret-color: #F5E2C3 !important;
    font-family: 'Georgia', serif !important;
    font-size: 15px !important;
    padding: 10px 16px !important;
    border-radius: 4px !important;
    height: 46px !important;
    box-sizing: border-box !important;
    flex: 1 1 240px !important;
    outline: none !important;
}

.woocommerce-checkout form.checkout_coupon input[type="text"]:focus {
    border-color: #F5E2C3 !important;
    box-shadow: 0 0 0 3px rgba(245, 226, 195, 0.25) !important;
}

/* Botón "Aplicar cupón" */
.woocommerce-checkout form.checkout_coupon button[name="apply_coupon"] {
    background-color: #7A0C2E !important;
    color: #F7F4EF !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    letter-spacing: 1.2px !important;
    text-transform: uppercase !important;
    padding: 0 24px !important;
    height: 46px !important;
    border: 2px solid #7A0C2E !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.woocommerce-checkout form.checkout_coupon button[name="apply_coupon"]:hover {
    background-color: #F5E2C3 !important;
    color: #170208 !important;
    border-color: #F5E2C3 !important;
}

/* ==========================================================================
   MÓDULO DE CUPÓN ACCESIBLE EN CHECKOUT (MOANA EDITORIAL)
   ========================================================================== */

/* 1. Ocultar el aviso superior redundante y su icono roto */
.woocommerce-checkout .woocommerce-form-coupon-toggle,
.woocommerce-checkout .woocommerce-info::before {
    display: none !important;
    content: none !important;
}

/* 2. Contenedor del formulario en una sola fila integrada */
.woocommerce-checkout form.checkout_coupon,
.woocommerce-checkout .woocommerce-form-coupon {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 12px !important;
    background-color: rgba(245, 226, 195, 0.04) !important;
    border: 1px solid rgba(245, 226, 195, 0.15) !important;
    border-radius: 4px !important;
    padding: 16px 20px !important;
    margin: 0 0 25px 0 !important;
    max-width: 600px !important;
    box-sizing: border-box !important;
}

/* 3. Desactivar márgenes y flotaciones de los párrafos nativos */
.woocommerce-checkout form.checkout_coupon p.form-row {
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    width: auto !important;
}

.woocommerce-checkout form.checkout_coupon p.form-row-first {
    flex: 1 1 240px !important;
}

.woocommerce-checkout form.checkout_coupon p.form-row-last {
    flex: 0 0 auto !important;
}

/* 4. Campo de entrada del código */
.woocommerce-checkout form.checkout_coupon input#coupon_code {
    width: 100% !important;
    height: 48px !important;
    background-color: #110105 !important;
    border: 1px solid #F5E2C3 !important;
    border-radius: 4px !important;
    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF !important;
    caret-color: #F5E2C3 !important;
    font-family: 'Georgia', serif !important;
    font-size: 15px !important;
    padding: 0 16px !important;
    box-sizing: border-box !important;
    outline: none !important;
}

.woocommerce-checkout form.checkout_coupon input#coupon_code:focus {
    border-color: #F5E2C3 !important;
    box-shadow: 0 0 0 3px rgba(245, 226, 195, 0.25) !important;
}

/* 5. Botón de aplicación del cupón */
.woocommerce-checkout form.checkout_coupon button[name="apply_coupon"] {
    height: 48px !important;
    background-color: #7A0C2E !important;
    color: #F7F4EF !important;
    border: 2px solid #7A0C2E !important;
    border-radius: 4px !important;
    padding: 0 24px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.2px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}

.woocommerce-checkout form.checkout_coupon button[name="apply_coupon"]:hover {
    background-color: #F5E2C3 !important;
    color: #170208 !important;
    border-color: #F5E2C3 !important;
}

