/* ==============================> ESTILOS LISTA CATEGORÍAS */

/* -> Contenedor Principal */
.wcc-lista-wrapper {
    display: grid;
    grid-template-columns: repeat(var(--wcc-grid-cols, 4), 1fr);
    gap: 4px;
    width: 100%;
    box-sizing: border-box;
}

/* -> Enlaces (Items) */
.wcc-lista-wrapper .wcc-cat-link {
    display: block;
    text-decoration: none;
    transition: all 0.3s ease-in-out;
    -webkit-transition: all 0.3s ease-in-out;
    /* Compatibilidad iOs */
    opacity: 0.8;
}

/* -> Texto */
.wcc-lista-wrapper .wcc-cat-link .wcc-cat-text {
    font-size: 14px;
    line-height: 16px;
    color: var(--e-global-color-accent);
    font-weight: 400;
    position: relative;
    transition: padding-left 0.3s ease;
}

/* -> Interacción (Hover) */
.wcc-lista-wrapper .wcc-cat-link:hover {
    opacity: 1;
    transform: translateX(2px);
    color: var(--e-global-color-primary);
}

.wcc-lista-wrapper .wcc-cat-link:hover .wcc-cat-text {
    padding-left: 5px;
}

/* -> Responsive: Tablet (max 1024px) */
@media screen and (max-width: 1024px) {
    .wcc-lista-wrapper {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 15px;
    }
}

/* -> Responsive: Móvil (max 768px) */
@media screen and (max-width: 768px) {
    .wcc-lista-wrapper {
        grid-template-columns: repeat(2, 1fr) !important;
        /* 2 Columnas en móvil */
        gap: 10px;
    }
}

/* -> Responsive: Móvil Pequeño (max 480px) */
@media screen and (max-width: 480px) {
    .wcc-lista-wrapper {
        grid-template-columns: 1fr !important;
        /* 1 Columna si es muy estrecho */
    }
}


/* ==============================> CARRUSEL CATEGORIAS */

.cc-wrapper-global {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

.cc-contenedor-principal {
    position: relative;
    padding: 10px 0;
}

.cc-track-carrusel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 15px;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
    scroll-behavior: smooth;
}

.cc-track-carrusel::-webkit-scrollbar {
    display: none;
}

.cc-item-categoria {
    flex: 0 0 calc((100% - 105px) / 8);
    scroll-snap-align: start;
    text-decoration: none;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #f0f0f0;
}

.cc-item-categoria:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.cc-imagen-wrapper {
    width: 100%;
    height: 140px;
    overflow: hidden;
    background-color: #f9f9f9;
}

.cc-imagen-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.cc-item-categoria:hover .cc-imagen-wrapper img {
    transform: scale(1.1);
}

.cc-info {
    padding: 12px 8px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cc-titulo {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
    margin: 0 0 5px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cc-precio {
    font-size: 12px;
    color: #777;
    margin-top: auto;
}

.cc-item-categoria:hover .cc-titulo {
    color: var(--e-global-color-primary, #0073aa);
}

.cc-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 35px;
    height: 35px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    font-size: 18px;
    color: #333;
}

.cc-nav-btn:hover {
    background: var(--e-global-color-primary, #333);
    color: #fff;
    border-color: transparent;
}

.cc-prev {
    left: -48px;
    opacity: 0;
    transition: .4s all ease-in-out;
}

.cc-next {
    right: -48px;
    opacity: 0;
    transition: .4s all ease-in-out;
}

.cc-wrapper-global:hover .cc-prev,
.cc-wrapper-global:hover .cc-next {
    opacity: 1;
}

/* Ocultar flechas si no son necesarias en pantallas táctiles o si se prefiere solo swipe */
@media (hover: none) and (pointer: coarse) {
    .cc-nav-btn {
        display: none;
    }

    .cc-wrapper-global {
        padding: 0 10px;
    }

    /* Añadir padding lateral en móviles */
}

/* -> RESPONSIVE */

/* Laptop / PC pequeña (Muestra 6) */
@media (max-width: 1280px) {
    .cc-item-categoria {
        /* (100% - (15px * 5)) / 6 */
        flex: 0 0 calc((100% - 75px) / 6);
    }
}

/* Tablet Landscape (Muestra 5) */
@media (max-width: 1024px) {
    .cc-item-categoria {
        flex: 0 0 calc((100% - 60px) / 5);
    }
}

/* Tablet Portrait (Muestra 3.5 para indicar scroll) */
@media (max-width: 768px) {
    .cc-item-categoria {
        flex: 0 0 calc(100% / 3.5 - 15px);
    }

    .cc-prev,
    .cc-next {
        display: none;
    }

    /* En tablet mejor usar dedo */
}

/* Mobile (Muestra 2.2 para indicar scroll) */
@media (max-width: 480px) {
    .cc-track-carrusel {
        gap: 10px;
    }

    .cc-item-categoria {
        flex: 0 0 calc(100% / 2.2 - 10px);
    }

    .cc-titulo {
        font-size: 12px;
    }
}

/* ==============================> ESTILOS SHORTCODE MARCAS */

.wc-marcas-contenedor {
    --gap-items: 20px;
    --item-pc-grid: 6;
    /* Solo para modo Grid */
    --color-hover: var(--e-global-color-primary, #000);

    width: 100%;
    position: relative;
    box-sizing: border-box;
    padding: 10px 0;
    /* Un poco de aire arriba/abajo */
}

/* -> MODO CARRUSEL (Ajustes para SwiperJS) */
.wc-marcas-contenedor.modo-carrusel {
    overflow: hidden;
    /* Ocultar lo que sale del carrusel */
    display: block;
    /* Asegurar bloque */
}

.wc-marcas-contenedor.modo-carrusel .swiper-wrapper {
    align-items: center;
    /* Centrar verticalmente las marcas */
}

/* -> ESTRUCTURA COMUN ITEM */
.wc-marcas-contenedor .wc-marca-item {
    text-align: center;
    transition: transform 0.3s ease;
    /* En carrusel JS, el ancho lo controla el script, no el CSS */
    height: auto;
    display: flex;
    justify-content: center;
}

.wc-marcas-contenedor .wc-marca-item a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    padding: 0 5px;
    /* Pequeño padding interno */
}

/* -> IMAGENES Y EFECTOS (Tus estilos originales) */
.wc-marcas-contenedor img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    /* Filtro inicial: Gris y opaco */
    filter: grayscale(100%) opacity(0.7);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    -webkit-backface-visibility: hidden;
}

/* Hover: Color y Zoom */
.wc-marcas-contenedor .wc-marca-item:hover img {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.1);
    /* Un poco más de zoom */
}

/* -> FALLBACK TEXTO (Si no hay imagen) */
.wc-marcas-contenedor .wc-marca-texto {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.wc-marcas-contenedor .wc-marca-item:hover .wc-marca-texto {
    background-color: var(--color-hover);
    color: #fff;
    border-color: var(--color-hover);
}

/* -> MODO GRID (CUADRICULA) - Solo si usas estilo="grid" */
.wc-marcas-contenedor.modo-grid .wc-marcas-wrapper {
    display: grid;
    grid-template-columns: repeat(var(--item-pc-grid), 1fr);
    gap: var(--gap-items);
}

/* -> RESPONSIVE MODO GRID */
@media screen and (max-width: 768px) {
    .wc-marcas-contenedor.modo-grid .wc-marcas-wrapper {
        grid-template-columns: repeat(3, 1fr);
        /* 3 columnas en tablet/móvil */
    }
}

@media screen and (max-width: 480px) {
    .wc-marcas-contenedor.modo-grid .wc-marcas-wrapper {
        grid-template-columns: repeat(2, 1fr);
        /* 2 columnas en móviles pequeños */
    }
}