/* Catálogo de productos: buscador, familias, filtros y tarjetas (0.22.0). Author: Presencia en internet.
 * The child theme styles every form control of the catalog page with long selectors; the doubled class
 * (.wl-cat.wl-cat) keeps these rules above them whatever the order the style sheets load in. */

.wl-cat {
    --wlc-navy: #01274c;
    --wlc-ink: #082c50;
    --wlc-blue: #0565d7;
    --wlc-muted: #56687f;
    --wlc-line: #dce6f0;
    --wlc-soft: #f0f6fc;
    --wlc-bg: #f4f7fb;
    --wlc-shadow: 0 14px 38px rgb(8 44 80 / 9%);
    margin: 0 0 40px;
    color: var(--wlc-ink);
}
.wl-cat *, .wl-cat *::before, .wl-cat *::after { box-sizing: border-box; }
.wl-cat .wl-cat-label, .wl-cat .wl-cat-sr, .wl-cat .wl-cat-live {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Search box ---------- */
.wl-cat .wl-cat-search { position: relative; margin: 0 0 22px; }
.wl-cat .wl-cat-box {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 6px 6px 54px;
    border: 1px solid var(--wlc-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--wlc-shadow);
    transition: border-color .15s, box-shadow .15s;
}
.wl-cat .wl-cat-box:focus-within { border-color: var(--wlc-blue); box-shadow: 0 0 0 4px rgb(5 101 215 / 14%), var(--wlc-shadow); }
.wl-cat .wl-cat-icon {
    position: absolute; top: 50%; left: 19px;
    width: 22px; height: 22px; margin-top: -11px;
    fill: none; stroke: var(--wlc-muted); stroke-width: 2.2; stroke-linecap: round;
}
body.wl-brand .wl-cat.wl-cat .wl-cat-box.wl-cat-box input[type="search"][name="buscar"],
.wl-cat.wl-cat .wl-cat-box.wl-cat-box input[type="search"] {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    height: 52px;
    min-height: 0;
    margin: 0;
    padding: 0 6px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--wlc-ink);
    font-size: 18px;
    line-height: 52px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}
.wl-cat .wl-cat-box input[type="search"]::placeholder { color: #7a8ba0; opacity: 1; }
.wl-cat .wl-cat-box input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }
body.wl-brand .wl-cat.wl-cat .wl-cat-box button,
.wl-cat.wl-cat .wl-cat-box button {
    flex: 0 0 auto;
    min-height: 52px;
    margin: 0;
    padding: 0 28px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #0669e3, #0062b9);
    color: #fff !important;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}
body.wl-brand .wl-cat.wl-cat .wl-cat-box button:hover { background: #0557bc; box-shadow: none; }

/* Suggestions, under the box */
.wl-cat .wl-cat-suggest {
    position: absolute; z-index: 60;
    top: calc(100% + 8px); left: -1px; right: -1px;
    max-height: min(70vh, 560px);
    overflow: auto;
    padding: 8px;
    border: 1px solid var(--wlc-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 22px 60px rgb(8 44 80 / 18%);
}
.wl-cat .wl-cat-suggest[hidden] { display: none; }
.wl-cat .wl-sg-h {
    margin: 10px 10px 6px; padding: 0;
    color: var(--wlc-muted);
    font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
}
.wl-cat .wl-sg-h:first-child { margin-top: 4px; }
body.wl-brand .wl-cat.wl-cat a.wl-sg-opt {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 10px;
    border-radius: 10px;
    color: var(--wlc-ink);
    text-decoration: none;
}
body.wl-brand .wl-cat.wl-cat a.wl-sg-opt:hover,
body.wl-brand .wl-cat.wl-cat a.wl-sg-opt.is-active { background: var(--wlc-soft); text-decoration: none; }
.wl-cat .wl-sg-img {
    flex: 0 0 48px; width: 48px; height: 48px;
    padding: 4px;
    border-radius: 8px;
    background: var(--wlc-bg);
    object-fit: contain;
}
.wl-cat .wl-sg-img--none { display: grid; place-items: center; }
.wl-cat .wl-sg-img--none svg { width: 22px; height: 22px; fill: none; stroke: #9aabbf; stroke-width: 1.6; }
.wl-cat .wl-sg-text { display: grid; min-width: 0; gap: 2px; }
.wl-cat .wl-sg-name { overflow: hidden; font-size: 15px; font-weight: 600; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.wl-cat .wl-sg-meta { overflow: hidden; color: var(--wlc-muted); font-size: 13px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.wl-cat .wl-sg-n { margin-left: auto; padding: 1px 9px; border-radius: 20px; background: var(--wlc-soft); color: var(--wlc-muted); font-size: 12px; font-weight: 700; }
body.wl-brand .wl-cat.wl-cat a.wl-sg-all { justify-content: center; margin-top: 6px; border-top: 1px solid var(--wlc-line); border-radius: 0 0 10px 10px; color: var(--wlc-blue); font-weight: 700; }
.wl-cat .wl-sg-none { margin: 8px 10px; padding: 0; color: var(--wlc-muted); font-size: 14px; }

/* ---------- Families and subcategories ---------- */
.wl-cat .wl-cat-families { margin: 0 0 26px; }
.wl-cat .wl-cat-tabs {
    display: flex; gap: 8px;
    margin: 0 0 14px;
    overflow-x: auto;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}
body.wl-brand .wl-cat.wl-cat a.wl-cat-tab {
    flex: 0 0 auto;
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 44px;
    margin: 0;
    padding: 9px 16px;
    border: 1px solid var(--wlc-line);
    border-radius: 12px;
    background: #fff;
    color: var(--wlc-ink);
    font-size: 15px; font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
body.wl-brand .wl-cat.wl-cat a.wl-cat-tab:hover { border-color: var(--wlc-blue); text-decoration: none; }
body.wl-brand .wl-cat.wl-cat a.wl-cat-tab.is-active,
body.wl-brand .wl-cat.wl-cat a.wl-cat-tab[aria-selected="true"] { border-color: var(--wlc-navy); background: var(--wlc-navy); color: #fff; }
body.wl-brand .wl-cat.wl-cat a.wl-cat-tab[aria-selected="false"] { border-color: var(--wlc-line); background: #fff; color: var(--wlc-ink); }
body.wl-brand .wl-cat.wl-cat a.wl-cat-tab.is-empty:not(.is-active):not([aria-selected="true"]) { color: #8395aa; }
.wl-cat .wl-cat-n { padding: 1px 8px; border-radius: 20px; background: var(--wlc-soft); color: var(--wlc-muted); font-size: 12px; font-weight: 700; line-height: 1.6; }
.wl-cat .wl-cat-tab.is-active .wl-cat-n, .wl-cat [aria-selected="true"] .wl-cat-n, .wl-cat a.wl-cat-chip[aria-current] .wl-cat-n { background: rgb(255 255 255 / 16%); color: #fff; }
.wl-cat .wl-cat-tab[aria-selected="false"] .wl-cat-n { background: var(--wlc-soft); color: var(--wlc-muted); }

.wl-cat .wl-cat-fam[hidden] { display: none; }
.wl-cat .wl-cat-none { margin: 4px 0 0; color: var(--wlc-muted); font-size: 14px; }
.wl-cat .wl-cat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.wl-cat .wl-cat-chips li { margin: 0; padding: 0; list-style: none; }
.wl-cat .wl-cat-chips li::before { display: none; }
body.wl-brand .wl-cat.wl-cat a.wl-cat-chip {
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 40px;
    padding: 7px 14px;
    border: 1px solid var(--wlc-line);
    border-radius: 30px;
    background: #fff;
    color: var(--wlc-ink);
    font-size: 14px; font-weight: 600; line-height: 1.3;
    text-decoration: none;
}
body.wl-brand .wl-cat.wl-cat a.wl-cat-chip:hover { border-color: var(--wlc-blue); color: var(--wlc-blue); text-decoration: none; }
body.wl-brand .wl-cat.wl-cat a.wl-cat-chip.wl-cat-all { border-style: dashed; color: var(--wlc-blue); }
body.wl-brand .wl-cat.wl-cat a.wl-cat-chip.is-open { border-color: var(--wlc-blue); box-shadow: inset 0 0 0 1px var(--wlc-blue); }
body.wl-brand .wl-cat.wl-cat a.wl-cat-chip[aria-current] { border-color: var(--wlc-navy); background: var(--wlc-navy); color: #fff; }
.wl-cat .wl-cat-x { margin-left: 2px; font-size: 17px; font-weight: 400; line-height: 1; }
.wl-cat .wl-cat-chips--sub { margin-top: 12px; padding: 12px 0 0 14px; border-top: 1px dashed var(--wlc-line); }
body.wl-brand .wl-cat.wl-cat .wl-cat-chips--sub a.wl-cat-chip { min-height: 34px; padding: 5px 12px; font-size: 13px; }

/* ---------- Count, supplier and order ---------- */
.wl-cat .wl-cat-bar {
    display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px;
    margin: 0 0 16px; padding: 18px 0 0;
    border-top: 1px solid var(--wlc-line);
}
.wl-cat .wl-cat-count { margin: 0; padding: 0 0 10px; color: var(--wlc-muted); font-size: 15px; }
.wl-cat .wl-cat-count strong { color: var(--wlc-ink); font-size: 18px; }
.wl-cat .wl-cat-refine { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: 0; }
body.wl-brand .wl-cat.wl-cat label.wl-cat-field { display: grid; gap: 4px; width: 240px; max-width: 100%; margin: 0; color: var(--wlc-muted); font-size: 12.5px; font-weight: 600; }
body.wl-brand .wl-cat.wl-cat .wl-cat-bar label.wl-cat-field:last-of-type { width: 190px; }
body.wl-brand .wl-cat.wl-cat .wl-cat-bar label.wl-cat-field select[name],
body.wl-brand .wl-cat.wl-cat.wl-cat--compact label.wl-cat-field select[name] {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 8px 36px 8px 12px;
    border: 1px solid #b9c8d9;
    border-radius: 10px;
    background-color: #fff;
    color: var(--wlc-ink);
    font-size: 15px;
}
body.wl-brand .wl-cat.wl-cat button.wl-cat-apply { min-height: 44px; padding: 8px 18px; }
.wl-cat-js .wl-cat-apply:not(.is-needed) { display: none !important; }

/* What is filtered */
.wl-cat .wl-cat-active { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; }
.wl-cat .wl-cat-active li { margin: 0; padding: 0; list-style: none; }
.wl-cat .wl-cat-active li::before { display: none; }
body.wl-brand .wl-cat.wl-cat .wl-cat-active a {
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 36px;
    padding: 5px 12px 5px 14px;
    border-radius: 30px;
    background: #e3eefb;
    color: var(--wlc-ink);
    font-size: 14px; font-weight: 600;
    text-decoration: none;
}
body.wl-brand .wl-cat.wl-cat .wl-cat-active a:hover { background: #d3e4f8; text-decoration: none; }
body.wl-brand .wl-cat.wl-cat .wl-cat-active a.wl-cat-clear { background: none; color: var(--wlc-blue); text-decoration: underline; }

/* ---------- Products ---------- */
body.wl-brand .wl-cat .wl-cat-grid.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin: 0 0 32px;
}
body.wl-brand .wl-cat .wl-cat-grid.woocommerce ul.products li.product { padding: 14px; border-radius: 14px; }
body.wl-brand .wl-cat .wl-cat-grid.woocommerce ul.products li.product a img { height: 190px; margin: 0 0 14px; padding: 14px; border-radius: 10px; }
body.wl-brand .wl-cat .wl-cat-grid.woocommerce ul.products li.product :is(h2, .woocommerce-loop-product__title) { margin: 0 0 12px; font-size: 16px !important; line-height: 1.4; }

/* The category above the name and the company below it, on every product card. */
body.wl-brand .woocommerce ul.products li.product .wl-card-cat,
.woocommerce ul.products li.product .wl-card-cat {
    margin: 0 0 6px; padding: 0;
    color: #0565d7;
    font-size: 11.5px; font-weight: 700; letter-spacing: .07em; line-height: 1.4;
    text-transform: uppercase;
}
body.wl-brand .woocommerce ul.products li.product .wl-card-sup,
.woocommerce ul.products li.product .wl-card-sup {
    display: flex; align-items: center; gap: 6px;
    margin: -4px 0 14px; padding: 0;
    color: #56687f;
    font-size: 13.5px; font-weight: 600; line-height: 1.4;
}
.woocommerce ul.products li.product .wl-card-sup::before {
    content: "";
    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' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 21V5l8-3v19m0-14h8v14M2 21h20M7 7h2m-2 4h2m-2 4h2m6-4h2m-2 4h2'/%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' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 21V5l8-3v19m0-14h8v14M2 21h20M7 7h2m-2 4h2m-2 4h2m6-4h2m-2 4h2'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Pages */
.wl-cat .wl-cat-pages { margin: 8px 0 0; }
.wl-cat .wl-cat-pages ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; border: 0; }
.wl-cat .wl-cat-pages li { margin: 0; padding: 0; border: 0; list-style: none; }
.wl-cat .wl-cat-pages li::before { display: none; }
body.wl-brand .wl-cat.wl-cat .wl-cat-pages li > .page-numbers {
    display: inline-grid; place-items: center;
    min-width: 42px; height: 42px;
    padding: 0 12px;
    border: 1px solid var(--wlc-line);
    border-radius: 10px;
    background: #fff;
    color: var(--wlc-ink);
    font-size: 15px; font-weight: 600;
    text-decoration: none;
}
body.wl-brand .wl-cat.wl-cat .wl-cat-pages li > a.page-numbers:hover { border-color: var(--wlc-blue); color: var(--wlc-blue); }
body.wl-brand .wl-cat.wl-cat .wl-cat-pages li > .page-numbers.current { border-color: var(--wlc-navy); background: var(--wlc-navy); color: #fff; }
body.wl-brand .wl-cat.wl-cat .wl-cat-pages li > .page-numbers.dots { border: 0; background: none; }

/* Nothing found, errors */
.wl-cat .wl-cat-empty { margin: 8px 0 30px; padding: 34px 28px; border: 1px solid var(--wlc-line); border-radius: 16px; background: #fff; text-align: center; }
body.wl-brand .wl-cat.wl-cat .wl-cat-empty h2 { margin: 0 0 8px; font-size: 22px; }
.wl-cat .wl-cat-empty p { margin: 0 0 8px; color: var(--wlc-muted); }

/* ---------- The categories' pages: a smaller box ---------- */
.wl-cat.wl-cat--compact { margin: 0 0 26px; }
.wl-cat--compact .wl-cat-search { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin: 0; }
.wl-cat--compact .wl-cat-box { flex: 1 1 420px; min-width: 0; box-shadow: 0 6px 20px rgb(8 44 80 / 6%); }
body.wl-brand .wl-cat.wl-cat.wl-cat--compact .wl-cat-box.wl-cat-box input[type="search"][name="buscar"] { height: 44px; font-size: 16px; line-height: 44px; }
body.wl-brand .wl-cat.wl-cat.wl-cat--compact .wl-cat-box button { min-height: 44px; padding: 0 20px; }
.wl-cat--compact .wl-cat-suggest { top: calc(100% + 6px); }
.wl-cat--compact .wl-cat-field { flex: 0 1 260px; min-width: 0; }

/* ---------- Smaller screens ---------- */
@media (max-width: 1100px) {
    body.wl-brand .wl-cat .wl-cat-grid.woocommerce ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
    body.wl-brand .wl-cat .wl-cat-grid.woocommerce ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    body.wl-brand .wl-cat .wl-cat-grid.woocommerce ul.products li.product { padding: 10px; }
    body.wl-brand .wl-cat .wl-cat-grid.woocommerce ul.products li.product a img { height: 150px; padding: 10px; }
    body.wl-brand .wl-cat .wl-cat-grid.woocommerce ul.products li.product :is(h2, .woocommerce-loop-product__title) { font-size: 14.5px !important; }
    .wl-cat .wl-cat-bar { align-items: stretch; }
    .wl-cat .wl-cat-refine { width: 100%; }
    body.wl-brand .wl-cat.wl-cat label.wl-cat-field,
    body.wl-brand .wl-cat.wl-cat .wl-cat-bar label.wl-cat-field:last-of-type { flex: 1 1 180px; width: auto; }
    body.wl-brand .wl-cat.wl-cat .wl-cat-bar label.wl-cat-field select[name] { width: 100%; min-width: 0; }
}
@media (max-width: 560px) {
    .wl-cat .wl-cat-box { padding-left: 44px; border-radius: 14px; }
    .wl-cat .wl-cat-icon { left: 14px; }
    body.wl-brand .wl-cat.wl-cat .wl-cat-box.wl-cat-box input[type="search"][name="buscar"] { height: 46px; font-size: 16px; line-height: 46px; }
    body.wl-brand .wl-cat.wl-cat .wl-cat-box button { min-height: 46px; padding: 0 16px; }
    .wl-cat .wl-cat-tabs { margin-right: -16px; padding-right: 16px; }
    /* The subcategories in one line that slides, like the families: ten of them took half a screen. */
    .wl-cat .wl-cat-families .wl-cat-chips { flex-wrap: nowrap; margin-right: -16px; padding: 2px 16px 6px 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .wl-cat .wl-cat-families .wl-cat-chips::-webkit-scrollbar { display: none; }
    .wl-cat .wl-cat-families .wl-cat-chips li { flex: 0 0 auto; }
    .wl-cat .wl-cat-families .wl-cat-chips--sub { padding-left: 0; }
    body.wl-brand .wl-cat.wl-cat a.wl-cat-tab { min-height: 40px; padding: 7px 12px; font-size: 14px; }
    body.wl-brand .wl-cat.wl-cat a.wl-cat-chip { min-height: 36px; padding: 6px 11px; font-size: 13.5px; }
    .wl-cat .wl-sg-img { flex-basis: 40px; width: 40px; height: 40px; }
}
@media (max-width: 380px) {
    body.wl-brand .wl-cat .wl-cat-grid.woocommerce ul.products { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
    .wl-cat .wl-cat-box { transition: none; }
}
