/* WooCommerce Category Bubbles - Estilos Encapsulados (Esquema #085FCF / #0E1550) */

.woo-category-bubbles-container {
    all: initial;
    display: block;
    width: 100%;
    margin: 8px 0; /* reducido el margen vertical */
    position: relative;
    background: transparent;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    /* Paleta */
    --wcb-color-primary: #085FCF;
    --wcb-color-dark: #0E1550;
    --wcb-color-border: #d9e6f7;
    --wcb-color-shadow: rgba(8,95,207,0.25);
    --wcb-color-text: #0E1550;
    --wcb-color-muted: #555;
    --wcb-color-bg-light: #ffffff;
    --wcb-color-bg-alt: #f4f7fb;
}

.woo-category-bubbles-container *,
.woo-category-bubbles-container *::before,
.woo-category-bubbles-container *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.woo-category-bubbles-container .woo-category-bubbles-wrapper {
    overflow: hidden;
    position: relative;
}

.woo-category-bubbles-container .woo-category-bubbles-scroll {
    display: flex;
    justify-content: flex-start; /* Alineación al inicio para permitir scroll */
    gap: 22px;
    padding: 10px 6px 12px; /* menos padding superior */
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    list-style: none;
    background: transparent;
}

.woo-category-bubbles-container .woo-category-bubbles-scroll::-webkit-scrollbar {
    display: none;
}

.woo-category-bubbles-container .category-bubble {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    min-width: 80px;
    max-width: 95px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    cursor: pointer;
}

.woo-category-bubbles-container .category-bubble:hover {
    transform: translateY(-5px);
}

.woo-category-bubbles-container .bubble-image {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-size: 55%; /* Fallback si hubiera background */
    background-position: center;
    background-repeat: no-repeat;
    border: 2px solid var(--wcb-color-border);
    box-shadow: 0 2px 6px rgba(14,21,80,0.10), 0 4px 10px rgba(8,95,207,0.08);
    transition: all 0.35s ease;
    background-color: #b1cafd;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.woo-category-bubbles-container .bubble-image img {
    width: 60%;
    height: 60%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    pointer-events: none;
    user-select: none;
    transition: transform .35s ease;
}

.woo-category-bubbles-container .category-bubble:hover .bubble-image {
    border-color: var(--wcb-color-primary);
    box-shadow: 0 4px 10px rgba(8,95,207,0.25), 0 8px 20px rgba(14,21,80,0.18);
    transform: scale(1.04);
}

.woo-category-bubbles-container .category-bubble:hover .bubble-image img {
    transform: scale(1.08);
}

.woo-category-bubbles-container .bubble-title {
    margin-top: 10px;
    text-align: center;
    font-size: 11px;
    color: var(--wcb-color-text);
    font-weight: 600;
    line-height: 1.25;
    word-wrap: break-word;
    max-width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.45px;
    transition: color 0.3s ease;
}

.woo-category-bubbles-container .category-bubble:hover .bubble-title {
    color: var(--wcb-color-primary);
}

/* Botón Ver Todas */
.woo-category-bubbles-container .view-all-bubble .bubble-image {
    background: linear-gradient(135deg, var(--wcb-color-bg-alt) 0%, #ffffff 100%);
    border: 2px dashed var(--wcb-color-border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.woo-category-bubbles-container .view-all-bubble .view-all-icon {
    background-image: none !important;
}

.woo-category-bubbles-container .view-all-bubble .view-all-icon svg {
    width: 32px;
    height: 32px;
    color: var(--wcb-color-primary);
    transition: all 0.4s ease;
}

.woo-category-bubbles-container .view-all-bubble:hover .bubble-image {
    background: linear-gradient(135deg, var(--wcb-color-primary) 0%, var(--wcb-color-dark) 100%);
    border-color: var(--wcb-color-primary);
}

.woo-category-bubbles-container .view-all-bubble:hover .view-all-icon svg {
    color: #fff;
    transform: rotate(90deg) scale(1.08);
}

/* Responsive */
@media (max-width: 768px) {
    .woo-category-bubbles-container .category-bubble {
        min-width: 70px;
        max-width: 85px;
    }
    
    .woo-category-bubbles-container .bubble-image {
        width: 60px;
        height: 60px;
        background-size: 50%;
    }
    
    .woo-category-bubbles-container .bubble-title {
        font-size: 9.5px;
        margin-top: 8px;
    }
    
    .woo-category-bubbles-container .woo-category-bubbles-scroll {
        gap: 16px;
        padding: 8px 4px 10px;
    }
    
    .woo-category-bubbles-container .view-all-bubble .view-all-icon svg {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .woo-category-bubbles-container .category-bubble {
        min-width: 65px;
        max-width: 75px;
    }
    
    .woo-category-bubbles-container .bubble-image {
        width: 54px;
        height: 54px;
        background-size: 48%;
    }
    
    .woo-category-bubbles-container .bubble-title {
        font-size: 8.5px;
        margin-top: 6px;
    }
    
    .woo-category-bubbles-container .woo-category-bubbles-scroll {
        gap: 14px;
        padding: 6px 4px 8px;
    }
    
    .woo-category-bubbles-container .view-all-bubble .view-all-icon svg {
        width: 24px;
        height: 24px;
    }
}

/* Tablet centrar (>= 768px y < 1024px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .woo-category-bubbles-container .woo-category-bubbles-scroll {
        justify-content: center;
    }
}

/* Desktop centrar (>= 1024px) */
@media (min-width: 1024px) {
    .woo-category-bubbles-container .woo-category-bubbles-scroll {
        justify-content: center;
    }
}

/* Animación de aparición */
.woo-category-bubbles-container { 
    opacity: 0; 
    transform: translateY(16px); 
    transition: opacity .6s ease, transform .6s ease; 
    will-change: opacity, transform; 
}
.woo-category-bubbles-container.wcb-visible { 
    opacity: 1; 
    transform: translateY(0); 
}
@media (prefers-reduced-motion: reduce) {
    .woo-category-bubbles-container { 
        transition: none; 
        opacity: 1; 
        transform: none; 
    }
}
