/* ==========================================================
   MANOSALVA — CATÁLOGO WOOCOMMERCE
   Reutiliza hero.css, buttons.css y product-card.css.
   Alcance: exclusivamente la plantilla del catálogo.
========================================================== */
.ms-shop-page .ms-shop {
    --ms-shop-navy: #11294f;
    --ms-shop-blue: #0b528d;
    --ms-shop-red: #ed152d;
    --ms-shop-muted: #53647a;
    --ms-shop-border: #e2e9f1;
    width: 100%;
    min-width: 0;
    color: var(--ms-shop-navy);
}

/* Contenedores heredados de WooCommerce. */
body.ms-shop-page #primary.content-area,
body.ms-shop-page #primary > #main.site-main,
body.ms-shop-page #primary.site-main {
    float: none;
    width: 100%;
    max-width: none;
    min-width: 0;
    margin-inline: 0;
}

.ms-shop-breadcrumb {
    width: min(94%, 1500px);
    margin: 12px auto 2px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: .84rem;
    color: var(--ms-shop-muted);
}
.ms-shop-breadcrumb a,
.ms-shop-breadcrumb a:visited { color: var(--ms-shop-blue); text-decoration: none; }
.ms-shop-breadcrumb a:hover { text-decoration: underline; }

/* Hero V2 en modo catálogo: compacto, sin formulario y con imagen opcional. */
.ms-shop-page .ms-shop-hero .ms-hero { padding-block: 10px 0; }
.ms-shop-page .ms-shop-hero .ms-hero > .ms-container {
    width: min(94%, 1500px);
    max-width: none;
    margin-inline: auto;
    padding: 0;
}
.ms-shop-page .ms-shop-hero .ms-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    grid-template-rows: auto;
    min-height: 300px;
    height: auto;
    align-items: stretch;
    gap: 0;
}
.ms-shop-page .ms-shop-hero .ms-hero__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    min-width: 0;
    width: auto;
    max-width: none;
    padding: clamp(26px, 3vw, 48px);
}
.ms-shop-page .ms-shop-hero .ms-hero__content:only-child { grid-column: 1 / -1; }
.ms-shop-page .ms-shop-hero .ms-hero__title {
    font-size: clamp(2rem, 3.6vw, 3.4rem);
    line-height: 1.08;
    margin: 0 0 14px;
    max-width: 760px;
}
.ms-shop-page .ms-shop-hero .ms-hero__eyebrow { margin: 0 0 12px; font-size: .88rem; }
.ms-shop-page .ms-shop-hero .ms-hero__description { max-width: 650px; line-height: 1.55; }
.ms-shop-page .ms-shop-hero .ms-hero__actions { margin-top: 22px; flex-wrap: wrap; }
.ms-shop-page .ms-shop-hero .ms-hero__visual { position: relative; min-height: 300px; height: auto; min-width: 0; }
.ms-shop-page .ms-shop-hero .ms-hero__image-wrapper { position: absolute; inset: 0; }
.ms-shop-page .ms-shop-hero .ms-hero__image { width: 100%; height: 100%; object-fit: cover; }
.ms-shop-page .ms-shop-hero .ms-hero__trust { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 20px; }
.ms-shop-page .ms-shop-hero .ms-hero__trust-item { min-width: 0; flex: 1 1 125px; }
.ms-shop-page .ms-shop-hero .ms-hero__benefits { margin-top: 12px; }

/* Catálogo: encabezado y rejilla principal. */
.ms-shop-catalogue {
    width: min(94%, 1500px);
    margin: clamp(28px, 4vw, 56px) auto clamp(44px, 6vw, 84px);
    scroll-margin-top: 145px;
}
.ms-shop-catalogue__header { margin: 0 0 24px; }
.ms-shop-catalogue__eyebrow {
    color: var(--ms-shop-red); font-size: .76rem; font-weight: 800;
    letter-spacing: .12em; margin: 0 0 8px;
}
.ms-shop-catalogue__header h2 {
    color: var(--ms-shop-navy); font-size: clamp(1.7rem, 2.7vw, 2.45rem);
    line-height: 1.14; font-weight: 800; margin: 0 0 12px;
}
.ms-shop-catalogue__header h2::after {
    content: ''; display: block; width: 54px; height: 3px;
    background: var(--ms-shop-red); border-radius: 5px; margin-top: 12px;
}
.ms-shop-catalogue__header p:last-child { color: var(--ms-shop-muted); max-width: 850px; line-height: 1.5; margin: 0; }
.ms-shop-catalogue__layout {
    display: grid; grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
    align-items: start; gap: clamp(18px, 2vw, 30px);
}
.ms-shop-catalogue__results { min-width: 0; width: 100%; }

/* Filtros. */
.ms-shop-filters {
    min-width: 0; padding: 22px 19px;
    border: 1px solid var(--ms-shop-border); border-radius: 18px;
    background: #f5f9fd; box-shadow: 0 8px 24px rgba(17, 41, 79, .045);
}
.ms-shop-filters__heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.ms-shop-filters__heading h2 { color: var(--ms-shop-navy); font-size: 1.12rem; line-height: 1.2; font-weight: 800; margin: 0; }
.ms-shop-filters__reset, .ms-shop-filters__reset:visited { color: var(--ms-shop-blue); font-size: .8rem; text-decoration: underline; }
.ms-shop-filters__form { display: grid; gap: 17px; margin: 0; }
.ms-shop-filters__field { display: grid; min-width: 0; gap: 7px; }
.ms-shop-filters label, .ms-shop-filters legend { color: var(--ms-shop-navy); font-size: .87rem; font-weight: 700; margin: 0; }
.ms-shop-filters input:not([type="hidden"]):not([type="checkbox"]), .ms-shop-filters select,
.ms-shop-catalogue__toolbar .woocommerce-ordering select {
    box-sizing: border-box; width: 100%; min-width: 0; min-height: 43px;
    padding: 9px 10px; border: 1px solid #cedbea; border-radius: 9px;
    background: #fff; color: var(--ms-shop-navy); font: inherit; font-size: .86rem;
}
.ms-shop-filters select { padding-right: 20px; }
.ms-shop-filters input:focus-visible, .ms-shop-filters select:focus-visible,
.ms-shop-catalogue__toolbar select:focus-visible { outline: 2px solid var(--ms-shop-blue); outline-offset: 2px; }
.ms-shop-filters__prices { margin: 0; padding: 0; border: 0; min-width: 0; }
.ms-shop-filters__prices legend { margin-bottom: 8px; }
.ms-shop-filters__price-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.ms-shop-filters__price-grid label { font-weight: 500; font-size: .76rem; }
.ms-shop-page .ms-shop-filters__submit { display: inline-flex; justify-content: center; width: 100%; border: 0; cursor: pointer; margin: 0; font-size: .9rem; }
.ms-shop-filters__help { border-top: 1px solid #dce6ef; margin-top: 24px; padding-top: 19px; }
.ms-shop-filters__help strong { font-size: .93rem; color: var(--ms-shop-navy); }
.ms-shop-filters__help p { font-size: .83rem; color: var(--ms-shop-muted); line-height: 1.5; margin: 8px 0 10px; }
.ms-shop-filters__help a, .ms-shop-filters__help a:visited { font-size: .85rem; color: var(--ms-shop-blue); font-weight: 700; text-decoration: underline; }

/* Controles de catálogo: contador y ordenación nativa. */
.ms-shop-catalogue__toolbar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 10px 14px; min-height: 58px; padding: 10px 14px; margin-bottom: 18px;
    border: 1px solid var(--ms-shop-border); border-radius: 12px; background: #fff;
}
.ms-shop-page .ms-shop-catalogue__toolbar .woocommerce-result-count {
    float: none; margin: 0; font-size: .85rem; font-weight: 600; color: var(--ms-shop-muted);
}
.ms-shop-page .ms-shop-catalogue__toolbar .woocommerce-ordering { float: none; margin: 0 0 0 auto; max-width: 100%; min-width: 0; }
.ms-shop-catalogue__toolbar .woocommerce-ordering select { min-height: 38px; }
.ms-shop-catalogue__toolbar .woocommerce-notices-wrapper,
.ms-shop-catalogue__toolbar .woocommerce-message,
.ms-shop-catalogue__toolbar .woocommerce-error { flex: 0 0 100%; max-width: 100%; }
.ms-shop-catalogue__toolbar .woocommerce-notices-wrapper:empty { display: none; }

/* Rejilla: preserva la tarjeta existente, neutraliza floats y clearfix de WooCommerce. */
body.ms-shop-page .ms-shop-catalogue__results ul.products {
    display: grid; grid-template-columns: repeat(3, minmax(0,1fr));
    gap: clamp(14px, 1.5vw, 23px); align-items: stretch; list-style: none;
    padding: 0; margin: 0; width: 100%; max-width: none;
}
body.ms-shop-page .ms-shop-catalogue__results ul.products::before,
body.ms-shop-page .ms-shop-catalogue__results ul.products::after { display: none; content: none; }
body.ms-shop-page .ms-shop-catalogue__results ul.products li.product {
    display: flex; float: none !important; clear: none !important;
    width: 100% !important; max-width: none; min-width: 0;
    margin: 0 !important; padding: 0; list-style: none;
}
.ms-shop-page .ms-shop-catalogue__results .ms-product-card {
    display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; width: 100%;
    max-width: none; height: auto; margin: 0;
    /* Evita que un fallo o retraso de AOS oculte productos del catálogo. */
    opacity: 1 !important; transform: none !important;
}
.ms-shop-page .ms-shop-catalogue__results .ms-product-card__body { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.ms-shop-page .ms-shop-catalogue__results .ms-product-card__footer { margin-top: auto; }
.ms-shop-page .ms-shop-catalogue__results ul.products li.product .ms-product-card__image {
    width: 100%; height: 100%; max-height: 100%; object-fit: contain; margin: 0; display: block;
}
.ms-shop-page .ms-shop-catalogue__results ul.products li.product .ms-product-card__brand-logo { width: auto; max-width: 100%; margin: 0; }
.ms-shop-page .ms-shop-catalogue__results .ms-product-card__title { overflow-wrap: anywhere; }
.ms-shop-page .ms-shop-catalogue__results .ms-product-card__title a:visited { color: inherit; }

/* Paginación y catálogo vacío. */
.ms-shop-page .ms-shop-catalogue__results .woocommerce-pagination { margin-top: 28px; text-align: center; }
.ms-shop-page .ms-shop-catalogue__results .woocommerce-pagination ul { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 7px; border: 0; margin: 0; padding: 0; }
.ms-shop-page .ms-shop-catalogue__results .woocommerce-pagination ul li { border: 0; margin: 0; float: none; }
.ms-shop-page .ms-shop-catalogue__results .woocommerce-pagination .page-numbers a,
.ms-shop-page .ms-shop-catalogue__results .woocommerce-pagination .page-numbers span {
    display: grid; place-items: center; min-width: 40px; min-height: 40px; padding: 8px; border-radius: 9px;
    background: #fff; color: var(--ms-shop-navy); border: 1px solid var(--ms-shop-border); text-decoration: none;
}
.ms-shop-page .ms-shop-catalogue__results .woocommerce-pagination .page-numbers .current { background: var(--ms-shop-blue); color: #fff; border-color: var(--ms-shop-blue); }
.ms-shop-catalogue__empty { border: 1px solid var(--ms-shop-border); background: #f5f9fd; border-radius: 16px; padding: 26px; }
.ms-shop-catalogue__empty > p { color: var(--ms-shop-muted); margin: 14px 0 18px; }

/* Responsive. */
@media (max-width: 1199px) {
    body.ms-shop-page .ms-shop-catalogue__results ul.products { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 900px) {
    .ms-shop-catalogue__layout { grid-template-columns: minmax(0,1fr); }
    .ms-shop-filters__form { grid-template-columns: repeat(2, minmax(0,1fr)); align-items: end; }
    .ms-shop-filters__submit { grid-column: 1 / -1; }
    .ms-shop-filters__help { display: none; }
}
@media (max-width: 767.98px) {
    .ms-shop-breadcrumb, .ms-shop-catalogue, .ms-shop-page .ms-shop-hero .ms-hero > .ms-container { width: calc(100% - 28px); }
    .ms-shop-page .ms-shop-hero .ms-hero { padding-inline: 0; }
    .ms-shop-page .ms-shop-hero .ms-hero__grid { grid-template-columns: minmax(0,1fr); min-height: 0; }
    .ms-shop-page .ms-shop-hero .ms-hero__content { padding: 25px 22px; }
    .ms-shop-page .ms-shop-hero .ms-hero__title { font-size: clamp(1.9rem, 7.5vw, 2.65rem); }
    .ms-shop-page .ms-shop-hero .ms-hero__visual { min-height: 180px; height: 180px; }
    .ms-shop-page .ms-shop-hero .ms-hero__actions { width: 100%; }
    .ms-shop-page .ms-shop-hero .ms-hero__trust { flex-direction: row; }
    .ms-shop-catalogue { scroll-margin-top: 100px; }
    .ms-shop-filters { padding: 17px 15px; }
    .ms-shop-catalogue__toolbar { align-items: stretch; }
    .ms-shop-page .ms-shop-catalogue__toolbar .woocommerce-ordering { flex: 1 1 100%; margin: 0; }
}
@media (max-width: 575px) {
    .ms-shop-filters__form { grid-template-columns: minmax(0,1fr); }
    body.ms-shop-page .ms-shop-catalogue__results ul.products { grid-template-columns: minmax(0,1fr); }
}

/* ==========================================================
   MANOSALVA — CATÁLOGO
   AJUSTES FINALES DE NAVEGACIÓN Y FILTROS
========================================================== */


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

.ms-shop-page .ms-shop-breadcrumb {
    margin-top: 16px;
    margin-bottom: 8px;

    gap: 9px;

    font-size: 13px;
    font-weight: 500;

    line-height: 1.4;

    color: #64748b;
}


.ms-shop-page .ms-shop-breadcrumb a,
.ms-shop-page .ms-shop-breadcrumb a:visited {
    color: #53647a !important;

    text-decoration: none;

    transition: color 0.2s ease;
}


.ms-shop-page .ms-shop-breadcrumb a:hover {
    color: #07539a !important;
}


.ms-shop-page
.ms-shop-breadcrumb [aria-hidden="true"] {
    color: #a1afbf;
}


.ms-shop-page
.ms-shop-breadcrumb [aria-current="page"] {
    color: #10234b;

    font-weight: 700;
}


/* ==========================================================
   FILTROS — BOTÓN LIMPIAR
========================================================== */

.ms-shop-page a.ms-shop-filters__reset,
.ms-shop-page a.ms-shop-filters__reset:visited {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 6px;

    min-height: 32px;

    padding: 6px 11px;

    border: 1px solid #cedbea;
    border-radius: 999px;

    background: #ffffff;

    color: #0b528d !important;

    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;

    text-decoration: none !important;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}


.ms-shop-page .ms-shop-filters__reset::before {
    content: "\21BB";

    font-size: 16px;
    font-weight: 600;
    line-height: 1;
}


.ms-shop-page a.ms-shop-filters__reset:hover {
    background: #e8f1fa;

    border-color: #a8c2dc;

    color: #10234b !important;
}


/* ==========================================================
   FILTROS — HABLAR CON UN TÉCNICO
========================================================== */

.ms-shop-page .ms-shop-filters__help a,
.ms-shop-page .ms-shop-filters__help a:visited {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 9px;

    width: 100%;
    min-height: 44px;

    box-sizing: border-box;

    margin-top: 5px;

    padding: 11px 14px;

    border: 1px solid transparent;
    border-radius: 999px;

    background: #10234b;

    color: #ffffff !important;

    font-size: 12px;
    font-weight: 800;
    line-height: 1.3;

    text-align: center;
    text-decoration: none !important;

    box-shadow:
        0 6px 15px
        rgba(16, 35, 75, 0.12);

    transition:
        background-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}


/* Icono de teléfono mediante SVG integrado */

.ms-shop-page .ms-shop-filters__help a::before {
    content: "";

    display: block;

    flex: 0 0 15px;

    width: 15px;
    height: 15px;

    background: currentColor;

    -webkit-mask:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6.62 10.79a15.054 15.054 0 0 0 6.59 6.59l2.2-2.2a1 1 0 0 1 1.01-.24c1.12.37 2.33.57 3.58.57a1 1 0 0 1 1 1V20a1 1 0 0 1-1 1C10.61 21 3 13.39 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.46.57 3.57a1 1 0 0 1-.25 1.02z'/%3E%3C/svg%3E")
        center / contain no-repeat;

    mask:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6.62 10.79a15.054 15.054 0 0 0 6.59 6.59l2.2-2.2a1 1 0 0 1 1.01-.24c1.12.37 2.33.57 3.58.57a1 1 0 0 1 1 1V20a1 1 0 0 1-1 1C10.61 21 3 13.39 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.46.57 3.57a1 1 0 0 1-.25 1.02z'/%3E%3C/svg%3E")
        center / contain no-repeat;
}


.ms-shop-page .ms-shop-filters__help a:hover {
    background: #07539a;

    color: #ffffff !important;

    transform: translateY(-2px);

    box-shadow:
        0 9px 20px
        rgba(7, 83, 154, 0.18);
}


/* ==========================================================
   ACCESIBILIDAD
========================================================== */

.ms-shop-page .ms-shop-filters__reset:focus-visible,
.ms-shop-page .ms-shop-filters__help a:focus-visible,
.ms-shop-page .ms-shop-breadcrumb a:focus-visible {
    outline: 2px solid #07539a;
    outline-offset: 3px;
}


@media (prefers-reduced-motion: reduce) {

    .ms-shop-page .ms-shop-filters__reset,
    .ms-shop-page .ms-shop-filters__help a {
        transition: none;
    }

    .ms-shop-page .ms-shop-filters__help a:hover {
        transform: none;
    }

}


/* ==========================================================
   MÓVIL
========================================================== */

@media (max-width: 767.98px) {

    .ms-shop-page .ms-shop-breadcrumb {
        margin-top: 12px;
        margin-bottom: 6px;

        font-size: 12px;
    }

}
/* Filtro de ofertas: control nativo accesible, no un campo de texto. */
.ms-shop-filters label.ms-shop-filters__sale {
    display: flex; align-items: center; gap: 9px;
    padding: 12px 10px; min-height: 44px; margin: 0;
    border: 1px solid #f0cdd3; border-radius: 10px;
    background: #fff5f6; color: #a80e26;
    font-weight: 800; cursor: pointer;
}
.ms-shop-filters__sale input[type="checkbox"] {
    appearance: auto; -webkit-appearance: checkbox;
    width: 19px !important; height: 19px !important; min-height: 0 !important;
    flex: 0 0 19px; margin: 0 !important; padding: 0 !important; accent-color: #ed1c2e;
}
