/* Marcas: logos limpios, sin tarjetas ni fondo sólido. */

.ozs--wc-brands {
    --ozs-cat-surface: #f3f4f6;
    --ozs-cat-border: #e2e5eb;
    --ozs-cat-title: #14527d;
    --ozs-cat-active-bg: #003a60;
    --ozs-cat-active-accent: #f99f00;
    --ozs-cat-card-bg: transparent;
    --ozs-cat-shadow: none;
    background: transparent;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    overflow: visible;
}

.ozs--wc-brands .ozs__header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0 0 20px;
    margin-bottom: 0;
    gap: 12px;
    flex-wrap: nowrap;
}

.ozs--wc-brands .ozs__header-text {
    position: relative;
    padding-left: 20px;
    flex: 1 1 auto;
    min-width: 0;
}

.ozs--wc-brands .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;
}

/* Título con la tipografía del TEMA (no la serif que impone el plugin).
   font-family: inherit toma la fuente heredada del tema. Ganamos al
   'font-family ... !important' global con mayor especificidad + !important. */
html body .ozs--wc-brands .ozs__title {
    margin: 0 !important;
    font-family: inherit !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    letter-spacing: normal !important;
    color: #111111 !important;
}

/* Colorea en naranja la parte resaltada del título: lo que el JS envuelve en
   .ozs-accent automáticamente (lo previo a "con"), o lo que escribas en
   <strong>/<b> en el editor. Hereda fuente/tamaño/peso; solo cambia el color. */
html body .ozs--wc-brands .ozs__title strong,
html body .ozs--wc-brands .ozs__title b,
html body .ozs--wc-brands .ozs__title .ozs-accent {
    color: #f95614 !important;
    font: inherit;
    letter-spacing: inherit;
}

.ozs--wc-brands .ozs__title::after {
    display: none;
}

.ozs--wc-brands .ozs__subtitle {
    margin: 4px 0 0;
    font-size: 1.05rem;
    line-height: 1.25;
    color: #202020;
    font-family: inherit;
}

/* El scroll horizontal lo hace el track; el viewport no debe recortar en vertical
   (cortaba la sombra de las tarjetas y la parte de abajo). Recorte solo horizontal. */
.ozs--wc-brands .ozs__viewport {
    overflow-x: clip;
    overflow-y: visible;
}

/* Pequeño aire al inicio/fin del track para que el BORDE (1px) de la primera y
   última tarjeta no se corte contra el filo del carrusel. El scroll-padding
   alinea el snap respetando ese aire; el JS (ozs--at-start) ancla el primer slide
   real aquí, dejando fuera de vista el clon del loop (sin peek a la izquierda). */
html body .ozs--wc-brands .ozs__track {
    padding-left: 4px;
    padding-right: 4px;
    scroll-padding-left: 4px;
    scroll-padding-right: 4px;
}

.ozs--wc-brands .ozs__dots {
    display: none !important;
}

.ozs--wc-brands .ozs__slide {
    display: flex;
    align-items: stretch;
    justify-content: center;
    min-width: 0;
    scroll-snap-align: start;
}

.ozs--wc-brands .ozs-wc-brand,
.ozs--wc-brands .oz-wc-brand {
    display: flex;
    flex: 1 1 auto;
    width: 100%;
    justify-content: center;
    align-items: stretch;
    min-height: 0;
}

/* Cada marca es una tarjeta: fondo blanco, borde 1px #E1E1E1, SIN sombra. */
.ozs--wc-brands .ozs-wc-brand__link,
.ozs--wc-brands .oz-wc-brand__link {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 120px;
    padding: 18px 16px;
    background: #ffffff;
    border: 1px solid #E1E1E1;
    border-radius: 10px;
    text-decoration: none;
    color: var(--ozs-cat-title);
    box-sizing: border-box;
    box-shadow: none;
    transition: border-color 220ms ease;
}

.ozs--wc-brands .ozs-wc-brand__link:hover,
.ozs--wc-brands .ozs-wc-brand__link:focus-visible,
.ozs--wc-brands .oz-wc-brand__link:hover,
.ozs--wc-brands .oz-wc-brand__link:focus-visible {
    transform: none;
    box-shadow: none;
    border-color: #c9c9c9;
    opacity: 1;
    outline: none;
}

.ozs--wc-brands .ozs__media,
.ozs--wc-brands .oz-slide__media {
    width: auto;
    aspect-ratio: auto;
    height: auto;
    min-height: 0;
    max-height: none;
    margin: 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ozs--wc-brands .ozs-wc-brand__img,
.ozs--wc-brands .oz-wc-brand__img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: none;
    object-fit: contain;
    object-position: center;
}

.ozs--wc-brands .ozs-wc-brand__link:has(.ozs-wc-brand__img) > .ozs-wc-brand__name,
.ozs--wc-brands .oz-wc-brand__link:has(.oz-wc-brand__img) > .oz-wc-brand__name {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ozs--wc-brands .ozs-wc-brand__count,
.ozs--wc-brands .oz-wc-brand__count {
    margin-top: 6px;
    font-size: 0.86rem;
    color: #5c6470;
}

.ozs-wc-brand--logo-only .ozs-wc-brand__link,
.oz-wc-brand--logo-only .oz-wc-brand__link {
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 1024px) {
    .ozs--wc-brands {
        padding: 0;
    }

    .ozs--wc-brands .ozs__header {
        margin-bottom: 0;
        padding-bottom: 18px;
    }

    .ozs--wc-brands .ozs-wc-brand__link,
    .ozs--wc-brands .oz-wc-brand__link {
        min-height: 0;
        padding: 0;
    }
}

@media (max-width: 768px) {
    .ozs--wc-brands .ozs__header {
        align-items: center;
        gap: 12px;
        padding-bottom: 16px;
    }

    .ozs--wc-brands .ozs__header-text {
        padding-left: 16px;
    }

    .ozs--wc-brands .ozs__header-text::before {
        width: 5px;
        height: calc(100% - 6px);
        box-shadow: 5px 0 0 var(--ozs-cat-title);
    }

    .ozs--wc-brands .ozs__title {
        font-size: clamp(1.4rem, 4.5vw, 1.8rem);
    }

    .ozs--wc-brands .ozs__subtitle {
        font-size: clamp(0.9rem, 2.5vw, 1rem);
        margin-top: 2px;
    }

    .ozs--wc-brands .ozs-wc-brand,
    .ozs--wc-brands .oz-wc-brand {
        min-height: 0;
    }

    .ozs--wc-brands .ozs-wc-brand__link,
    .ozs--wc-brands .oz-wc-brand__link {
        min-height: 0;
        padding: 0;
        border-radius: 0;
    }
}

@media (max-width: 414px) {
    .ozs--wc-brands .ozs__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

/* Marcas sin cabecera: flechas circulares verdes fuera del carrusel */
html body .ozs--wc-brands:not(.ozs--has-header) {
    position: relative;
    overflow: visible;
    padding-left: 60px;
    padding-right: 60px;
    box-sizing: border-box;
}

html body .ozs--wc-brands:not(.ozs--has-header) .ozs__viewport {
    overflow-x: clip;
    overflow-y: visible;
}

/* ============================ Flechas ============================
   Igual que en categorías: las flechas van ARRIBA, a la derecha del título (el JS
   las monta dentro del .ozs__header). Estilo: círculos blancos con borde gris y
   chevron gris, en fila. Sobrescribimos el estilo global (amarillo y lateral). */
.ozs--wc-brands .ozs__header {
    align-items: center;
}

.ozs--wc-brands .ozs__header .ozs__nav {
    position: static !important;
    inset: auto !important;
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    align-self: center;
    pointer-events: auto;
    z-index: auto;
}

.ozs--wc-brands .ozs__header .ozs__nav-btn {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    border: 1.5px solid #d7d7d7 !important;
    box-shadow: none !important;
    cursor: pointer;
    transition: background 180ms ease, border-color 180ms ease, opacity 180ms ease !important;
}

.ozs--wc-brands .ozs__header .ozs__nav-btn::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='M9 6l6 6-6 6' stroke='%23555555' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    width: 18px !important;
    height: 18px !important;
    background-size: 18px 18px !important;
}

.ozs--wc-brands .ozs__header .ozs__nav-btn--prev::before {
    transform: rotate(180deg) !important;
}

.ozs--wc-brands .ozs__header .ozs__nav-btn:hover,
.ozs--wc-brands .ozs__header .ozs__nav-btn:focus-visible {
    background: #f5f5f5 !important;
    border-color: #b9b9b9 !important;
    transform: none !important;
    box-shadow: none !important;
}

.ozs--wc-brands .ozs__header .ozs__nav-btn[disabled],
.ozs--wc-brands .ozs__header .ozs__nav-btn.is-disabled {
    background: #ffffff !important;
    opacity: 0.4 !important;
    transform: none !important;
    box-shadow: none !important;
    cursor: default !important;
}

@media (max-width: 414px) {
    html body .ozs--wc-brands:not(.ozs--has-header)[data-hide-nav-mobile="true"] {
        padding-left: 0;
        padding-right: 0;
    }
}

/* =========================================================
   Variante: Grilla de marcas con rotación (cards blancas)
   Se ve como tarjetas grandes en grilla; si hay más marcas
   que slots, cada slot rota individualmente con fade.
   ========================================================= */
html body .ozs--wc-brands.ozs--brands-grid {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
    overflow: visible;
}

html body .ozs--wc-brands.ozs--brands-grid .ozs__header {
    margin-bottom: 24px;
}

.ozs--wc-brands.ozs--brands-grid .ozs-brands-grid__grid {
    display: grid;
    grid-template-columns: repeat(var(--ozs-brands-cols, 3), minmax(0, 1fr));
    /* auto (no 1fr): cada fila toma la altura natural de las tarjetas (su
       aspect-ratio). Con 1fr las filas se repartían el alto del contenedor y, si
       la sección del page builder tiene altura fija, las tarjetas se aplastaban
       y se cortaban. */
    grid-auto-rows: auto;
    gap: clamp(16px, 1.6vw, 28px);
    width: 100%;
    box-sizing: border-box;
    /* Espacio para que la sombra de las tarjetas (y el hover) quepa completa y no
       la tape la sección de abajo. Compensamos arriba y a los lados con margen
       negativo para no descuadrar; abajo dejamos el espacio real para la sombra. */
    padding: 8px 12px 36px;
    margin-top: -8px;
    margin-left: -12px;
    margin-right: -12px;
}

.ozs--wc-brands.ozs--brands-grid .ozs-brands-grid__slot {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    aspect-ratio: 16 / 9;
    min-height: 110px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    display: block;
    transition: box-shadow 220ms ease, transform 220ms ease;
}

.ozs--wc-brands.ozs--brands-grid .ozs-brands-grid__slot:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.ozs--wc-brands.ozs--brands-grid .ozs-brands-grid__inner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    opacity: 1;
    transform: scale(1);
    transition: opacity 420ms ease, transform 520ms ease;
}

.ozs--wc-brands.ozs--brands-grid .ozs-brands-grid__inner.is-leaving {
    opacity: 0;
    transform: scale(0.94);
}

.ozs--wc-brands.ozs--brands-grid .ozs-brands-grid__inner.is-entering {
    opacity: 0;
    transform: scale(1.06);
}

.ozs--wc-brands.ozs--brands-grid .ozs-wc-brand,
.ozs--wc-brands.ozs--brands-grid .oz-wc-brand {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ozs--wc-brands.ozs--brands-grid .ozs-wc-brand__link,
.ozs--wc-brands.ozs--brands-grid .oz-wc-brand__link {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border: 0;
}

.ozs--wc-brands.ozs--brands-grid .ozs__media,
.ozs--wc-brands.ozs--brands-grid .oz-slide__media {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    aspect-ratio: auto;
}

.ozs--wc-brands.ozs--brands-grid .ozs-wc-brand__img,
.ozs--wc-brands.ozs--brands-grid .oz-wc-brand__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    object-position: center;
    filter: none;
    display: block;
}

.ozs--wc-brands.ozs--brands-grid .ozs-wc-brand__name,
.ozs--wc-brands.ozs--brands-grid .oz-wc-brand__name {
    font-size: clamp(1rem, 1.4vw, 1.4rem);
    font-weight: 700;
    color: #111111;
    text-align: center;
}

/* Oculta nav y dots cuando es grilla */
.ozs--wc-brands.ozs--brands-grid > .ozs__nav,
.ozs--wc-brands.ozs--brands-grid .ozs__dots {
    display: none !important;
}

/* Responsive grilla */
@media (max-width: 1024px) {
    .ozs--wc-brands.ozs--brands-grid .ozs-brands-grid__grid {
        grid-template-columns: repeat(var(--ozs-brands-cols-tablet, 3), minmax(0, 1fr));
        gap: 12px;
    }
}

@media (max-width: 640px) {
    .ozs--wc-brands.ozs--brands-grid .ozs-brands-grid__grid {
        grid-template-columns: repeat(var(--ozs-brands-cols-mobile, 3), minmax(0, 1fr));
        gap: 10px;
    }
    .ozs--wc-brands.ozs--brands-grid .ozs-brands-grid__slot {
        aspect-ratio: 4 / 3;
        min-height: 100px;
        border-radius: 12px;
    }
    /* En móvil: la grilla escapa del padding del maquetador y ocupa todo el ancho del viewport */
    html body .ozs--wc-brands.ozs--brands-grid {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: calc(50% - 50vw) !important;
        margin-right: calc(50% - 50vw) !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 380px) {
    .ozs--wc-brands.ozs--brands-grid .ozs-brands-grid__grid {
        gap: 8px;
    }
    .ozs--wc-brands.ozs--brands-grid .ozs-brands-grid__slot {
        aspect-ratio: 4 / 3;
        min-height: 90px;
        border-radius: 10px;
    }
    html body .ozs--wc-brands.ozs--brands-grid {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}
