/* ============================================================================
 * Melasty España — child theme custom CSS
 * Réplica visual de melastyperu.com (Tailwind v4 JIT browser + IBM Plex Sans).
 *
 * Paleta R5 (corporativa Melasty) — alineada a melastyperu.com (B10):
 *   Primary brand:      red-500  #ef4444   (accents, CTAs primarios — origen)
 *   Hover/dark:         red-600  #dc2626   (hover de bg/text + `to` del gradient)
 *   Text primary:       gray-900 #111827   (body + headings)
 *   Text secondary:     gray-700 #374151
 *   Text muted:         gray-500 #6b7280
 *   Background default: white   #ffffff
 *   Background subtle:  gray-50  #f9fafb
 *   Border default:     gray-200 #e5e7eb
 *
 * Tipografía: IBM Plex Sans (Google Fonts) — pesos 300/400/500/600/700 + italic.
 * ===========================================================================*/

:root {
    --melasty-color-primary:        #ef4444;
    --melasty-color-primary-hover:  #dc2626;
    --melasty-color-primary-dark:   #b91c1c;
    --melasty-color-text:           #111827;
    --melasty-color-text-secondary: #374151;
    --melasty-color-text-muted:     #6b7280;
    --melasty-color-bg:             #ffffff;
    --melasty-color-bg-subtle:      #f9fafb;
    --melasty-color-bg-dark:        #111827;
    --melasty-color-border:         #e5e7eb;

    --melasty-font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    --melasty-radius-sm: 0.25rem;
    --melasty-radius-md: 0.5rem;
    --melasty-radius-lg: 0.75rem;

    --melasty-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --melasty-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
    --melasty-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* ----------------------------------------------------------------------------
 * Tipografía global
 * --------------------------------------------------------------------------*/
body {
    font-family: var(--melasty-font-sans);
    color: var(--melasty-color-text);
    background: var(--melasty-color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--melasty-font-sans);
    font-weight: 700;
    color: var(--melasty-color-text);
    line-height: 1.25;
    letter-spacing: -0.025em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.875rem); }
h4 { font-size: clamp(1.125rem, 2.5vw, 1.5rem); }

p {
    color: var(--melasty-color-text-secondary);
    line-height: 1.7;
}

a {
    color: var(--melasty-color-primary-dark);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--melasty-color-primary);
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

/* ----------------------------------------------------------------------------
 * Header — sticky con shadow
 * --------------------------------------------------------------------------*/
.site-header,
header.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--melasty-color-bg);
    box-shadow: var(--melasty-shadow-md);
    padding: 1rem 0;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.site-header .logo img {
    height: 40px;
    width: auto;
}

.site-header nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-header nav a {
    color: var(--melasty-color-text);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.site-header nav a:hover {
    color: var(--melasty-color-primary);
    text-decoration: none;
}

/* ----------------------------------------------------------------------------
 * Hero — gradient rojo Melasty con CTA central
 * --------------------------------------------------------------------------*/
.melasty-hero {
    background: linear-gradient(135deg, var(--melasty-color-primary) 0%, var(--melasty-color-primary-dark) 100%);
    color: var(--melasty-color-bg);
    padding: clamp(4rem, 10vw, 8rem) 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.melasty-hero h1 {
    color: var(--melasty-color-bg);
    margin-bottom: 1.5rem;
    max-width: 56rem;
    margin-left: auto;
    margin-right: auto;
}

.melasty-hero p.subtitle {
    color: rgba(255, 255, 255, 0.92);
    font-size: 1.25rem;
    max-width: 42rem;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}

.melasty-hero .btn-row {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ----------------------------------------------------------------------------
 * Botones — primario (negro hover rojo) y secundario (outline blanco)
 * --------------------------------------------------------------------------*/
.btn,
.button,
button.btn,
a.btn,
.wp-block-button__link {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--melasty-radius-md);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 2px solid transparent;
    line-height: 1.25;
}

.btn-primary,
.wp-block-button__link {
    background: var(--melasty-color-text);
    color: var(--melasty-color-bg);
    border-color: var(--melasty-color-text);
}

.btn-primary:hover,
.wp-block-button__link:hover {
    background: var(--melasty-color-primary);
    border-color: var(--melasty-color-primary);
    color: var(--melasty-color-bg);
    text-decoration: none;
}

.btn-outline-light {
    background: transparent;
    color: var(--melasty-color-bg);
    border-color: var(--melasty-color-bg);
}

.btn-outline-light:hover {
    background: var(--melasty-color-bg);
    color: var(--melasty-color-text);
    text-decoration: none;
}

.btn-secondary {
    background: var(--melasty-color-bg);
    color: var(--melasty-color-text);
    border-color: var(--melasty-color-border);
}

.btn-secondary:hover {
    border-color: var(--melasty-color-primary);
    color: var(--melasty-color-primary);
    text-decoration: none;
}

/* ----------------------------------------------------------------------------
 * Secciones de contenido
 * --------------------------------------------------------------------------*/
.melasty-section {
    padding: clamp(3rem, 8vw, 6rem) 1.5rem;
    max-width: 1280px;
    margin: 0 auto;
}

.melasty-section-subtle {
    background: var(--melasty-color-bg-subtle);
}

.melasty-section h2 {
    text-align: center;
    margin-bottom: 1rem;
}

.melasty-section .lead {
    text-align: center;
    max-width: 42rem;
    margin: 0 auto 3rem;
    color: var(--melasty-color-text-muted);
    font-size: 1.125rem;
}

/* ----------------------------------------------------------------------------
 * Grid de productos (cards)
 * --------------------------------------------------------------------------*/
.melasty-product-grid,
.woocommerce ul.products,
ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.melasty-product-card,
.woocommerce ul.products li.product {
    background: var(--melasty-color-bg);
    border: 1px solid var(--melasty-color-border);
    border-radius: var(--melasty-radius-md);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    width: auto !important;
    margin: 0 !important;
}

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

.melasty-product-card .img-wrap,
.woocommerce ul.products li.product img {
    aspect-ratio: 1 / 1;
    width: 100%;
    object-fit: cover;
    display: block;
    background: var(--melasty-color-bg-subtle);
}

.melasty-product-card .body,
.woocommerce ul.products li.product .button-wrap,
.woocommerce ul.products li.product .price {
    padding: 0 1.25rem;
}

.melasty-product-card h3,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 1.25rem 1.25rem 0.5rem;
    color: var(--melasty-color-text);
}

.melasty-product-card .description {
    color: var(--melasty-color-text-muted);
    font-size: 0.875rem;
    padding: 0 1.25rem;
    margin-bottom: 1rem;
    flex-grow: 1;
    line-height: 1.5;
}

.melasty-product-card .price,
.woocommerce ul.products li.product .price {
    font-weight: 700;
    color: var(--melasty-color-primary-dark);
    font-size: 1.125rem;
    padding: 0 1.25rem;
}

.melasty-product-card .actions,
.woocommerce ul.products li.product .button {
    margin: 1.25rem;
    display: flex;
    gap: 0.5rem;
}

/* RFQ button overrides */
.melasty-rfq-button,
a.melasty-rfq-button {
    background: var(--melasty-color-primary);
    color: var(--melasty-color-bg) !important;
    padding: 0.625rem 1.25rem;
    border-radius: var(--melasty-radius-sm);
    font-weight: 600;
    width: 100%;
    text-align: center;
    display: block;
}

.melasty-rfq-button:hover {
    background: var(--melasty-color-primary-dark);
    text-decoration: none !important;
}

/* ----------------------------------------------------------------------------
 * Diferenciadores ("¿Por qué elegir Melasty?") — 3 cols con icono
 * --------------------------------------------------------------------------*/
.melasty-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.melasty-feature {
    text-align: center;
    padding: 2rem 1.5rem;
}

.melasty-feature .icon {
    width: 3.5rem;
    height: 3.5rem;
    background: linear-gradient(135deg, var(--melasty-color-primary) 0%, var(--melasty-color-primary-dark) 100%);
    color: var(--melasty-color-bg);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.melasty-feature h3 {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.melasty-feature p {
    color: var(--melasty-color-text-muted);
    line-height: 1.6;
}

/* ----------------------------------------------------------------------------
 * CTA banner (sección "Solicita presupuesto")
 * --------------------------------------------------------------------------*/
.melasty-cta-banner {
    background: var(--melasty-color-bg-dark);
    color: var(--melasty-color-bg);
    padding: clamp(3rem, 8vw, 5rem) 1.5rem;
    text-align: center;
    border-radius: 0;
}

.melasty-cta-banner h2 {
    color: var(--melasty-color-bg);
    margin-bottom: 1rem;
}

.melasty-cta-banner p {
    color: rgba(255, 255, 255, 0.85);
    max-width: 36rem;
    margin: 0 auto 2rem;
    font-size: 1.125rem;
}

/* ----------------------------------------------------------------------------
 * Footer — fondo negro con cols + redes + legales
 * --------------------------------------------------------------------------*/
.site-footer,
footer.site-footer {
    background: var(--melasty-color-bg-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 4rem 1.5rem 2rem;
    margin-top: 0;
}

.site-footer .container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
}

.site-footer h4,
.site-footer .widget-title {
    color: var(--melasty-color-bg);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

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

.site-footer ul li {
    margin-bottom: 0.625rem;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.75);
    transition: color 0.2s ease;
}

.site-footer a:hover {
    color: var(--melasty-color-primary-hover);
    text-decoration: none;
}

.site-footer .copyright {
    grid-column: 1 / -1;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    margin-top: 2rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

.site-footer .social-icons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.site-footer .social-icons a {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    transition: background 0.2s ease;
}

.site-footer .social-icons a:hover {
    background: var(--melasty-color-primary);
}

/* ----------------------------------------------------------------------------
 * WooCommerce — single product
 * --------------------------------------------------------------------------*/
.single-product .product .product_title {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    margin-bottom: 1rem;
}

.single-product .price {
    color: var(--melasty-color-primary-dark);
    font-size: 1.5rem;
    font-weight: 700;
}

.single-product div.product .woocommerce-tabs ul.tabs li.active {
    background: var(--melasty-color-bg);
    border-color: var(--melasty-color-primary);
}

.single-product div.product .woocommerce-tabs ul.tabs li a {
    color: var(--melasty-color-text);
}

.melasty-rfq-block {
    background: var(--melasty-color-bg-subtle);
    border-left: 4px solid var(--melasty-color-primary);
    padding: 1.5rem;
    border-radius: var(--melasty-radius-md);
    margin: 1.5rem 0;
}

.melasty-rfq-block__intro {
    color: var(--melasty-color-text-secondary);
    font-size: 1.025rem;
    margin-bottom: 1.25rem;
}

.melasty-rfq-block__cta {
    margin-bottom: 1rem;
}

.melasty-rfq-block__primary {
    display: inline-block;
    background: var(--melasty-color-primary);
    color: var(--melasty-color-bg);
    padding: 0.875rem 2rem;
    border-radius: var(--melasty-radius-md);
    font-weight: 600;
    text-decoration: none;
}

.melasty-rfq-block__alts {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1.5rem;
    font-size: 0.95rem;
}

/* ----------------------------------------------------------------------------
 * WooCommerce — checkout / cart / mi-cuenta — alineación con paleta
 * --------------------------------------------------------------------------*/
.woocommerce a.button,
.woocommerce-page a.button,
.woocommerce button.button,
.woocommerce input.button {
    background: var(--melasty-color-primary);
    color: var(--melasty-color-bg);
    border-radius: var(--melasty-radius-md);
    font-weight: 600;
    border: none;
    padding: 0.75rem 1.5rem;
}

.woocommerce a.button:hover,
.woocommerce-page a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
    background: var(--melasty-color-primary-dark);
    color: var(--melasty-color-bg);
}

.woocommerce span.onsale {
    background: var(--melasty-color-primary);
    color: var(--melasty-color-bg);
    border-radius: var(--melasty-radius-sm);
}

/* ----------------------------------------------------------------------------
 * Breadcrumbs
 * --------------------------------------------------------------------------*/
.melasty-breadcrumb {
    font-size: 0.875rem;
    color: var(--melasty-color-text-muted);
    margin-bottom: 1.5rem;
    padding: 0.75rem 0;
}

.melasty-breadcrumb a {
    color: var(--melasty-color-text-muted);
}

.melasty-breadcrumb a:hover {
    color: var(--melasty-color-primary-dark);
}

.melasty-breadcrumb .separator {
    margin: 0 0.5rem;
    color: var(--melasty-color-border);
}

/* ----------------------------------------------------------------------------
 * RTL overrides (ar)
 * --------------------------------------------------------------------------*/
html[dir="rtl"] body { text-align: right; }
html[dir="rtl"] .site-header nav ul { flex-direction: row-reverse; }
html[dir="rtl"] .melasty-rfq-block { border-left: none; border-right: 4px solid var(--melasty-color-primary); }

/* ----------------------------------------------------------------------------
 * Responsive — breakpoints simples
 * --------------------------------------------------------------------------*/
@media (max-width: 768px) {
    .site-header .container { flex-direction: column; gap: 1rem; }
    .site-header nav ul { flex-wrap: wrap; gap: 1rem; }
    .melasty-hero .btn-row { flex-direction: column; align-items: stretch; padding: 0 2rem; }
}

/* ============================================================================
 * B10 — fidelidad melastyperu.com (home Elementor)
 * ===========================================================================*/

/* WooCommerce products widget en sección S2: replicar look de cards melastyperu.com */
.elementor-widget-wc-products ul.products li.product,
.elementor-widget-wc-products ul.products li.product:hover {
    background: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, .07);
    overflow: hidden;
    transition: box-shadow .2s ease;
    padding: 0 0 1rem 0;
}
.elementor-widget-wc-products ul.products li.product:hover {
    box-shadow: 0 20px 25px rgba(0, 0, 0, .1);
}
.elementor-widget-wc-products ul.products li.product img {
    object-fit: contain;
    height: 16rem;
    width: 100%;
    background: #f9fafb;
    margin: 0;
    padding: 1rem;
    box-sizing: border-box;
}
.elementor-widget-wc-products ul.products li.product .woocommerce-loop-product__title {
    padding: 0 1.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.35;
    min-height: 3rem;
}
.elementor-widget-wc-products ul.products li.product .price {
    padding: 0 1.5rem;
    color: #ef4444;
    font-weight: 700;
}
.elementor-widget-wc-products ul.products li.product .button,
.elementor-widget-wc-products ul.products li.product a.button {
    margin: 1rem 1.5rem 0;
    background: #ef4444;
    color: #fff;
    font-weight: 600;
    border-radius: 0.5rem;
    padding: 0.625rem 1rem;
    text-align: center;
    display: block;
}
.elementor-widget-wc-products ul.products li.product .button:hover {
    background: #dc2626;
    color: #fff;
}

/* Badges modo de venta — añadidos por inc/purchase-mode.php */
.melasty-badge-mode {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    margin: 0.75rem 1.5rem 0.25rem;
}
.melasty-badge-ecom { background: #dcfce7; color: #166534; }
.melasty-badge-rfq  { background: #eff6ff; color: #1e40af; }

/* Testimonios genéricos S4: marca visual sutil + disclaimer */
.elementor-section.testimonial-generic .card-testimonial-generic {
    height: 100%;
}
.testimonial-disclaimer {
    font-size: 0.8125rem;
    color: #6b7280;
    font-style: italic;
    text-align: center;
    margin-top: 1.5rem;
}

/* Iconos circulares de S3 (¿Por qué?) refinados — Pro icon-box ya hace el círculo,
   pero forzamos color exacto y size para fidelidad pixel */
.elementor-widget-icon-box .elementor-icon-wrapper .elementor-icon {
    width: 4rem;
    height: 4rem;
}

/* Sección RR.SS. S7 — placeholders con data-pending */
.elementor-section a[data-pending="true"] {
    opacity: 0.85;
    transition: opacity .2s, color .2s;
}
.elementor-section a[data-pending="true"]:hover {
    opacity: 1;
    color: #dc2626 !important;
}

/* RTL fixes específicos para AR */
html[dir="rtl"] .elementor-section.testimonial-generic .card-testimonial-generic {
    text-align: right;
}
html[dir="rtl"] .elementor-widget-icon-box .elementor-icon-box-content {
    text-align: center; /* keep center for stacked icon-box */
}

/* Smooth scroll para anclas (#productos, #contacto) */
html { scroll-behavior: smooth; }

/* ============================================================================
 * B10.1 — fixes de alineación cards + header edge-to-edge + logo visible
 * ===========================================================================*/

/* B10.1 fix #1: cards de wc-products altura uniforme + botón al fondo */
.elementor-widget-wc-products ul.products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
@media (max-width: 980px) {
    .elementor-widget-wc-products ul.products {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .elementor-widget-wc-products ul.products {
        grid-template-columns: 1fr;
    }
}
.elementor-widget-wc-products ul.products li.product {
    display: flex;
    flex-direction: column;
    /* invalidar floats / clear de WC defaults */
    width: 100% !important;
    margin: 0 !important;
    float: none !important;
    clear: none !important;
}
.elementor-widget-wc-products ul.products li.product > a:first-of-type {
    display: flex;
    flex-direction: column;
    flex: 1; /* expandir lo que va antes del botón */
    text-decoration: none;
}
.elementor-widget-wc-products ul.products li.product .woocommerce-loop-product__title {
    flex: 1; /* empuja el precio + botón al fondo */
    display: flex;
    align-items: flex-start;
    margin: 0.75rem 1.5rem 0.5rem;
}
.elementor-widget-wc-products ul.products li.product .price {
    margin-top: auto;
}

/* B10.1 fix #2: header full-width en bg pero contenido contained */
header.site-header {
    width: 100%;
    margin: 0;
    padding: 0; /* el padding lo maneja el .container interno */
}
header.site-header .container {
    padding: 1rem 1.5rem; /* mantener padding lateral del contenido */
}

/* B10.1 fix #2b: footer full-width en bg pero contenido contained */
footer.site-footer {
    width: 100%;
    margin: 0;
    padding: 0;
}
footer.site-footer .container {
    padding: 4rem 1.5rem 2rem;
}

/* B10.1 fix #3: logo visible — forzar size + display block en el a.logo */
header.site-header .logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}
header.site-header .logo img {
    height: 48px !important; /* logo más visible (vs 40 antes) */
    width: auto !important;
    max-width: 200px;
    display: block;
}

/* B10.1 fix #3b: si por algún motivo no hay custom_logo, fallback span más grande */
header.site-header .logo > span {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--melasty-color-primary);
    line-height: 1;
}

/* Elementor canvas → default migration: asegurar que las secciones full-width
   de Elementor se mantienen edge-to-edge cuando hay header/footer del theme */
body.page-template-default .elementor .elementor-section.elementor-section-stretched,
body.page-template-default .elementor .elementor-section.elementor-section-full_width {
    width: 100%;
    max-width: 100%;
}

/* B10.1 fix #4: ocultar título h1 de la home (Hello Elementor parent lo imprime
   por defecto en page.php pero queremos que el hero Elementor sea el primer
   bloque visible) */
body.home .entry-header,
body.home header.entry-header,
body.home .page-header,
body.home .post-header,
body.elementor-page > main > .entry-header,
body.elementor-page main > article > header,
body.elementor-page .ehp-header { display: none !important; }

/* B10.1 fix #5: refuerzo header full-width — el bg blanco debe ir edge-to-edge.
   Hello Elementor parent puede aplicar max-width al body o a un wrapper externo;
   forzamos el header a 100vw exactos (compensando scrollbar via calc opcional) */
header.site-header {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* idem footer */
footer.site-footer {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* También para todas las elementor sections que sean top-level */
body.elementor-page .elementor-section.elementor-top-section {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    max-width: 100vw;
}

/* B10.1 fix #6: Hello Elementor parent envuelve el contenido en
   <main class="site-main"> + <div class="page-content"> con padding/max-width
   que rompe el edge-to-edge. En elementor-page los anulamos. */
body.elementor-page main#content,
body.elementor-page main.site-main,
body.elementor-page main.site-main > .page-content,
body.elementor-page > main > main.site-main,
body.elementor-page .page-content {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Tras anular wrappers, el primer <main> del child theme también queda
   sin padding para no introducir margen */
body.elementor-page > main#main {
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
}

/* Y las secciones Elementor recuperan su 100vw */
body.elementor-page .elementor-section.elementor-top-section {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Header y footer se quedan a 100% normal (no calc 100vw que rompe en mobile) */
header.site-header {
    width: 100%;
    margin: 0;
}
footer.site-footer {
    width: 100%;
    margin: 0;
}

/* B10.1 fix #7: WooCommerce wc-products widget renderiza con `columns-4`
   hardcoded y CSS de WC default que da `width: 22%` a li.product. Forzamos
   grid 3 cols, anulamos floats/widths legacy de WC, alineamos cards. */

.elementor-widget-wc-products .woocommerce,
.elementor-widget-wc-products .woocommerce.columns-4,
.elementor-widget-wc-products .woocommerce.columns-3,
.elementor-widget-wc-products .woocommerce.columns-2 {
    width: 100% !important;
}

.elementor-widget-wc-products ul.products,
.elementor-widget-wc-products ul.products.columns-4,
.elementor-widget-wc-products ul.products.columns-3,
.elementor-widget-wc-products ul.products.columns-2 {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.5rem !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.elementor-widget-wc-products ul.products > li.product {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 0 1.25rem !important;
    float: none !important;
    clear: none !important;
    background: #ffffff !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    display: flex !important;
    flex-direction: column !important;
    transition: box-shadow .2s ease;
}

.elementor-widget-wc-products ul.products > li.product:hover {
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.12);
}

.elementor-widget-wc-products ul.products > li.product > a:first-of-type {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 0 auto !important;
    text-decoration: none !important;
    padding: 0 !important;
}

.elementor-widget-wc-products ul.products > li.product > a img,
.elementor-widget-wc-products ul.products > li.product img.attachment-woocommerce_thumbnail {
    width: 100% !important;
    height: 16rem !important;
    object-fit: contain !important;
    background: #f9fafb !important;
    margin: 0 !important;
    padding: 1rem !important;
    box-sizing: border-box !important;
    display: block !important;
}

.elementor-widget-wc-products ul.products > li.product .woocommerce-loop-product__title {
    padding: 0.75rem 1.25rem 0.5rem !important;
    margin: 0 !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #111827 !important;
    line-height: 1.35 !important;
    flex: 1 0 auto;
}

.elementor-widget-wc-products ul.products > li.product .price {
    padding: 0.25rem 1.25rem 0.75rem !important;
    margin: 0 !important;
    color: #ef4444 !important;
    font-weight: 700 !important;
    font-size: 1.0625rem;
}

.elementor-widget-wc-products ul.products > li.product .price del { display: none; }

.elementor-widget-wc-products ul.products > li.product .button,
.elementor-widget-wc-products ul.products > li.product a.button,
.elementor-widget-wc-products ul.products > li.product a.melasty-rfq-button,
.elementor-widget-wc-products ul.products > li.product a.add_to_cart_button {
    margin: auto 1.25rem 0 !important;
    background: #ef4444 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    border-radius: 0.5rem !important;
    padding: 0.625rem 1rem !important;
    text-align: center !important;
    display: block !important;
    text-decoration: none !important;
    line-height: 1.4 !important;
    font-size: 0.9375rem;
    transition: background .2s ease;
    border: none !important;
}

.elementor-widget-wc-products ul.products > li.product .button:hover,
.elementor-widget-wc-products ul.products > li.product a.button:hover,
.elementor-widget-wc-products ul.products > li.product a.melasty-rfq-button:hover,
.elementor-widget-wc-products ul.products > li.product a.add_to_cart_button:hover {
    background: #dc2626 !important;
    color: #ffffff !important;
}

/* Responsive: 2 cols en tablet, 1 col en mobile */
@media (max-width: 980px) {
    .elementor-widget-wc-products ul.products,
    .elementor-widget-wc-products ul.products.columns-4,
    .elementor-widget-wc-products ul.products.columns-3,
    .elementor-widget-wc-products ul.products.columns-2 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
@media (max-width: 600px) {
    .elementor-widget-wc-products ul.products,
    .elementor-widget-wc-products ul.products.columns-4,
    .elementor-widget-wc-products ul.products.columns-3,
    .elementor-widget-wc-products ul.products.columns-2 {
        grid-template-columns: 1fr !important;
    }
}

/* Container interno de la sección S2 con padding lateral para que el grid
   no toque los bordes laterales del viewport en edge-to-edge */
body.elementor-page section[id="productos"] .elementor-container,
body.elementor-page #productos .elementor-container {
    padding: 0 2rem !important;
    max-width: 1280px !important;
    margin: 0 auto !important;
}

/* B10.1 fix #8: forzar el wrapper de la sección de productos a ocupar
   100% del viewport y dejar respiro lateral via container interno con
   max-width predecible. El CSS de Elementor + WC default chocaba. */

/* La sección entera de productos: bg blanco edge-to-edge */
body.elementor-page section[data-id*="s2prod"] {
    width: 100% !important;
    max-width: 100vw !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Container directo dentro de la sección S2: max-width controlado + padding */
body.elementor-page section[data-id*="s2prod"] > .elementor-container {
    max-width: 1280px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 2rem !important;
    box-sizing: border-box !important;
}

/* Column dentro: 100% width (no flex limitations) */
body.elementor-page section[data-id*="s2prod"] .elementor-column,
body.elementor-page section[data-id*="s2prod"] .elementor-column-wrap,
body.elementor-page section[data-id*="s2prod"] .elementor-widget-wrap {
    width: 100% !important;
    max-width: 100% !important;
}

/* Y el widget de wc-products: full width */
body.elementor-page section[data-id*="s2prod"] .elementor-widget-wc-products,
body.elementor-page section[data-id*="s2prod"] .elementor-widget-wc-products .elementor-widget-container,
body.elementor-page section[data-id*="s2prod"] .elementor-widget-wc-products .woocommerce {
    width: 100% !important;
    max-width: 100% !important;
}

/* B10.1 fix #9: shortcode propio melasty_products_grid (bypass de wc-products
   widget que tenía conflictos de width/grid imposibles de resolver) */

.melasty-products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}
@media (max-width: 980px) {
    .melasty-products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
}
@media (max-width: 600px) {
    .melasty-products-grid { grid-template-columns: 1fr; gap: 1.25rem; }
}

.melasty-product-card {
    background: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s ease, transform .2s ease;
}
.melasty-product-card:hover {
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.melasty-product-card__image {
    display: block;
    background: #f9fafb;
    text-decoration: none;
    line-height: 0;
}
.melasty-product-card__image img {
    width: 100%;
    height: 18rem;
    object-fit: contain;
    padding: 1rem;
    box-sizing: border-box;
    display: block;
}

.melasty-product-card__body {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
    padding: 1.25rem;
    gap: 0.5rem;
}

.melasty-product-card__badge {
    display: inline-block;
    width: fit-content;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}
.melasty-product-card__badge--ecom { background: #dcfce7; color: #166534; }
.melasty-product-card__badge--rfq { background: #eff6ff; color: #1e40af; }

.melasty-product-card__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.35;
    flex: 1 0 auto;
    /* truncar a 2 líneas si es muy largo */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.melasty-product-card__price {
    margin: 0;
    color: #ef4444;
    font-weight: 700;
    font-size: 1.0625rem;
}
.melasty-product-card__price .woocommerce-Price-amount { color: inherit; }

.melasty-product-card__buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.melasty-btn {
    flex: 1;
    text-align: center;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    line-height: 1.3;
    transition: background .2s ease, color .2s ease;
    cursor: pointer;
    border: 2px solid transparent;
    box-sizing: border-box;
}
.melasty-btn--primary {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
}
.melasty-btn--primary:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #ffffff;
}
.melasty-btn--secondary {
    background: #ffffff;
    color: #ef4444;
    border-color: #ef4444;
}
.melasty-btn--secondary:hover {
    background: #fef2f2;
    color: #dc2626;
}

/* RTL: invertir orden de los botones para AR */
html[dir="rtl"] .melasty-product-card__buttons { flex-direction: row-reverse; }

/* ============================================================================
 * B12 — Single Product (override content-single-product.php)
 * ===========================================================================*/

.melasty-single-product { padding: 0; margin: 0; }
.melasty-single-product .msp-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* S1 Breadcrumb */
.msp-breadcrumb { background: #f9fafb; padding: 1rem 0; font-size: 0.875rem; color: #6b7280; }
.msp-breadcrumb a { color: #ef4444; text-decoration: none; }
.msp-breadcrumb a:hover { color: #dc2626; text-decoration: underline; }

/* S2 Grid 2col */
.msp-main { background: #ffffff; padding: 3rem 0; }
.msp-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
@media (max-width: 768px) { .msp-grid-2 { grid-template-columns: 1fr; gap: 1.5rem; } }

.msp-gallery { background: #f9fafb; border-radius: 0.5rem; padding: 2rem; min-height: 24rem; display: flex; align-items: center; justify-content: center; }
.msp-gallery__main { max-width: 100%; height: auto; max-height: 28rem; object-fit: contain; }

.msp-details { display: flex; flex-direction: column; gap: 1rem; }
.msp-badge { display: inline-block; width: fit-content; padding: 0.375rem 1rem; border-radius: 9999px; font-size: 0.8125rem; font-weight: 600; }
.msp-badge--ecom { background: #dcfce7; color: #166534; }
.msp-badge--rfq { background: #eff6ff; color: #1e40af; }

.msp-title { margin: 0; font-size: 2rem; font-weight: 700; color: #111827; line-height: 1.2; }

.msp-price { margin: 0; font-size: 2rem; font-weight: 700; color: #ef4444; line-height: 1.2; }
.msp-price__asterisco, .msp-price__asterisk { font-size: 1rem; color: #f59e0b; cursor: help; }
.msp-price__disclaimer { margin: 0; font-size: 0.8125rem; color: #6b7280; font-style: italic; }
.msp-price--rfq { font-size: 1.125rem; color: #6b7280; font-weight: 500; font-style: italic; }

.msp-meta { margin: 0; color: #4b5563; font-size: 0.9375rem; }
.msp-shortdesc { color: #4b5563; line-height: 1.6; }
.msp-shortdesc p { margin: 0 0 0.75rem; }

.msp-buttons { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; }
.msp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.875rem 1.5rem; border-radius: 0.5rem; font-weight: 600; text-decoration: none; transition: background .2s, color .2s, transform .1s; cursor: pointer; border: 2px solid transparent; }
.msp-btn--primary { background: #ef4444; color: #ffffff; border-color: #ef4444; }
.msp-btn--primary:hover { background: #dc2626; border-color: #dc2626; color: #ffffff; }
.msp-btn--wa { background: #25d366; color: #ffffff; border-color: #25d366; }
.msp-btn--wa:hover { background: #1da851; border-color: #1da851; color: #ffffff; }
.msp-btn--cart { background: #ffffff; color: #ef4444; border-color: #ef4444; }
.msp-btn--cart:hover { background: #fef2f2; }
.msp-btn--white { background: #ffffff; color: #ef4444; border-color: #ffffff; }
.msp-btn--white:hover { background: #f9fafb; color: #dc2626; }
.msp-btn--dark { background: #000000; color: #ffffff; border-color: #000000; }
.msp-btn--dark:hover { background: #1f2937; }

/* S3 Tabs */
.msp-tabs-section { background: #f9fafb; padding: 3rem 0; }
.msp-tabs { display: flex; gap: 0.5rem; border-bottom: 2px solid #e5e7eb; margin-bottom: 2rem; flex-wrap: wrap; }
.msp-tab { background: none; border: none; padding: 0.875rem 1.5rem; font-size: 1rem; font-weight: 600; color: #6b7280; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; transition: color .2s, border-color .2s; }
.msp-tab:hover { color: #ef4444; }
.msp-tab.is-active { color: #ef4444; border-bottom-color: #ef4444; }
.msp-panel { display: none; padding: 1rem 0; line-height: 1.7; color: #4b5563; }
.msp-panel.is-active { display: block; }
.msp-panel p { margin: 0 0 1rem; }
.msp-panel a { color: #ef4444; }

.msp-specs { width: 100%; border-collapse: collapse; }
.msp-specs th, .msp-specs td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid #e5e7eb; }
.msp-specs th { width: 30%; color: #111827; font-weight: 600; background: #ffffff; }
.msp-specs td { color: #4b5563; }

/* S4 FAQ */
.msp-faq-section { background: #ffffff; padding: 3rem 0; }
.msp-faq__title { text-align: center; font-size: 2rem; font-weight: 700; color: #111827; margin: 0 0 2rem; }
.msp-faq { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.75rem; }
.msp-faq__item { background: #f9fafb; border-radius: 0.5rem; padding: 1rem 1.25rem; border-left: 4px solid #ef4444; }
.msp-faq__q { font-weight: 600; color: #111827; cursor: pointer; list-style: none; padding-right: 1.5rem; position: relative; }
.msp-faq__q::after { content: "+"; position: absolute; right: 0; top: 0; color: #ef4444; font-size: 1.25rem; font-weight: 700; transition: transform .2s; }
.msp-faq__item[open] .msp-faq__q::after { transform: rotate(45deg); }
.msp-faq__a { padding-top: 0.75rem; color: #4b5563; line-height: 1.6; }
.msp-faq__a p { margin: 0; }

/* S5 CTA banda */
.msp-cta { background: #ef4444; padding: 3rem 0; color: #ffffff; }
.msp-cta__inner { text-align: center; }
.msp-cta__title { margin: 0 0 0.75rem; font-size: 1.75rem; font-weight: 700; }
.msp-cta__p { margin: 0 0 1.5rem; font-size: 1.0625rem; max-width: 36rem; margin-left: auto; margin-right: auto; opacity: .92; }
.msp-cta__buttons { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* S6 Related */
.msp-related { background: #ffffff; padding: 3rem 0; }
.msp-related__title { text-align: center; font-size: 2rem; font-weight: 700; color: #111827; margin: 0 0 2rem; }

/* RTL */
html[dir="rtl"] .msp-faq__q { padding-right: 0; padding-left: 1.5rem; }
html[dir="rtl"] .msp-faq__q::after { right: auto; left: 0; }
html[dir="rtl"] .msp-faq__item { border-left: none; border-right: 4px solid #ef4444; }
html[dir="rtl"] .msp-specs th, html[dir="rtl"] .msp-specs td { text-align: right; }

/* ============================================================================
 * B15.C — Footer Kit Digital — composición oficial única
 * (sustituye 4 logos individuales con 2 placeholders amarillos del B13)
 * ===========================================================================*/
.kit-digital-footer {
    grid-column: 1 / -1;
    background: #ffffff;
    color: #111827;
    padding: 2.5rem 1.5rem;
    border-radius: 0.5rem;
    margin: 2rem 0 1rem;
    text-align: center;
    border-top: 1px solid #e5e7eb;
}
.kit-digital-header {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin: 0 0 1.5rem;
    text-transform: uppercase;
    line-height: 1.4;
}
.kit-digital-logos-oficial {
    display: block;
    margin: 0 auto;
}
.kit-digital-logos-oficial img {
    max-width: 100%;
    width: min(1100px, 100%);
    height: auto;
    margin: 0 auto;
    display: block;
}
.kit-digital-text {
    max-width: 800px;
    margin: 1.5rem auto 0;
    font-size: 0.8125rem;
    color: #4b5563;
    line-height: 1.5;
}
@media (max-width: 600px) {
    .kit-digital-header { font-size: 0.6875rem; }
    .kit-digital-text { font-size: 0.75rem; }
    .kit-digital-footer { padding: 1.5rem 1rem; }
}

/* Disclaimer general precios — usado en /productos/ y categorías */
.melasty-precio-disclaimer {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 0.75rem 1.25rem;
    border-radius: 0.375rem;
    color: #92400e;
    font-size: 0.9375rem;
    margin: 1rem auto 2rem;
    max-width: 1100px;
}
.melasty-precio-disclaimer a { color: #b45309; font-weight: 600; }

/* Asterisco precio en cards y single */
.msp-price-eur, .melasty-product-card__price .msp-price-eur { color: inherit; font-weight: 700; }
.msp-price__asterisk { color: #f59e0b; cursor: help; font-size: 0.85em; }
.msp-price__disclaimer { display: block; font-size: 0.7rem; color: #6b7280; font-style: italic; margin-top: 0.125rem; line-height: 1.3; }

/* B15.C — Footer inyectado vía wp_footer hook */
.melasty-site-footer {
    background: #111827;
    color: rgba(255, 255, 255, 0.85);
    padding: 3rem 0 1rem;
    margin-top: 2rem;
}
.melasty-site-footer .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}
.melasty-site-footer .msf-cols {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 1rem;
}
@media (max-width: 980px) {
    .melasty-site-footer .msf-cols { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .melasty-site-footer .msf-cols { grid-template-columns: 1fr; }
}
.melasty-site-footer .msf-col h4 {
    color: #ef4444;
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.melasty-site-footer .msf-col p,
.melasty-site-footer .msf-col li {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0 0 0.5rem;
    list-style: none;
}
.melasty-site-footer .msf-col ul { margin: 0; padding: 0; }
.melasty-site-footer .msf-col a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color .2s;
}
.melasty-site-footer .msf-col a:hover { color: #ef4444; }
.melasty-site-footer .msf-copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8125rem;
    margin-top: 1rem;
}

/* B16.C — Cards de categorías para /productos/ */
.msc-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0 3rem;
}
.msc-cat-card {
    display: flex; flex-direction: column;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    text-decoration: none !important;
    color: inherit;
    transition: transform .2s, box-shadow .2s;
}
.msc-cat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .08);
    color: inherit;
}
.msc-cat-card__img {
    aspect-ratio: 4 / 3;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #f9fafb;
}
.msc-cat-card__body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
    gap: 0.5rem;
}
.msc-cat-card__title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
    color: #111827;
    line-height: 1.3;
}
.msc-cat-card__desc {
    font-size: 0.875rem;
    color: #4b5563;
    margin: 0;
    line-height: 1.5;
    flex: 1 0 auto;
}
.msc-cat-card__btn {
    color: #ef4444;
    font-weight: 600;
    font-size: 0.9375rem;
    margin-top: 0.5rem;
}
.msc-cat-card:hover .msc-cat-card__btn { color: #dc2626; }
@media (max-width: 600px) {
    .msc-categories-grid { grid-template-columns: 1fr; }
}

/* ============================================================================
 * B17.B — Sticky footer (elimina gap blanco contenido↔footer en páginas cortas)
 * ===========================================================================*/

html, body { height: 100%; }
body.melasty-sticky-footer {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
body.melasty-sticky-footer #page,
body.melasty-sticky-footer .site,
body.melasty-sticky-footer > main,
body.melasty-sticky-footer .ehp-main,
body.melasty-sticky-footer .site-main,
body.melasty-sticky-footer #content {
    flex: 1 0 auto;
}
body.melasty-sticky-footer footer.site-footer,
body.melasty-sticky-footer .ehp-footer,
body.melasty-sticky-footer > footer {
    flex-shrink: 0;
    margin-top: auto !important;
}

/* ============================================================================
 * B17.C — Bloques /contacto/, /servicios/, /sobre-nosotros/
 * ===========================================================================*/

/* /contacto/ */
.msc-contacto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; margin: 2rem 0 3rem; }
.msc-contacto-col h2 { font-size: 1.5rem; font-weight: 700; margin: 0 0 1rem; color: #111827; }
.msc-contacto-col h3 { font-size: 1.125rem; font-weight: 600; margin: 0 0 .75rem; color: #1f2937; }
.msc-contacto-col p { color: #374151; line-height: 1.6; }
.msc-contacto-canales { list-style: none; padding: 0; margin: 0; }
.msc-contacto-canales li { display: flex; align-items: center; gap: .75rem; margin: .625rem 0; font-size: 1rem; }
.msc-contacto-canales a { color: #ef4444; text-decoration: none; font-weight: 500; }
.msc-contacto-canales a:hover { text-decoration: underline; }
.msc-cc-icon { font-size: 1.25rem; }
.msc-contacto-fallback { background: #fef3f2; border: 1px solid #fecaca; border-radius: 12px; padding: 2rem; }
.msc-contacto-fallback h3 { color: #7f1d1d; margin-top: 0; }
.msc-cta { display: inline-block; padding: .75rem 1.5rem; border-radius: 6px; text-decoration: none; font-weight: 600; margin: .5rem .5rem 0 0; transition: opacity .2s; }
.msc-cta--primary { background: #ef4444; color: #fff !important; }
.msc-cta--wa { background: #25D366; color: #fff !important; }
.msc-cta:hover { opacity: .9; }

/* /servicios/ */
.msc-servicios-grid { margin: 2rem 0 1rem; }
.msc-serv-card { display: flex; gap: 2rem; padding: 2.5rem 2rem; background: #fff; border-radius: 12px; margin-bottom: 1.5rem; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.msc-serv-card--alt { background: #f9fafb; }
.msc-serv-icon { flex-shrink: 0; width: 64px; height: 64px; background: #ef4444; color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.75rem; }
.msc-serv-body h2 { margin: 0 0 .75rem; font-size: 1.5rem; color: #111827; }
.msc-serv-body p { color: #4b5563; line-height: 1.6; margin: 0 0 1rem; }
.msc-serv-body ul { padding-left: 1.25rem; color: #374151; margin: 0; }
.msc-serv-body ul li { margin: .375rem 0; line-height: 1.5; }
.msc-serv-body strong { color: #111827; font-weight: 600; }

/* /sobre-nosotros/ */
.msc-sobre-section { margin: 2.5rem 0; padding: 2rem; border-radius: 12px; }
.msc-sobre-section--alt { background: #f9fafb; }
.msc-sobre-section h2 { font-size: 1.75rem; margin: 0 0 1rem; color: #111827; }
.msc-sobre-section p { color: #374151; line-height: 1.7; margin: 0 0 .75rem; }
.msc-sobre-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin: 1.5rem 0; }
.msc-sobre-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 1.5rem; }
.msc-sobre-card h3 { color: #ef4444; margin-top: 0; }

/* Responsive */
@media (max-width: 768px) {
    .msc-contacto-grid, .msc-sobre-grid { grid-template-columns: 1fr; }
    .msc-serv-card { flex-direction: column; gap: 1rem; padding: 1.5rem; }
}

/* RTL */
body.rtl .msc-contacto-grid, body.rtl .msc-sobre-grid { direction: rtl; }
body.rtl .msc-serv-card { direction: rtl; }
body.rtl .msc-serv-body ul { padding-left: 0; padding-right: 1.25rem; }

/* === B17.F7 Mejoras visuales no especulativas === */

/* Anti-zoom iOS: inputs deben tener font-size >= 16px en mobile */
@media (max-width: 768px) {
    input[type="text"], input[type="email"], input[type="tel"], input[type="search"],
    input[type="number"], input[type="password"], input[type="url"],
    select, textarea, .wpcf7 input:not([type="submit"]), .wpcf7 textarea {
        font-size: 16px !important;
    }
}

/* Scroll suave para anclas internas */
html { scroll-behavior: smooth; }

/* Respeta preferencia del usuario de reducir movimiento */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Tap target mínimo accesible en botones primarios mobile */
@media (max-width: 768px) {
    .msc-cta, .single_add_to_cart_button, button[type="submit"], .wpcf7-submit {
        min-height: 44px;
    }
}

/* =============================================================================
 * B18.2.E2 — Refactor contención: full-width inteligente
 *
 * Hello Elementor parent limita .site-main a 1140px en pantallas ≥1200px.
 * Resolvemos selectivamente:
 *   (a) Homes y páginas internas B18.2 (sin WooCommerce) → full-width para que
 *       las secciones .mp-* lleguen lado-a-lado (hero, banners, footer KD)
 *   (b) Archive WC (/productos/) y single product → contención a max 1280px
 *       centrado, así el listado/ficha se ve profesional sin desbordar
 * ===========================================================================*/

/* (a) Páginas B18.2 con secciones full-width (.mp-hero o .mp-page-header):
 *     home + páginas internas con cabecera B18.2.D
 *     Detectamos vía :has() — soportado en navegadores modernos. */
body.home .site-main,
body.page-template-default:has(.mp-hero) .site-main,
body.page-template-default:has(.mp-page-header) .site-main,
body.page-template-default:has(.mp-hero) .page-content,
body.page-template-default:has(.mp-page-header) .page-content {
    max-width: none !important;
    padding-inline-end: 0 !important;
    padding-inline-start: 0 !important;
}

/* (b) WC archive + single + páginas WC: contención a 1440px (E2.7 Ajuste 2) */
body.woocommerce-page .site-main,
body.woocommerce-shop .site-main,
body.archive.post-type-archive-product .site-main,
body.single-product .site-main,
body.tax-product_cat .site-main {
    max-width: 1440px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 2rem var(--mp-container-pad) !important;
}

/* B18.2.F.0 — Cabecera archive WC escapa contenedor (lado-a-lado) */
body.archive.post-type-archive-product .site-main .mp-page-header,
body.tax-product_cat .site-main .mp-page-header,
body.woocommerce-shop .site-main .mp-page-header {
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    max-width: none !important;
}

/* (c) Páginas internas SIN cabecera full-width B18.2.D (ej: /contacto/, legales):
 *     contenidas a 1280px centradas (E2.7 Ajuste 1) */
body.page-template-default:not(.home):not(.woocommerce-page):not(:has(.mp-hero)):not(:has(.mp-page-header)) .site-main {
    max-width: var(--mp-container-max) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 2rem var(--mp-container-pad) !important;
}

/* Por si reaparecen site-header/site-footer */
body .site-header.mp-header,
body .site-footer.mp-footer {
    max-width: none !important;
}

/* =============================================================================
 * B18.2 — Tokens visuales clonados de melastyperu.com
 * Reutilizan la paleta --melasty-* (B10) ya existente y añaden namespace --mp-*
 * para los nuevos componentes B18.2 (header, hero, productos, footer, etc.)
 * ===========================================================================*/
:root {
    /* Aliases a tokens existentes B10 */
    --mp-red-primary:      var(--melasty-color-primary);        /* #ef4444 */
    --mp-red-hover:        var(--melasty-color-primary-hover);  /* #dc2626 */
    --mp-red-dark:         var(--melasty-color-primary-dark);   /* #b91c1c */
    --mp-red-bg:           #fef2f2;                              /* hover:bg-red-50 */
    --mp-black:            var(--melasty-color-text);            /* #111827 */
    --mp-gray-text:        var(--melasty-color-text-secondary);  /* #374151 */
    --mp-gray-muted:       var(--melasty-color-text-muted);      /* #6b7280 */
    --mp-gray-light:       var(--melasty-color-bg-subtle);       /* #f9fafb */
    --mp-gray-border:      var(--melasty-color-border);          /* #e5e7eb */
    --mp-white:            var(--melasty-color-bg);              /* #ffffff */
    --mp-green-badge-bg:   #dcfce7;                              /* bg-green-100 */
    --mp-green-badge-text: #166534;                              /* text-green-800 */
    --mp-footer-bg:        #0f172a;                              /* slate-900 negro footer */

    /* Tipografía (alias a B10) */
    --mp-font:             var(--melasty-font-sans);

    /* Escala tipográfica */
    --mp-h1: 2.75rem;
    --mp-h2: 2rem;
    --mp-h3: 1.5rem;
    --mp-h4: 1.25rem;
    --mp-body: 1rem;
    --mp-small: 0.875rem;

    /* Espaciado (E2.7 Ajuste 3: container ampliado a 1440 con respiración interior) */
    --mp-section-pad:    5rem;
    --mp-container-max:  1440px;
    --mp-container-pad:  2rem;

    /* Sombras (Tailwind shadow-lg / shadow-2xl) */
    --mp-shadow-card:       0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --mp-shadow-card-hover: 0 25px 50px -12px rgba(0,0,0,0.25);
    --mp-shadow-header:     0 2px 8px rgba(0,0,0,0.08);

    /* Radios */
    --mp-radius:    0.5rem;   /* rounded-lg */
    --mp-radius-sm: 0.25rem;  /* rounded */
}

@media (max-width: 768px) {
    :root {
        --mp-h1: 2rem;
        --mp-h2: 1.5rem;
        --mp-h3: 1.25rem;
        --mp-section-pad: 3rem;
        --mp-container-pad: 1rem;
    }
}

.mp-container {
    max-width: var(--mp-container-max);
    margin: 0 auto;
    padding: 0 var(--mp-container-pad);
}

/* =============================================================================
 * B18.2.A — Header (mp-header* coexiste con .site-header B10)
 * ===========================================================================*/
.mp-header {
    background: var(--mp-white);
    border-bottom: 1px solid var(--mp-gray-border);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: box-shadow 0.2s ease, padding 0.2s ease;
    padding: 1rem 0;
    box-shadow: none;
}
.mp-header--sticky { box-shadow: var(--mp-shadow-header); padding: 0.5rem 0; }

.mp-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    position: relative;
}

.mp-header__logo { flex-shrink: 0; text-decoration: none; }
.mp-header__logo img { max-height: 50px; width: auto; display: block; }
.mp-logo-text {
    font-family: var(--mp-font);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--mp-red-primary);
    letter-spacing: -0.02em;
    text-transform: lowercase;
}

.mp-header__nav { flex: 1; display: flex; justify-content: center; }
.mp-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2.5rem; /* E2.7 Ajuste 4 */
}
.mp-menu li > a,
.mp-menu__item > a,
.mp-menu li.menu-item > a {
    text-decoration: none;
    color: var(--mp-black);
    font-weight: 600; /* E2.7 Ajuste 4 */
    font-size: 1rem; /* E2.7 Ajuste 4 */
    letter-spacing: 0.01em;
    padding: 0.625rem 0; /* E2.7 Ajuste 4 */
    transition: color 0.2s;
    display: inline-block;
    position: relative;
}
.mp-menu li > a:hover { color: var(--mp-red-primary); text-decoration: none; }
.mp-menu li.current-menu-item > a,
.mp-menu li.current_page_item > a,
.mp-menu__item--active > a { color: var(--mp-red-primary); }
.mp-menu li.current-menu-item > a::after,
.mp-menu li.current_page_item > a::after,
.mp-menu__item--active > a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--mp-red-primary);
}

.mp-header__lang { flex-shrink: 0; }
.mp-header__lang ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}
.mp-header__lang li {
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 600;
}
.mp-header__lang a {
    text-decoration: none;
    color: var(--mp-gray-text);
    padding: 0.25rem 0.625rem;
    border-radius: var(--mp-radius-sm);
    transition: all 0.2s;
    display: inline-block;
}
.mp-header__lang a:hover { background: var(--mp-red-primary); color: var(--mp-white); text-decoration: none; }
/* E2.7 Ajuste 5: idioma activo con letras BLANCAS sobre fondo rojo */
.mp-header__lang li.current-lang a,
.mp-header__lang li.current_lang a,
.mp-header__lang li.current-lang > a,
.mp-header__lang li.current_lang > a,
.mp-header__lang .current-lang a,
.mp-header__lang .current-lang > a,
.mp-header__lang .pll-current-lang a,
.mp-header__lang .lang-item.current-menu-item a,
.mp-header__lang .lang-item-current a {
    background: var(--mp-red-primary) !important;
    color: var(--mp-white) !important;
}

.mp-header__hamburger {
    display: none;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 4px;
}
.mp-header__hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--mp-black);
    transition: all 0.2s;
}
.mp-header__hamburger--active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.mp-header__hamburger--active span:nth-child(2) { opacity: 0; }
.mp-header__hamburger--active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1024px) {
    .mp-header__hamburger { display: flex; }
    .mp-header__nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--mp-white);
        flex-direction: column;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        box-shadow: var(--mp-shadow-card);
        z-index: 99;
    }
    .mp-header__nav--open { max-height: 600px; }
    .mp-menu { flex-direction: column; padding: 1rem 0; gap: 0; width: 100%; }
    .mp-menu li, .mp-menu__item { width: 100%; border-bottom: 1px solid var(--mp-gray-border); }
    .mp-menu li > a { padding: 1rem 2rem; display: block; }
    .mp-menu li.current-menu-item > a::after,
    .mp-menu__item--active > a::after { display: none; }
}

body.rtl .mp-header__inner { flex-direction: row-reverse; }
body.rtl .mp-menu { flex-direction: row-reverse; }
body.rtl .mp-header__lang ul { flex-direction: row-reverse; }

/* Override .site-header B10 cuando coexiste con .mp-header (evita doble padding) */
.site-header.mp-header > .container.mp-container { padding: 0 var(--mp-container-pad); }

/* =============================================================================
 * B18.2.A — Hero + sistema de botones reusable .mp-btn
 * ===========================================================================*/
.mp-hero {
    background: var(--mp-red-primary);
    color: var(--mp-white);
    padding: 5rem 0 6rem;
    text-align: center;
    overflow: hidden;
    position: relative;
}
.mp-hero__title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 1.5rem;
    color: var(--mp-white);
    letter-spacing: -0.02em;
}
.mp-hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.5;
    max-width: 750px; /* E2.7 Ajuste 3 nota: legibilidad aunque container=1440 */
    margin: 0 auto 2.5rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
}
.mp-hero__title {
    max-width: 950px;
    margin-left: auto;
    margin-right: auto;
}
.mp-section-subtitle {
    max-width: 800px; /* E2.7 Ajuste 3 nota: legibilidad subtítulos secciones */
}
.mp-hero__cta { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

.mp-btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: var(--mp-radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.0625rem;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    line-height: 1.2;
    cursor: pointer;
    text-align: center;
}
.mp-btn:hover { text-decoration: none; }

.mp-btn--white { background: var(--mp-white); color: var(--mp-red-primary); border-color: var(--mp-white); }
.mp-btn--white:hover { background: var(--mp-red-bg); color: var(--mp-red-hover); }

.mp-btn--black { background: var(--mp-black); color: var(--mp-white); border-color: var(--mp-black); }
.mp-btn--black:hover { background: #1f2937; color: var(--mp-white); }

.mp-btn--red { background: var(--mp-red-primary); color: var(--mp-white); border-color: var(--mp-red-primary); }
.mp-btn--red:hover { background: var(--mp-red-hover); border-color: var(--mp-red-hover); color: var(--mp-white); }

.mp-btn--outline-red { background: var(--mp-white); color: var(--mp-red-primary); border-color: var(--mp-red-primary); }
.mp-btn--outline-red:hover { background: var(--mp-red-bg); color: var(--mp-red-hover); border-color: var(--mp-red-hover); }

.mp-btn--sm { padding: 0.5rem 1rem; font-size: 0.875rem; }

@media (max-width: 768px) {
    .mp-hero { padding: 3rem 0 4rem; }
    .mp-btn { padding: 0.875rem 1.5rem; font-size: 1rem; }
}

/* =============================================================================
 * B18.2.A — Sección productos featured + cards (estilo peru)
 * ===========================================================================*/
.mp-featured { background: var(--mp-white); padding: var(--mp-section-pad) 0; }

.mp-section-header { text-align: center; margin-bottom: 3rem; }
.mp-section-title {
    font-size: var(--mp-h2);
    font-weight: 700;
    color: var(--mp-black);
    margin: 0 0 1rem;
    letter-spacing: -0.02em;
}
.mp-section-subtitle {
    font-size: 1.0625rem;
    color: var(--mp-gray-text);
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.6;
}

.mp-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.mp-product-card {
    background: var(--mp-white);
    border-radius: var(--mp-radius);
    box-shadow: var(--mp-shadow-card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.mp-product-card:hover {
    box-shadow: var(--mp-shadow-card-hover);
    transform: translateY(-2px);
}

.mp-product-card__media {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--mp-gray-light);
    overflow: hidden;
}
.mp-product-card__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
}
.mp-product-card__animals {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--mp-radius-sm);
    padding: 0.25rem 0.5rem;
}
.mp-animal-icon { font-size: 1.125rem; }

.mp-product-card__body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.625rem;
}

.mp-badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: var(--mp-radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    align-self: flex-start;
}
.mp-badge--available { background: var(--mp-green-badge-bg); color: var(--mp-green-badge-text); }
.mp-badge--rfq { background: var(--mp-red-bg); color: var(--mp-red-hover); }

.mp-product-card__title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--mp-black);
    margin: 0;
    line-height: 1.3;
}
.mp-product-card__desc {
    font-size: 0.875rem;
    color: var(--mp-gray-text);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mp-product-card__cta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.5rem;
}

.mp-featured__more { text-align: center; }

@media (max-width: 1024px) {
    .mp-products-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .mp-products-grid { grid-template-columns: 1fr; }
    .mp-product-card__cta { grid-template-columns: 1fr; }
}

body.rtl .mp-products-grid { direction: rtl; }
body.rtl .mp-product-card__animals { right: auto; left: 0.75rem; }

/* =============================================================================
 * B18.2.B — ¿Por qué Melasty?
 * ===========================================================================*/

.mp-why {
    background: var(--mp-white);
    padding: var(--mp-section-pad) 0;
}

.mp-why__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.mp-why__col {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mp-why__icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--mp-red-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.mp-why__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--mp-black);
    margin: 0 0 0.75rem;
}

.mp-why__desc {
    font-size: 0.9375rem;
    color: var(--mp-gray-text);
    line-height: 1.6;
    margin: 0;
    max-width: 320px;
}

@media (max-width: 768px) {
    .mp-why__grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* =============================================================================
 * B18.2.B — Testimonios
 * ===========================================================================*/

.mp-testimonials {
    background: var(--mp-gray-light);
    padding: var(--mp-section-pad) 0;
}

.mp-testimonials__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.mp-testimonial-card {
    background: var(--mp-white);
    border-radius: var(--mp-radius);
    padding: 2rem;
    box-shadow: var(--mp-shadow-card);
    position: relative;
    display: flex;
    flex-direction: column;
}

.mp-testimonial-card__quote-mark {
    font-family: Georgia, serif;
    font-size: 4rem;
    color: var(--mp-red-primary);
    line-height: 1;
    margin-bottom: -1rem;
    font-weight: 700;
}

.mp-testimonial-card__quote {
    font-size: 1rem;
    color: var(--mp-gray-text);
    line-height: 1.6;
    margin: 0 0 1.5rem;
    flex: 1;
    font-style: italic;
}

.mp-testimonial-card__author {
    font-size: 0.9375rem;
    color: var(--mp-black);
    font-weight: 600;
    margin: 0;
}

@media (max-width: 1024px) {
    .mp-testimonials__grid { grid-template-columns: 1fr; }
}

/* =============================================================================
 * B18.2.B — CTA banner
 * ===========================================================================*/

.mp-cta-banner {
    background: var(--mp-red-primary);
    color: var(--mp-white);
    padding: 4rem 0;
    text-align: center;
}

.mp-cta-banner__title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--mp-white);
    margin: 0 0 1rem;
}

.mp-cta-banner__subtitle {
    font-size: 1.0625rem;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 auto 2rem;
    max-width: 650px;
    line-height: 1.6;
}

/* =============================================================================
 * B18.2.B — Contacto strip + redes
 * ===========================================================================*/

.mp-contact-strip {
    background: var(--mp-white);
    padding: var(--mp-section-pad) 0;
}

.mp-contact-strip__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.mp-contact-card {
    text-align: center;
    text-decoration: none;
    color: inherit;
    padding: 2rem 1rem;
    border-radius: var(--mp-radius);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mp-contact-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--mp-shadow-card);
}

.mp-contact-card__icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--mp-red-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.mp-contact-card__label {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--mp-black);
    margin: 0 0 0.5rem;
}

.mp-contact-card__value {
    font-size: 1rem;
    color: var(--mp-gray-text);
    margin: 0;
    word-break: break-word;
}

.mp-social {
    background: var(--mp-gray-light);
    padding: 4rem 0;
}

.mp-social__icons {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.mp-social-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--mp-red-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s;
}

.mp-social-icon:hover {
    background: var(--mp-red-hover);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .mp-contact-strip__grid { grid-template-columns: 1fr; gap: 1rem; }
}

/* =============================================================================
 * B18.2.C — Footer + banner Kit Digital
 * ===========================================================================*/

.mp-footer {
    background: var(--mp-black);
    color: var(--mp-white);
    margin-top: auto;
}

.mp-footer__main { padding: 4rem 0 3rem; }

.mp-footer__cols {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 3rem;
}

.mp-footer__col--brand { max-width: 360px; }

.mp-footer__brand {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.mp-footer__logo {
    font-family: var(--mp-font);
    font-size: 2rem;
    font-weight: 800;
    color: var(--mp-red-primary);
    letter-spacing: -0.02em;
    line-height: 1;
    text-transform: lowercase;
}

.mp-footer__brand-sub {
    font-size: 0.875rem;
    color: var(--mp-white);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-top: 0.25rem;
    opacity: 0.85;
}

.mp-footer__tagline {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.6;
    margin: 0;
}

.mp-footer__heading {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--mp-white);
    letter-spacing: 0.08em;
    margin: 0 0 1.25rem;
    text-transform: uppercase;
}

.mp-footer__links { list-style: none; margin: 0; padding: 0; }
.mp-footer__links li { margin-bottom: 0.625rem; }
.mp-footer__links a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color 0.2s;
}
.mp-footer__links a:hover { color: var(--mp-red-primary); text-decoration: none; }

.mp-footer__copy {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
}
.mp-footer__copy p {
    margin: 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
}

/* Banner Kit Digital — full width contenido */
.mp-footer__kd {
    background: var(--mp-white);
    padding: 2rem 0;
    border-top: 4px solid var(--mp-red-primary);
}
.mp-footer__kd-link { display: block; text-decoration: none; }
.mp-footer__kd-image {
    width: 100%;
    max-width: 1280px;
    height: auto;
    display: block;
    margin: 0 auto;
}
.mp-footer__kd-caption {
    font-size: 0.8125rem;
    color: var(--mp-gray-text);
    text-align: center;
    line-height: 1.6;
    margin: 1rem auto 0;
    max-width: 900px;
    padding: 0 1rem;
}

@media (max-width: 1024px) {
    .mp-footer__cols { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
    .mp-footer__col--brand { grid-column: 1 / -1; max-width: 100%; }
}
@media (max-width: 640px) {
    .mp-footer__cols { grid-template-columns: 1fr; gap: 2rem; }
    .mp-footer__main { padding: 3rem 0 2rem; }
}

body.rtl .mp-footer__cols { direction: rtl; }
body.rtl .mp-footer__brand { align-items: flex-end; }

/* =============================================================================
 * B18.2.C — Breadcrumbs
 * ===========================================================================*/

.mp-breadcrumbs {
    background: var(--mp-gray-light);
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--mp-gray-border);
    font-size: 0.875rem;
}
.mp-breadcrumbs a {
    color: var(--mp-gray-text);
    text-decoration: none;
    transition: color 0.2s;
}
.mp-breadcrumbs a:hover { color: var(--mp-red-primary); text-decoration: none; }
.mp-breadcrumbs__sep {
    color: var(--mp-gray-text);
    margin: 0 0.5rem;
    opacity: 0.6;
}
.mp-breadcrumbs [aria-current="page"] {
    color: var(--mp-black);
    font-weight: 500;
}
body.rtl .mp-breadcrumbs__sep { transform: scaleX(-1); display: inline-block; }

/* =============================================================================
 * B18.2.D — Páginas internas
 * ===========================================================================*/

/* Page header con imagen */
.mp-page-header {
    position: relative;
    min-height: 360px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    color: var(--mp-white);
    padding: 4rem 0;
}
.mp-page-header__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(15, 23, 42, 0.6), rgba(15, 23, 42, 0.7));
}
.mp-page-header__content {
    position: relative;
    z-index: 2;
}
.mp-page-header__title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--mp-white);
    margin: 0 0 1rem;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.mp-page-header__subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255,255,255,0.95);
    max-width: 700px;
    line-height: 1.5;
    margin: 0;
}

/* Bloque split texto+imagen estilo wurth */
.mp-split { background: var(--mp-white); padding: var(--mp-section-pad) 0; }
.mp-split:nth-child(even) { background: var(--mp-gray-light); }
.mp-split__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.mp-split--reverse .mp-split__grid { direction: rtl; }
.mp-split--reverse .mp-split__text,
.mp-split--reverse .mp-split__image { direction: ltr; }
.mp-split__title {
    font-size: var(--mp-h2);
    font-weight: 700;
    color: var(--mp-black);
    margin: 0 0 1.5rem;
    letter-spacing: -0.02em;
}
.mp-split__body {
    font-size: 1rem;
    color: var(--mp-gray-text);
    line-height: 1.7;
}
.mp-split__body p { margin: 0 0 1rem; }
.mp-split__image {
    background-size: cover;
    background-position: center;
    border-radius: var(--mp-radius);
    aspect-ratio: 4 / 3;
    box-shadow: var(--mp-shadow-card);
}
@media (max-width: 1024px) {
    .mp-split__grid { grid-template-columns: 1fr; gap: 2rem; }
    .mp-split--reverse .mp-split__grid { direction: ltr; }
}

/* Grid 4 servicios (D — distinto del .msc-servicios-grid de B17.C) */
.mp-services-grid { background: var(--mp-white); padding: var(--mp-section-pad) 0; }
.mp-services-grid__cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
.mp-service-card {
    background: var(--mp-white);
    border-radius: var(--mp-radius);
    padding: 2rem 1.5rem;
    box-shadow: var(--mp-shadow-card);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.mp-service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--mp-shadow-card-hover);
}
.mp-service-card__icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--mp-red-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}
.mp-service-card__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--mp-black);
    margin: 0 0 0.75rem;
}
.mp-service-card__desc {
    font-size: 0.9375rem;
    color: var(--mp-gray-text);
    line-height: 1.6;
    margin: 0;
}
@media (max-width: 1024px) { .mp-services-grid__cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .mp-services-grid__cards { grid-template-columns: 1fr; } }

/* Valores 3 columnas */
.mp-values { background: var(--mp-white); padding: var(--mp-section-pad) 0; }
.mp-values__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}
.mp-values__item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.mp-values__icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--mp-red-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}
.mp-values__title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--mp-black);
    margin: 0 0 0.5rem;
}
.mp-values__desc {
    font-size: 0.9375rem;
    color: var(--mp-gray-text);
    line-height: 1.5;
    margin: 0;
    max-width: 280px;
}
@media (max-width: 768px) { .mp-values__grid { grid-template-columns: 1fr; gap: 2rem; } }

/* Noticias / blog */
.mp-news {
    padding: var(--mp-section-pad) 0;
    background: var(--mp-white);
}
.mp-news__empty {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 3rem 1rem;
}
.mp-news__empty h2 {
    font-size: var(--mp-h2);
    color: var(--mp-black);
    margin: 0 0 1rem;
}
.mp-news__empty p {
    font-size: 1.0625rem;
    color: var(--mp-gray-text);
    line-height: 1.6;
    margin: 0;
}
.mp-news__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.mp-news-card {
    background: var(--mp-white);
    border-radius: var(--mp-radius);
    overflow: hidden;
    box-shadow: var(--mp-shadow-card);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}
.mp-news-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--mp-shadow-card-hover);
}
.mp-news-card__media {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--mp-gray-light);
}
.mp-news-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.mp-news-card__body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.75rem;
}
.mp-news-card__date {
    font-size: 0.8125rem;
    color: var(--mp-gray-text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.mp-news-card__title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}
.mp-news-card__title a { color: var(--mp-black); text-decoration: none; }
.mp-news-card__title a:hover { color: var(--mp-red-primary); text-decoration: none; }
.mp-news-card__excerpt {
    font-size: 0.9375rem;
    color: var(--mp-gray-text);
    line-height: 1.5;
    margin: 0;
    flex: 1;
}
.mp-news-card__more {
    color: var(--mp-red-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    margin-top: auto;
}
@media (max-width: 1024px) { .mp-news__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .mp-news__grid { grid-template-columns: 1fr; } }

/* =============================================================================
 * B18.2.E2.SP — Single Product (rediseño Melasty completo)
 * ===========================================================================*/
.mp-single-product {
    padding: 2.5rem 0 4rem;
    background: var(--mp-white);
}

.mp-single-product__top {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 3rem;
    margin-bottom: 4rem;
}

/* Galería */
.mp-single-product__gallery { display: flex; flex-direction: column; gap: 1rem; }

.mp-single-product__main-image {
    background: var(--mp-gray-light);
    border-radius: var(--mp-radius);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    position: relative;
    box-shadow: var(--mp-shadow-card);
}
.mp-single-product__main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1.5rem;
    display: block;
}
.mp-single-product__animals {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--mp-radius-sm);
    padding: 0.25rem 0.625rem;
}
.mp-single-product__thumbs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.mp-thumb {
    width: 80px;
    height: 80px;
    border: 2px solid var(--mp-gray-border);
    border-radius: var(--mp-radius-sm);
    background: var(--mp-gray-light);
    cursor: pointer;
    padding: 0;
    overflow: hidden;
    transition: border-color 0.2s;
}
.mp-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 0.25rem; }
.mp-thumb:hover { border-color: var(--mp-red-primary); }
.mp-thumb.is-active { border-color: var(--mp-red-primary); }

/* Info derecha */
.mp-single-product__info { display: flex; flex-direction: column; gap: 1rem; }

.mp-single-product__info .mp-badge { align-self: flex-start; font-size: 0.8125rem; padding: 0.375rem 0.75rem; }

.mp-single-product__title {
    font-size: var(--mp-h2);
    font-weight: 700;
    color: var(--mp-black);
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.mp-single-product__sku {
    font-size: 0.875rem;
    color: var(--mp-gray-muted);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mp-single-product__short {
    font-size: 1.0625rem;
    color: var(--mp-gray-text);
    line-height: 1.6;
}
.mp-single-product__short ul { padding-left: 1.25rem; margin: 0.5rem 0; }
.mp-single-product__short li { margin-bottom: 0.25rem; }

.mp-single-product__price-row { padding: 1rem 0; border-top: 1px solid var(--mp-gray-border); border-bottom: 1px solid var(--mp-gray-border); }
.mp-single-product__price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--mp-red-primary);
    margin: 0;
    line-height: 1.2;
}
.mp-single-product__price--rfq { color: var(--mp-black); }
.mp-single-product__price del { color: var(--mp-gray-muted); font-size: 1.125rem; font-weight: 400; margin-right: 0.5rem; }
.mp-single-product__price ins { text-decoration: none; color: var(--mp-red-primary); }
.mp-single-product__price .woocommerce-Price-amount { color: inherit; }

.mp-single-product__action { display: flex; flex-direction: column; gap: 0.75rem; }
.mp-single-product__cta-btn { width: 100%; text-align: center; padding: 1rem 2rem; font-size: 1.0625rem; }
.mp-qty input.qty {
    width: 80px;
    padding: 0.625rem;
    border: 1px solid var(--mp-gray-border);
    border-radius: var(--mp-radius-sm);
    text-align: center;
}
.mp-single-product__action .cart { display: flex; gap: 0.75rem; align-items: stretch; flex-wrap: wrap; }
.mp-single-product__action .cart .mp-qty { flex-shrink: 0; }
.mp-single-product__action .cart button.single_add_to_cart_button { flex: 1; }

.mp-single-product__shipping {
    background: var(--mp-gray-light);
    border-radius: var(--mp-radius);
    padding: 1.25rem;
    margin-top: 0.5rem;
}
.mp-single-product__shipping-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--mp-black);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.625rem;
}
.mp-single-product__shipping ul {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.9375rem;
    color: var(--mp-gray-text);
    line-height: 1.7;
}

.mp-single-product__cats {
    font-size: 0.875rem;
    color: var(--mp-gray-muted);
    margin: 0;
}
.mp-single-product__cats a { color: var(--mp-gray-text); text-decoration: none; }
.mp-single-product__cats a:hover { color: var(--mp-red-primary); }

/* Secciones full-width-ish */
.mp-single-product__section {
    padding: 3rem 0;
    border-top: 1px solid var(--mp-gray-border);
}
.mp-single-product__section--alt { background: var(--mp-gray-light); margin: 3rem -2rem; padding: 3rem 2rem; border-radius: var(--mp-radius); border-top: none; }

.mp-single-product__h2 {
    font-size: var(--mp-h3);
    font-weight: 700;
    color: var(--mp-black);
    margin: 0 0 1.5rem;
}

.mp-single-product__body {
    font-size: 1rem;
    color: var(--mp-gray-text);
    line-height: 1.7;
}
.mp-single-product__body p { margin: 0 0 1rem; }
.mp-single-product__body ul, .mp-single-product__body ol { padding-left: 1.5rem; margin: 1rem 0; }
.mp-single-product__body li { margin-bottom: 0.375rem; line-height: 1.6; }

/* Tabla specs */
.mp-specs-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--mp-white);
    border-radius: var(--mp-radius);
    overflow: hidden;
    box-shadow: var(--mp-shadow-card);
}
.mp-specs-table th,
.mp-specs-table td {
    padding: 0.875rem 1.25rem;
    text-align: left;
    font-size: 0.9375rem;
    border-bottom: 1px solid var(--mp-gray-border);
}
.mp-specs-table tr:last-child th,
.mp-specs-table tr:last-child td { border-bottom: none; }
.mp-specs-table th {
    width: 35%;
    background: var(--mp-gray-light);
    color: var(--mp-black);
    font-weight: 600;
}
.mp-specs-table td { color: var(--mp-gray-text); }
.mp-specs-table tr:nth-child(even) td { background: rgba(248, 250, 252, 0.4); }

/* CTA inline antes del footer */
.mp-single-product__inline-cta {
    background: var(--mp-black);
    color: var(--mp-white);
    border-radius: var(--mp-radius);
    padding: 3rem 2rem;
    margin: 4rem 0 0;
    text-align: center;
}
.mp-single-product__cta-h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--mp-white);
    margin: 0 0 1rem;
}
.mp-single-product__cta-p {
    font-size: 1.0625rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 650px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

/* Productos relacionados — fondo gris suave para alternar */
.mp-related {
    background: var(--mp-gray-light);
    padding: var(--mp-section-pad) 0;
    margin-top: 0;
}
.mp-related .mp-products-grid { margin-bottom: 0; }

/* Mobile */
@media (max-width: 1024px) {
    .mp-single-product__top { grid-template-columns: 1fr; gap: 2rem; }
    .mp-single-product__section--alt { margin: 2rem 0; padding: 2rem 1rem; }
}

@media (max-width: 640px) {
    .mp-single-product { padding: 1.5rem 0 2.5rem; }
    .mp-single-product__action .cart { flex-direction: column; }
    .mp-single-product__action .cart .mp-qty input { width: 100%; }
    .mp-thumb { width: 60px; height: 60px; }
}

/* RTL */
body.rtl .mp-single-product__animals { right: auto; left: 1rem; }
body.rtl .mp-specs-table th, body.rtl .mp-specs-table td { text-align: right; }
body.rtl .mp-single-product__short ul { padding-right: 1.25rem; padding-left: 0; }

/* =============================================================================
 * B18.2.E2 — Override colores WooCommerce (eliminar morados/colores fuera paleta)
 * ===========================================================================*/

/* Botones WC default → rojo Melasty */
body.woocommerce a.button,
body.woocommerce-page a.button,
body.woocommerce button.button:not(.mp-btn),
body.woocommerce input.button,
body.woocommerce #respond input#submit,
body.woocommerce .button.alt,
body.woocommerce-page .button.alt {
    background-color: var(--mp-red-primary) !important;
    color: var(--mp-white) !important;
    border-color: var(--mp-red-primary) !important;
    border-radius: var(--mp-radius-sm) !important;
    font-weight: 600 !important;
    text-shadow: none !important;
    box-shadow: none !important;
    padding: 0.625rem 1.25rem !important;
}
body.woocommerce a.button:hover,
body.woocommerce-page a.button:hover,
body.woocommerce button.button:hover:not(.mp-btn),
body.woocommerce input.button:hover,
body.woocommerce #respond input#submit:hover,
body.woocommerce .button.alt:hover {
    background-color: var(--mp-red-hover) !important;
    border-color: var(--mp-red-hover) !important;
    color: var(--mp-white) !important;
}

/* Badges onsale */
body.woocommerce span.onsale,
body.woocommerce-page span.onsale {
    background-color: var(--mp-red-primary) !important;
    color: var(--mp-white) !important;
    border-radius: var(--mp-radius-sm) !important;
}

/* Links WC */
body.woocommerce .woocommerce-breadcrumb a,
body.woocommerce-page .woocommerce-breadcrumb a {
    color: var(--mp-red-primary);
}
body.woocommerce .woocommerce-breadcrumb a:hover,
body.woocommerce-page .woocommerce-breadcrumb a:hover {
    color: var(--mp-red-hover);
}

/* Mensajes/notices */
.woocommerce-message,
.woocommerce-info {
    border-top-color: var(--mp-red-primary) !important;
    background: var(--mp-gray-light) !important;
    color: var(--mp-black) !important;
}
.woocommerce-message::before,
.woocommerce-info::before {
    color: var(--mp-red-primary) !important;
}
.woocommerce-error { border-top-color: var(--mp-red-primary) !important; }

/* Pagination archive WC */
.woocommerce nav.woocommerce-pagination ul li a:focus,
.woocommerce nav.woocommerce-pagination ul li a:hover,
.woocommerce nav.woocommerce-pagination ul li span.current {
    background-color: var(--mp-red-primary) !important;
    color: var(--mp-white) !important;
    border-color: var(--mp-red-primary) !important;
}
.woocommerce nav.woocommerce-pagination ul {
    border-color: var(--mp-gray-border) !important;
}

/* Estrellas reseñas en gris (no amarillo) */
.woocommerce p.stars a,
.woocommerce p.stars a::before {
    color: var(--mp-gray-muted) !important;
}
.woocommerce p.stars a:hover,
.woocommerce p.stars a.active::before {
    color: var(--mp-red-primary) !important;
}

/* Tabs WC */
.woocommerce div.product .woocommerce-tabs ul.tabs li.active {
    background: var(--mp-white) !important;
    border-color: var(--mp-gray-border) !important;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
    color: var(--mp-red-primary) !important;
    font-weight: 600 !important;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::after {
    border-color: var(--mp-gray-border) !important;
}

/* Archive product card price overrides — eliminar dollar/pound symbols mezclados */
.woocommerce ul.products li.product .price {
    color: var(--mp-red-primary) !important;
    font-weight: 700 !important;
}

/* Cualquier link WC heredando color por defecto */
body.woocommerce a:not(.mp-btn):not(.button):not(.mp-product-card a) {
    color: var(--mp-red-primary);
}
body.woocommerce a:not(.mp-btn):not(.button):not(.mp-product-card a):hover {
    color: var(--mp-red-hover);
}

/* =============================================================================
 * B18.2.E2.7 — Ajustes 6 y 7: textos blancos en botones del plugin melasty-core
 * El plugin renderiza .msp-btn--dark, .msp-btn--white y un banner CTA RFQ con
 * fondos rojo/negro pero el texto a veces hereda color oscuro. Forzamos blanco.
 * ===========================================================================*/

/* Ajuste 6: botón WhatsApp .msp-btn--dark (fondo negro/oscuro → texto blanco) */
.msp-btn--dark,
a.msp-btn--dark,
.msp-btn--dark *,
a[href*="wa.me"].msp-btn,
a[href*="whatsapp"].msp-btn,
a[href*="wa.me"] svg,
a[href*="whatsapp"] svg,
a[href*="wa.me"] i,
a[href*="whatsapp"] i {
    color: var(--mp-white) !important;
    fill: var(--mp-white) !important;
}
.msp-btn--dark {
    background-color: var(--mp-black) !important;
    border-color: var(--mp-black) !important;
}
.msp-btn--dark:hover {
    background-color: #1f2937 !important;
    color: var(--mp-white) !important;
}

/* Ajuste 7: banner CTA RFQ "Solicitar presupuesto personalizado" del plugin */
.msp-cta,
.msp-cta--red,
[class*="msp-cta"],
.melasty-core-rfq-cta,
.melasty-rfq-banner {
    color: var(--mp-white) !important;
}
.msp-cta *,
.msp-cta--red *,
[class*="msp-cta"] *,
.melasty-core-rfq-cta *,
.melasty-rfq-banner * {
    color: var(--mp-white) !important;
}
/* Botón .msp-btn--white DENTRO de fondo rojo: mantener texto rojo (legible sobre blanco) */
.msp-cta .msp-btn--white,
[class*="msp-cta"] .msp-btn--white,
.msp-btn--white {
    background-color: var(--mp-white) !important;
    color: var(--mp-red-primary) !important;
    border-color: var(--mp-white) !important;
}
.msp-cta .msp-btn--white:hover,
.msp-btn--white:hover {
    background-color: #fee2e2 !important;
    color: var(--mp-red-hover) !important;
}

/* B19.2 — forzar centrado de CTA RFQ del producto (texto y botones) */
.msp-cta,
.msp-cta .msp-container,
.msp-cta__inner { text-align: center !important; }
.msp-cta__p { max-width: 42rem !important; margin-left: auto !important; margin-right: auto !important; text-align: center !important; }
.msp-cta__buttons { justify-content: center !important; }

/* B20 — links clickables en card de producto (imagen + título) */
.mp-product-card__media-link { display: block; text-decoration: none; cursor: pointer; }
.mp-product-card__media-link:focus-visible { outline: 2px solid #ef4444; outline-offset: 2px; }
.mp-product-card__media-link:hover img { opacity: 0.92; transition: opacity .2s; }
.mp-product-card__title a { color: inherit !important; text-decoration: none !important; transition: color .15s; }
.mp-product-card__title a:hover { color: #ef4444 !important; text-decoration: none !important; }

/* B20.1 — Intros de la página /productos/ (Categorías + Todos los productos) */
.mp-products-intro { padding: 2.5rem 0 1rem; }
.mp-products-intro--alt { padding-top: 3rem; }
.mp-products-intro__title { font-size: 2rem; font-weight: 700; color: #111827; margin: 0 0 0.75rem; line-height: 1.2; }
.mp-products-intro__text { font-size: 1.0625rem; color: #4b5563; max-width: 56rem; margin: 0; line-height: 1.6; }
html[dir='rtl'] .mp-products-intro__text { text-align: right; }
@media (max-width: 640px) {
  .mp-products-intro { padding: 1.5rem 0 0.5rem; }
  .mp-products-intro__title { font-size: 1.5rem; }
  .mp-products-intro__text { font-size: 1rem; }
}
