/*
 Theme Name:   Astra Child
 Theme URI:    https://juliancelda.com
 Description:  Tema hijo de Astra para juliancelda.com
 Author:       juliancelda.com
 Template:     astra
 Version:      1.0.0
 Text Domain:  astra-child
*/

/* =======================================================================
   LAYOUT GENERAL
   ======================================================================= */

.ast-container,
.ast-flex.ast-justify-content-space-between {
    max-width: 1440px !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box;
}

.ast-site-content-wrap {
    max-width: 100% !important;
}

/* =======================================================================
   LAYOUT TIENDA — Sidebar 16% / Contenido 84%
   ======================================================================= */

.woocommerce-page #secondary,
.ast-woocommerce-container #secondary {
    width: 16% !important;
    min-width: 180px;
    padding-right: 24px !important;
    box-sizing: border-box;
}

.woocommerce-page #primary,
.ast-woocommerce-container #primary {
    width: 84% !important;
    box-sizing: border-box;
}

.ast-woocommerce-container .ast-row,
.woocommerce-page .ast-row {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
}

/* =======================================================================
   RESPONSIVE — móvil sidebar arriba al 100%
   ======================================================================= */
@media (max-width: 768px) {
    .woocommerce-page #secondary,
    .ast-woocommerce-container #secondary {
        width: 100% !important;
        padding-right: 0 !important;
    }
    .woocommerce-page #primary,
    .ast-woocommerce-container #primary {
        width: 100% !important;
    }
}

/* =======================================================================
   CONTENIDO 100% ANCHO
   ======================================================================= */

/* Quitar max-width del contenedor principal de Astra */
.ast-container {
    max-width: 100% !important;
}

/* El wrapper interno con padding lateral */
.ast-site-content-wrap,
#ast-content-id {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
    width: 100%;
}

/* Header también a 100% */
.ast-masthead-custom-menu-items,
#ast-hb-menu-1,
.main-header-bar .ast-container {
    max-width: 100% !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
}

/* =======================================================================
   FIX — Forzar 100% ancho sobre CSS inline de Astra
   ======================================================================= */

/* Astra pone max-width via CSS inline, lo sobreescribimos con mayor especificidad */
body .ast-container,
body .ast-grid,
body #ast-content-id,
body.woocommerce-page .ast-container,
body.ast-woo-shop-archive .ast-container {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 32px !important;
    padding-right: 32px !important;
    box-sizing: border-box !important;
}

/* El site-content que envuelve todo */
body .site-content,
body #content {
    width: 100% !important;
    max-width: 100% !important;
}

/* =======================================================================
   FIX — Split sidebar / contenido
   ======================================================================= */

/* Astra usa columnas via clases ast-columns-4 etc */
body.ast-woo-shop-archive.ast-left-sidebar #primary,
body.woocommerce-page.ast-left-sidebar #primary {
    width: 78% !important;
    float: right !important;
}

body.ast-woo-shop-archive.ast-left-sidebar #secondary,
body.woocommerce-page.ast-left-sidebar #secondary {
    width: 16% !important;
    float: left !important;
    padding-right: 20px !important;
}

/* Clearfix para el contenedor padre */
body.ast-left-sidebar .ast-container > .ast-row::after {
    content: "";
    display: table;
    clear: both;
}

/* =======================================================================
   FIX — Títulos sidebar (sobreescribir rojo de Astra/WooCommerce)
   ======================================================================= */

body #secondary .widget-title,
body #secondary .widgettitle,
body .woocommerce-sidebar .widget-title,
body #secondary h2,
body #secondary h3 {
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: .07em !important;
    color: #1a1a1a !important;
    border: none !important;
    background: none !important;
    padding: 0 !important;
    margin: 0 0 10px !important;
}

/* =======================================================================
   LOOP DE TIENDA — Tarjetas de producto
   ======================================================================= */

/* Grid de productos — responsive */
.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}
/* Escritorio normal: 1024px - 1400px → 4 columnas */
@media (max-width: 1400px) {
    .woocommerce ul.products { grid-template-columns: repeat(4, 1fr) !important; }
}
/* Tablet: 768px - 1024px → 3 columnas */
@media (max-width: 1024px) {
    .woocommerce ul.products { grid-template-columns: repeat(3, 1fr) !important; }
}
/* Móvil grande: 480px - 768px → 2 columnas */
@media (max-width: 768px) {
    .woocommerce ul.products { grid-template-columns: repeat(2, 1fr) !important; }
}
/* Móvil pequeño: <480px → 2 columnas también */
@media (max-width: 480px) {
    .woocommerce ul.products { grid-template-columns: repeat(2, 1fr) !important; }
}

/* Relacionados en la ficha de producto: abajo, a todo el ancho — 6 por fila (4 tablet, 2 móvil) */
.ac14-single__related { margin: 8px 0 32px; padding: 0 20px; }
.ac14-single__related > h2 { font-size: 18px; font-weight: 700; margin: 0 0 14px; color: #1a1a1a; }
.ac14-single__related ul.products { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
@media (max-width: 1100px) {
    .ac14-single__related ul.products { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}
@media (max-width: 768px) {
    .ac14-single__related { padding: 0 10px; }
    .ac14-single__related ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}


/* Tarjeta */
li.ac14-card {
    background: #fff;
    border: 0.5px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    margin: 0 !important;
    transition: box-shadow .15s ease;
    width: auto !important;
    float: none !important;
}
li.ac14-card:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
}

/* Imagen */
.ac14-card__img {
    position: relative;
    background: #fff;
    aspect-ratio: 1 / 0.85;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ac14-card__img a {
    display: block;
    width: 100%;
    height: 100%;
}
.ac14-card__img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
    box-sizing: border-box;
    transition: transform .2s ease;
}
.ac14-card__img:hover img { transform: scale(1.03); }

/* Labels sobre imagen */
.ac14-label {
    position: absolute;
    top: 8px;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: .04em;
    line-height: 1.4;
    z-index: 10;
}
.ac14-label--oferta { left: 8px; background: #cf2e2e; color: #fff; }
.ac14-label--promo  { left: 8px; background: #1D9E75; color: #fff; }

/* Cuando hay oferta Y promo, la promo va debajo */
.ac14-label--oferta + .ac14-label--promo { top: 30px; }

/* Logo marca */
.ac14-card__marca {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #fff;
    border: 0.5px solid #e0e0e0;
    border-radius: 4px;
    padding: 3px 6px;
    z-index: 10;
}
.ac14-card__marca img {
    max-height: 40px;
    width: auto;
    display: block;
    object-fit: contain;
    padding: 0 !important;
    margin: 0 !important;
    vertical-align: middle;
}

/* Cuerpo */
.ac14-card__body {
    padding: 10px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* SKU + EAN */
.ac14-sku-ean {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}
.ac14-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 3px;
    line-height: 1.4;
}
.ac14-badge--sku { background: #cf2e2e; color: #fff; }
.ac14-badge--ean { background: #f0f0f0; color: #444; font-family: monospace; font-weight: 400; border: 0.5px solid #e0e0e0; }
.ac14-badge--ref { background: #eef2fb; color: #2b4a85; font-family: monospace; font-weight: 400; border: 0.5px solid #d5dff3; }

/* Meta: marca + promo */
.ac14-card__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 11px;
}
.ac14-card__meta-marca { color: #888; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
.ac14-card__meta-promo { color: #1D9E75; font-weight: 500; }
.ac14-card__meta-promo::before { content: '·'; margin-right: 4px; color: #ccc; }
.ac14-card__meta-promo:first-child::before { display: none; }

/* Nombre */
a.ac14-card__nombre {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.35;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
a.ac14-card__nombre:hover { color: #cf2e2e; }

/* Tabla precios x cant. */
.ac14-tabla {
    border: 0.5px solid #e8e8e8;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 2px;
}
.ac14-tabla__head {
    background: #f5f5f5;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #666;
    padding: 4px 10px;
    border-bottom: 0.5px solid #e8e8e8;
}
.ac14-tabla__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    border-bottom: 0.5px solid #f0f0f0;
    font-size: 13px;
    color: #333;
}
.ac14-tabla__row:last-child { border-bottom: none; }
.ac14-tabla__precio { font-weight: 700; color: #cf2e2e; font-size: 13px; }

/* Precios finales */
.ac14-card__precios {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 10px;
    row-gap: 0;
    margin-top: 2px;
}
.ac14-precio-tachado { font-size: 16px; color: #aaa; text-decoration: line-through; }
.ac14-precio-principal {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
}
.ac14-precio-normal  { font-size: 20px; font-weight: 700; color: #cf2e2e; line-height: 1.15; }
.ac14-precio-oferta  { font-size: 22px; font-weight: 600; color: #cf2e2e; }
.ac14-precio-siniva  { font-size: 10px; color: #aaa; }

/* Sin precio (no logueado) */
.ac14-sin-precio {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #aaa;
    font-style: italic;
    margin-top: 4px;
}
.ac14-sin-precio a { color: #cf2e2e; text-decoration: none; }
.ac14-sin-precio a:hover { text-decoration: underline; }

/* ── BLOQUE DE ACCIÓN ── */
.ac14-card__action {
    padding: 8px 10px;
    border-top: 0.5px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow: hidden;
    box-sizing: border-box;
}

/* Fila cantidad (40%) + botón carrito (60%) */
.ac14-qty-row {
    display: flex;
    align-items: center;
    gap: 5px;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

/* Bloque cantidad — 40% fijo */
.ac14-qty-wrap {
    display: flex;
    align-items: center;
    gap: 3px;
    flex: 0 0 40%;
    max-width: 40%;
    overflow: hidden;
}
.ac14-qty-btn {
    width: 24px;
    height: 28px;
    flex-shrink: 0;
    border: 0.5px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .1s;
    padding: 0;
}
.ac14-qty-btn:hover { background: #e8e8e8; }
.ac14-qty-input {
    flex: 1;
    min-width: 0;
    height: 28px;
    text-align: center;
    border: 0.5px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    color: #333;
    background: #fff;
    -moz-appearance: textfield;
    box-sizing: border-box;
}
.ac14-qty-input::-webkit-outer-spin-button,
.ac14-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Botón añadir al carrito — 60% restante */
.ac14-btn-carrito {
    flex: 1;
    min-width: 0;
    height: 28px;
    background: #1D9E75;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: background .15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 6px;
    box-sizing: border-box;
}
.ac14-btn-carrito:hover { background: #0F6E56; }

/* Botón lista */
.ac14-btn-lista {
    width: 100%;
    height: 28px;
    background: #fff;
    border: 0.5px solid #ddd;
    border-radius: 5px;
    font-size: 11px;
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: background .1s, color .1s;
}
.ac14-btn-lista:hover { background: #eceff1; color: #333; }

/* Sin stock */
.ac14-sin-stock {
    font-size: 12px;
    color: #aaa;
    text-align: center;
    padding: 6px 0;
}

/* =======================================================================
   CANTIDADES — nuevo estilo pill
   ======================================================================= */
.ac14-qty-wrap {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    flex: 0 0 40%;
    max-width: 40%;
    height: 30px;
}
.ac14-qty-btn {
    width: 28px !important;
    height: 100% !important;
    border: none !important;
    border-radius: 0 !important;
    background: #f5f5f5 !important;
    color: #333 !important;
    font-size: 16px !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .1s;
    padding: 0 !important;
}
.ac14-qty-btn:hover { background: #e8e8e8 !important; }
.ac14-qty-btn.ac14-qty-minus { border-right: 1px solid #ddd !important; }
.ac14-qty-btn.ac14-qty-plus  { border-left:  1px solid #ddd !important; }
.ac14-qty-input {
    flex: 1 !important;
    min-width: 0 !important;
    height: 100% !important;
    border: none !important;
    border-radius: 0 !important;
    text-align: center;
    font-size: 13px !important;
    font-weight: 500;
    color: #333 !important;
    background: #fff !important;
    -moz-appearance: textfield;
    box-sizing: border-box;
    padding: 0 !important;
}

/* =======================================================================
   ENVASE — icono + texto más grande
   ======================================================================= */
.ac14-card__envase {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #555;
    margin: 2px 0;
}
.ac14-card__envase svg { flex-shrink: 0; color: #888; }
.ac14-precio-principal .ac14-card__envase,
.ac14-card__precios .ac14-card__envase {
    display: inline-flex;
    font-size: 11px;
    color: #aaa;
    margin-top: 2px;
}

/* =======================================================================
   META: marca enlazable + promoción
   ======================================================================= */
.ac14-card__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 12px;
    margin: 2px 0;
}
.ac14-card__meta-marca a {
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: 11px;
    text-decoration: none;
}
.ac14-card__meta-marca a:hover { color: #cf2e2e; }
.ac14-card__meta-promo a {
    color: #cf2e2e;
    font-weight: 800;
    font-size: 12px;
    text-decoration: none;
}
.ac14-card__meta-promo a:hover { color: #0F6E56; }
.ac14-card__meta-promo::before { content: '·'; margin-right: 2px; color: #ccc; }

/* =======================================================================
   LABEL PROMOCIÓN (imagen custom sobre imagen producto)
   ======================================================================= */
.ac14-label--promo-img {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 10;
    display: block;
}
/* Label cuadrado (p. ej. 90×90) o apaisado: se escala SIN deformar dentro de una caja máxima (alto × ancho).
   Tarjeta de escritorio 64×120 · ficha 80×140 · tarjeta móvil 44×80 · vista lista 36×70 (más abajo). */
.ac14-label--promo-img img {
    height: auto !important;   /* !important: WooCommerce/Astra fuerzan width:100% en las imágenes de la lista */
    width: auto !important;
    max-height: 64px !important;
    max-width: 120px !important;
    display: block;
    padding: 0 !important;
    margin: 0 !important;
}
.ac14-single__img-wrap .ac14-label--promo-img img { max-height: 80px !important; max-width: 140px !important; }
/* En la tarjeta, la regla genérica «.ac14-card__img > a» (enlace de la imagen del producto: absolute + inset:0) estiraba también el
   enlace de la etiqueta por toda la imagen y se «comía» el clic del producto. La etiqueta mide solo lo que mide su imagen. */
.ac14-card__img > a.ac14-label--promo-img { right: auto; bottom: auto; width: auto; height: auto; top: 8px; left: 8px; }
.ac14-card__img > .ac14-card__etiquetas ~ a.ac14-label--promo-img { top: 66px; }
/* Si hay imagen de promo, no mostrar el label de texto */
.ac14-label--promo { display: none; }

/* ac14-precio-envase — mismo diseño que ac14-card__envase */
.ac14-precio-envase {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #555;
}
.ac14-envase-linea { display: flex; margin: 4px 0 0; }
.ac14-envase-linea strong { font-weight: 600; color: #333; }
.ac14-precio-tachado { display: inline-block; }
.ac14-precio-envase::before {
    content: "";
    display: inline-block;
    width: 15px;
    height: 15px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z'/%3E%3Cpath d='m3.3 7 8.7 5 8.7-5'/%3E%3Cpath d='M12 22V12'/%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    flex-shrink: 0;
}

/* =======================================================================
   FICHA DE PRODUCTO — imagen + info (tabla del grupo y relacionados, debajo)
   ======================================================================= */

.ac14-single__grid {
    display: grid;
    grid-template-columns: 42% minmax(0, 1fr) minmax(0, 29%);
    gap: 0;
    align-items: start;
    margin-bottom: 32px;
}

.ac14-single__col {
    padding: 20px;
    box-sizing: border-box;
}

.ac14-single__col--info {
    border-left: 0.5px solid #ebebeb;
}
/* Columna 3: precios y compra */
.ac14-single__col--compra {
    border-left: 0.5px solid #ebebeb;
}
.ac14-single__col--compra .ac14-single__precio-bloque { padding-bottom: 12px; margin-bottom: 12px; }
.ac14-single__col--compra .ac14-single__precio-normal { font-size: 30px; line-height: 1.15; }
.ac14-single__col--compra .ac14-single__qty-row { flex-wrap: nowrap; }
.ac14-single__col--compra .ac14-btn-lista { width: 100%; }

/* Imagen */
.ac14-single__img-wrap { position: relative; }
.ac14-single__marca-logo {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #fff;
    border: 0.5px solid #e0e0e0;
    border-radius: 4px;
    padding: 4px 8px;
    z-index: 10;
}
.ac14-single__marca-logo img {
    max-height: 40px;
    width: auto;
    display: block;
}

/* Nombre */
.ac14-single__nombre {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
    margin: 8px 0 14px;
}

/* Metas */
.ac14-single__metas {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}
.ac14-single__meta-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 13px;
}
.ac14-single__meta-label {
    color: #aaa;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
    min-width: 72px;
    flex-shrink: 0;
}
.ac14-single__meta-val { color: #333; font-weight: 500; }
.ac14-single__meta-link { color: #cf2e2e; font-weight: 500; text-decoration: none; }
.ac14-single__meta-link:hover { text-decoration: underline; }
.ac14-single__meta-promo { color: #cf2e2e; font-weight: 700; font-size: 13px; text-decoration: none; }
.ac14-single__meta-promo:hover { text-decoration: underline; }

/* Descripción corta */
.ac14-single__desc-corta {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
    border-top: 0.5px solid #ebebeb;
    padding-top: 12px;
    margin-top: 4px;
}

/* Características (atributos del producto) — columna 2, bajo la descripción */
.ac14-single__caract[hidden] { display: none !important; }
.ac14-single__caract { margin-top: 16px; padding-top: 14px; border-top: 0.5px solid #ebebeb; }
.ac14-single__caract-titulo {
    margin: 0 0 8px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #8a8a8a !important;
    line-height: 1.3 !important;
}
.ac14-single__caract table.woocommerce-product-attributes {
    width: 100%;
    margin: 0 !important;
    border: 0 !important;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
    background: #fff;
}
.ac14-single__caract table.woocommerce-product-attributes tr { display: grid; grid-template-columns: minmax(0, 42%) minmax(0, 1fr); gap: 10px; border: 0 !important; }
.ac14-single__caract table.woocommerce-product-attributes tr:nth-child(odd) { background: #f7f7f7; }
.ac14-single__caract table.woocommerce-product-attributes th,
.ac14-single__caract table.woocommerce-product-attributes td {
    display: block;
    border: 0 !important;
    padding: 7px 10px !important;
    background: transparent !important;
    line-height: 1.4;
    text-align: left;
}
.ac14-single__caract table.woocommerce-product-attributes th { font-weight: 400; color: #777; }
.ac14-single__caract table.woocommerce-product-attributes td { color: #222; font-weight: 600; }
.ac14-single__caract .woocommerce-product-attributes-item__value, .ac14-single__caract .woocommerce-product-attributes-item__value p { margin: 0 !important; padding: 0 !important; font-style: normal !important; }
.ac14-single__caract .woocommerce-product-attributes-item__value a { color: #cf2e2e; text-decoration: none; }
.ac14-single__caract .woocommerce-product-attributes-item__value a:hover { text-decoration: underline; }
.ac14-single__caract table.woocommerce-product-attributes { border-radius: 8px; overflow: hidden; box-shadow: inset 0 0 0 0.5px #ebebeb; }

/* Precios */
.ac14-single__precio-bloque {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 0.5px solid #ebebeb;
}
.ac14-single__precio-tachado { font-size: 16px; color: #aaa; text-decoration: line-through; }
.ac14-single__precio-normal  { font-size: 28px; font-weight: 700; color: #cf2e2e; }
.ac14-single__precio-oferta  { font-size: 28px; font-weight: 700; color: #cf2e2e; }
.ac14-single__precio-siniva  { font-size: 12px; color: #aaa; margin-top: 4px; }

/* Botón carrito ficha */
.ac14-single__qty-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.ac14-single__qty-row .ac14-qty-wrap {
    flex: 0 0 120px;
    max-width: 120px;
    height: 42px;
}

.ac14-single__btn-carrito {
    flex: 1;
    min-width: 0;
    width: auto;
    height: 42px;
    background: #1D9E75;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background .15s;
}
.ac14-single__btn-carrito:hover { background: #0F6E56; }

/* YouTube */
.ac14-single__youtube { margin: 24px 0; }
.ac14-single__youtube-wrap {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
}
.ac14-single__youtube-wrap iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

/* Dataview */
.ac14-single__dataview { margin: 24px 0; }

/* Responsive ficha */
@media (max-width: 1024px) {
    .single-product .ac14-single__grid {
        grid-template-columns: 50% minmax(0, 1fr) !important;
    }
    .ac14-single__col--info { border-right: none; }
}
@media (max-width: 640px) {
    .single-product .ac14-single__grid { grid-template-columns: minmax(0, 1fr) !important; }
    .ac14-single__col--info, .ac14-single__col--compra { border-left: none; border-top: 0.5px solid #ebebeb; }
    .ac14-single__col { padding: 10px; }
    /* El tema mete padding de contenedor (ast-container) + de #primary encima del
       nuestro — entre los tres dejaban el contenido a ~67% del ancho. Los quitamos
       en la ficha de producto para que el único padding sea el de la columna (10px). */
    body.single-product .ast-container { padding-left: 0 !important; padding-right: 0 !important; }
    .single-product #primary { padding-left: 0 !important; padding-right: 0 !important; }
}

/* =======================================================================
   FICHA PRODUCTO — fixes layout
   ======================================================================= */

/* Forzar grid en la ficha */
.single-product .ac14-single__grid {
    display: grid !important;
    grid-template-columns: 42% minmax(0, 1fr) minmax(0, 29%) !important;
    width: 100%;
}
/* Responsive — misma especificidad que la regla de arriba, así que tienen que ir
   después para ganar el empate (el orden decide cuando todo es !important) */
@media (max-width: 1024px) {
    .single-product .ac14-single__grid { grid-template-columns: 50% minmax(0, 1fr) !important; }
    .single-product .ac14-single__col--compra { grid-column: 1 / -1; border-left: none; border-top: 0.5px solid #ebebeb; }
}
@media (max-width: 640px) {
    .single-product .ac14-single__grid { grid-template-columns: minmax(0, 1fr) !important; }
}

/* Ocultar sale flash nativo de WooCommerce en ficha */
.single-product span.onsale { display: none !important; }

/* Quitar padding/margin extra que añade Astra al summary */
.single-product div.summary.entry-summary {
    float: none !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Quitar el wrapper de columnas que pone Astra/WooCommerce */
.single-product .woocommerce-product-gallery {
    float: none !important;
    width: 100% !important;
}

/* Galería dentro de nuestra columna */
.ac14-single__col--img .woocommerce-product-gallery {
    margin: 0 !important;
}
.ac14-single__col--img .woocommerce-product-gallery__wrapper img {
    width: 100%;
    height: auto;
}

/* Qty wrap en ficha */
/* Qty + Añadir al carrito en la misma fila (ver .ac14-single__qty-row) */

/* Ficha producto — sin sidebar, ancho completo */
.single-product #primary {
    width: 100% !important;
    float: none !important;
}
.single-product #secondary { display: none !important; }

/* Mi Cuenta (dashboard con sesión iniciada) — mismo caso que la ficha de
   producto: el 84% de la regla ".woocommerce-page #primary" de más arriba
   solo lo pisa Astra cuando la página no tiene contenido (login, sin
   sidebar); con el dashboard real dentro, esa regla vieja gana y deja un
   hueco vacío a la derecha. */
.woocommerce-account #primary {
    width: 100% !important;
    float: none !important;
}
.single-product .woocommerce-product-gallery,
.single-product .woocommerce-product-gallery--with-images {
    float: none !important;
    width: 100% !important;
    margin-bottom: 0 !important;
}

/* Ocultar galería nativa que escapa fuera del grid en ficha */
.single-product .woocommerce-product-gallery:not(.ac14-single__col--img .woocommerce-product-gallery) {
    display: none !important;
}
/* Galería dentro de nuestra columna sí visible */
.ac14-single__col--img .woocommerce-product-gallery {
    display: block !important;
}
/* Ocultar sale flash nativo fuera de nuestro grid */
.single-product > .ast-container > .woocommerce-product-gallery { display: none !important; }
.single-product span.onsale { display: none !important; }

/* Ocultar galería duplicada fuera del grid — la segunda que aparece */
.single-product .ac14-single > .woocommerce-product-gallery,
.single-product .ac14-single > .images { display: none !important; }

/* Imagen principal ficha — sin galería. 3/2 porque todas las fotos del catálogo son 600x400 */
.ac14-single__img-principal {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 3 / 2;
}
.ac14-single__img-main {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 16px;
    box-sizing: border-box;
}

/* Ocultar cualquier galería nativa que aparezca en la ficha */
.single-product .woocommerce-product-gallery { display: none !important; }
.single-product .images.woocommerce-product-gallery { display: none !important; }

/* Imagen en el loop desde imagenes_sofys */
.ac14-card__img .ac14-loop-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
    box-sizing: border-box;
    transition: transform .2s ease;
}
.ac14-card__img:hover .ac14-loop-img { transform: scale(1.03); }

/* Quitar label oferta nativo de WooCommerce en ficha */
.single-product span.onsale,
.single-product .woocommerce-badge { display: none !important; }

/* =======================================================================
   BUSCADOR AC14 SEARCH
   ======================================================================= */

.ac14-search-wrap { position: relative; width: 100%; max-width: 680px; margin: 0 auto; }

.ac14-search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0 12px;
    height: 44px;
    transition: border-color .15s;
}
.ac14-search-bar:focus-within { border-color: #cf2e2e; }
.ac14-search-icon { color: #aaa; flex-shrink: 0; }
.ac14-search-bar:focus-within .ac14-search-icon { color: #cf2e2e; }

.ac14-search-input {
    flex: 1;
    border: none !important;
    outline: none !important;
    font-size: 14px;
    color: #1a1a1a;
    background: transparent;
    box-shadow: none !important;
    height: 100%;
    padding: 0 !important;
    margin: 0 !important;
}
.ac14-search-input::placeholder { color: #bbb; }

.ac14-search-clear {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #aaa;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.ac14-search-clear:hover { color: #555; }

.ac14-search-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: #666;
    border: 0.5px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    background: #fff;
    flex-shrink: 0;
    transition: background .1s, color .1s, border-color .1s;
}
.ac14-search-icon-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.ac14-search-icon-btn:hover { background: #eceff1; }
.ac14-search-icon-btn.ac14-listening {
    background: #cf2e2e;
    border-color: #cf2e2e;
    color: #fff;
    animation: ac14-mic-pulse 1.2s ease-in-out infinite;
}
@keyframes ac14-mic-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(207,46,46,.4); }
    50% { box-shadow: 0 0 0 8px rgba(207,46,46,0); }
}

/* Modal de escaneo de código de barras */
.ac14-search-scan-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}
.ac14-search-scan-modal.active { display: flex; }
.ac14-search-scan-box {
    position: relative;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    width: min(90vw, 480px);
}
.ac14-search-scan-msg {
    position: absolute;
    top: 12px; left: 0; right: 0;
    text-align: center;
    color: #fff;
    font-size: 13px;
    margin: 0;
    z-index: 1;
    text-shadow: 0 1px 3px rgba(0,0,0,.6);
}
#ac14-search-scan-video {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 3/4;
    object-fit: cover;
}
.ac14-search-scan-close {
    position: absolute;
    top: 8px; right: 8px;
    z-index: 2;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,.9);
    border: none;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Desplegable */
.ac14-search-drop {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 0.5px solid #e0e0e0;
    border-radius: 10px;
    z-index: 9999;
    display: none;
    overflow: hidden;
}
.ac14-search-drop.active { display: block; }

/* Grid 2 columnas */
.ac14-drop-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: 260px;
}
.ac14-drop-col { padding: 14px; }
.ac14-drop-col--left { border-right: 0.5px solid #f0f0f0; }

.ac14-drop-section-title {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #aaa;
    margin-bottom: 8px;
}
.ac14-drop-divider { height: 0.5px; background: #f0f0f0; margin: 10px 0; }

/* Sugerencias */
.ac14-drop-suggestion {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 7px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    color: #333;
}
.ac14-drop-suggestion:hover { background: #eceff1; }
.ac14-drop-suggestion svg { color: #bbb; flex-shrink: 0; }
.ac14-drop-sug-text { flex: 1; }
.ac14-drop-sug-text strong { color: #cf2e2e; font-weight: 600; }
.ac14-drop-sug-type {
    font-size: 10px;
    color: #888;
    background: #f0f0f0;
    padding: 1px 6px;
    border-radius: 3px;
    flex-shrink: 0;
}

/* Grid de productos */
.ac14-drop-products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.ac14-drop-product {
    border: 0.5px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none;
    display: block;
    transition: border-color .1s;
}
.ac14-drop-product { background: #fff; border-color: #e5e5e5; }
.ac14-drop-product:hover { border-color: #bbb; }
.ac14-drop-product-img {
    background: #fff;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.ac14-drop-product-img img { width: 100%; height: 100%; object-fit: contain; padding: 6px; box-sizing: border-box; }
.ac14-drop-product-img svg { color: #ccc; }
.ac14-drop-product-info { padding: 5px 6px; }
.ac14-drop-product-sku { background: #cf2e2e; color: #fff; font-size: 9px; font-weight: 600; padding: 1px 5px; border-radius: 2px; display: inline-block; margin-bottom: 2px; }
.ac14-drop-product-name { font-size: 11px; color: #333; font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ac14-drop-product-price { font-size: 12px; font-weight: 700; color: #cf2e2e; margin-top: 2px; }

/* Footer */
.ac14-drop-footer {
    border-top: 0.5px solid #f0f0f0;
    padding: 9px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafafa;
}
.ac14-drop-count { font-size: 12px; color: #aaa; }
.ac14-drop-ver-todos { font-size: 12px; color: #cf2e2e; font-weight: 500; text-decoration: none; }
.ac14-drop-ver-todos:hover { text-decoration: underline; }

/* Loading */
.ac14-drop-loading {
    padding: 24px;
    text-align: center;
    font-size: 13px;
    color: #aaa;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.ac14-drop-loading svg { animation: ac14-spin 1s linear infinite; }
@keyframes ac14-spin { to { transform: rotate(360deg); } }

.ac14-drop-empty { font-size: 13px; color: #aaa; padding: 16px 0; text-align: center; }

/* Responsive */
@media (max-width: 640px) {
    .ac14-drop-grid { grid-template-columns: 1fr; }
    .ac14-drop-col--left { border-right: none; border-bottom: 0.5px solid #f0f0f0; }
    .ac14-drop-products { grid-template-columns: repeat(2, 1fr); }
}

/* =======================================================================
   BUSCADOR — ancho 100% en header y desplegable full width
   ======================================================================= */

/* Buscador ocupa todo el espacio disponible en el header de Astra */
.ac14-search-wrap {
    max-width: 100% !important;
    width: 100% !important;
    flex: 1 1 auto !important;
}

/* Widget HTML de Astra que contiene el buscador */
.ast-header-html-1 .ac14-search-wrap,
.ast-header-html .ac14-search-wrap {
    width: 100% !important;
    display: block !important;
}

/* Barra de búsqueda */
.ac14-search-bar {
    background: rgba(255,255,255,0.95) !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Desplegable — ancho de la página con márgenes laterales */
.ac14-search-drop {
    position: fixed !important;
    left: 24px !important;
    right: 24px !important;
    top: auto !important;
    width: auto !important;
    max-height: 624px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,.12);
}

#ac14-search-wrap { position: static !important; }

/* Grid: sidebar 320px, resto para productos */
.ac14-drop-grid {
    grid-template-columns: 320px 1fr !important;
    max-height: 564px;
}
.ac14-drop-col--left {
    overflow-y: auto;
    max-height: 564px;
}
.ac14-drop-col--right {
    overflow-y: auto;
    max-height: 564px;
    padding: 14px 12px;
}

/* Productos — 5 columnas fijas en escritorio: con 10 resultados salen 2 filas completas
   en vez de una sola fila muy ancha (lo que hacía auto-fill antes) */
.ac14-drop-products {
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 8px;
}
@media (max-width: 900px) {
    .ac14-drop-products { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 640px) {
    .ac14-drop-products { grid-template-columns: repeat(2, 1fr) !important; }
}
.ac14-drop-product-img {
    aspect-ratio: 1 !important;
}
.ac14-drop-product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
    box-sizing: border-box;
}

/* La regla de arriba (320px 1fr) no tiene media query, así que gana siempre por
   estar más abajo en el archivo — en móvil dejaba la columna de productos en ~24px */
@media (max-width: 640px) {
    .ac14-drop-grid { grid-template-columns: 1fr !important; max-height: none; }
    .ac14-drop-col--left,
    .ac14-drop-col--right { max-height: none; }
    .ac14-drop-col--left { border-right: none; border-bottom: 0.5px solid #f0f0f0; }
    .ac14-search-drop { left: 10px !important; right: 10px !important; max-height: 80vh; overflow-y: auto; }
}
.ac14-drop-product-info { padding: 4px 6px 6px; }
.ac14-drop-product-name { font-size: 11px; }
.ac14-drop-product-price { font-size: 11px; }

/* Buscador — forzar 100% en el bloque izquierdo del header de Astra */
#ast-desktop-header .ast-main-header-wrap .site-header-primary-section-left {
    flex: 1 1 auto !important;
    width: 100% !important;
    max-width: 100% !important;
}
#ast-desktop-header .ast-main-header-wrap .site-header-primary-section-left .ac14-search-wrap {
    width: 100% !important;
}

/* Buscador 100% — selectores exactos de la cabecera */
.site-header-primary-section-left.site-header-section {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}
.site-header-primary-section-left .ast-builder-layout-element,
.site-header-primary-section-left .ast-header-html-1,
.site-header-primary-section-left .ast-header-html,
.site-header-primary-section-left .ast-builder-html-element {
    width: 100% !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

/* =======================================================================
   FILTROS SIDEBAR — estilo limpio (tipo Makro/ibergrouper)
   ======================================================================= */

/* =======================================================================
   HUSKY (WooCommerce Product Filter) — sidebar tienda
   ======================================================================= */

/* Contenedor general */
.woof_container,
.woof_block_html_items,
#woof_products_top_panel {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 0 20px 0 !important;
}

/* Título de sección — colapsable con flecha */
.woof_block_html_items h4,
.woof_container_inner h4,
.ac14-sidebar-widget .widget-title,
.ac14-sidebar-titulo {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    text-transform: uppercase !important;
    letter-spacing: .04em !important;
    margin: 0 0 10px 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
}

/* Lista de items */
.woof_list,
.woof_list_item {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Regla genérica para marcas, etiquetas, precio — NO para categorías (.woof_list_checkbox) */
.woof_list:not(.woof_list_checkbox) li,
.woof_list_item li {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 4px 0 !important;
    margin: 0 !important;
    border: none !important;
    font-size: 13px !important;
    color: #333 !important;
}

/* Checkboxes */
.woof_list li input[type="checkbox"],
.woof_list_item li input[type="checkbox"] {
    width: 15px !important;
    height: 15px !important;
    accent-color: #cf2e2e !important;
    flex-shrink: 0 !important;
    cursor: pointer !important;
    margin: 0 !important;
}

/* Labels */
.woof_list li label,
.woof_list_item li label {
    font-size: 13px !important;
    color: #333 !important;
    cursor: pointer !important;
    margin: 0 !important;
    flex: 1 !important;
    font-weight: 400 !important;
}

/* Contador de productos */
.woof_label_count,
.woof_list li .count {
    font-size: 11px !important;
    color: #aaa !important;
    margin-left: auto !important;
}

/* Separador entre secciones */
.woof_block_html_items {
    border-bottom: 0.5px solid #f0f0f0 !important;
    padding-bottom: 16px !important;
    margin-bottom: 16px !important;
}
.woof_block_html_items:last-child { border-bottom: none !important; }

/* Filtro activo — item seleccionado */
.woof_list li.chosen label,
.woof_list li input:checked + label {
    color: #cf2e2e !important;
    font-weight: 500 !important;
}

/* Radio buttons */
.woof_list li input[type="radio"] {
    accent-color: #cf2e2e !important;
    width: 15px !important;
    height: 15px !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
}

/* Botón reset filtros */
.woof_reset_search_button,
#woof_reset_search_button {
    font-size: 12px !important;
    color: #cf2e2e !important;
    background: none !important;
    border: 0.5px solid #cf2e2e !important;
    border-radius: 5px !important;
    padding: 4px 12px !important;
    cursor: pointer !important;
    margin-top: 8px !important;
}
.woof_reset_search_button:hover { background: #cf2e2e !important; color: #fff !important; }

/* =======================================================================
   HUSKY — SCROLL en Marcas y Etiquetas (más de 6 items)
   Aplica a los bloques con clase ac14-scroll-filter
   ======================================================================= */
.ac14-scroll-filter .woof_list,
.ac14-scroll-filter .woof_list_item {
    max-height: 198px;   /* 6 items × 33px aprox */
    overflow-y: auto !important;
    scrollbar-width: thin;
    scrollbar-color: #cf2e2e #f0f0f0;
    padding-right: 4px !important;
}
.ac14-scroll-filter .woof_list::-webkit-scrollbar { width: 4px; }
.ac14-scroll-filter .woof_list::-webkit-scrollbar-track { background: #f0f0f0; border-radius: 2px; }
.ac14-scroll-filter .woof_list::-webkit-scrollbar-thumb { background: #cf2e2e; border-radius: 2px; }

/* =======================================================================
   HUSKY — jerarquía de categorías gestionada por el sistema nativo
   woof_childs_list + woof_childs_list_opener. Ver CSS más abajo.
   ======================================================================= */

/* Slider de precio */
.woof_price_filter .price_slider_wrapper,
.widget_price_filter .price_slider_wrapper {
    padding: 4px 0 !important;
}
.woof_price_filter .price_slider_amount,
.widget_price_filter .price_slider_amount {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 13px !important;
    margin-bottom: 10px !important;
}
.woof_price_filter .price_slider_amount input,
.widget_price_filter .price_slider_amount input[type="text"] {
    width: 70px !important;
    height: 32px !important;
    border: 1px solid #ddd !important;
    border-radius: 5px !important;
    padding: 0 8px !important;
    font-size: 13px !important;
    color: #333 !important;
    text-align: center !important;
    background: #fff !important;
}
.ui-slider-range { background: #cf2e2e !important; }
.ui-slider-handle {
    border-color: #cf2e2e !important;
    background: #fff !important;
    width: 16px !important;
    height: 16px !important;
    border-radius: 50% !important;
    border-width: 2px !important;
}
.woof_price_filter .button,
.widget_price_filter .button {
    background: #cf2e2e !important;
    color: #fff !important;
    border: none !important;
    border-radius: 5px !important;
    padding: 5px 14px !important;
    font-size: 12px !important;
    cursor: pointer !important;
}
.woof_price_filter .button:hover,
.widget_price_filter .button:hover { background: #fff !important; color: #cf2e2e !important; box-shadow: inset 0 0 0 1.5px #cf2e2e !important; }

/* =======================================================================
   HEADER ELEMENTOR — clases personalizadas (estables, sin depender de IDs)
   ======================================================================= */

/* =======================================================================
   HEADER PHP PURO — ac14-header
   ======================================================================= */

#ac14-header {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    display: flex;
    flex-direction: column;
}

/* ── PANEL MI CUENTA — ancho completo, bajo la fila principal ── */
.ac14-cuenta-drop {
    display: none;
    width: 100%;
    background: #fff;
    border-top: 2px solid #cf2e2e;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
    overflow: hidden;
}
.ac14-cuenta-drop.active { display: block; }
.ac14-cuenta-drop-content { padding: 20px 32px; max-height: 60vh; overflow-y: auto; }
.ac14-cuenta-drop-empty { padding: 24px 32px; text-align: center; color: #888; font-size: 13px; }
.ac14-cuenta-drop-footer { border-top: 1px solid #f0f0f0; padding: 10px 32px; display: flex; justify-content: flex-end; background: #fafafa; }
.ac14-cuenta-logout { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #888; text-decoration: none; }
.ac14-cuenta-logout:hover { color: #cf2e2e; }

/* =======================================================================
   FILA 1 — Franja de publicidad (fina, ancho completo)
   ======================================================================= */
.ac14-header-banner-strip {
    width: 100%;
    height: 50px;
    background: #cf2e2e;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-sizing: border-box;
}
.ac14-banner-strip-img {
    max-height: 40px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
}

/* =======================================================================
   FILA 2 — Logo + Buscador + Acciones (75px, fondo blanco)
   ======================================================================= */
.ac14-header-principal {
    display: flex;
    flex-direction: row;
    align-items: center;
    height: 75px;
    padding: 0 24px;
    background: #fff;
    gap: 20px;
    box-sizing: border-box;
}

.ac14-header-logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}
.ac14-header-logo img {
    max-height: 55px;
    width: auto;
    display: block;
}
.ac14-header-site-name {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
}

.ac14-header-buscador {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
}
.ac14-header-buscador .ac14-search-wrap { width: 100% !important; max-width: 100% !important; }

/* Acciones — comercial, listas, cuenta, carrito: todo en formato compacto icono+texto */
.ac14-header-acciones {
    flex: 0 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
}

.ac14-header-acciones .ac14-header-icon-btn,
.ac14-btn-comercial,
.ac14-btn-cuenta,
.ac14-btn-cuenta-login {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 53px;
    box-sizing: border-box;
    background: none;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    color: #444;
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;
}
/* Hover / foco / pulsado de TODOS los botones de la cabecera: fondo transparente y
   texto + icono en rojo. Astra pinta los <button>:hover en blanco (con fondo blanco no
   se veía nada) y el foco con borde azul; "#ac14-header" + !important para ganarle.
   (El botón "Categorías" va aparte: ahí el hover es rojo con letra blanca.) */
#ac14-header .ac14-header-acciones .ac14-header-icon-btn:hover,
#ac14-header .ac14-header-acciones .ac14-header-icon-btn:focus,
#ac14-header .ac14-header-acciones .ac14-header-icon-btn:active,
#ac14-header .ac14-btn-comercial:hover,
#ac14-header .ac14-btn-comercial:focus,
#ac14-header .ac14-btn-comercial:active,
#ac14-header .ac14-btn-cuenta:hover,
#ac14-header .ac14-btn-cuenta:focus,
#ac14-header .ac14-btn-cuenta:active,
#ac14-header .ac14-btn-cuenta-login:hover,
#ac14-header .ac14-btn-cuenta-login:focus,
#ac14-header .ac14-btn-cuenta-login:active,
#ac14-header .ac14-search-icon-btn:hover,
#ac14-header .ac14-search-icon-btn:focus,
#ac14-header .ac14-search-icon-btn:active,
#ac14-header .ac14-search-clear:hover,
#ac14-header .ac14-search-clear:focus,
#ac14-header .ac14-menu-toggle:hover,
#ac14-header .ac14-menu-toggle:focus,
#ac14-header #ac14-menu-toggle:hover,
#ac14-header #ac14-menu-toggle:focus {
    background: #eceff1 !important;
    color: #cf2e2e !important;
    box-shadow: none !important;
    outline: none !important;
}
#ac14-header .ac14-search-icon-btn:hover,
#ac14-header .ac14-search-icon-btn:focus,
#ac14-header .ac14-search-icon-btn:active { border-color: #cf2e2e !important; }
/* Iconos (SVG de trazo/relleno currentColor o fijo) y textos internos siguen el rojo */
#ac14-header .ac14-header-acciones .ac14-header-icon-btn:hover svg,
#ac14-header .ac14-header-acciones .ac14-header-icon-btn:focus svg,
#ac14-header .ac14-btn-comercial:hover svg,
#ac14-header .ac14-btn-comercial:focus svg,
#ac14-header .ac14-btn-cuenta:hover svg,
#ac14-header .ac14-btn-cuenta:focus svg,
#ac14-header .ac14-btn-cuenta-login:hover svg,
#ac14-header .ac14-btn-cuenta-login:focus svg,
#ac14-header .ac14-search-icon-btn:hover svg,
#ac14-header .ac14-search-icon-btn:focus svg,
#ac14-header .ac14-search-icon-btn:active svg,
#ac14-header .ac14-search-clear:hover svg,
#ac14-header #ac14-menu-toggle:hover svg {
    color: #cf2e2e !important;
    stroke: currentColor;
}
#ac14-header .ac14-header-acciones .ac14-header-icon-btn:hover span,
#ac14-header .ac14-btn-comercial:hover span,
#ac14-header .ac14-btn-cuenta:hover span,
#ac14-header .ac14-btn-cuenta-login:hover span { color: #cf2e2e !important; }
/* Accesibilidad: el foco con teclado sigue visible, en rojo suave y no azul */
#ac14-header .ac14-header-acciones .ac14-header-icon-btn:focus-visible,
#ac14-header .ac14-btn-comercial:focus-visible,
#ac14-header .ac14-btn-cuenta:focus-visible,
#ac14-header .ac14-btn-cuenta-login:focus-visible,
#ac14-header .ac14-search-icon-btn:focus-visible { outline: 2px solid rgba(207,46,46,.35) !important; outline-offset: 1px; }

.ac14-comercial-avatar {
    width: 22px; height: 22px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}
.ac14-comercial-avatar-initials {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: #cf2e2e;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.ac14-btn-comercial svg { display: none; } /* icono de teléfono redundante junto al avatar */
.ac14-comercial-nombre {
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ac14-btn-cuenta-chevron { display: none; } /* no hace falta en formato compacto */
.ac14-btn-cuenta svg:not(.ac14-btn-cuenta-chevron),
.ac14-btn-cuenta-login svg {
    width: 22px; height: 22px; /* mismo tamaño que el resto de iconos de la fila */
}

/* El panel de info del comercial (posición, fondo, sombra) ya lo gestiona
   ac14-b2b.php — usa position:fixed con coordenadas calculadas por JS
   (posicionarDrop), no hay que duplicar/pisar esa regla aquí. */

/* Carrito */
.ac14-carrito-btn { position: relative; }
.ac14-carrito-icon-wrap { position: relative; display: inline-flex; }
.ac14-carrito-count {
    position: absolute;
    top: -6px; right: -8px;
    background: #fff; color: #cf2e2e;
    border: 1px solid #cf2e2e;
    font-size: 9px; font-weight: 700;
    width: 16px; height: 16px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}

/* =======================================================================
   FILA 3 — Categorías (escritorio) + Menú principal (50px, fondo blanco)
   ======================================================================= */
.ac14-header-menu-row {
    display: flex;
    align-items: stretch;
    height: 50px;
    background: #fff;
    box-sizing: border-box;
    border-top: 0.5px solid #eee;
}

.ac14-categorias-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 24px;
    background: #f5f5f5;
    border: none;
    border-right: 0.5px solid #eee;
    color: #1a1a1a;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
}
/* Gris en reposo; rojo con letra blanca al pasar el ratón y mientras el panel
   está abierto. Se repite con #ac14-header para ganar a los estilos de botón de
   Astra (el azul de hover/foco/activo venía de ahí). */
#ac14-header .ac14-categorias-toggle:hover,
#ac14-header .ac14-categorias-toggle:focus,
#ac14-header .ac14-categorias-toggle:focus-visible,
#ac14-header .ac14-categorias-toggle:active,
#ac14-header .ac14-categorias-toggle[aria-expanded="true"] {
    outline: none;
    background: #cf2e2e;
    color: #fff;
    border-color: #cf2e2e;
}
.ac14-categorias-toggle svg { flex-shrink: 0; }

.ac14-menu-toggle {
    display: none;
    background: none; border: none;
    cursor: pointer; padding: 6px;
    color: #cf2e2e;
}

.ac14-nav-menu {
    display: flex;
    list-style: none;
    margin: 0; padding: 0 24px; gap: 0;
    align-items: center;
    height: 100%;
}
.ac14-nav-menu li { position: relative; height: 100%; display: flex; align-items: center; }
.ac14-nav-menu > li > a {
    display: flex; align-items: center;
    padding: 0 14px;
    height: 50px;
    font-size: 13px; font-weight: 700;
    color: #1a1a1a;
    text-decoration: none;
    white-space: nowrap;
    transition: color .15s, background .15s;
}
.ac14-nav-menu > li > a:hover { color: #cf2e2e; }
.ac14-nav-menu > li.current-menu-item > a { color: #cf2e2e; border-bottom: 2px solid #cf2e2e; }

/* Clase personalizada: menu-btn — estilo botón */
.ac14-nav-menu > li.menu-btn > a {
    background: #cf2e2e;
    color: #fff !important;
    border-radius: 6px;
    padding: 0 16px;
    margin: 6px 4px;
    height: auto;
    line-height: 1;
    padding-top: 6px;
    padding-bottom: 6px;
}
.ac14-nav-menu > li.menu-btn > a:hover {
    background: #cf2e2e;
    color: #fff !important;
}

/* Clase personalizada: menu-rojo — texto en rojo */
.ac14-nav-menu > li.menu-rojo > a {
    color: #fc4b08 !important;
}
.ac14-nav-menu > li.menu-rojo > a:hover {
    color: #cf2e2e !important;
}

/* Submenú */
.ac14-nav-menu .sub-menu {
    display: none;
    position: absolute; top: 100%; left: 0;
    background: #fff;
    border: 0.5px solid #e0e0e0;
    border-radius: 6px;
    min-width: 200px;
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
    z-index: 999;
    list-style: none; padding: 6px 0; margin: 0;
}
.ac14-nav-menu li:hover > .sub-menu { display: block; }
.ac14-nav-menu .sub-menu li { height: auto; display: block; }
.ac14-nav-menu .sub-menu li a {
    padding: 8px 16px;
    font-size: 13px; font-weight: 400; color: #333;
    height: auto;
}
.ac14-nav-menu .sub-menu li a:hover { color: #cf2e2e; background: #eceff1; }

/* =======================================================================
   PANEL "Todas las categorías" — desplegable de la fila 3, solo escritorio
   ======================================================================= */
/* Se despliega justo debajo de la fila de menú (top:100% del header), alineado
   con el botón "Categorías" (left:0), no fijado arriba tapando la cabecera. */
.ac14-categorias-panel {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    right: 0;
    width: 100%;
    background: #fff;
    border: 0.5px solid #e5e5e5;
    border-top: none;
    box-shadow: 0 12px 32px rgba(0,0,0,.14);
    z-index: 998;
    box-sizing: border-box;
}
.ac14-categorias-panel.abierto { display: block; }

.ac14-cat-mega { display: flex; height: min(560px, 70vh); }

/* 1) Lateral: categorías padre */
.ac14-cat-mega__lateral {
    list-style: none;
    margin: 0;
    padding: 8px 0;
    width: 260px;
    flex: 0 0 260px;
    border-right: 0.5px solid #eee;
    background: #fafafa;
    overflow-y: auto;
}
.ac14-cat-mega__lateral li { height: auto; display: block; margin: 0; }
.ac14-cat-mega__padre {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 14px 20px;
    background: none;
    border: none;
    border-left: 3px solid transparent;
    border-radius: 0;
    box-shadow: none;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
}
.ac14-cat-mega__padre svg { color: #bbb; flex-shrink: 0; }
/* #ac14-header para ganar al azul de hover/foco de los <button> de Astra */
#ac14-header .ac14-cat-mega__padre:hover,
#ac14-header .ac14-cat-mega__padre:focus,
#ac14-header .ac14-cat-mega__padre.activo {
    outline: none;
    background: #fff;
    color: #cf2e2e;
    border-left-color: #cf2e2e;
}
/* Al pasar por encima (sin ser la categoría activa) el fondo NO puede ser blanco: es el color del panel de contenido */
#ac14-header .ac14-cat-mega__padre:not(.activo):hover,
#ac14-header .ac14-cat-mega__padre:not(.activo):focus { background: #ececec; }
#ac14-header .ac14-cat-mega__padre.activo svg { color: #cf2e2e; }

/* Contenido de la categoría activa */
.ac14-cat-mega__contenido { flex: 1; min-width: 0; overflow-y: auto; padding: 22px 28px 26px; }
.ac14-cat-mega__vista { display: none; }
.ac14-cat-mega__vista.activa { display: block; }

.ac14-cat-mega__cabecera { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.ac14-cat-mega__cabecera h3 { margin: 0; font-size: 22px; font-weight: 700; color: #1a1a1a; }
.ac14-cat-mega__vertodo { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: #cf2e2e; text-decoration: none; white-space: nowrap; }
.ac14-cat-mega__vertodo:hover { color: #cf2e2e; text-decoration: underline;}
.ac14-cat-mega__vertodo svg { flex-shrink: 0; }

/* Cuerpo: [promociones (solo si hay)] + [rejilla de subcategorías] lado a lado,
   así las subcategorías nunca se cuelan debajo de la columna de promociones. */
.ac14-cat-mega__cuerpo { display: flex; align-items: flex-start; gap: 32px; }
.ac14-cat-mega__grid {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 26px 36px;
    align-items: start;
}

/* 3) Columnas de subcategorías: título en mayúsculas + sub-subcategorías */
.ac14-cat-mega__titulo-col {
    display: block;
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    line-height: 1.3;
    color: #1a1a1a;
    text-decoration: none;
}
a.ac14-cat-mega__titulo-col:hover { color: #cf2e2e; }
.ac14-cat-mega__col ul { list-style: none; margin: 0; padding: 0; }
.ac14-cat-mega__col li { height: auto; margin: 0; }
.ac14-cat-mega__col li a { display: block; padding: 3px 0; font-size: 13px; line-height: 1.35; color: #555; text-decoration: none; }
.ac14-cat-mega__col li a:hover { color: #cf2e2e; }
.ac14-cat-mega__col .ac14-cat-mega__mas a { margin-top: 2px; font-weight: 700; color: #cf2e2e; }

/* 2) Columna de promociones (primera) */
.ac14-cat-mega__promos { flex: 0 0 240px; box-sizing: border-box; background: #f7f7f7; border-radius: 8px; padding: 14px 16px; }
.ac14-cat-mega__promo { display: flex; align-items: center; gap: 10px; padding: 8px 0; color: #1a1a1a; text-decoration: none; }
.ac14-cat-mega__promo-icono {
    flex: 0 0 30px;
    height: 30px;
    border-radius: 50%;
    background: #cf2e2e;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ac14-cat-mega__promo-texto { font-size: 13px; font-weight: 600; line-height: 1.25; }
.ac14-cat-mega__promo-texto small { display: block; margin-top: 2px; font-size: 11px; font-weight: 400; color: #888; }
.ac14-cat-mega__promo:hover .ac14-cat-mega__promo-texto { color: #cf2e2e; }

/* Spacer */
.ac14-header-spacer { height: 0; }

/* =======================================================================
   RESPONSIVE HEADER
   ======================================================================= */

/* Tablet */
@media (max-width: 1024px) {
    .ac14-header-principal { padding: 0 16px !important; }
    .ac14-header-menu-row { padding: 0 !important; }
    .ac14-header-banner-strip { height: 40px; }
}

/* =======================================================================
   MÓVIL — CABECERA ESTILO APP (≤768px)
   Barra superior fija (logo izq. + lupa der.), buscador a pantalla completa,
   hoja de categorías y barra inferior fija: Inicio · Categorías · Carrito · Listas · Cuenta
   ======================================================================= */
:root { --ac14-acento: #cf2e2e; --ac14-m-top: 56px; --ac14-m-bar: 62px; }

/* Elementos solo-móvil: ocultos en escritorio */
.ac14-m-iconos,
.ac14-m-buscar-btn,
.ac14-m-buscar-cab,
.ac14-m-nav,
.ac14-m-menu { display: none; }

@media (max-width: 768px) {
    body.ac14-app { padding-bottom: calc(var(--ac14-m-bar) + env(safe-area-inset-bottom, 0px)); }
    /* overflow-x:hidden en body (Astra) rompe position:fixed en iOS Safari: «clip» recorta sin crear scroll propio */
    html, body.ac14-app { overflow-x: clip !important; }
    @supports not (overflow: clip) { html, body.ac14-app { overflow-x: visible !important; } }

    /* ── Barra superior fija ── */
    #ac14-header {
        position: fixed;
        top: 0; left: 0; right: 0;
        width: 100%;
        box-shadow: 0 1px 6px rgba(0,0,0,.10);
    }
    body.admin-bar #ac14-header { top: 46px; }
    body.admin-bar #wpadminbar { position: fixed !important; }
    .ac14-header-spacer { height: var(--ac14-m-top); }

    .ac14-header-banner-strip,
    .ac14-header-acciones,
    .ac14-header-menu-row,
    .ac14-cuenta-drop { display: none !important; }

    .ac14-header-principal {
        flex-wrap: nowrap;
        height: var(--ac14-m-top);
        padding: 0 8px 0 14px;
        gap: 8px;
        justify-content: space-between;
    }
    .ac14-header-logo img { width: auto !important; height: auto !important; max-height: 34px; max-width: 60vw; object-fit: contain; object-position: left center; }
    .ac14-header-logo .custom-logo-link { display: flex; align-items: center; }

    #ac14-header .ac14-m-iconos { display: flex; align-items: center; gap: 0; }
    #ac14-header .ac14-m-buscar-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px; height: 44px;
        margin: 0;
        padding: 0;
        background: none;
        border: none;
        border-radius: 50%;
        box-shadow: none;
        color: #333;
        cursor: pointer;
    }
    #ac14-header .ac14-m-buscar-btn:hover,
    #ac14-header .ac14-m-buscar-btn:focus,
    #ac14-header .ac14-m-buscar-btn:active { background: #eceff1; color: var(--ac14-acento); outline: none; }

    /* ── Buscador: pantalla completa al pulsar la lupa ── */
    .ac14-header-buscador { display: none; }
    body.ac14-m-buscando #ac14-header { z-index: 1300; }
    body.ac14-m-buscando .ac14-header-buscador {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1300;
        background: #fff;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0 12px 28px;
        box-sizing: border-box;
    }
    body.admin-bar.ac14-m-buscando .ac14-header-buscador { top: 46px; }
    body.ac14-m-buscando { overflow: hidden; }
    .ac14-header-buscador .ac14-m-buscar-cab {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: var(--ac14-m-top);
        font-size: 17px;
        color: #1a1a1a;
    }
    #ac14-header .ac14-m-buscar-cerrar {
        display: flex; align-items: center; justify-content: center;
        width: 44px; height: 44px; margin-right: -8px; padding: 0;
        background: none; border: none; border-radius: 50%; box-shadow: none; color: #333; cursor: pointer;
    }
    #ac14-header .ac14-m-buscar-cerrar:hover,
    #ac14-header .ac14-m-buscar-cerrar:focus { background: #eceff1; color: var(--ac14-acento); outline: none; }
    /* Resultados dentro del propio panel (no flotando) */
    body.ac14-m-buscando .ac14-search-drop {
        position: static !important;
        left: auto !important; right: auto !important; top: auto !important;
        width: auto !important;
        max-height: none !important;
        margin-top: 10px;
        border: none;
        box-shadow: none;
        overflow: visible;
    }

    /* ── Hoja «Categorías» (se abre desde la barra inferior) ── */
    .ac14-categorias-toggle { display: none !important; }
    .ac14-categorias-panel {
        position: fixed;
        top: var(--ac14-m-top); left: 0; right: 0;
        bottom: calc(var(--ac14-m-bar) + env(safe-area-inset-bottom, 0px));
        width: auto;
        display: none;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border: none;
        box-shadow: none;
        background: #fff;
        z-index: 998;
    }
    body.admin-bar .ac14-categorias-panel { top: calc(var(--ac14-m-top) + 46px); }
    .ac14-categorias-panel.abierto { display: block !important; }
    body.ac14-m-cats { overflow: hidden; }

    .ac14-cat-mega { display: block; height: auto; }
    /* Las 3 familias: tres «tarjetas» grandes a todo el ancho; la activa se rellena con el color de acento */
    .ac14-cat-mega__lateral {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        width: auto; flex: none;
        padding: 12px 12px 10px;
        margin: 0;
        border-right: none;
        border-bottom: 1px solid #eee;
        background: #fff;
        position: sticky; top: 0; z-index: 2;
        overflow: visible;
    }
    .ac14-cat-mega__lateral li { min-width: 0; }
    #ac14-header .ac14-cat-mega__padre {
        width: 100%;
        min-height: 58px;
        padding: 8px 6px;
        justify-content: center;
        text-align: center;
        white-space: normal;
        font-size: 13px;
        font-weight: 700;
        line-height: 1.2;
        background: #f4f4f4;
        color: #1a1a1a;
        border: 1.5px solid #e4e4e4;
        border-radius: 12px;
    }
    .ac14-cat-mega__padre svg { display: none; }
    #ac14-header .ac14-cat-mega__padre:hover,
    #ac14-header .ac14-cat-mega__padre:focus { background: #e6e6e6; color: #1a1a1a; border-color: var(--ac14-acento); }
    #ac14-header .ac14-cat-mega__padre.activo,
    #ac14-header .ac14-cat-mega__padre.activo:hover,
    #ac14-header .ac14-cat-mega__padre.activo:focus {
        background: var(--ac14-acento);
        color: #fff;
        border-color: var(--ac14-acento);
        box-shadow: 0 3px 10px rgba(0,0,0,.18);
    }
    .ac14-cat-mega__contenido { padding: 16px 14px 20px; overflow: visible; }
    .ac14-cat-mega__cabecera h3 { font-size: 18px; }
    .ac14-cat-mega__cuerpo { flex-direction: column; gap: 18px; }
    .ac14-cat-mega__promos { flex: none; width: 100%; }
    .ac14-cat-mega__grid { grid-template-columns: 1fr; gap: 22px; width: 100%; }

    /* Resto de enlaces del menú principal, bajo las categorías */
    .ac14-m-menu { display: block; list-style: none; margin: 0; padding: 4px 14px 24px; border-top: 8px solid #f4f4f4; }
    .ac14-m-menu li { margin: 0; height: auto; display: block; }
    .ac14-m-menu a { display: block; padding: 14px 2px; border-bottom: 1px solid #f0f0f0; font-size: 15px; font-weight: 600; color: #1a1a1a; text-decoration: none; }
    .ac14-m-menu a:hover { color: var(--ac14-acento); }

    /* ── Barra inferior fija ── */
    .ac14-m-nav {
        display: flex;
        align-items: stretch;
        position: fixed;
        left: 0; right: 0; bottom: 0;
        z-index: 1100;
        height: calc(var(--ac14-m-bar) + env(safe-area-inset-bottom, 0px));
        padding-bottom: env(safe-area-inset-bottom, 0px);
        box-sizing: border-box;
        background: #fff;
        border-top: 1px solid #e6e6e6;
        box-shadow: 0 -2px 14px rgba(0,0,0,.08);
    }
    .ac14-m-nav .ac14-m-nav__it {
        flex: 1 1 0;
        min-width: 0;
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        margin: 0;
        padding: 6px 2px;
        background: none !important;
        border: none;
        border-radius: 0;
        box-shadow: none;
        color: #6b6b6b !important;
        font-size: 11px;
        font-weight: 600;
        line-height: 1;
        letter-spacing: 0;
        text-transform: none;
        text-decoration: none;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    .ac14-m-nav .ac14-m-nav__it svg { width: 24px; height: 24px; flex-shrink: 0; }
    .ac14-m-nav .ac14-m-nav__it:hover,
    .ac14-m-nav .ac14-m-nav__it:focus,
    .ac14-m-nav .ac14-m-nav__it:active { outline: none; color: #6b6b6b !important; }
    .ac14-m-nav .ac14-m-nav__it.es-activo,
    .ac14-m-nav .ac14-m-nav__it.es-activo:hover,
    .ac14-m-nav .ac14-m-nav__it.es-activo:focus { color: var(--ac14-acento) !important; }

    /* Carrito: destacado pero al mismo nivel que el resto (píldora de color con el icono en blanco y la etiqueta en el color de acento) */
    /* Icono y etiqueta dentro del mismo cuadrado de color */
    .ac14-m-nav .ac14-m-nav__it.ac14-m-nav__it--carro,
    .ac14-m-nav .ac14-m-nav__it.ac14-m-nav__it--carro:hover,
    .ac14-m-nav .ac14-m-nav__it.ac14-m-nav__it--carro:focus,
    .ac14-m-nav .ac14-m-nav__it.ac14-m-nav__it--carro.es-activo,
    .ac14-m-nav .ac14-m-nav__it.ac14-m-nav__it--carro.es-activo:hover {
        overflow: visible;
        flex: 0 0 64px;
        margin: 5px 6px;
        padding: 4px 2px;
        border-radius: 14px;
        background: var(--ac14-acento) !important;
        color: #fff !important;
        box-shadow: 0 2px 6px rgba(207,46,46,.35);
    }
    .ac14-m-nav .ac14-m-nav__it--carro .ac14-m-nav__txt { color: #fff; font-weight: 700; }
    .ac14-m-nav .ac14-m-nav__it.ac14-m-nav__it--carro.es-activo { box-shadow: 0 0 0 3px rgba(207,46,46,.22), 0 2px 6px rgba(207,46,46,.35); }
    .ac14-m-nav__bola { display: flex; align-items: center; justify-content: center; width: auto; height: auto; margin: 0; background: none; box-shadow: none; }
    .ac14-m-nav .ac14-m-nav__bola .ac14-carrito-icon-wrap { position: relative; }
    .ac14-m-nav .ac14-m-nav__bola svg { width: 24px; height: 24px; color: #fff; }
    .ac14-m-nav__bola .ac14-carrito-count {
        position: absolute; top: -8px; right: -6px;
        width: 19px; height: 19px;
        font-size: 10px;
        background: #1a1a1a; color: #fff; border: 2px solid #fff;
    }

    /* Sin hamburguesa: el menú móvil antiguo ya no se usa */
    .ac14-menu-primary { display: none !important; }
}

/* =======================================================================
   PÁGINA DE TIENDA — márgenes laterales
   ======================================================================= */
.woocommerce-page #primary,
.woocommerce-shop #primary,
.ast-woocommerce-container #primary {
    padding-left: 30px !important;
    padding-right: 30px !important;
    box-sizing: border-box !important;
}

/* La ficha de producto también lleva la clase woocommerce-page, así que hereda el
   margen de 30px de la tienda de arriba — en móvil lo anulamos para aprovechar el ancho */
@media (max-width: 640px) {
    .single-product #primary {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* Páginas de WooCommerce SIN filtros laterales (carrito, finalizar compra, Mi cuenta
   y sus apartados, pedido recibido, ficha…): contenido al 100% del ancho. Solo la
   tienda y sus categorías/etiquetas conservan el 16% / 84% con la barra de filtros. */
body.woocommerce-page:not(.post-type-archive-product):not(.tax-product_cat):not(.tax-product_tag):not(.woocommerce-shop) #primary {
    width: 100% !important;
    float: none !important;
    padding-left: 30px !important;
    padding-right: 30px !important;
    box-sizing: border-box !important;
}
/* El ancho de contenido de Astra (distinto en cada instalación: 1200px en el servidor)
   se aplica también al bloque interior ".woocommerce" y lo dejaba centrado y estrecho. */
body.woocommerce-page:not(.post-type-archive-product):not(.tax-product_cat):not(.tax-product_tag):not(.woocommerce-shop) #primary .woocommerce,
body.woocommerce-page:not(.post-type-archive-product):not(.tax-product_cat):not(.tax-product_tag):not(.woocommerce-shop) #primary .entry-content > * {
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}
body.woocommerce-page:not(.post-type-archive-product):not(.tax-product_cat):not(.tax-product_tag):not(.woocommerce-shop) #secondary {
    display: none !important;
}
@media (max-width: 768px) {
    body.woocommerce-page:not(.post-type-archive-product):not(.tax-product_cat):not(.tax-product_tag):not(.woocommerce-shop) #primary {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}

/* =======================================================================
   LAYOUT TIENDA — archive-product.php (control total, sin depender de Astra)
   ======================================================================= */

/* Wrapper principal: flex row */
.ac14-tienda-wrap {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 24px;
    width: 100%;
    max-width: 1960px;
    margin: 0 auto;
    padding: 24px 32px;
    box-sizing: border-box;
}

/* Sidebar — ancho fijo */
.ac14-tienda-sidebar {
    width: 280px;
    flex: 0 0 280px;
    min-width: 0;
    box-sizing: border-box;
}

/* Contenido — ocupa el resto */
.ac14-tienda-main {
    flex: 1 1 0%;
    min-width: 0;
    box-sizing: border-box;
}

/* Quitar margen/padding que Astra añade al #secondary y #primary
   cuando usa archive-product.php propio (no aplican, pero por si acaso) */
.ac14-tienda-wrap #secondary,
.ac14-tienda-wrap #primary {
    width: auto !important;
    float: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Responsive — móvil: sidebar arriba, full width */
/* ── TABLET (768px - 1024px) — sidebar colapsable + 3 columnas ── */
@media (max-width: 1024px) and (min-width: 768px) {
    .ac14-tienda-wrap {
        flex-direction: row;
        padding: 16px;
        gap: 16px;
    }
    .ac14-tienda-sidebar {
        width: 200px;
        flex: 0 0 200px;
        transition: width .3s, opacity .3s, padding .3s;
    }
    .ac14-tienda-sidebar.ac14-sidebar-cerrado {
        width: 0 !important;
        flex: 0 0 0 !important;
        overflow: hidden;
        opacity: 0;
        padding: 0 !important;
        min-width: 0;
    }
    .ac14-loop-grid { grid-template-columns: repeat(3, 1fr) !important; }
    .ac14-filtros-toggle { display: inline-flex !important; }
    .ac14-sidebar-overlay { display: none !important; }
}

/* ── MÓVIL (<768px) — panel filtros + grid 2 columnas ── */
@media (max-width: 767px) {
    .ac14-tienda-wrap {
        flex-direction: column;
        padding: 12px;
        gap: 0;
    }
    /* Sidebar como panel deslizante — NO ocupa espacio en el layout */
    .ac14-tienda-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 85% !important;
        max-width: 320px !important;
        height: 100% !important;
        max-height: 100% !important;
        flex: none !important;
        z-index: 9999;
        background: #fff;
        overflow-y: auto;
        padding: 20px 16px !important;
        transform: translateX(-110%);
        transition: transform .3s ease;
        border-radius: 0 !important;
        box-shadow: 4px 0 20px rgba(0,0,0,.2);
    }
    .ac14-tienda-sidebar.ac14-sidebar-abierto {
        transform: translateX(0);
    }
    /* Overlay */
    .ac14-sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.5);
        z-index: 9998;
    }
    .ac14-sidebar-overlay.activo { display: block; }

    /* Main ocupa todo el ancho */
    .ac14-tienda-main { width: 100%; }

    /* Grid 2 columnas */
    .ac14-loop-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    /* Botón filtros visible */
    .ac14-filtros-toggle { display: inline-flex !important; margin-bottom: 12px; }

    /* Ajustes tarjeta móvil */
    .ac14-card__img { height: 130px; }
    .ac14-card__nombre { font-size: 12px; }
    .ac14-precio-normal { font-size: 17px; }
    .ac14-qty-row { flex-wrap: wrap; gap: 6px; }
    .ac14-btn-carrito { font-size: 12px; padding: 7px 8px; }
    .ac14-btn-lista { font-size: 11px; }

    /* Ocultar cerrar sidebar en tablet */
    .ac14-sidebar-cerrar-btn { display: flex; }
}
    /* Cerrar sidebar — botón X */
    .ac14-sidebar-cerrar {
        display: flex;
        justify-content: flex-end;
        margin-bottom: 12px;
    }
}

/* Categorías jerárquicas → pendiente de revisar HTML real de HUSKY */

/* =======================================================================
   HUSKY — Categorías jerárquicas
   HUSKY genera esta estructura:
     ul.woof_list_checkbox
       li.woof_childs_list_li          ← padre con hijos
         div.icheckbox_square-blue
         label.woof_checkbox_label
         a.woof_childs_list_opener
         ul.woof_childs_list           ← hijos (HUSKY toggle display:block)
           li
             div.icheckbox_square-blue
             label.woof_checkbox_label
   ======================================================================= */

/* Reset flotados heredados de HUSKY */
.woof_list_checkbox li { float: none !important; clear: both !important; }

/* Cada li ocupa el 100% y pone checkbox+label+opener en fila */
.woof_list_checkbox > li {
    display: grid !important;
    grid-template-columns: auto 1fr auto !important;
    grid-template-rows: auto auto !important;
    align-items: center !important;
    column-gap: 6px !important;
    width: 100% !important;
    padding: 3px 0 !important;
    box-sizing: border-box !important;
}

/* Columna 1: iCheck */
.woof_list_checkbox > li > .icheckbox_square-blue {
    grid-column: 1;
    grid-row: 1;
}

/* Columna 2: label */
.woof_list_checkbox > li > label.woof_checkbox_label {
    grid-column: 2;
    grid-row: 1;
    margin: 0 !important;
    min-width: 0 !important;
    white-space: normal !important;
    word-break: break-word !important;
}

/* Columna 3: opener +/− */
.woof_list_checkbox > li > a.woof_childs_list_opener {
    grid-column: 3;
    grid-row: 1;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #aaa !important;
    text-decoration: none !important;
    line-height: 1 !important;
}
.woof_list_checkbox > li > a.woof_childs_list_opener:hover { color: #cf2e2e !important; }

/* Sublista: fila 2, ocupa las 3 columnas → debajo del padre */
.woof_list_checkbox > li > ul.woof_childs_list {
    grid-column: 1 / -1;
    grid-row: 2;
    display: none !important;       /* oculta por defecto              */
    width: 100% !important;
    padding-left: 22px !important;
    margin: 2px 0 4px 0 !important;
    box-sizing: border-box !important;
    list-style: none !important;
}

/* HUSKY aplica style="display:block" al expandir.
   Como usamos !important arriba, necesitamos permitir que HUSKY lo supere.
   Solución: usar una clase que HUSKY añade al li cuando está abierto */
.woof_list_checkbox > li.opened > ul.woof_childs_list,
.woof_list_checkbox > li > ul.woof_childs_list[style*="display: block"],
.woof_list_checkbox > li > ul.woof_childs_list[style*="display:block"] {
    display: block !important;
}

/* Hijos de la sublista: grid igual */
.woof_list_checkbox > li > ul.woof_childs_list > li {
    display: grid !important;
    grid-template-columns: auto 1fr !important;
    align-items: center !important;
    column-gap: 6px !important;
    width: 100% !important;
    padding: 2px 0 !important;
    float: none !important;
}
.woof_list_checkbox > li > ul.woof_childs_list > li > .icheckbox_square-blue {
    grid-column: 1;
}
.woof_list_checkbox > li > ul.woof_childs_list > li > label.woof_checkbox_label {
    grid-column: 2;
    margin: 0 !important;
    white-space: normal !important;
    word-break: break-word !important;
}

/* Panel Mi Cuenta — oculto por defecto, visible solo con .active */
#ac14-header .ac14-cuenta-drop { display: none !important; }
#ac14-header .ac14-cuenta-drop.active { display: block !important; }

/* ── Logo Ferrobox ── */
.ac14-logo-ferrobox {
    max-height: 65px;
    width: auto;
    display: block;
}

/* ── Semáforo de stock ── */
.ac14-semaforo {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 0 2px;
}
.ac14-semaforo__punto {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.ac14-semaforo--verde  .ac14-semaforo__punto { background: #22c55e; }
.ac14-semaforo--amarillo .ac14-semaforo__punto { background: #f59e0b; }
.ac14-semaforo--rojo   .ac14-semaforo__punto { background: #cf2e2e; }
.ac14-semaforo--verde  .ac14-semaforo__texto { color: #16a34a; }
.ac14-semaforo--amarillo .ac14-semaforo__texto { color: #d97706; }
.ac14-semaforo--rojo   .ac14-semaforo__texto { color: #cf2e2e; }

/* ── Consultar disponibilidad ── */
.ac14-consultar-stock {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #d97706;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 6px;
    padding: 7px 10px;
    line-height: 1.3;
}
.ac14-consultar-stock svg { flex-shrink: 0; color: #d97706; }

/* ── Estado descatalogado ── */
.ac14-descatalogado {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 7px 10px;
}
.ac14-descatalogado svg { flex-shrink: 0; color: #9ca3af; }

/* ── Sidebar sticky con scroll independiente ── */
.ac14-tienda-sidebar {
    position: sticky;
    top: 180px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #ddd #f5f5f5;
    padding: 16px 12px 16px 16px;
    background: #fff;
    border-radius: 8px;
}
.ac14-tienda-sidebar::-webkit-scrollbar { width: 4px; }
.ac14-tienda-sidebar::-webkit-scrollbar-track { background: #f5f5f5; }
.ac14-tienda-sidebar::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }

/* ── Descatalogado — marca de agua y estilos ── */
.ac14-card__img { position: relative; }

.ac14-watermark-descatalogado {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 16px;
    font-weight: 900;
    color: rgba(252, 75, 8, 0.55);
    text-transform: uppercase;
    letter-spacing: .1em;
    pointer-events: none;
    white-space: nowrap;
    z-index: 2;
    border: 3px solid rgba(252, 75, 8, 0.45);
    padding: 4px 10px;
    border-radius: 4px;
}
.ac14-img-descatalogado {
    filter: grayscale(60%) opacity(0.7);
}
.ac14-descatalogado {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #fff !important;
    background: rgb(252, 75, 8) !important;
    border: none !important;
    border-radius: 6px;
    padding: 8px 12px;
    width: 100%;
    justify-content: center;
}
.ac14-descatalogado svg { flex-shrink: 0; color: #fff; }

/* ── Fondo tienda ── */
.woocommerce-page .site-content,
body.post-type-archive-product,
body.tax-product_cat,
body.tax-product_tag {
    background: #F5F5F5 !important;
}

/* ── Botón Filtros (visible solo en móvil y tablet) ── */
.ac14-filtros-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 12px;
    transition: background .15s;
}
.ac14-filtros-toggle:hover { background: #cf2e2e; }
.ac14-filtros-toggle svg { flex-shrink: 0; }

/* Botón cerrar sidebar en móvil */
.ac14-sidebar-cerrar-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    color: #555;
    margin-left: auto;
    margin-bottom: 16px;
}

/* Botón cerrar sidebar — solo en móvil */
.ac14-sidebar-cerrar-btn { display: none; }

/* ── Móvil — ocultar EAN para ahorrar espacio ── */
@media (max-width: 767px) {
    .ac14-badge--ean { display: none !important; }
    .ac14-card .ac14-badge--ref { display: none !important; }
}


/* =======================================================================
   MIGAS DE PAN (ficha de producto) + CATEGORÍA EN LA TARJETA
   ======================================================================= */
.ac14-migas { padding: 10px 20px 0; box-sizing: border-box; }
.ac14-migas ol { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; margin: 0; padding: 0; list-style: none; font-size: 13px; line-height: 1.4; }
.ac14-migas li { margin: 0; display: inline-flex; align-items: center; }
.ac14-migas li + li::before { content: "›"; margin: 0 8px; color: #bbb; }
.ac14-migas a { color: #666; text-decoration: none; }
.ac14-migas a:hover, .ac14-migas a:focus-visible { color: #cf2e2e; text-decoration: underline; }
.ac14-migas li:last-child a { color: #1a1a1a; font-weight: 600; }
@media (max-width: 640px) { .ac14-migas { padding: 8px 10px 0; } .ac14-migas ol { font-size: 12px; } }

.ac14-card__cat { font-size: 11px; line-height: 1.3; margin: 0 0 2px; }
.ac14-card__cat a { color: #888; text-decoration: none; }
.ac14-card__cat a:hover, .ac14-card__cat a:focus-visible { color: #cf2e2e; text-decoration: underline; }

/* Migas en la tienda: alineadas con el contenido (sin el sangrado de la ficha) */
.ac14-tienda-main .ac14-migas { padding: 0 0 12px; }
.ac14-migas [aria-current="page"] span { color: #1a1a1a; font-weight: 600; }

/* Tienda: migas y total de productos en la misma línea, dentro de la barra superior */
.ac14-filtros__toolbar-izq { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; min-width: 0; }
.ac14-tienda-main .ac14-filtros__toolbar .ac14-migas { padding: 0; }
.ac14-filtros__toolbar-izq .ac14-migas + .ac14-filtros__toolbar-total { padding-left: 14px; border-left: 1px solid #ddd; }
@media (max-width: 640px) {
    .ac14-filtros__toolbar-izq .ac14-migas + .ac14-filtros__toolbar-total { padding-left: 0; border-left: 0; }
}

/* =======================================================================
   PANEL MI CUENTA — Menús de las 4 columnas ([ac14_menu_cuenta])
   ======================================================================= */
.ac14-cuenta-menu { list-style: none; margin: 0; padding: 0; }
.ac14-cuenta-menu li { margin: 0; }
.ac14-cuenta-menu a { display: block; padding: 5px 0; font-size: 14px; color: #333; text-decoration: none; }
.ac14-cuenta-menu a:hover,
.ac14-cuenta-menu .current-menu-item > a { color: #cf2e2e; }

/* ── Título de bloque: en el menú, «Clases CSS» del elemento = ac14-menu-titulo ── */
.ac14-cuenta-menu .ac14-menu-titulo > a { font-weight: 700; color: #111; padding-bottom: 8px; }
.ac14-cuenta-menu .ac14-menu-titulo > a[href="#"] { cursor: default; pointer-events: none; }
.ac14-cuenta-menu .ac14-menu-titulo > a:hover { color: #111; }

/* ── Iconos: «Clases CSS» del elemento = ac14-ico-NOMBRE (ver lista abajo). Toman el color del texto ── */
.ac14-cuenta-menu [class*="ac14-ico-"] > a { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.ac14-cuenta-menu [class*="ac14-ico-"] > a::before {
    content: ""; flex: 0 0 18px; width: 18px; height: 18px; background-color: currentColor;
    -webkit-mask: var(--ac14-ico) center / contain no-repeat; mask: var(--ac14-ico) center / contain no-repeat;
}
.ac14-ico-usuario          { --ac14-ico: url("data:image/svg+xml,<svg 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'><path d='M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2'/><circle cx='12' cy='7' r='4'/></svg>"); }
.ac14-ico-usuarios         { --ac14-ico: url("data:image/svg+xml,<svg 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'><path d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/><circle cx='9' cy='7' r='4'/><path d='M22 21v-2a4 4 0 0 0-3-3.87'/><path d='M16 3.13a4 4 0 0 1 0 7.75'/></svg>"); }
.ac14-ico-usuario-ajustes  { --ac14-ico: url("data:image/svg+xml,<svg 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'><circle cx='9' cy='7' r='4'/><path d='M10 15H6a4 4 0 0 0-4 4v2'/><circle cx='18' cy='15' r='3'/><path d='m21.7 16.4-.9-.3'/><path d='m15.2 13.9-.9-.3'/><path d='m16.6 18.7.3-.9'/><path d='m19.1 12.2.3-.9'/><path d='m19.6 18.7-.4-1'/><path d='m16.8 12.3-.4-1'/><path d='m14.3 16.6 1-.4'/><path d='m20.7 13.8 1-.4'/></svg>"); }
.ac14-ico-tienda           { --ac14-ico: url("data:image/svg+xml,<svg 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'><path d='m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7'/><path d='M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8'/><path d='M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4'/><path d='M2 7h20'/><path d='M22 7v3a2 2 0 0 1-2 2a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7'/></svg>"); }
.ac14-ico-arroba           { --ac14-ico: url("data:image/svg+xml,<svg 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'><circle cx='12' cy='12' r='4'/><path d='M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8'/></svg>"); }
.ac14-ico-correo           { --ac14-ico: url("data:image/svg+xml,<svg 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'><rect width='20' height='16' x='2' y='4' rx='2'/><path d='m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7'/></svg>"); }
.ac14-ico-documento        { --ac14-ico: url("data:image/svg+xml,<svg 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'><path d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/><path d='M14 2v6h6'/><path d='M16 13H8'/><path d='M16 17H8'/><path d='M10 9H8'/></svg>"); }
.ac14-ico-recibo           { --ac14-ico: url("data:image/svg+xml,<svg 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'><path d='M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z'/><path d='M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8'/><path d='M12 17.5v-11'/></svg>"); }
.ac14-ico-lista            { --ac14-ico: url("data:image/svg+xml,<svg 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'><rect width='8' height='4' x='8' y='2' rx='1'/><path d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/><path d='M12 11h4'/><path d='M12 16h4'/><path d='M8 11h.01'/><path d='M8 16h.01'/></svg>"); }
.ac14-ico-carrito          { --ac14-ico: url("data:image/svg+xml,<svg 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'><circle cx='8' cy='21' r='1'/><circle cx='19' cy='21' r='1'/><path d='M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12'/></svg>"); }
.ac14-ico-paquete          { --ac14-ico: url("data:image/svg+xml,<svg 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'><path d='m7.5 4.27 9 5.15'/><path d='M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z'/><path d='m3.3 7 8.7 5 8.7-5'/><path d='M12 22V12'/></svg>"); }
.ac14-ico-camion           { --ac14-ico: url("data:image/svg+xml,<svg 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'><path d='M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2'/><path d='M15 18H9'/><path d='M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14'/><circle cx='17' cy='18' r='2'/><circle cx='7' cy='18' r='2'/></svg>"); }
.ac14-ico-descarga         { --ac14-ico: url("data:image/svg+xml,<svg 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'><path d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/><polyline points='7 10 12 15 17 10'/><line x1='12' x2='12' y1='15' y2='3'/></svg>"); }
.ac14-ico-etiqueta         { --ac14-ico: url("data:image/svg+xml,<svg 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'><path d='M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z'/><circle cx='7.5' cy='7.5' r='.5' fill='black'/></svg>"); }
.ac14-ico-alerta           { --ac14-ico: url("data:image/svg+xml,<svg 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'><path d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3'/><path d='M12 9v4'/><path d='M12 17h.01'/></svg>"); }
.ac14-ico-campana          { --ac14-ico: url("data:image/svg+xml,<svg 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'><path d='M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9'/><path d='M10.3 21a1.94 1.94 0 0 0 3.4 0'/></svg>"); }
.ac14-ico-ajustes          { --ac14-ico: url("data:image/svg+xml,<svg 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'><line x1='21' x2='14' y1='4' y2='4'/><line x1='10' x2='3' y1='4' y2='4'/><line x1='21' x2='12' y1='12' y2='12'/><line x1='8' x2='3' y1='12' y2='12'/><line x1='21' x2='16' y1='20' y2='20'/><line x1='12' x2='3' y1='20' y2='20'/><line x1='14' x2='14' y1='2' y2='6'/><line x1='8' x2='8' y1='10' y2='14'/><line x1='16' x2='16' y1='18' y2='22'/></svg>"); }
.ac14-ico-corazon          { --ac14-ico: url("data:image/svg+xml,<svg 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'><path d='M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z'/></svg>"); }
.ac14-ico-casa             { --ac14-ico: url("data:image/svg+xml,<svg 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'><path d='M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8'/><path d='M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/></svg>"); }
.ac14-ico-ayuda            { --ac14-ico: url("data:image/svg+xml,<svg 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'><circle cx='12' cy='12' r='10'/><path d='M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3'/><path d='M12 17h.01'/></svg>"); }
.ac14-ico-salir            { --ac14-ico: url("data:image/svg+xml,<svg 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'><path d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/><polyline points='16 17 21 12 16 7'/><line x1='21' x2='9' y1='12' y2='12'/></svg>"); }

/* =======================================================================
   AVISOS DE WOOCOMMERCE — éxito / error / información (todo el sitio)
   (!important: Astra y WooCommerce pintan estos avisos con su propio estilo)
   ======================================================================= */
.woocommerce-notices-wrapper { margin: 0 0 16px; }
.woocommerce-notices-wrapper:empty { display: none; }
body .woocommerce-message,
body .woocommerce-info,
body .woocommerce-error {
    position: relative !important;
    display: flex !important; align-items: center; gap: 12px; flex-wrap: wrap;
    margin: 0 0 12px !important;
    padding: 14px 16px !important;
    list-style: none !important;
    border: 1px solid !important; border-radius: 12px !important;
    font-size: 14px !important; line-height: 1.45 !important; text-align: left !important;
    box-shadow: 0 1px 2px rgba(16,24,40,.05) !important;
    width: auto !important;
}
/* Icono redondo (sustituye al icono de fuente de WooCommerce/Astra) */
body .woocommerce-message::before,
body .woocommerce-info::before,
body .woocommerce-error li::before {
    position: static !important;
    flex: 0 0 26px; width: 26px !important; height: 26px !important; margin: 0 !important; padding: 0 !important;
    display: inline-flex !important; align-items: center; justify-content: center;
    border-radius: 50%; color: #fff !important;
    font: 800 14px/1 system-ui, -apple-system, "Segoe UI", sans-serif !important;
    text-indent: 0; top: auto !important; left: auto !important;
}
body .woocommerce-message { background: #f6fef9 !important; border-color: #abefc6 !important; color: #054f31 !important; }
body .woocommerce-message::before { content: "✓" !important; background: #12b76a; }
body .woocommerce-info { background: #f5faff !important; border-color: #b2ddff !important; color: #194185 !important; }
body .woocommerce-info::before { content: "i" !important; background: #2e90fa; font-style: italic !important; }
body .woocommerce-error { display: block !important; padding: 4px 16px !important; background: #fecdca !important; border-color: #fecdca !important; color: #cf2e2e !important; }
body .woocommerce-error::before { display: none !important; }
body .woocommerce-error li { display: flex !important; align-items: flex-start; gap: 12px; margin: 0 !important; padding: 11px 0 !important; list-style: none !important; }
body .woocommerce-error li + li { border-top: 1px solid rgba(217,45,32,.15); }
body .woocommerce-error li::before { content: "!" !important; background: #cf2e2e; }
.woocommerce-message a:not(.button), .woocommerce-info a:not(.button), .woocommerce-error a:not(.button) { color: inherit; font-weight: 700; text-decoration: underline; }
/* Botón dentro del aviso («Ver carrito», «Deshacer»…) */
body .woocommerce-message .button,
body .woocommerce-info .button,
body .woocommerce-error .button {
    float: none !important; order: 2; margin: 0 0 0 auto !important;
    padding: 8px 14px !important; border-radius: 8px !important;
    background: #fff !important; color: inherit !important;
    border: 1.5px solid currentColor !important;
    font-size: 13px !important; font-weight: 700 !important; line-height: 1.2 !important;
}
body .woocommerce-message .button:hover,
body .woocommerce-info .button:hover,
body .woocommerce-error .button:hover { background: rgba(0,0,0,.05) !important; }
/* Formulario de acceso B2B: tiene sus propios avisos */
body .ac14acc-caja .woocommerce-error li::before { display: none !important; }
@media (max-width: 640px) {
    body .woocommerce-message .button, body .woocommerce-info .button { width: 100%; text-align: center; margin: 4px 0 0 !important; }
}

/* =======================================================================
   MÓVIL: zonas táctiles y tamaños mínimos de los filtros
   ======================================================================= */
@media (max-width: 768px) {
    .ac14-filtros__item { min-height: 42px; display: flex; align-items: center; gap: 10px; }
    .ac14-filtros__item input[type="checkbox"],
    .ac14-filtros__item input[type="radio"] { width: 20px; height: 20px; flex: 0 0 20px; margin: 0; }
    .ac14-filtros__cat-toggle { min-width: 44px; min-height: 40px; }
    .ac14-filtros__count { font-size: 12px; }
    .ac14-filtros__catalogo-ic { padding: 12px; box-sizing: content-box; }
}

/* =======================================================================
   AVISO DE DISPONIBILIDAD: botón «Avisarme por correo» (ficha y tarjetas)
   ======================================================================= */
#ac14-single-action[hidden], #ac14-single-sinstock[hidden] { display: none !important; }
.ac14-sin-stock--ficha { text-align: left; padding: 12px 0; }
.ac14-sin-stock--ficha .ac14-sin-stock__txt { display: flex; align-items: center; font-size: 12px; font-weight: 600; color: #d97706; background: #fef3c7; border: 1px solid #fde68a; border-radius: 6px; padding: 7px 10px; margin-bottom: 0; }
.ac14av-caja { margin-top: 8px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; }
.ac14av-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px; width: 100%;
    padding: 9px 12px; border-radius: 8px; font-size: 13px; font-weight: 700; line-height: 1.2; text-align: center;
    background: #fff; color: var(--ac14-acento, #cf2e2e); border: 1.5px solid var(--ac14-acento, #cf2e2e);
    text-decoration: none; transition: background .12s, color .12s;
}
.ac14av-btn:hover, .ac14av-btn:focus { background: var(--ac14-acento, #cf2e2e); color: #fff; }
.ac14av-on { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: #15803d; }
.ac14av-anular { font-size: 11px; color: #888; text-decoration: underline; }
.ac14-sin-stock--ficha .ac14av-btn { width: auto; padding: 10px 18px; font-size: 14px; }

/* =======================================================================
   «¿QUÉ PRODUCTO BUSCAS?» — subcategorías: una fila, tipo slider, encima de todo
   ======================================================================= */
.ac14-qb-wrap { width: 100%; max-width: 1960px; margin: 0 auto; padding: 20px 32px 0; box-sizing: border-box; }
.ac14-qb {
    position: relative; display: flex; align-items: center; gap: 14px;
    background: #fff; border: 1px solid #e3e3e3; border-radius: 12px; padding: 14px 16px;
    box-shadow: 0 1px 6px rgba(0,0,0,.05); box-sizing: border-box; min-width: 0;
}
.ac14-qb__cab { flex: 0 0 auto; padding-right: 4px; }
.ac14-qb__titulo { font-size: 15px; font-weight: 800; color: #1a1a1a; margin: 0; line-height: 1.2; white-space: nowrap; }
.ac14-qb__sub { margin: 3px 0 0; font-size: 12px; color: #777; white-space: nowrap; }
.ac14-qb__lista {
    flex: 1 1 0; min-width: 0; margin: 0; padding: 2px 2px; list-style: none;
    display: flex; flex-wrap: nowrap; gap: 12px; overflow-x: auto; overflow-y: hidden;
    scrollbar-width: none; -ms-overflow-style: none;
    cursor: grab; outline: none;
}
.ac14-qb__lista::-webkit-scrollbar { display: none; }
.ac14-qb__lista--arrastra { cursor: grabbing; user-select: none; }
.ac14-qb__lista--arrastra a { pointer-events: none; }
.ac14-qb__item { flex: 0 0 auto; margin: 0; padding: 0; }
.ac14-qb__enlace {
    display: flex; align-items: center; gap: 12px; height: 74px; padding: 6px 18px 6px 8px;
    background: #fff; border: 1px solid #e3e3e3; border-radius: 8px; text-decoration: none; color: #1a1a1a;
    transition: border-color .12s, box-shadow .12s;
}
.ac14-qb__enlace:hover, .ac14-qb__enlace:focus-visible { border-color: var(--ac14-acento, #cf2e2e); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.ac14-qb__enlace--activo, .ac14-qb__enlace--activo:hover { border-color: var(--ac14-acento, #cf2e2e); background: #fecdca; box-shadow: inset 0 0 0 1px var(--ac14-acento, #cf2e2e); }
.ac14-qb__enlace--activo .ac14-qb__nombre { font-weight: 700; }
.ac14-qb__img { flex: 0 0 60px; width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; color: #c8c8c8; }
.ac14-qb__img img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; mix-blend-mode: multiply; pointer-events: none; -webkit-user-drag: none; }
.ac14-qb__nombre { font-size: 14px; font-weight: 500; line-height: 1.2; white-space: nowrap; }
.ac14-qb__flecha {
    flex: 0 0 auto; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%;
    background: transparent; color: #111; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.ac14-qb__flecha[hidden] { display: none; }
.ac14-qb__flecha:hover { background: #eceff1; color: var(--ac14-acento, #cf2e2e); }
@media (max-width: 1024px) { .ac14-qb-wrap { padding: 16px 16px 0; } }
@media (max-width: 767px) {
    .ac14-qb-wrap { padding: 12px 12px 0; }
    .ac14-qb { flex-direction: column; align-items: stretch; gap: 8px; padding: 12px; }
    .ac14-qb__sub { display: none; }
    .ac14-qb__flecha { display: none; }
    .ac14-qb__lista { flex: 0 0 auto; margin: 0 -2px; padding-bottom: 2px; }
    .ac14-qb__enlace { height: 60px; gap: 8px; padding: 4px 12px 4px 6px; }
    .ac14-qb__img { flex-basis: 46px; width: 46px; height: 46px; }
    .ac14-qb__nombre { font-size: 13px; }
}

/* =======================================================================
   BUSCADOR — panel a página completa (escritorio) + scroll infinito
   Columnas de producto según dispositivo: ≥1700 → 8 · ≥1400 → 6 · ≥1100 → 5 · ≥769 → 4 · móvil → 2
   ======================================================================= */
html.ac14-search-abierto { overflow: hidden; }
@media (min-width: 769px) {
    .ac14-search-drop {
        position: fixed !important;
        left: 0 !important; right: 0 !important; bottom: 0 !important;
        width: auto !important; max-height: none !important;
        border: 0; border-top: 1px solid #e6e6e6; border-radius: 0;
        box-shadow: none;
        z-index: 9990;
        flex-direction: column;
    }
    .ac14-search-drop.active { display: flex; }
    .ac14-search-drop .ac14-drop-grid {
        flex: 1 1 auto; min-height: 0; max-height: none !important;
        grid-template-columns: 280px minmax(0, 1fr) !important;
        grid-template-rows: minmax(0, 1fr);
    }
    .ac14-search-drop .ac14-drop-col--left,
    .ac14-search-drop .ac14-drop-col--right { max-height: none !important; overflow-y: auto; min-height: 0; }
    .ac14-search-drop .ac14-drop-col--right { padding: 14px 24px 24px 18px; }
    .ac14-search-drop .ac14-drop-footer { flex: 0 0 auto; }
    .ac14-search-drop .ac14-drop-products { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 12px; }
}
@media (min-width: 1100px) { .ac14-search-drop .ac14-drop-products { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; } }
@media (min-width: 1400px) { .ac14-search-drop .ac14-drop-products { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; } }
@media (min-width: 1700px) { .ac14-search-drop .ac14-drop-products { grid-template-columns: repeat(8, minmax(0, 1fr)) !important; } }
.ac14-drop-sentinel { grid-column: 1 / -1; display: flex; justify-content: center; padding: 18px 0 6px; color: #bbb; min-height: 40px; }
.ac14-drop-sentinel svg { animation: ac14-spin 1s linear infinite; }
.ac14-drop-x {
    position: absolute; top: 10px; right: 14px; z-index: 2;
    width: 34px; height: 34px; border-radius: 50%; border: 1px solid #e3e3e3; background: #fff; color: #555;
    display: none; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.ac14-drop-x:hover { color: var(--ac14-acento, #cf2e2e); border-color: var(--ac14-acento, #cf2e2e); }
@media (min-width: 769px) { .ac14-search-drop .ac14-drop-x { display: flex; } }

/* =======================================================================
   TIENDA — columnas de producto según dispositivo
   ≥1800 → 7 · ≥1500 → 6 · ≥1350 → 5 · ≥1100 → 4 · 769–1099 → 3 · ≤768 → 2
   (la vista «lista» no se toca)
   ======================================================================= */
.ac14-tienda-main ul.products:not(.ac14-vista-lista) { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
@media (min-width: 769px)  { .ac14-tienda-main ul.products:not(.ac14-vista-lista) { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
@media (min-width: 1100px) { .ac14-tienda-main ul.products:not(.ac14-vista-lista) { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; } }
/* Columnas 2 · 3 · 4 · 6 (sin 5): 24, 48 y 72 productos por página cuadran siempre en filas completas */
@media (min-width: 1500px) { .ac14-tienda-main ul.products:not(.ac14-vista-lista) { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; } }

/* Tabla de descuento por cantidad dentro de la tarjeta: más compacta */
.ac14-card .ac14-tiers { font-size: 12px; margin: 6px 0 8px; }
.ac14-card .ac14-tiers__head, .ac14-card .ac14-tier { grid-template-columns: 1.5fr 1fr .6fr; padding: 5px 7px; column-gap: 4px; }

/* Etiquetas sobre la imagen (arriba izquierda): OFERTA + estrella de destacado */
.ac14-card__etiquetas { position: absolute; top: 8px; left: 8px; z-index: 11; display: flex; align-items: center; gap: 5px; pointer-events: none; }
.ac14-etq { display: inline-flex; align-items: center; justify-content: center; height: 22px; border-radius: 4px; font-size: 11px; font-weight: 700; letter-spacing: .04em; line-height: 1; }
.ac14-etq--oferta { height: 52px; width: 52px; background: none; border: 0; padding: 0; filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); }
.ac14-etq--oferta svg { display: block; width: 44px; height: 50px; }
.ac14-etq--oferta img { display: block; width: 52px; height: 52px; object-fit: contain; }
.ac14-etq--star { background: #fff4c2; color: #e6a800; border: 2px solid #ffc61a; width: 52px; height: 52px; border-radius: 8px; }
.ac14-card__etiquetas ~ .ac14-label--promo-img, .ac14-card__etiquetas ~ a .ac14-label--promo-img { top: 66px; }
.ac14-single__img-wrap > .ac14-card__etiquetas { top: 10px; left: 10px; }
.ac14-single__img-wrap > .ac14-card__etiquetas ~ .ac14-label--promo-img { top: 68px; left: 10px; }
/* Tabla de descuento en la tarjeta: sin columna de ahorro */
.ac14-card .ac14-tiers__head, .ac14-card .ac14-tier { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }

/* Botones de producto: Astra pinta los <button>:hover en blanco; el hover siempre debe verse (gris, nunca azul ni blanco) */
.ac14-card .ac14-btn-lista:hover, .ac14-single__action .ac14-btn-lista:hover { background: #e9ecef !important; color: #1a1a1a !important; border-color: #b8bec6 !important; }
.ac14-g-qty button:hover { background: #e2e5e9 !important; color: #1a1a1a !important; }

/* ── Tarjeta: precios compactos (menos altura) ── */
/* Fila 1: precio principal + precio normal tachado. Fila 2: IVA incl. + PVPR (gris, pequeño). Después, el envase separado por una línea. */
.ac14-card__precios { row-gap: 4px; }
.ac14-card__precios .ac14-precio-principal, .ac14-card__precios .ac14-precio-normal { display: contents; }
.ac14-card__precios .ac14-pr-main { order: 1; }
.ac14-card__precios .ac14-precio-tachado { order: 2; font-size: 13px; line-height: 1.2; }
.ac14-card__precios::after { content: ''; order: 3; flex: 0 0 100%; height: 0; }
.ac14-card__precios .ac14-pr-iva { order: 4; margin: 0; }
.ac14-card__precios .ac14-pr-pvpr { order: 5; flex: 0 0 auto; }
.ac14-card__precios .ac14-precio-siniva-ref { order: 6; flex: 0 0 100%; }
.ac14-card__precios .ac14-envase-linea { order: 7; flex: 0 0 100%; margin: 4px 0 0; padding-top: 7px; border-top: 1px solid #eee; font-size: 12px; }
.ac14-card .ac14-tiers { margin: 8px 0 8px; }
.ac14-card .ac14-tiers__head { display: none; }
.ac14-card .ac14-tier { grid-template-columns: minmax(0, 1fr) auto; padding: 3px 7px; }
.ac14-card .ac14-tier__cant { flex-wrap: nowrap; white-space: nowrap; gap: 5px; }
/* Tabla de envase en tarjetas: más grande que antes, sin círculo de selección (la ficha lo lleva) */
.ac14-card .ac14-tiers { font-size: 13px; max-width: none; border-radius: 10px; }
.ac14-card .ac14-tier { min-height: 38px; padding: 7px 10px; }
.ac14-card .ac14-tier__cant::before { display: none; }
.ac14-card .ac14-tier__cant { flex-wrap: wrap; gap: 2px 6px; min-width: 0; }
.ac14-card .ac14-tier__precio { white-space: nowrap; }
.ac14-card .ac14-tier__precio { font-size: 1.08em; }
.ac14-card .ac14-tier__ahorro { font-size: .85em; padding: 1px 5px; }
/* Ref. Proveedor: como la categoría (gris, pequeño, sin fondo) */
.ac14-card__ref { font-size: 11px; line-height: 1.3; margin: 0 0 2px; color: #888; }

/* ── Ficha: mismo orden que la tarjeta. Fila 1: precio principal + tachado · fila 2: IVA incl. + PVPR · luego el envase ── */
.ac14-single__precio-bloque { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 12px; row-gap: 6px; }
.ac14-single__precio-bloque .ac14-single__precio-normal, .ac14-single__precio-bloque .ac14-single__precio-normal .ac14-precio-wrap { display: contents; }
.ac14-single__precio-bloque .ac14-pr-main { order: 1; }
.ac14-single__precio-bloque .ac14-single__precio-tachado { order: 2; font-size: 16px; line-height: 1.2; }
.ac14-single__precio-bloque::after { content: ''; order: 3; flex: 0 0 100%; height: 0; }
.ac14-single__precio-bloque .ac14-pr-iva { order: 4; margin: 0; font-size: 15px; }
.ac14-single__precio-bloque .ac14-pr-pvpr { order: 5; flex: 0 0 auto; font-size: 15px; }
.ac14-single__precio-bloque .ac14-precio-siniva-ref { order: 6; flex: 0 0 100%; }
.ac14-single__precio-bloque .ac14-card__envase { order: 7; flex: 0 0 100%; margin: 6px 0 0; font-size: 14px; }

/* Buscador: en ordenador no tienen sentido la búsqueda por voz ni por imagen (sí en móvil/tablet táctil) */
@media (hover: hover) and (pointer: fine) and (min-width: 769px) {
    #ac14-search-mic-btn, #ac14-search-img-btn { display: none !important; }
}

/* ── Botón «CERRAR ✕» unificado (buscador, escáner EAN, filtros móvil, modales) ── */
.ac14-btn-cerrar,
#ac14-header .ac14-btn-cerrar {
    align-items: center; justify-content: center; gap: 6px;
    width: auto !important; height: 34px !important; min-width: 0 !important; min-height: 0 !important;
    padding: 0 14px !important;
    background: #cf2e2e !important; color: #fff !important;
    border: 0 !important; border-radius: 6px !important; box-shadow: none !important; outline: none;
    font-size: 12px !important; font-weight: 700 !important; letter-spacing: .05em; line-height: 1 !important; text-transform: uppercase;
    cursor: pointer; aspect-ratio: auto !important; flex-shrink: 0;
}
.ac14-btn-cerrar:hover, .ac14-btn-cerrar:focus,
#ac14-header .ac14-btn-cerrar:hover, #ac14-header .ac14-btn-cerrar:focus { background: #fff !important; color: #cf2e2e !important; box-shadow: inset 0 0 0 1.5px #cf2e2e !important;  }
.ac14-btn-cerrar:not(.ac14-sidebar-cerrar-btn):not(.ac14-drop-x) { display: inline-flex; }
.ac14-btn-cerrar svg { flex: none; }
.ac14-search-drop .ac14-drop-x { top: 10px; right: 14px; }
.ac14-search-scan-box .ac14-search-scan-close { top: 10px; right: 10px; }

/* ── Tienda · vista en LISTA: fila más baja, imagen grande y logo de marca sin tapar la foto ── */
@media (min-width: 701px) {
    .woocommerce ul.products.ac14-vista-lista li.ac14-card .ac14-card__img { width: 132px; flex: 0 0 132px; aspect-ratio: auto; min-height: 112px; align-self: stretch; }
    /* La foto ocupa el 100% del alto de la celda con el mínimo margen, sin deformarse */
    .woocommerce ul.products.ac14-vista-lista li.ac14-card .ac14-card__img a { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: auto; height: auto; }
    .woocommerce ul.products.ac14-vista-lista li.ac14-card .ac14-card__img img.ac14-loop-img, .woocommerce ul.products.ac14-vista-lista li.ac14-card .ac14-card__img a img { width: 100%; height: 100%; padding: 3px; object-fit: contain; object-position: center; }
    /* El logo de la marca sale en la fila del SKU/EAN (a la derecha), no sobre la foto */
    .woocommerce ul.products.ac14-vista-lista li.ac14-card .ac14-card__img .ac14-card__marca { display: none; }
    .woocommerce ul.products.ac14-vista-lista li.ac14-card .ac14-card__marca-lista { display: inline-flex; margin-left: auto; align-items: center; }
    .woocommerce ul.products.ac14-vista-lista li.ac14-card .ac14-card__marca-lista img { max-height: 40px; width: auto; max-width: 140px; object-fit: contain; display: block; padding: 0; }
    /* Cuerpo en dos columnas: datos a la izquierda, precios a la derecha */
    .woocommerce ul.products.ac14-vista-lista li.ac14-card .ac14-card__body { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 24px; row-gap: 3px; align-content: center; justify-items: start; padding: 8px 14px; }
    .woocommerce ul.products.ac14-vista-lista li.ac14-card .ac14-card__body > * { grid-column: 1; }
    .woocommerce ul.products.ac14-vista-lista li.ac14-card .ac14-card__body > .ac14-card__precios { grid-column: 2; grid-row: 1 / span 3; align-self: center; justify-self: end; justify-content: flex-end; text-align: right; white-space: nowrap; margin-top: 0; }
    .woocommerce ul.products.ac14-vista-lista li.ac14-card .ac14-card__body > .ac14-tiers { grid-column: 2; grid-row: 4; justify-self: end; min-width: 190px; }
    .woocommerce ul.products.ac14-vista-lista li.ac14-card .ac14-card__precios .ac14-envase-linea { border-top: 0; padding-top: 0; justify-content: flex-end; }
    .woocommerce ul.products.ac14-vista-lista li.ac14-card .ac14-card__action { flex: 0 0 230px; }
}
/* Logo de marca de la lista: oculto en cuadrícula y en móvil (ahí va sobre la imagen) */
.ac14-card__marca-lista { display: none; }

/* ── Tarjeta (cuadrícula): la foto pegada abajo, sin hueco inferior; el espacio sobrante queda arriba, donde van la marca y OFERTA ── */
.ac14-card__img { aspect-ratio: 1 / 0.8; }
.ac14-card__img > a { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: auto; height: auto; }
.ac14-card__img > a img.ac14-loop-img { width: 100%; height: 100%; padding: 0 6px 3px; object-fit: contain; object-position: center bottom; }

/* Cuadrícula: 30px de aire sobre la foto (para la marca y la etiqueta OFERTA), sin margen inferior */
.woocommerce-js ul.products:not(.ac14-vista-lista) li.product a img,
.woocommerce-page ul.products:not(.ac14-vista-lista) li.product a img { margin-top: 30px; margin-bottom: 0px; height: calc(100% - 30px); }

/* Producto destacado en la tienda: SIN marca visual por ahora (se quitó el borde amarillo y antes la estrella).
   La tarjeta conserva la clase .ac14-card--destacada por si se decide otra marca; los destacados siguen saliendo primero. */

/* Móvil (2 columnas): la cantidad con − / + no cabía en el 40% de una tarjeta estrecha y el número no se veía.
   Se apila: cantidad a todo el ancho, «Añadir» debajo y «Añadir a la lista» al final; todo con altura táctil. */
@media (max-width: 640px) {
    li.ac14-card .ac14-qty-row { flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 6px; }
    li.ac14-card .ac14-qty-wrap { flex: 0 0 auto; width: 100%; max-width: 100%; height: 38px; }
    li.ac14-card .ac14-qty-btn { width: 44px !important; font-size: 20px !important; }
    li.ac14-card .ac14-qty-input { font-size: 16px !important; font-weight: 700; }
    li.ac14-card .ac14-btn-carrito { flex: 0 0 auto; width: 100%; height: 38px; font-size: 14px; }
    li.ac14-card .ac14-btn-lista { height: auto; min-height: 34px; padding: 6px 8px; font-size: 12px; line-height: 1.2; }
}

/* Ficha de un producto descatalogado: aviso informativo en lugar del precio y la compra */
.ac14-ficha-descat { padding: 16px 18px; background: #f3f4f6; border: 1px solid #e5e7eb; border-left: 4px solid #6b7280; border-radius: 8px; }
.ac14-ficha-descat__t { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: #374151; }
.ac14-ficha-descat__t svg { flex-shrink: 0; color: #6b7280; }
.ac14-ficha-descat__p { margin: 8px 0 0; font-size: 13px; line-height: 1.5; color: #4b5563; }

/* =======================================================================
   PAGINACIÓN (tienda, categorías, búsqueda…) — color de acento de la web (rojo; verde para Ferrobox) y aire sobre ella
   ======================================================================= */
.woocommerce nav.woocommerce-pagination,
nav.woocommerce-pagination { margin: 32px 0 12px !important; padding: 0 !important; clear: both; text-align: left !important; }
.woocommerce nav.woocommerce-pagination ul,
nav.woocommerce-pagination ul.page-numbers { display: flex !important; flex-wrap: wrap; gap: 6px; justify-content: flex-start; margin: 0 !important; padding: 0 !important; border: 0 !important; list-style: none; }
.woocommerce nav.woocommerce-pagination ul li,
nav.woocommerce-pagination ul.page-numbers li { float: none !important; margin: 0 !important; border: 0 !important; overflow: visible !important; }
.woocommerce nav.woocommerce-pagination ul li a.page-numbers,
.woocommerce nav.woocommerce-pagination ul li span.page-numbers,
nav.woocommerce-pagination .page-numbers:not(ul) {
    display: inline-flex !important; align-items: center; justify-content: center; box-sizing: border-box;
    min-width: 42px; height: 42px; padding: 0 12px !important; margin: 0 !important;
    border: 1px solid var(--ac14-acento, #cf2e2e) !important; border-radius: 6px;
    background: #fff !important; color: var(--ac14-acento, #cf2e2e) !important;
    font-size: 14px; font-weight: 600; line-height: 1; text-decoration: none !important;
    transition: background .15s, color .15s;
}
.woocommerce nav.woocommerce-pagination ul li a.page-numbers:hover,
.woocommerce nav.woocommerce-pagination ul li a.page-numbers:focus-visible,
nav.woocommerce-pagination a.page-numbers:not(ul):hover { background: var(--ac14-acento, #cf2e2e) !important; color: #fff !important; }
.woocommerce nav.woocommerce-pagination ul li span.page-numbers.current,
nav.woocommerce-pagination .page-numbers.current:not(ul) { background: var(--ac14-acento, #cf2e2e) !important; color: #fff !important; }
.woocommerce nav.woocommerce-pagination ul li span.page-numbers.dots { border-color: transparent !important; background: transparent !important; color: #6b7280 !important; min-width: 24px; padding: 0 !important; }
@media (max-width: 768px) {
    .woocommerce nav.woocommerce-pagination, nav.woocommerce-pagination { margin: 26px 0 16px !important; }
    .woocommerce nav.woocommerce-pagination ul { gap: 5px; justify-content: center; }
    .woocommerce nav.woocommerce-pagination ul li a.page-numbers,
    .woocommerce nav.woocommerce-pagination ul li span.page-numbers { min-width: 38px; height: 38px; padding: 0 9px !important; font-size: 13px; }
}

/* =======================================================================
   TARJETA DE PRODUCTO · MÓVIL (≤768px) — más compacta
   Cuadrícula = «Boceto A»: SKU sobre la foto, marca arriba a la derecha, título 2 líneas, precio en 1 línea
   y fila de acción [lista][− 1 +][carrito] con iconos. Lista = «Boceto C»: foto 78px a la izquierda y
   línea «SKU · categoría · marca». En escritorio no cambia nada.
   ======================================================================= */
.ac14-card__sku-img { display: none; }
@media (max-width: 768px) {
    /* ── Común (cuadrícula y lista) ── */
    .woocommerce ul.products li.ac14-card .ac14-sku-ean .ac14-badge--ean,
    .woocommerce ul.products li.ac14-card .ac14-card__ref,
    .woocommerce ul.products li.ac14-card .ac14-card__meta,
    .woocommerce ul.products li.ac14-card .ac14-envase-linea.ac14-env-uno { display: none !important; }
    .woocommerce ul.products li.ac14-card .ac14-card__body { padding: 7px 8px 4px; gap: 3px; }
    .woocommerce ul.products li.ac14-card a.ac14-card__nombre { font-size: 13px; line-height: 1.28; -webkit-line-clamp: 2; }
    .woocommerce ul.products li.ac14-card .ac14-card__precios { margin-top: 1px; row-gap: 1px; column-gap: 6px; }
    .woocommerce ul.products li.ac14-card .ac14-card__precios .ac14-pr-main { font-size: 17px; line-height: 1.15; }
    .woocommerce ul.products li.ac14-card .ac14-card__precios .ac14-precio-tachado, .woocommerce ul.products li.ac14-card .ac14-card__precios .ac14-precio-tachado .ac14-pr-main { font-size: 12px; }
    .woocommerce ul.products li.ac14-card .ac14-card__precios .ac14-pr-iva,
    .woocommerce ul.products li.ac14-card .ac14-card__precios .ac14-pr-pvpr,
    .woocommerce ul.products li.ac14-card .ac14-card__precios .ac14-precio-siniva { font-size: 10.5px; line-height: 1.25; }
    .woocommerce ul.products li.ac14-card .ac14-card__precios .ac14-envase-linea { margin: 2px 0 0; padding-top: 4px; font-size: 11px; }
    .woocommerce ul.products li.ac14-card .ac14-semaforo { padding: 0 8px 3px; margin: 0; font-size: 11px; line-height: 1.2; }
    .woocommerce ul.products li.ac14-card .ac14-tiers { font-size: 12px; margin: 4px 0; }
    .woocommerce ul.products li.ac14-card .ac14-tier { min-height: 36px; padding: 6px 8px; }

    /* Fila de acción: [lista][− 1 +][carrito]; los textos se ocultan y quedan los iconos */
    .woocommerce ul.products li.ac14-card .ac14-card__action { padding: 6px 8px 8px; }
    .woocommerce ul.products li.ac14-card .ac14-card__action:has(> .ac14-qty-row) { flex-direction: row; align-items: center; gap: 4px; }
    .woocommerce ul.products li.ac14-card .ac14-qty-row { display: contents; }
    .woocommerce ul.products li.ac14-card .ac14-btn-lista { order: 1; flex: 0 0 34px; width: 34px; height: 36px; min-height: 0; padding: 0; font-size: 0; gap: 0; border-radius: 6px; }
    .woocommerce ul.products li.ac14-card .ac14-qty-wrap { order: 2; flex: 0 0 auto; width: auto; max-width: none; height: 36px; gap: 0; }
    .woocommerce ul.products li.ac14-card .ac14-btn-carrito { order: 3; flex: 1 1 0; min-width: 36px; width: auto; height: 36px; padding: 0; font-size: 0; gap: 0; border-radius: 6px; }
    .woocommerce ul.products li.ac14-card .ac14-btn-lista svg { width: 17px; height: 17px; }
    .woocommerce ul.products li.ac14-card .ac14-btn-carrito svg { width: 20px; height: 20px; }
    .woocommerce ul.products li.ac14-card .ac14-qty-btn { width: 22px !important; font-size: 16px !important; padding: 0 !important; }
    .woocommerce ul.products li.ac14-card .ac14-qty-input { width: 28px !important; min-width: 0; font-size: 14px !important; font-weight: 700; padding: 0 !important; }
    /* Avisos de «sin stock»: una línea corta */
    .woocommerce ul.products li.ac14-card .ac14-card__action .ac14-consultar-stock { font-size: 11px; line-height: 1.25; }
    .woocommerce ul.products li.ac14-card .ac14-card__action .ac14-consultar-stock { padding: 6px 8px; }
    .woocommerce ul.products li.ac14-card .ac14-card__action .ac14av-btn { font-size: 11.5px; padding: 7px 8px; line-height: 1.2; }

    /* Etiquetas sobre la foto más pequeñas */
    .woocommerce ul.products li.ac14-card .ac14-etq--oferta, .woocommerce ul.products li.ac14-card .ac14-etq--star { width: 36px; height: 36px; }
    .woocommerce ul.products li.ac14-card .ac14-etq--oferta svg { width: 30px; height: 34px; }
    .woocommerce ul.products li.ac14-card .ac14-etq--oferta img { width: 36px; height: 36px; }
    .woocommerce ul.products li.ac14-card .ac14-card__etiquetas { top: 5px; left: 5px; }
    .woocommerce ul.products li.ac14-card .ac14-label--promo-img { top: 5px; left: 5px; }
    .woocommerce ul.products li.ac14-card .ac14-label--promo-img img { max-height: 44px !important; max-width: 80px !important; }
    .woocommerce ul.products li.ac14-card .ac14-card__etiquetas ~ .ac14-label--promo-img,
    .woocommerce ul.products li.ac14-card .ac14-card__etiquetas ~ a .ac14-label--promo-img { top: 44px; }

    /* ── Cuadrícula (Boceto A) ── */
    .woocommerce ul.products:not(.ac14-vista-lista) li.ac14-card .ac14-card__img { aspect-ratio: 1 / 0.74; }
    .woocommerce-js ul.products:not(.ac14-vista-lista) li.product a img,
    .woocommerce-page ul.products:not(.ac14-vista-lista) li.product a img { margin-top: 14px; height: calc(100% - 14px); }
    .woocommerce ul.products:not(.ac14-vista-lista) li.ac14-card .ac14-card__marca { top: 5px; right: 5px; padding: 2px 4px; }
    .woocommerce ul.products:not(.ac14-vista-lista) li.ac14-card .ac14-card__marca img { max-height: 28px; max-width: 84px; }
    .woocommerce ul.products:not(.ac14-vista-lista) li.ac14-card .ac14-sku-ean { display: none; }
    .woocommerce ul.products:not(.ac14-vista-lista) li.ac14-card .ac14-card__cat { display: none; }
    .woocommerce ul.products:not(.ac14-vista-lista) li.ac14-card .ac14-card__sku-img { display: block; position: absolute; left: 5px; bottom: 5px; z-index: 10; background: var(--ac14-acento, #cf2e2e); color: #fff; font-size: 10px; font-weight: 700; line-height: 1; padding: 3px 6px; border-radius: 4px; letter-spacing: .02em; }

    /* ── Lista (Boceto D, 2026-11-16) ──────────────────────────────────────────────
       Columna izquierda ancha [1 promo/oferta · 2 logo de marca] sobre [3 foto]; columna derecha [4 info] y [5 acción].
       La foto/etiquetas/marca viven dentro de .ac14-card__img, que aquí es una mini-rejilla. */
    .woocommerce ul.products.ac14-vista-lista li.ac14-card { display: grid !important; grid-template-columns: 124px minmax(0, 1fr); grid-template-rows: auto auto 1fr; align-items: start; }
    .woocommerce ul.products.ac14-vista-lista li.ac14-card .ac14-card__img { grid-column: 1; grid-row: 1 / span 3; display: grid; grid-template-columns: auto auto minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); align-items: center; width: auto; flex: none; aspect-ratio: auto; height: auto; min-height: 118px; margin: 8px 0 8px 8px; align-self: stretch; }
    /* 1 · icono de oferta / promoción (arriba a la izquierda) */
    .woocommerce ul.products.ac14-vista-lista li.ac14-card .ac14-card__etiquetas { position: static; grid-column: 1; grid-row: 1; transform: none; margin: 0 2px 0 0; }
    .woocommerce ul.products.ac14-vista-lista li.ac14-card .ac14-etq--oferta, .woocommerce ul.products.ac14-vista-lista li.ac14-card .ac14-etq--star { width: 32px; height: 32px; }
    .woocommerce ul.products.ac14-vista-lista li.ac14-card .ac14-etq--oferta svg { width: 27px; height: 30px; }
    .woocommerce ul.products.ac14-vista-lista li.ac14-card .ac14-etq--oferta img { width: 32px; height: 32px; }
    .woocommerce ul.products.ac14-vista-lista li.ac14-card .ac14-label--promo-img { position: static; grid-column: 2; grid-row: 1; margin-right: 2px; }
    .woocommerce ul.products.ac14-vista-lista li.ac14-card .ac14-label--promo-img img { max-height: 36px !important; max-width: 70px !important; }
    /* 2 · logo de marca (arriba a la derecha de la columna) */
    .woocommerce ul.products.ac14-vista-lista li.ac14-card .ac14-card__img .ac14-card__marca { display: block; position: static; grid-column: 3; grid-row: 1; justify-self: end; align-self: center; margin: 0 0 0 4px; padding: 2px 4px; }
    .woocommerce ul.products.ac14-vista-lista li.ac14-card .ac14-card__img .ac14-card__marca img { max-height: 28px; max-width: 76px; }
    .woocommerce ul.products.ac14-vista-lista li.ac14-card .ac14-card__marca-lista, .woocommerce ul.products.ac14-vista-lista li.ac14-card .ac14-card__sku-img { display: none; }
    /* 3 · foto (más ancha y alta; rellena el resto de la columna) */
    .woocommerce ul.products.ac14-vista-lista li.ac14-card .ac14-card__img > a:not(.ac14-label--promo-img) { position: relative; inset: auto; grid-column: 1 / -1; grid-row: 2; width: 100%; height: 100%; min-height: 84px; }
    .woocommerce ul.products.ac14-vista-lista li.ac14-card .ac14-card__img img.ac14-loop-img { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 2px; object-fit: contain; object-position: center; }
    /* 4 · info y 5 · acción (columna derecha) */
    .woocommerce ul.products.ac14-vista-lista li.ac14-card .ac14-card__body { grid-column: 2; grid-row: 1; display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; text-align: left; column-gap: 6px; row-gap: 2px; padding: 7px 8px 2px 10px; }
    .woocommerce ul.products.ac14-vista-lista li.ac14-card .ac14-card__body > * { grid-column: auto; grid-row: auto; }
    .woocommerce ul.products.ac14-vista-lista li.ac14-card .ac14-sku-ean { display: contents; }
    .woocommerce ul.products.ac14-vista-lista li.ac14-card .ac14-badge--sku { font-size: 10px; padding: 2px 5px; }
    .woocommerce ul.products.ac14-vista-lista li.ac14-card .ac14-card__cat { flex: 0 1 auto; min-width: 0; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .woocommerce ul.products.ac14-vista-lista li.ac14-card a.ac14-card__nombre { flex: 0 0 100%; }
    .woocommerce ul.products.ac14-vista-lista li.ac14-card .ac14-card__body > .ac14-card__precios { flex: 0 0 100%; justify-content: flex-start; align-self: auto; }
    .woocommerce ul.products.ac14-vista-lista li.ac14-card .ac14-card__body > .ac14-tiers { flex: 0 0 100%; min-width: 0; justify-self: auto; }
    .woocommerce ul.products.ac14-vista-lista li.ac14-card .ac14-semaforo { grid-column: 2; grid-row: 2; padding: 0 8px 2px 10px; }
    .woocommerce ul.products.ac14-vista-lista li.ac14-card .ac14-card__action { grid-column: 2; grid-row: 3; flex: none; border-top: 0; padding: 4px 8px 8px 10px; }
}

/* =======================================================================
   ESCÁNER «LEER CÓDIGOS» (móvil / tablet): cámara a pantalla completa con marco, botón verde
   y lista de códigos leídos en un panel pegado abajo (70 % de la pantalla, sin márgenes, esquinas redondeadas solo arriba)
   ======================================================================= */
.ac14-search-scan-modal.ac14-scan--lista { background: #000; align-items: stretch; justify-content: stretch; }
.ac14-scan--lista .ac14-search-scan-box { width: 100vw; height: 100vh; height: 100dvh; border-radius: 0; }
.ac14-scan--lista #ac14-search-scan-video { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; }
.ac14-scan--lista .ac14-search-scan-msg { top: 16px; left: 14px; right: 70px; text-align: left; font-size: 14px; font-weight: 600; z-index: 3; }

/* Marco de lectura: lo de fuera se ignora; se pone verde mientras lee */
.ac14-scan-marco { position: absolute; left: 50%; top: 38%; width: 88%; height: 30%; max-width: 520px; transform: translate(-50%, -50%); border: 3px solid #fff; border-radius: 14px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); z-index: 2; pointer-events: none; transition: border-color .15s, box-shadow .15s; }
.ac14-scan-marco[hidden] { display: none; }
.ac14-scan-marco.leyendo { border-color: #22c55e; box-shadow: 0 0 0 100vmax rgba(0,0,0,.45), 0 0 18px 2px rgba(34,197,94,.7) inset; }

/* Barra inferior: estado + botón grande «Leer códigos» */
.ac14-scan-barra { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 14px 16px calc(18px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,0)); display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.ac14-scan-barra[hidden] { display: none; }
.ac14-scan-estado { color: #fff; font-size: 14px; text-align: center; min-height: 20px; text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.ac14-scan-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 8px; }
.ac14-scan-chips span { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; background: rgba(34,197,94,.9); color: #fff; padding: 3px 8px; border-radius: 6px; }
.ac14-scan-leer { height: 58px; border: 0 !important; border-radius: 14px !important; background: #1D9E75 !important; color: #fff !important; font-size: 18px !important; font-weight: 700 !important; letter-spacing: .01em; box-shadow: 0 4px 14px rgba(0,0,0,.35); cursor: pointer; }
.ac14-scan-leer:hover, .ac14-scan-leer:focus { background: #178a66 !important; color: #fff !important; }
.ac14-scan-leer:disabled { opacity: .7; cursor: default; }

/* Panel de resultados */
.ac14-scan-panel { position: absolute; left: 0; right: 0; bottom: 0; height: 70vh; height: 70dvh; background: #f4f5f7; border-radius: 16px 16px 0 0; z-index: 4; display: flex; flex-direction: column; box-shadow: 0 -6px 24px rgba(0,0,0,.35); }
.ac14-scan-panel[hidden] { display: none; }
.ac14-scan-panel__cab { flex: 0 0 auto; padding: 14px 16px 10px; font-size: 16px; font-weight: 700; color: #1a1a1a; background: #fff; border-radius: 16px 16px 0 0; border-bottom: 1px solid #e5e7eb; }
.ac14-scan-lista { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 10px 10px 14px; display: flex; flex-direction: column; gap: 10px; }
.ac14-scan-panel__pie { flex: 0 0 auto; display: flex; gap: 8px; align-items: center; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); background: #fff; border-top: 1px solid #e5e7eb; }
.ac14-scan-x, .ac14-scan-carrito { flex: 0 0 48px; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border: 1px solid #d5d8dd !important; border-radius: 12px !important; background: #fff !important; color: #1a1a1a !important; padding: 0 !important; text-decoration: none; cursor: pointer; }
.ac14-scan-releer { flex: 1 1 auto; height: 48px; border: 0 !important; border-radius: 12px !important; background: #1D9E75 !important; color: #fff !important; font-size: 16px !important; font-weight: 700 !important; cursor: pointer; }
.ac14-scan-releer:hover, .ac14-scan-releer:focus { background: #178a66 !important; color: #fff !important; }
.ac14-scan-x:hover, .ac14-scan-carrito:hover { background: #eceff1 !important; color: #1a1a1a !important; }

/* Tarjeta de cada código */
.ac14-scan-item { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 10px 12px; }
.ac14-scan-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; font-weight: 700; color: #444; letter-spacing: .03em; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px dashed #e5e7eb; }
.ac14-scan-buscando { color: #888; font-size: 13px; }
.ac14-scan-aviso { display: inline-block; font-size: 13px; color: #92400e; background: #fef3c7; border-radius: 8px; padding: 6px 10px; }
.ac14-scan-aviso--err { color: #991b1b; background: #fee2e2; }
.ac14-scan-enlace { display: inline-block; margin-left: 6px; font-size: 13px; font-weight: 700; color: var(--ac14-acento, #cf2e2e); text-decoration: underline; }
.ac14-scan-prod { display: flex; gap: 10px; align-items: flex-start; }
.ac14-scan-prod__img { flex: 0 0 62px; width: 62px; height: 62px; display: block; background: #fff; border: 1px solid #eee; border-radius: 8px; overflow: hidden; }
.ac14-scan-prod__img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ac14-scan-prod__info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.ac14-scan-sku { font-size: 11px; font-weight: 700; color: #fff; background: var(--ac14-acento, #cf2e2e); border-radius: 4px; padding: 2px 6px; line-height: 1.2; }
.ac14-scan-nombre { font-size: 14px; font-weight: 600; line-height: 1.25; color: #1a1a1a; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ac14-scan-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.ac14-scan-precio { font-size: 17px; font-weight: 700; color: var(--ac14-acento, #cf2e2e); }
.ac14-scan-sem { font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.ac14-scan-sem i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.ac14-scan-sem--verde { color: #16a34a; } .ac14-scan-sem--verde i { background: #22c55e; }
.ac14-scan-sem--amarillo { color: #d97706; } .ac14-scan-sem--amarillo i { background: #f59e0b; }
.ac14-scan-sem--rojo { color: #cf2e2e; } .ac14-scan-sem--rojo i { background: #cf2e2e; }
.ac14-scan-sem--gris { color: #6b7280; } .ac14-scan-sem--gris i { background: #9ca3af; }
.ac14-scan-compra { display: flex; gap: 8px; margin-top: 10px; align-items: center; }
.ac14-scan-qty { display: flex; align-items: center; flex: 0 0 auto; height: 44px; border: 1px solid #d5d8dd; border-radius: 10px; overflow: hidden; background: #fff; }
.ac14-scan-qty button { width: 38px; height: 100%; border: 0 !important; border-radius: 0 !important; background: #f0f1f3 !important; color: #1a1a1a !important; font-size: 20px !important; padding: 0 !important; cursor: pointer; }
.ac14-scan-qty button:hover { background: #e2e5e9 !important; }
.ac14-scan-qty input { width: 48px; height: 100%; border: 0 !important; text-align: center; font-size: 16px; font-weight: 700; padding: 0 !important; background: #fff !important; -moz-appearance: textfield; appearance: textfield; }
.ac14-scan-qty input::-webkit-outer-spin-button, .ac14-scan-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ac14-scan-add { flex: 1 1 auto; height: 44px; border: 0 !important; border-radius: 10px !important; background: #1D9E75 !important; color: #fff !important; font-size: 15px !important; font-weight: 700 !important; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 10px !important; cursor: pointer; }
.ac14-scan-add:hover, .ac14-scan-add:focus { background: #178a66 !important; color: #fff !important; }
.ac14-scan-add.hecho { background: #0f6e56 !important; }
.ac14-scan-add:disabled { opacity: .8; cursor: default; }
.ac14-scan-msg-compra { font-size: 12px; color: #4b5563; margin-top: 6px; min-height: 0; }
.ac14-scan-msg-compra:empty { display: none; }
.ac14-scan-msg-compra.err { color: #991b1b; }
.ac14-scan--lista .ac14-search-scan-close { z-index: 6; }

/* Tienda móvil: con la barra de iconos (ac14-filtros) el botón «Filtros» suelto de arriba sobra */
@media (max-width: 767px) {
    .ac14-tienda-main.ac14-main--con-barra > .ac14-filtros-toggle { display: none !important; }
}

/* =======================================================================
   MI CUENTA · hoja desplegable desde la barra inferior (móvil ≤768px)
   Es el mismo panel #ac14-cuenta-drop del escritorio (menús + interruptores), pegado encima de la barra.
   ======================================================================= */
.ac14-cuenta-drop-mhead { display: none; }
@media (max-width: 768px) {
    #ac14-header .ac14-cuenta-drop.active {
        position: fixed;
        left: 0; right: 0;
        bottom: calc(var(--ac14-m-bar) + env(safe-area-inset-bottom, 0px));
        width: auto;
        max-height: 78vh; max-height: 78dvh;
        display: flex !important;
        flex-direction: column;
        border-top: 0;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 0 0 100vmax rgba(0,0,0,.4), 0 -6px 24px rgba(0,0,0,.2);
        z-index: 1090;
        overflow: hidden;
    }
    .ac14-cuenta-drop-mhead {
        flex: 0 0 auto;
        display: flex; align-items: center; gap: 10px;
        padding: 14px 14px 12px 14px;
        background: #fff;
        border-bottom: 1px solid #e5e7eb;
    }
    /* Acceso a Mi cuenta: avatar + nombre + «Ir a mi cuenta ›» */
    .ac14-cuenta-drop-mperfil {
        flex: 1 1 auto; min-width: 0;
        display: flex; align-items: center; gap: 12px;
        padding: 8px 10px 8px 8px; border-radius: 14px;
        background: #f4f5f7; color: #1a1a1a !important; text-decoration: none !important;
    }
    .ac14-cuenta-drop-mperfil:active { background: #eceef1; }
    .ac14-cuenta-drop-mavatar {
        flex: 0 0 42px; width: 42px; height: 42px; border-radius: 50%;
        display: flex; align-items: center; justify-content: center;
        background: var(--ac14-acento, #cf2e2e); color: #fff;
        font-family: var(--ac14-f-titulo, inherit); font-size: 15px; font-weight: 700; letter-spacing: .02em;
    }
    .ac14-cuenta-drop-mtxt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
    .ac14-cuenta-drop-mnombre { font-size: 15px; font-weight: 700; line-height: 1.25; color: #1a1a1a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .ac14-cuenta-drop-mver { font-size: 12.5px; font-weight: 600; line-height: 1.25; color: var(--ac14-acento, #cf2e2e); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .ac14-cuenta-drop-mflecha { flex: 0 0 auto; color: #9aa0a8; }
    .ac14-cuenta-drop-mcerrar {
        flex: 0 0 38px; width: 38px; height: 38px; padding: 0 !important;
        display: flex; align-items: center; justify-content: center;
        border: 1px solid #d5d8dd !important; border-radius: 10px !important;
        background: #fff !important; color: #1a1a1a !important; cursor: pointer;
    }
    #ac14-header .ac14-cuenta-drop.active .ac14-cuenta-drop-content {
        flex: 1 1 auto; min-height: 0;
        max-height: none;
        overflow-y: auto; -webkit-overflow-scrolling: touch;
        padding: 12px 14px 16px;
    }
    #ac14-header .ac14-cuenta-drop.active .ac14-cuenta-drop-empty { padding: 20px 16px; }
    /* El contenido de Elementor no debe desbordar la hoja */
    #ac14-header .ac14-cuenta-drop-content .elementor-section,
    #ac14-header .ac14-cuenta-drop-content .e-con { max-width: 100%; }
    body.ac14-m-cuenta-abierta { overflow: hidden; }
}
@media (max-width: 768px) {
    /* Contenido de la hoja con formato móvil: interruptores arriba, menús en tarjetas de lista, «Cerrar sesión» al final */
    #ac14-header .ac14-cuenta-drop.active { background: #f4f5f7; }
    #ac14-header .ac14-cuenta-drop.active .ac14-cuenta-drop-content { background: #f4f5f7; padding: 14px 14px 18px; }
    #ac14-header .ac14-cuenta-drop-content > .elementor { display: flex; flex-direction: column; gap: 12px; }
    #ac14-header .ac14-cuenta-drop-content .e-parent:not(.e-grid) { display: contents; }

    /* Interruptores (PVPR, precios, IVA): una fila por interruptor, arriba del todo */
    #ac14-header .ac14-cuenta-drop-content .elementor-widget:has(.ac14-toggle) { order: -1; margin: 0 !important; width: 100%; }
    #ac14-header .ac14-cuenta-drop-content .elementor-widget:has(.ac14-toggle) + .elementor-widget:has(.ac14-toggle) { margin-top: -4px !important; }
    #ac14-header .ac14-cuenta-drop-content .ac14-toggle {
        display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
        min-height: 52px; padding: 8px 16px; box-sizing: border-box;
        background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
    }
    #ac14-header .ac14-cuenta-drop-content .ac14-toggle__label { order: 1; flex: 1 1 auto; font-size: 15px; font-weight: 600; color: #1a1a1a; white-space: normal; }
    #ac14-header .ac14-cuenta-drop-content .ac14-pvp-margen-wrap { order: 2; }
    #ac14-header .ac14-cuenta-drop-content .ac14-toggle__btn { order: 3; }
    #ac14-header .ac14-cuenta-drop-content .ac14-toggle__track { width: 48px; height: 28px; border-radius: 14px; }
    #ac14-header .ac14-cuenta-drop-content .ac14-toggle__thumb { top: 3px; left: 3px; width: 22px; height: 22px; }
    #ac14-header .ac14-cuenta-drop-content .ac14-toggle__btn.active .ac14-toggle__thumb { transform: translateX(20px); }

    /* Menús: cada columna = una tarjeta con su título y filas de 48px con flecha */
    #ac14-header .ac14-cuenta-drop-content .e-grid { display: flex !important; flex-direction: column; gap: 12px !important; padding: 0 !important; margin: 0 !important; }
    #ac14-header .ac14-cuenta-drop-content .e-grid > .e-con {
        width: 100% !important; min-width: 0; padding: 0 !important; margin: 0 !important;
        background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; overflow: hidden;
    }
    #ac14-header .ac14-cuenta-drop-content .e-grid > .e-con:not(:has(li)) { display: none !important; }
    #ac14-header .ac14-cuenta-drop-content .e-grid .elementor-widget { margin: 0 !important; }
    #ac14-header .ac14-cuenta-drop-content .ac14-cuenta-menu { margin: 0 !important; padding: 0 !important; list-style: none; }
    #ac14-header .ac14-cuenta-drop-content .ac14-cuenta-menu li { margin: 0 !important; }
    #ac14-header .ac14-cuenta-drop-content .ac14-cuenta-menu a {
        display: flex; align-items: center; gap: 12px;
        min-height: 48px; padding: 12px 16px; box-sizing: border-box;
        font-size: 15px; font-weight: 500; line-height: 1.25; color: #1a1a1a;
        border-top: 1px solid #f0f1f3;
    }
    #ac14-header .ac14-cuenta-drop-content .ac14-cuenta-menu a:active { background: #f4f5f7; }
    #ac14-header .ac14-cuenta-drop-content .ac14-cuenta-menu li:first-child > a { border-top: 0; }
    #ac14-header .ac14-cuenta-drop-content .ac14-cuenta-menu a::after {
        content: ""; flex: 0 0 16px; width: 16px; height: 16px; margin-left: auto; background-color: #b4b9c0;
        -webkit-mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='9 18 15 12 9 6'/></svg>") center / contain no-repeat;
        mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='9 18 15 12 9 6'/></svg>") center / contain no-repeat;
    }
    /* Título de bloque: pequeño, en mayúsculas, sin flecha */
    #ac14-header .ac14-cuenta-drop-content .ac14-cuenta-menu .ac14-menu-titulo > a {
        min-height: 0; padding: 12px 16px 6px; border-top: 0;
        font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #7a8089;
    }
    #ac14-header .ac14-cuenta-drop-content .ac14-cuenta-menu .ac14-menu-titulo > a::after { display: none; }
    #ac14-header .ac14-cuenta-drop-content .ac14-cuenta-menu .ac14-menu-titulo + li > a { border-top: 0; }
    #ac14-header .ac14-cuenta-drop-content .ac14-cuenta-menu [class*="ac14-ico-"] > a { font-weight: 500; }

    /* Cerrar sesión: botón a todo el ancho, al final */
    #ac14-header .ac14-cuenta-drop-content .elementor-widget:has(.ac14-logout-btn) { order: 9; margin: 0 !important; }
    #ac14-header .ac14-cuenta-drop-content .ac14-logout-btn {
        display: flex; justify-content: center; gap: 8px; width: 100%; box-sizing: border-box;
        min-height: 48px; padding: 12px 16px; font-size: 15px; font-weight: 600; color: #cf2e2e; background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
    }
}
