.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: 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;
}

/* Plantilla "2 filas" (design.template = 2rows -> clase ozs--layout-cat_2rows).
   Por defecto el track es de 1 fila; esta variante lo pasa a 2 filas. */
.ozs--wc-categories.ozs--layout-cat_2rows .ozs__track {
    grid-template-rows: repeat(2, minmax(0, 1fr));
}

.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;
    }
}

/* Cards de categorías: FOTO real a sangre con el nombre superpuesto abajo */
.ozs--wc-categories {
    --ozs-cat-navy: #0a2a4d;
    --ozs-cat-lime: #97BE13;
    --ozs-cat-lime-dark: #6f8e0d;
    --ozs-cat-name: #ffffff;
}

.ozs--wc-categories .ozs-wc-cat {
    display: block;
    height: 100%;
    text-decoration: none;
    color: inherit;
    min-height: 0;
    padding: 0;
    background: transparent;
    border: 0;
}

.ozs--wc-categories .ozs-wc-cat:hover,
.ozs--wc-categories .ozs-wc-cat:focus-visible,
.ozs--wc-categories .ozs-wc-cat.is-current {
    background: transparent;
    color: inherit;
    transform: none;
    box-shadow: none;
}

.ozs--wc-categories .ozs-wc-cat .ozs-card {
    position: relative;
    display: block;
    height: 100%;
    min-height: 100%;
    background: var(--ozs-cat-navy);
    border: 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: none;
    transition: transform 220ms ease, box-shadow 220ms ease;
}

.ozs--wc-categories .ozs-wc-cat:hover .ozs-card,
.ozs--wc-categories .ozs-wc-cat:focus-visible .ozs-card {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 33, 61, 0.18);
}

/* La foto de la categoría ocupa toda la tarjeta */
.ozs--wc-categories .ozs-wc-cat .ozs-card__media {
    position: relative;
    aspect-ratio: var(--ozs-ratio, var(--oz-ratio, 1 / 1));
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: var(--ozs-cat-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Mostrar la imagen real (foto) cubriendo el media */
.ozs--wc-categories .ozs-wc-cat .ozs-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    transition: transform 400ms ease;
}

.ozs--wc-categories .ozs-wc-cat:hover .ozs-card__img,
.ozs--wc-categories .ozs-wc-cat:focus-visible .ozs-card__img {
    transform: scale(1.05);
    filter: none;
}

/* Degradado inferior para que el nombre se lea sobre la foto */
.ozs--wc-categories .ozs-wc-cat .ozs-card__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.35) 35%, rgba(0, 0, 0, 0) 65%);
    pointer-events: none;
}

.ozs--wc-categories .ozs-wc-cat.has-svg .ozs-card__img {
    object-fit: cover;
    padding: 0;
}

.ozs--wc-categories .ozs-wc-cat .ozs-wc-cat__placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 197, 63, 0.18);
    color: var(--ozs-cat-lime);
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
}

/* Nombre superpuesto abajo a la izquierda */
.ozs--wc-categories .ozs-wc-cat .ozs-card__body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
    justify-content: flex-end;
    background: transparent;
    padding: 16px;
    text-align: left;
}

.ozs--wc-categories .ozs-wc-cat .ozs-wc-cat__name {
    margin: 0;
    color: var(--ozs-cat-name);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
    text-transform: uppercase;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
    -webkit-line-clamp: 2;
}

.ozs--wc-categories .ozs-wc-cat .ozs-wc-cat__count {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.85);
    text-align: left;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

@media (max-width: 768px) {
    .ozs--wc-categories .ozs-wc-cat .ozs-card__media {
        aspect-ratio: 1 / 1;
    }

    .ozs--wc-categories .ozs-wc-cat .ozs-card__body {
        padding: 12px;
    }

    .ozs--wc-categories .ozs-wc-cat .ozs-wc-cat__name {
        font-size: 0.92rem;
    }
}

@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;
    }
}

/* Margen lateral en ancho completo sin desbordar (padding interno, no margin).
   El plugin fuerza padding:0 !important en el contenedor, así que lo
   sobrescribimos aquí. box-sizing: border-box evita el scroll horizontal. */
body .ozs--wc-categories {
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

@media (max-width: 768px) {
    body .ozs--wc-categories {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}

/* La sombra y el desplazamiento hacia arriba al hover no deben verse cortados:
   el carril recorta (overflow), así que le damos aire vertical para que quepan
   la elevación de la tarjeta y su sombra. */
.ozs--wc-categories .ozs__track {
    padding-top: 10px;
    padding-bottom: 34px;
}
