/*
Theme Name: 	Onemall Child Theme
Theme Uri:  	https://www.magentech.com/themes/sw_onemall
Description:  A child theme of SW Onemall
Author:     	Magentech
Author Uri: 	https://www.magentech.com/
Template:   	onemall
Version:    	1.7.4
License:    	GNU General Public License v2 or later
*/

/* ============================================================
   Personalizaciones MatzApp (update-safe)
   ============================================================ */

/* ============================================================
   Páginas Sobre nosotros / Contáctanos (contenido rediseñado)
   ============================================================ */
.matz-about, .matz-contact { max-width: 1140px; margin: 0 auto; }
.matz-kicker {
    display: inline-block; color: #476faa; font-weight: 700;
    letter-spacing: 2px; font-size: 13px; text-transform: uppercase; margin-bottom: 6px;
}
.matz-about-intro { display: flex; align-items: center; gap: 46px; margin-bottom: 10px; }
.matz-about-intro .txt { flex: 1; }
.matz-about-intro h2 { color: #232f3e; font-size: 34px; font-weight: 800; margin: 0 0 16px; }
.matz-about p, .matz-contact p { color: #5a6b80; line-height: 1.85; font-size: 16px; }
.matz-about-intro .img {
    width: 300px; text-align: center; flex-shrink: 0;
    background: radial-gradient(circle at 50% 40%, #eef3fb 0%, #f6f8fc 70%, transparent 72%);
}
.matz-about-intro .img img { max-width: 100%; height: auto; }

.matz-sec-title {
    color: #232f3e; font-size: 24px; font-weight: 800; margin: 44px 0 22px;
    position: relative; padding-left: 16px;
}
.matz-sec-title:before {
    content: ""; position: absolute; left: 0; top: 5px; bottom: 5px;
    width: 5px; background: #2e448e; border-radius: 3px;
}
.matz-promesa { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.matz-promesa .card {
    background: #f6f8fc; border: 1px solid #e3e9f3; border-radius: 12px;
    padding: 28px 22px; text-align: center; transition: all .3s;
}
.matz-promesa .card:hover { box-shadow: 0 10px 26px rgba(20,40,80,.12); transform: translateY(-4px); border-color: #cdd9ec; }
.matz-promesa .card .ico {
    width: 60px; height: 60px; border-radius: 50%;
    background: linear-gradient(135deg, #2e448e, #476faa); color: #fff;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px; font-size: 24px;
}
.matz-promesa .card h4 { color: #232f3e; font-size: 16px; font-weight: 700; margin: 0 0 8px; }
.matz-promesa .card p { font-size: 14px; line-height: 1.65; margin: 0; color: #5a6b80; }

.matz-hormiga {
    display: flex; align-items: center; gap: 34px; margin-top: 44px;
    background: linear-gradient(120deg, #232f3e 0%, #2e448e 68%, #476faa 100%);
    border-radius: 14px; padding: 34px 44px; overflow: hidden;
}
.matz-hormiga img { height: 160px; width: auto; flex-shrink: 0; margin-bottom: -34px; }
.matz-hormiga h3 { color: #fff; font-size: 23px; font-weight: 800; margin: 0 0 12px; }
.matz-hormiga p { color: #cfe0f5; margin: 0; line-height: 1.75; font-size: 15px; }

/* Contáctanos */
.matz-contact-info { list-style: none; margin: 22px 0 0; padding: 0; }
.matz-contact-info li {
    display: flex; align-items: flex-start; gap: 16px;
    padding: 16px 0; border-bottom: 1px solid #eceff4;
}
.matz-contact-info li .ci-ico {
    width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, #2e448e, #476faa); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.matz-contact-info li .ci-txt { padding-top: 3px; }
.matz-contact-info li .ci-txt strong { display: block; color: #232f3e; font-size: 15px; }
.matz-contact-info li .ci-txt span, .matz-contact-info li .ci-txt a { color: #5a6b80; font-size: 15px; text-decoration: none; }
.matz-contact-info li .ci-txt a:hover { color: #2e448e; }
.matz-contact h3 { color: #232f3e; font-size: 26px; font-weight: 800; margin: 0 0 14px; }
/* formulario CF7 en la página de contacto */
.page-contact-form { background: #f6f8fc; border: 1px solid #e3e9f3; border-radius: 12px; padding: 30px; }
.page-contact-form .wpcf7 input[type="text"],
.page-contact-form .wpcf7 input[type="email"],
.page-contact-form .wpcf7 textarea {
    width: 100%; border: 1px solid #d5deea; border-radius: 8px;
    padding: 12px 14px; margin-bottom: 14px; font-size: 15px; background: #fff;
}
.page-contact-form .wpcf7 input:focus, .page-contact-form .wpcf7 textarea:focus { border-color: #2e448e; outline: none; }
.page-contact-form .wpcf7 input[type="submit"] {
    width: auto; height: auto; line-height: 1.2; background: #2e448e; color: #fff;
    border: 0; border-radius: 30px; margin-top: 6px;
    padding: 14px 42px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
    font-size: 13px; cursor: pointer; transition: background .3s;
}
.page-contact-form .wpcf7 input[type="submit"]:hover { background: #20305f; }

@media (max-width: 767px) {
    .matz-about-intro, .matz-hormiga { flex-direction: column; text-align: center; }
    .matz-hormiga img { margin-bottom: 0; }
    .matz-promesa { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) { .matz-promesa { grid-template-columns: 1fr; } }

/* Ocultar selector de idioma falso del demo (English/Arabic, estilo WPML
   sin multilenguaje real) y el conversor de moneda (USD/EUR) en barra superior.
   La tienda es de un solo idioma (español) y moneda local. */
#lang_sel,
#lang_sel_click,
.widget_currency_converter,
[id^="woocommerce_currency_converter"] {
    display: none !important;
}

/* Slider de categorías del home ("LO MÁS VENDIDO"): badges circulares con foto
   real de producto (400x400). Tamaño uniforme y legible. */
.sw-category-slider2 .item-product-cat .item-image {
    text-align: center;
    padding-bottom: 12px;
}
.sw-category-slider2 .item-product-cat .item-image img {
    width: auto !important;
    height: 130px !important;
    max-width: 100%;
    object-fit: contain;
    display: inline-block;
    transition: transform .3s;
}
.sw-category-slider2 .item-product-cat:hover .item-image img {
    transform: scale(1.06);
}

/* Logo MATZ: es casi cuadrado (103x110), no horizontal como el del demo
   (186x50). Limitar la altura para que el header no crezca. */
.onemall-logo img {
    max-height: 58px;
    width: auto;
}
/* En el header principal (header-mid, padding 31px arriba/abajo) el logo puede
   ser mas grande "flotando" sobre ese padding: altura 92px compensada con
   margenes negativos para NO aumentar la altura del header. */
.header-style2 .header-mid .onemall-logo img {
    max-height: 92px;
    margin: -24px 0;
}
.sticky-menu .onemall-logo img {
    max-height: 40px;
}
.header-mobile-style1 .onemall-logo img,
.header-mobile-style2 .onemall-logo img {
    max-height: 44px;
}

/* Mascota Matiz en el footer (columna derecha del bloque de newsletter).
   El bloque tiene ~114px de alto (padding 40px + form): la mascota se alinea
   a la derecha y sobresale un poco hacia arriba como guiño visual. */
.matz-mascota-footer {
    text-align: right;
    position: relative;
}
.matz-mascota-footer img {
    height: 120px;
    width: auto;
    vertical-align: middle;
    margin-top: -8px;
}
.matz-mascota-footer .matz-mascota-msg {
    color: #9db0c9;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 14px;
    vertical-align: middle;
    display: inline-block;
}
@media (max-width: 767px) {
    .matz-mascota-footer { text-align: center; margin-top: 15px; }
}

/* Menú principal: replicar el diseño del demo (ítem activo/hover = texto de
   color, SIN caja de fondo). La caja azul venía de Bootstrap
   (.nav-pills>li.active>a { background:#428bca }) que el tema nunca resetea;
   el demo no lo sufría porque sus ítems demo no marcaban "current". */
.header-bottom .nav-pills > li.active > a,
.header-bottom .nav-pills > li.active > a:hover,
.header-bottom .nav-pills > li.active > a:focus {
    background-color: transparent;
    color: #8fb3e8;
}
.header-bottom .nav-pills > li > a:hover,
.header-bottom .nav-pills > li > a:focus {
    background-color: transparent;
    color: #8fb3e8;
}

/* Franja de título de páginas internas (Tienda, categorías, blog): el tema usa
   una foto demo de ropa (assets/img/bg-bread.jpg). Se reemplaza por un
   gradiente con la paleta MATZ. */
.listings-title {
    background: linear-gradient(120deg, #232f3e 0%, #2e448e 65%, #476faa 100%) !important;
}
.listings-title .wrap-title .entry-title,
.listings-title .wrap-title .breadcrumbs .breadcrumb > li,
.listings-title .wrap-title .breadcrumbs .breadcrumb > li a {
    color: #fff;
}
.listings-title .wrap-title .breadcrumbs .breadcrumb > li.active span {
    color: #cfe0f5;
}

/* Detalle de producto: el "Qty" junto al selector de cantidad viene de un
   pseudo-elemento del tema (content:"Qty" en app-default.css). */
.product_detail .content_product_detail .quantity:before {
    content: "Cant." !important;
}

/* Franja promocional del home (antes de testimonios): banda navy con mascota,
   mensaje y CTA — estilo retail. */
.matz-promo-strip {
    background: linear-gradient(120deg, #232f3e 0%, #2e448e 70%, #476faa 100%);
    border-radius: 6px;
    margin: 10px 0 40px;
    overflow: hidden;
}
.matz-promo-inner {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 26px 40px;
    flex-wrap: wrap;
}
.matz-promo-mascota {
    height: 110px;
    width: auto;
    margin-bottom: -34px; /* que "pise" el borde inferior */
}
.matz-promo-texto { flex: 1; min-width: 240px; }
.matz-promo-texto h3 {
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 6px;
}
.matz-promo-texto p {
    color: #cfe0f5;
    margin: 0;
    font-size: 14px;
}
.matz-promo-btn {
    background: #fff;
    color: #2e448e !important;
    font-weight: 700;
    padding: 13px 34px;
    border-radius: 30px;
    text-transform: uppercase;
    font-size: 13px;
    transition: all .3s;
}
.matz-promo-btn:hover {
    background: #f83a3a;
    color: #fff !important;
}
@media (max-width: 767px) {
    .matz-promo-inner { justify-content: center; text-align: center; }
    .matz-promo-mascota { margin-bottom: 0; }
}

/* Columna "Atención al cliente" del footer */
.matz-footer-contacto ul { list-style: none; margin: 0; padding: 0; }
.matz-footer-contacto ul li {
    color: #9db0c9;
    font-size: 13px;
    line-height: 2;
}

/* ============================================================
   Cards de producto: fila única de acciones (carrito + wishlist + comparar)
   El tema estiliza el markup VIEJO de YITH Wishlist (2.x/3.x); la versión
   instalada (4.16) renderiza .yith-add-to-wishlist-button-block con svg +
   label de texto, que rompía el layout (corazón gigante + texto en su propia
   línea). Aquí se adapta ese markup nuevo al look del tema: cuadrito 30x30
   de solo icono, alineado con el carrito y el comparar.
   Comparar: el botón que FUNCIONA es el que inyecta YITH WooCompare
   (yith_woocompare_show_compare_button_in = shop), porque el plugin solo
   encola su JS cuando él mismo pinta el botón. El botón propio del tema
   (href="javascript:void(0)") queda muerto sin ese contexto, así que se
   oculta por CSS (atributo href) y se deja el de YITH, que el tema ya
   estiliza igual (cuadrito con icono) por la clase .compare.
   ============================================================ */
.item-bottom a.compare[href^="javascript"] {
    display: none !important;
}
.item .item-wrap .item-detail .item-content .item-bottom .yith-add-to-wishlist-button-block {
    display: inline-block;
    vertical-align: top;
    float: left;
    margin: 0 5px 5px 0;
}
.item .item-wrap .item-detail .item-content .item-bottom .yith-wcwl-add-to-wishlist-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 0;
    color: #999;
    transition: all .3s;
}
.item .item-wrap .item-detail .item-content .item-bottom .yith-wcwl-add-to-wishlist-button svg {
    width: 15px;
    height: 15px;
}
/* ocultar cualquier texto dentro del bloque (label, feedback "añadido", etc.) */
.item .item-wrap .item-detail .item-content .item-bottom .yith-add-to-wishlist-button-block span {
    display: none;
}
.item .item-wrap .item-detail .item-content .item-bottom .yith-wcwl-add-to-wishlist-button:hover,
.item .item-wrap .item-detail .item-content .item-bottom .yith-wcwl-add-to-wishlist-button--added {
    border-color: #2e448e;
    color: #2e448e;
}

/* Botón "volver arriba" del tema (#onemall-totop, main.js lo muestra al hacer
   scroll): oculto porque ocupa la misma esquina que el botón de WhatsApp de
   Matz. El !important gana incluso al display inline que setea el fadeIn(). */
#onemall-totop {
    display: none !important;
}

/* ============================================================
   Botón flotante de WhatsApp con la carita de Matz
   (HTML en functions.php -> matizapp_boton_whatsapp)
   ============================================================ */
.matz-wa-flotante {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    animation: matz-wa-entrada .6s cubic-bezier(.34, 1.56, .64, 1) .8s backwards;
}

/* --- Botón circular con la cara de Matz --- */
.matz-wa-btn {
    position: relative;
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 25%, #ffffff 0%, #eef3fb 70%, #dbe5f3 100%);
    border: 3px solid #25d366;
    box-shadow: 0 6px 18px rgba(20, 40, 80, .28);
    flex-shrink: 0;
    transition: transform .25s ease, box-shadow .25s ease;
}
.matz-wa-btn img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}
/* Anillo de pulso (latido suave para llamar la atención sin ser invasivo) */
.matz-wa-btn:before {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 3px solid #25d366;
    animation: matz-wa-pulso 2.6s ease-out infinite;
    pointer-events: none;
}
/* Badge verde de WhatsApp en la esquina del botón */
.matz-wa-badge {
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2be16f 0%, #1ebe5d 100%);
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}

/* --- Burbuja de saludo (aparece sola a los 3s, se esconde a los 14s,
       vuelve al pasar el mouse o al enfocar con teclado) --- */
.matz-wa-burbuja {
    background: #fff;
    color: #232f3e;
    font-size: 13px;
    line-height: 1.45;
    padding: 11px 16px;
    border-radius: 14px 14px 2px 14px;
    box-shadow: 0 4px 16px rgba(20, 40, 80, .22);
    white-space: nowrap;
    position: relative;
    opacity: 0;
    transform: translateX(8px) scale(.96);
    pointer-events: none;
    transition: opacity .3s ease, transform .3s ease;
    animation: matz-wa-saludo 14s ease .3s 1 both;
}
.matz-wa-burbuja strong { color: #2e448e; }
/* Piquito de la burbuja apuntando al botón */
.matz-wa-burbuja:after {
    content: "";
    position: absolute;
    right: -6px;
    bottom: 10px;
    border-width: 6px 0 0 7px;
    border-style: solid;
    border-color: transparent transparent transparent #fff;
    filter: drop-shadow(2px 2px 2px rgba(20, 40, 80, .12));
}
.matz-wa-flotante:hover .matz-wa-burbuja,
.matz-wa-flotante:focus .matz-wa-burbuja,
.matz-wa-flotante:focus-visible .matz-wa-burbuja {
    opacity: 1;
    transform: translateX(0) scale(1);
}

/* --- Interacción --- */
.matz-wa-flotante:hover .matz-wa-btn,
.matz-wa-flotante:focus .matz-wa-btn {
    transform: translateY(-3px) scale(1.06);
    box-shadow: 0 10px 26px rgba(20, 40, 80, .35);
}
.matz-wa-flotante:focus-visible .matz-wa-btn {
    outline: 3px solid #2e448e;
    outline-offset: 3px;
}

/* --- Animaciones --- */
@keyframes matz-wa-entrada {
    from { opacity: 0; transform: translateY(30px) scale(.5); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes matz-wa-pulso {
    0%   { transform: scale(1);    opacity: .7; }
    70%  { transform: scale(1.45); opacity: 0; }
    100% { transform: scale(1.45); opacity: 0; }
}
/* Ciclo de la burbuja: 14s totales -> visible del ~21% al ~93% (3s a 13s) */
@keyframes matz-wa-saludo {
    0%, 21%   { opacity: 0; transform: translateX(8px) scale(.96); }
    25%, 89%  { opacity: 1; transform: translateX(0) scale(1); }
    93%, 100% { opacity: 0; transform: translateX(8px) scale(.96); }
}

/* --- Móvil: botón un poco más compacto y burbuja que no desborde --- */
@media (max-width: 767px) {
    .matz-wa-flotante { right: 14px; bottom: 14px; }
    .matz-wa-btn { width: 58px; height: 58px; }
    .matz-wa-badge { width: 24px; height: 24px; }
    .matz-wa-burbuja { font-size: 12px; padding: 9px 13px; }
}

/* --- Accesibilidad: sin animaciones si el usuario las tiene reducidas --- */
@media (prefers-reduced-motion: reduce) {
    .matz-wa-flotante,
    .matz-wa-burbuja { animation: none; }
    .matz-wa-btn:before { animation: none; opacity: 0; }
    .matz-wa-btn { transition: none; }
}

/* Cuadros de garantías del home (.block-service-home2): igualar la altura de
   los 4 cuadros. Por defecto cada uno crece según su texto (los subtítulos de
   1 vs 2 líneas dejaban cuadros disparejos). Flex solo en escritorio: en móvil
   el tema usa scroll horizontal con items inline-block y no hay que tocarlo. */
@media (min-width: 992px) {
    .block-service-home2 ul {
        display: flex;
        flex-wrap: wrap;
    }
    .block-service-home2 ul > li.item {
        display: flex;
        float: none;
    }
    .block-service-home2 ul > li.item .item-content {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}