/* ==========================================================================
   1. ESTRUCTURA ASTRA: BARRA LATERAL A LA IZQUIERDA
   ========================================================================== */

.ast-container,
#content .ast-container,
.site-content .ast-container {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
}

#secondary,
.sidebar,
.ast-sidebar,
.widget-area {
    order: 1 !important;
    float: left !important;
    padding-right: 30px !important;
    padding-left: 0 !important;
}

#primary,
.content-area,
.ast-article-inner {
    order: 2 !important;
    float: right !important;
}

/* ==========================================================================
   2. SLIDER HOME 1530x306
   ========================================================================== */

.slider-home,
.slider-home img {
    width: 100%;
    max-width: 1530px;
    height: 306px;
}

.slider-home {
    margin: 0 auto;
    overflow: hidden;
    border-radius: 12px;
}

.slider-home img {
    object-fit: cover;
    display: block;
}

@media (max-width: 1024px) {
    .slider-home,
    .slider-home img { height: 240px; }
}

@media (max-width: 768px) {
    .slider-home,
    .slider-home img { height: 180px; }
}

/* ==========================================================================
   3. CONFIGURACIÓN CABECERA Y FIBOSEARCH (ASTRA)
   ========================================================================== */

.dgwt-wcas-suggestions-wrapper {
    max-width: 800px !important;
}

.site-header-section.ast-header-section-has-menu,
.site-header-section[class*="ast-grid-col-"],
div[class*="ast-header-widget-"] {
    flex-grow: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
}

.ast-header-widget-area,
.ast-header-search-wrap,
.ast-search-menu-item {
    width: 100% !important;
    max-width: 750px !important;
    display: block !important;
    margin: 0 auto !important;
}

.dgwt-wcas-search-wrap,
.dgwt-wcas-search-form {
    width: 100% !important;
    max-width: 100% !important;
}

/* ==========================================================================
   4. BOTONES CATEGORÍAS HORIZONTALES (WOOCOMMERCE)
   ========================================================================== */

.categorias-slider {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 18px;
    overflow-x: auto;
    padding: 12px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}

.categorias-slider::-webkit-scrollbar { display: none; }

.categoria-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 50px;
    text-decoration: none;
    color: #333;
    white-space: nowrap;
    flex-shrink: 0;
    transition: .3s;
}

.categoria-item:hover {
    background: #6BAF2A;
    color: #fff;
}

.categoria-icono {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #F8F6F3;
    display: flex;
    justify-content: center;
    align-items: center;
}

.categoria-icono i {
    color: #6BAF2A;
    font-size: 18px;
}

.categoria-item:hover .categoria-icono { background: #fff; }

.categoria-texto {
    font-size: 15px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .categorias-slider {
        justify-content: flex-start;
        padding-left: 10px;
    }
}

/* ==========================================================================
   5. SIDEBAR CATEGORÍAS WOOCOMMERCE (contenedor + título + lista + subcat)
   ========================================================================== */

.fv-sidebar-categorias {
    background: #ffffff;
    border: 1px solid #ececec;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 25px;
    max-height: 900px;
    overflow-y: auto;
}

.fv-sidebar-categorias::-webkit-scrollbar { width: 6px; }
.fv-sidebar-categorias::-webkit-scrollbar-thumb {
    background: #DDDDDD;
    border-radius: 20px;
}

/* Título SIN color de fondo */
.fv-sidebar-titulo {
    padding: 14px 22px;
    background: transparent;
    color: #2b2b2b;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .3px;
}

/* Lista principal */
.fv-categorias {
    margin: 0;
    padding: 0;
    list-style: none;
}

.fv-categoria {
    border-bottom: 1px solid #F3F3F3;
}

.fv-categoria:last-child {
    border-bottom: none;
}

.fv-categoria-principal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 8px;
}

.fv-categoria-principal > a {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 6px 9px 20px;
    color: #2b2b2b;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: .25s;
}

.fv-categoria-principal > a:hover {
    color: #6BAF2A;
    background: #fafafa;
}

.fv-categoria.abierta > .fv-categoria-principal > a {
    color: #6BAF2A;
    background: #F9FFF4;
}

/* Contador */
.fv-contador {
    min-width: 26px;
    height: 26px;
    padding: 0 9px;
    border-radius: 30px;
    background: #F3F4F6;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    font-weight: 700;
    color: #777;
    margin-left: 12px;
}

/* Subcategorías */
.fv-subcategorias {
    list-style: none;
    margin: 0;
    padding: 0;
    display: none;
    background: #fcfcfc;
}

.fv-categoria.abierta > .fv-subcategorias {
    display: block;
}

.fv-subcategorias li {
    border-top: 1px solid #F2F2F2;
}

.fv-subcategorias li a {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    padding: 7px 20px 7px 40px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: .25s;
}

.fv-subcategorias li a:before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #D8D8D8;
    margin-right: 4px;
    display: inline-block;
    flex-shrink: 0;
}

.fv-subcategorias li a .fv-contador {
    margin-left: 4px;
}

.fv-subcategorias li a:hover {
    color: #6BAF2A;
    background: #F9FFF4;
}

.fv-subcategorias li a:hover:before {
    background: #6BAF2A;
}

.fv-subcategorias li.activa > a {
    color: #6BAF2A;
    font-weight: 600;
    background: #F5FCEF;
}

.fv-subcategorias li.activa > a:before {
    background: #6BAF2A;
}

/* ==========================================================================
   6. BUSCADOR SIDEBAR (¿Qué buscas?)
   ========================================================================== */

.fv-sidebar-buscador {
    padding: 14px 16px;
    background: #ffffff;
    border-bottom: 1px solid #ececec;
}

.fv-buscador-form {
    display: flex;
    align-items: center;
    width: 100%;
    background: #F8F6F3;
    border: 1px solid #ececec;
    border-radius: 30px;
    padding: 0 14px;
    transition: border-color .25s, background .25s;
}

.fv-buscador-form:focus-within {
    border-color: #6BAF2A;
    background: #ffffff;
}

.fv-buscador-icono {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    flex-shrink: 0;
    margin-right: 8px;
}

.fv-buscador-form:focus-within .fv-buscador-icono {
    color: #6BAF2A;
}

.fv-buscador-input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 10px 0 !important;
    font-size: 14px;
    color: #333;
    min-width: 0;
}

.fv-buscador-input::placeholder {
    color: #999;
    opacity: 1;
}

/* ==========================================================================
   7. FLECHA TOGGLE (círculo pequeño + espaciado derecho)
   ========================================================================== */

.fv-toggle {
    width: 26px;
    height: 26px;
    border: 1.5px solid #DCDCDC;
    background: #ffffff;
    border-radius: 50%;
    cursor: pointer;
    color: #6BAF2A;
    transition: all .25s;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    line-height: 1;
    margin-right: 14px;
    flex-shrink: 0;
}

.fv-toggle:hover {
    border-color: #6BAF2A;
    background: #F9FFF4;
    color: #6BAF2A;
}

.fv-toggle span {
    font-size: 11px;
    line-height: 1;
}

/* Por defecto: mostrar ▾ (cerrado), ocultar ▴ */
.fv-toggle .fv-toggle-abrir  { display: none; }
.fv-toggle .fv-toggle-cerrar { display: inline-block; }

/* Categoría abierta: mostrar ▴, ocultar ▾ */
.fv-categoria.abierta .fv-toggle .fv-toggle-abrir  { display: inline-block; }
.fv-categoria.abierta .fv-toggle .fv-toggle-cerrar { display: none; }

/* Categoría abierta: círculo relleno verde con flecha blanca */
.fv-categoria.abierta .fv-toggle {
    border-color: #6BAF2A;
    background: #6BAF2A;
    color: #ffffff;
}

.fv-categoria.abierta .fv-toggle:hover {
    background: #5a9a22;
    border-color: #5a9a22;
}

/* ==========================================================================
   8. RESPONSIVE SIDEBAR + BUSCADOR + TOGGLE
   ========================================================================== */

@media (max-width: 768px) {
    .fv-sidebar-categorias { border-radius: 8px; }
    .fv-sidebar-titulo {
        font-size: 16px;
        padding: 12px 18px;
    }
    .fv-categoria-principal {
        padding-right: 6px;
    }
    .fv-categoria-principal > a {
        padding: 8px 6px 8px 16px;
        font-size: 14px;
    }
    .fv-subcategorias li a {
        padding: 6px 16px 6px 28px;
        font-size: 13px;
    }
    .fv-sidebar-buscador {
        padding: 12px 14px;
    }
    .fv-buscador-input {
        font-size: 13px;
    }
    .fv-toggle {
        width: 24px;
        height: 24px;
        margin-right: 10px;
    }
    .fv-toggle span {
        font-size: 10px;
    }
}
