.ozs--wc-categories {
    --ozs-cat-surface: transparent;
    --ozs-cat-border: #14527d;
    --ozs-cat-title: #14527d;
    --ozs-cat-active-bg: #003a60;
    --ozs-cat-active-accent: #f99f00;
    --ozs-cat-card-bg: #ffffff;
    --ozs-cat-shadow: 0 8px 24px rgba(0, 33, 61, 0.06);
    background: var(--ozs-cat-surface);
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    overflow: visible;
}

.ozs--wc-categories .ozs__header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0 0 20px;
    margin-bottom: 24px;
    gap: 12px;
    flex-wrap: nowrap;
}

.ozs--wc-categories .ozs__header-text {
    position: relative;
    padding-left: 20px;
    flex: 1 1 auto;
    min-width: 0;
}

.ozs--wc-categories .ozs__header-text::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 0;
    width: 6px;
    height: calc(100% - 8px);
    background: var(--ozs-cat-active-accent);
    box-shadow: 6px 0 0 var(--ozs-cat-title);
    border-radius: 0;
}

.ozs--wc-categories .ozs__title {
    margin: 0;
    font-size: clamp(1.6rem, 1.8vw, 2.2rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--ozs-cat-title);
    letter-spacing: -0.01em;
}

.ozs--wc-categories .ozs__title::after {
    display: none;
}

.ozs--wc-categories .ozs__subtitle {
    margin: 4px 0 0;
    font-size: 1.05rem;
    line-height: 1.25;
    color: #202020;
}

.ozs--wc-categories .ozs__viewport {
    overflow: hidden;
}

.ozs--wc-categories .ozs__track {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    grid-auto-columns: calc((100% - (var(--ozs-gap, 18px) * (var(--ozs-cols, 6) - 1))) / var(--ozs-cols, 6));
    gap: var(--ozs-gap, 18px);
    align-items: stretch;
    padding: 0;
}

.ozs--wc-categories .ozs__slide {
    min-width: 0;
    scroll-snap-align: start;
}

.ozs--wc-categories .ozs__dots {
    display: none !important;
}

.ozs--wc-categories .ozs-wc-cat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 164px;
    height: 100%;
    padding: 20px 16px 16px;
    background: var(--ozs-cat-card-bg);
    border: 1px solid var(--ozs-cat-border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--ozs-cat-title);
    box-sizing: border-box;
    transition: transform 220ms ease, background 220ms ease, color 220ms ease, box-shadow 220ms ease;
}

.ozs--wc-categories .ozs-wc-cat:hover,
.ozs--wc-categories .ozs-wc-cat:focus-visible,
.ozs--wc-categories .ozs-wc-cat.is-current {
    background: var(--ozs-cat-active-bg);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: var(--ozs-cat-shadow);
    outline: none;
}

.ozs--wc-categories .ozs-wc-cat__icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 68px;
    margin-bottom: 12px;
}

.ozs--wc-categories .ozs-wc-cat__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(80px, 80%);
    max-width: 80px;
    height: 68px;
}

.ozs--wc-categories .ozs-wc-cat__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 220ms ease, filter 220ms ease, opacity 220ms ease;
}

.ozs--wc-categories .ozs-wc-cat:hover .ozs-wc-cat__img,
.ozs--wc-categories .ozs-wc-cat:focus-visible .ozs-wc-cat__img,
.ozs--wc-categories .ozs-wc-cat.is-current .ozs-wc-cat__img {
    transform: scale(1.03);
    filter: brightness(0) saturate(100%) invert(67%) sepia(74%) saturate(2222%) hue-rotate(1deg) brightness(104%) contrast(104%);
}

.ozs--wc-categories .ozs-wc-cat__placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: var(--ozs-cat-border);
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1;
}

.ozs--wc-categories .ozs-wc-cat:hover .ozs-wc-cat__placeholder,
.ozs--wc-categories .ozs-wc-cat:focus-visible .ozs-wc-cat__placeholder,
.ozs--wc-categories .ozs-wc-cat.is-current .ozs-wc-cat__placeholder {
    background: rgba(255, 255, 255, 0.15);
    color: var(--ozs-cat-active-accent);
}

.ozs--wc-categories .ozs-wc-cat__name {
    display: -webkit-box;
    max-width: 100%;
    min-height: 2.4em;
    margin: 0;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-wrap: balance;
    color: inherit;
}

.ozs--wc-categories .ozs-wc-cat__count {
    margin-top: 6px;
    font-size: 0.86rem;
    line-height: 1;
    color: inherit;
    opacity: 0.78;
}

@media (max-width: 1024px) {
    .ozs--wc-categories {
        padding: 0;
        margin: 0;
    }

    .ozs--wc-categories .ozs__header {
        margin-bottom: 20px;
    }

    .ozs--wc-categories .ozs-wc-cat {
        min-height: clamp(140px, 15vw, 152px);
        padding: 18px 14px 14px;
    }
}

@media (max-width: 768px) {
    .ozs--wc-categories {
        padding: 0;
        margin: 0;
    }

    .ozs--wc-categories .ozs__header {
        align-items: center;
        gap: 12px;
        margin-bottom: 18px;
    }

    .ozs--wc-categories .ozs__header-text {
        padding-left: 16px;
    }

    .ozs--wc-categories .ozs__header-text::before {
        width: 5px;
        height: calc(100% - 6px);
        box-shadow: 5px 0 0 var(--ozs-cat-title);
    }

    .ozs--wc-categories .ozs__title {
        font-size: clamp(1.4rem, 4.5vw, 1.8rem);
    }

    .ozs--wc-categories .ozs__subtitle {
        font-size: clamp(0.9rem, 2.5vw, 1rem);
        margin-top: 2px;
    }

    .ozs--wc-categories .ozs-wc-cat {
        min-height: 130px;
        padding: 16px 10px 12px;
        border-radius: 12px;
    }

    .ozs--wc-categories .ozs-wc-cat__icon-wrap {
        min-height: 56px;
        margin-bottom: 10px;
    }

    .ozs--wc-categories .ozs-wc-cat__icon {
        width: min(64px, 70%);
        height: 54px;
    }

    .ozs--wc-categories .ozs-wc-cat__placeholder {
        width: 54px;
        height: 54px;
        font-size: 1.4rem;
    }

    .ozs--wc-categories .ozs-wc-cat__name {
        font-size: clamp(0.85rem, 3vw, 0.94rem);
    }
}

@media (max-width: 414px) {
    .ozs--wc-categories .ozs-wc-cat {
        min-height: 120px;
        padding: 14px 8px 10px;
    }
    
    .ozs--wc-categories .ozs-wc-cat__name {
        font-size: clamp(0.8rem, 3.5vw, 0.88rem);
    }
}

@media (max-width: 375px) {
    .ozs--wc-categories .ozs__title {
        font-size: clamp(1.2rem, 5.5vw, 1.4rem);
    }
    
    .ozs--wc-categories .ozs-wc-cat__icon-wrap {
        min-height: 50px;
        margin-bottom: 8px;
    }
    
    .ozs--wc-categories .ozs-wc-cat__icon {
        width: min(56px, 75%);
        height: 48px;
    }
}

@media (max-width: 320px) {
    .ozs--wc-categories .ozs__title {
        font-size: 1.2rem;
    }
    .ozs--wc-categories .ozs__subtitle {
        font-size: 0.8rem;
    }
    .ozs--wc-categories .ozs-wc-cat__name {
        font-size: 0.78rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ozs--has-header:not(.ozs--banner) .ozs__nav-btn,
    .ozs--wc-categories .ozs-wc-cat,
    .ozs--wc-categories .ozs-wc-cat__img {
        transition: none;
    }
}

/* =========================================================================
   SKIN OSCURO "cat-grupesac" (opt-in) — tarjeta horizontal: texto a la
   izquierda (nombre + "Productos (N)") e imagen a la derecha, sobre fondo
   oscuro. Se activa agregando la clase personalizada "cat-grupesac" al
   slider (Admin del slider -> Avanzado -> Clase). Scopeado con la clase
   doble .ozs--wc-categories.cat-grupesac (especificidad 0,3,0) para vencer
   a las reglas base sin !important. No afecta a otros sliders.
   ========================================================================= */

/* Header: titulo centrado, bicolor (usa *asteriscos* en el titulo), sin la
   barra-acento lateral del tema claro. */
.ozs--wc-categories.cat-grupesac .ozs__header {
    justify-content: center;
    padding-bottom: 0;
    margin-bottom: 36px;
}
.ozs--wc-categories.cat-grupesac .ozs__header-text {
    flex: 0 1 auto;
    padding-left: 0;
    text-align: center;
}
.ozs--wc-categories.cat-grupesac .ozs__header-text::before {
    display: none;
}
.ozs--wc-categories.cat-grupesac .ozs__title {
    color: #ffffff;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.ozs--wc-categories.cat-grupesac .ozs__title-hl {
    color: #ff5a1f;
}

/* Tarjeta: grid de 2 columnas (texto | imagen) y 2 filas (nombre / conteo),
   con la imagen ocupando toda la columna derecha. */
/* Variante B: la imagen es FONDO de la mitad derecha (bleed a los bordes) y el
   texto va encima a la izquierda, sobre un degradado que lo mantiene legible. */
.ozs--wc-categories.cat-grupesac .ozs-wc-cat {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start; /* vence al align-items:center base: texto a la izquierda */
    overflow: hidden;
    min-height: 190px;
    padding: 22px 26px;
    background: #171717;
    border: 1px solid #2b2b2b;
    border-radius: 10px;
    color: #ffffff;
    text-align: left;
}

/* Imagen como fondo: ocupa el lado derecho, pegada a los bordes (bleed). */
.ozs--wc-categories.cat-grupesac .ozs-wc-cat__icon-wrap {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 62%;
    min-height: 0;
    margin: 0;
    display: block;
    z-index: 0;
}
.ozs--wc-categories.cat-grupesac .ozs-wc-cat__icon {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
}
.ozs--wc-categories.cat-grupesac .ozs-wc-cat__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: right center;
}

/* Degradado: oscuro a la izquierda -> transparente a la derecha. Encima de la
   imagen (z1) y debajo del texto (z2) para que el nombre se lea siempre. */
.ozs--wc-categories.cat-grupesac .ozs-wc-cat::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, #171717 30%, rgba(23, 23, 23, 0.8) 50%, rgba(23, 23, 23, 0) 76%);
    pointer-events: none;
}

.ozs--wc-categories.cat-grupesac .ozs-wc-cat__name {
    position: relative;
    z-index: 2;
    min-height: 0;
    margin: 0;
    max-width: 60%;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.15;
    text-align: left;
    color: #ffffff;
    -webkit-line-clamp: 2;
}

.ozs--wc-categories.cat-grupesac .ozs-wc-cat__count {
    position: relative;
    z-index: 2;
    margin: 6px 0 0;
    opacity: 1;
    color: #ff5a1f;
    font-size: 0.98rem;
    font-weight: 400;
}
.ozs--wc-categories.cat-grupesac .ozs-wc-cat__count::before {
    content: "Productos ";
}

/* Placeholder (categoria sin imagen) en variante oscura. */
.ozs--wc-categories.cat-grupesac .ozs-wc-cat__placeholder {
    background: #2b2b2b;
    color: #ff5a1f;
}

/* Hover/activo: borde naranja + leve elevacion + zoom sutil de la imagen. */
.ozs--wc-categories.cat-grupesac .ozs-wc-cat:hover,
.ozs--wc-categories.cat-grupesac .ozs-wc-cat:focus-visible,
.ozs--wc-categories.cat-grupesac .ozs-wc-cat.is-current {
    border-color: #ff5a1f;
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
}
.ozs--wc-categories.cat-grupesac .ozs-wc-cat:hover .ozs-wc-cat__name,
.ozs--wc-categories.cat-grupesac .ozs-wc-cat.is-current .ozs-wc-cat__name {
    color: #ffffff;
}
.ozs--wc-categories.cat-grupesac .ozs-wc-cat:hover .ozs-wc-cat__count,
.ozs--wc-categories.cat-grupesac .ozs-wc-cat.is-current .ozs-wc-cat__count {
    color: #ff5a1f;
}
.ozs--wc-categories.cat-grupesac .ozs-wc-cat:hover .ozs-wc-cat__img,
.ozs--wc-categories.cat-grupesac .ozs-wc-cat.is-current .ozs-wc-cat__img {
    transform: scale(1.04);
    filter: none;
}

@media (max-width: 768px) {
    .ozs--wc-categories.cat-grupesac .ozs-wc-cat {
        min-height: 132px;
        padding: 16px 18px;
    }
    /* Menos imagen en movil -> mas espacio para el texto (el nombre no se parte). */
    .ozs--wc-categories.cat-grupesac .ozs-wc-cat__icon-wrap {
        width: 44%;
    }
    .ozs--wc-categories.cat-grupesac .ozs-wc-cat__name {
        font-size: 1.02rem;
        max-width: 78%;
    }
    .ozs--wc-categories.cat-grupesac .ozs-wc-cat__count {
        font-size: 0.85rem;
    }
}

/* -------------------------------------------------------------------------
   FLECHAS A LOS LADOS (no arriba) y recoloreadas a marca.
   El prefijo html body .ozs.ozs--wc-categories.cat-grupesac (especificidad
   alta) vence a las reglas verdes !important del CSS base.
   ------------------------------------------------------------------------- */
/* Padding en el WRAPPER (no margin en el viewport): crea los canales laterales
   para las flechas SIN romper el carrusel. Con padding, el ancho de contenido
   = ancho del viewport, asi el JS y el grid concuerdan y la 3a card NO se
   corta. Las flechas (nav absoluto) caen en estos canales. */
.ozs--wc-categories.cat-grupesac {
    position: relative;
    padding-left: 80px !important;
    padding-right: 80px !important;
    /* La pista base trae padding lateral var(--ozs-peek, 60px). Con el "peek"
       apagado, el JS quita la variable y el CSS cae al fallback de 60px,
       dejando MEDIA card asomando en los bordes. Forzamos 0 = columnas
       siempre completas. (Si se activara el peek, el JS pone la var inline y
       gana, asi que esto no lo rompe.) */
    --ozs-peek: 0px;
}

/* Asegura el encaje a columnas completas tras arrastrar (las slides ya traen
   scroll-snap-align:start). El JS desactiva el snap durante el scroll
   programatico y lo restaura al terminar, asi que esto no estorba sus clics. */
html body .ozs.ozs--wc-categories.cat-grupesac .ozs__track {
    scroll-snap-type: x mandatory;
}

/* El contenedor de flechas pasa a ser una fila full-width centrada vertical
   sobre las cards; justify-content:space-between manda UNA flecha a cada
   extremo (prev a la izquierda, next a la derecha). Robusto: no depende de
   left/right por boton. El +22px compensa el alto del titulo de arriba para
   que el centro caiga sobre las cards, no sobre el bloque entero. */
html body .ozs.ozs--wc-categories.cat-grupesac > .ozs__nav {
    position: absolute !important;
    top: calc(50% + 22px);
    left: 0;
    right: 0;
    bottom: auto;
    transform: translateY(-50%);
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 0;
    pointer-events: none; /* deja pasar el clic a las cards; los botones lo reactivan */
    z-index: 6;
}

html body .ozs.ozs--wc-categories.cat-grupesac .ozs__nav-btn {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    margin: 0 !important;
    border-radius: 10px !important;
    pointer-events: auto;
}

/* Color de marca: oscuro con icono blanco; hover naranja (en vez del verde). */
html body .ozs.ozs--wc-categories.cat-grupesac .ozs__nav-btn--prev,
html body .ozs.ozs--wc-categories.cat-grupesac .ozs__nav-btn--next {
    background: #1c1c1c !important;
    border: 1px solid #ff5a1f !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45) !important;
}
html body .ozs.ozs--wc-categories.cat-grupesac .ozs__nav-btn:hover,
html body .ozs.ozs--wc-categories.cat-grupesac .ozs__nav-btn:focus-visible {
    background: #ff5a1f !important;
    transform: none !important;
}

/* Icono de la flecha en blanco (el verde lo dibujaba en oscuro). */
html body .ozs.ozs--wc-categories.cat-grupesac .ozs__nav-btn--prev::before,
html body .ozs.ozs--wc-categories.cat-grupesac .ozs__nav-btn--next::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M5 12h14M13 5l7 7-7 7' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}

/* Deshabilitado (no hay mas para desplazar): oscuro y atenuado. */
html body .ozs.ozs--wc-categories.cat-grupesac .ozs__nav-btn[disabled],
html body .ozs.ozs--wc-categories.cat-grupesac .ozs__nav-btn.is-disabled {
    background: #1c1c1c !important;
    border-color: #3a3a3a !important;
    opacity: 0.45 !important;
}

/* En movil: gutters mas chicos (no a ancho completo) para que las flechas
   queden A LOS LADOS, en sus canales, sin taparse encima de la card. */
@media (max-width: 768px) {
    .ozs--wc-categories.cat-grupesac {
        padding-left: 40px;
        padding-right: 40px;
    }
    html body .ozs.ozs--wc-categories.cat-grupesac .ozs__nav-btn {
        width: 34px !important;
        height: 34px !important;
    }
}
@media (max-width: 360px) {
    .ozs--wc-categories.cat-grupesac {
        padding-left: 34px;
        padding-right: 34px;
    }
}
