﻿/* --- Layout listado productos --- */
.sectionProductos {
    padding-top: 92px;
    padding-bottom: 70px;
}

.col-product {
    margin-top: 16px;
    margin-bottom: 16px;
}

.row-filter {
    padding-bottom: 24px;
    align-items: center;
}

/* --- Toolbar / búsqueda --- */
.productos-toolbar {
    width: 100%;
}

.productos-search {
    display: flex;
    align-items: stretch;
    max-width: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #fff;
    box-shadow: 0 1px 3px rgba(17, 72, 105, 0.06);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.productos-search:focus-within {
    border-color: #114869;
    box-shadow: 0 0 0 3px rgba(17, 72, 105, 0.12);
}

.input-search-product {
    flex: 1;
    min-width: 0;
    border: none;
    background: #fff;
    height: 44px;
    font-size: 15px;
    font-weight: 400;
    line-height: normal;
    padding: 0 16px;
    color: #232323;
}

.input-search-product::placeholder {
    color: #9ca3af;
}

.input-search-product:focus {
    outline: none;
    border: none;
    box-shadow: none;
}

.button-search-product {
    flex: 0 0 48px;
    background-color: #114869;
    height: 44px;
    width: 48px;
    border: none;
    border-radius: 0;
    justify-content: center;
    align-items: center;
    display: flex;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.button-search-product:hover {
    background-color: #0d3a54;
}

/* --- Breadcrumb --- */
.productos-breadcrumb .a_ariadna_cats,
.productos-breadcrumb .a_ariadna_cats:focus,
.productos-breadcrumb .a_ariadna_cats:hover {
    color: #114869;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
}

/* --- Sidebar categorías y orden --- */
#treeCategorias {
    margin-bottom: 32px;
}

#treeCategorias span.lbl,
#ordenaciones span.lbl {
    line-height: 1.35;
    display: block;
    color: #232323;
}

/* Acordeón Bootstrap — el panel .collapse empuja el contenido al abrir */
#treeCategorias .productos-cat-accordion {
    --bs-accordion-border-color: rgba(0, 0, 0, 0.08);
    --bs-accordion-btn-padding-x: 12px;
    --bs-accordion-btn-padding-y: 10px;
    --bs-accordion-body-padding-x: 12px;
    --bs-accordion-body-padding-y: 8px;
    --bs-accordion-active-color: #114869;
    --bs-accordion-active-bg: rgba(17, 72, 105, 0.08);
    --bs-accordion-btn-focus-box-shadow: 0 0 0 0.2rem rgba(17, 72, 105, 0.15);
}

#treeCategorias .productos-cat-accordion .accordion-button {
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    color: #232323;
    background-color: #fff;
    box-shadow: none;
}

#treeCategorias .productos-cat-accordion .accordion-button:not(.collapsed) {
    color: #114869;
    background-color: rgba(17, 72, 105, 0.08);
}

#treeCategorias .productos-cat-accordion .accordion-body {
    padding-top: 4px;
    padding-bottom: 8px;
}

#treeCategorias .productos-cat-link,
#treeCategorias .productos-cat-sublink {
    display: block;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    text-decoration: none;
    color: #232323;
    border-radius: 8px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

#treeCategorias .productos-cat-sublink {
    font-size: 13px;
    text-transform: none;
    padding-left: 8px;
}

#treeCategorias .productos-cat-sublink--parent {
    font-weight: 600;
    color: #114869;
    margin-bottom: 4px;
}

#treeCategorias .productos-cat-link:hover,
#treeCategorias .productos-cat-sublink:hover {
    background-color: rgba(17, 72, 105, 0.06);
    color: #114869;
}

#treeCategorias .productos-cat-link.active,
#treeCategorias .productos-cat-sublink.active {
    font-weight: 600;
    color: #114869;
    background-color: rgba(17, 72, 105, 0.1);
}

#treeCategorias .accordion-item.active-category > .accordion-header .accordion-button {
    color: #114869;
    background-color: rgba(17, 72, 105, 0.1);
}

/* Sub-acordeón anidado (ej. subcategorías con hijos) */
#treeCategorias .accordion-body > .accordion {
    margin-top: 4px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

#treeCategorias .menu_title_cats,
#ordenaciones .menu_title_orders {
    min-height: 40px;
    width: 100%;
    padding: 8px 12px 4px;
    font-size: 18px;
    font-weight: 600;
    color: #114869;
    letter-spacing: 0.02em;
}

#treeCategorias .a_all_cats,
#ordenaciones .a_order_products {
    display: block;
    cursor: pointer;
    min-height: 40px;
    width: 100%;
    padding: 8px 12px;
    font-weight: 400;
    font-size: 15px;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.15s ease;
}

#treeCategorias .a_all_cats:hover,
#ordenaciones .a_order_products:hover {
    background-color: rgba(17, 72, 105, 0.06);
}

#treeCategorias .a_all_cats.active,
#treeCategorias .a_all_cats.active span.lbl,
#ordenaciones .a_order_products.active span.lbl,
#treeCategorias a.nav-link.active {
    font-weight: 600;
    color: #114869;
    background-color: rgba(17, 72, 105, 0.1);
}

#treeCategorias .a_all_cats:focus span.lbl,
#treeCategorias .a_all_cats:hover span.lbl,
#ordenaciones .a_order_products:focus span.lbl,
#ordenaciones .a_order_products:hover span.lbl {
    color: #114869 !important;
}

#ordenaciones {
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin-top: 8px;
}


/* --- Cards producto --- */
.container-products .row-items {
    --productos-card-radius: 12px;
}

.product-card {
    height: 100%;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--productos-card-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(17, 72, 105, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(17, 72, 105, 0.12);
}

.product-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.product-card__media {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: #f8fafb;
    aspect-ratio: 4 / 3;
}

.product-card__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    padding: 12px;
    transition: transform 0.25s ease;
}

.product-card:hover .product-card__media img {
    transform: scale(1.03);
}

.product-card__body {
    flex: 1;
    padding: 14px 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.product-card__title {
    font-size: 15px;
    line-height: 1.4;
    font-weight: 700;
    margin: 0;
    color: #114869;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
}

.product-card__price {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    color: #232323;
    margin: 0;
}

.product-card__footer {
    padding: 4px 16px 16px;
    margin-top: auto;
}

.product-card__cta {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #114869;
    background: transparent;
    border: 2px solid #114869;
    border-radius: 999px;
    padding: 8px 16px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.product-card:hover .product-card__cta {
    background-color: #114869;
    color: #fff;
}

/* Compatibilidad markup antiguo (si queda en caché) */
.container-products .new {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(17, 72, 105, 0.06);
}

/* --- Sin resultados --- */
.productos-no-results {
    text-align: center;
    padding: 48px 24px;
    width: 100%;
}

.label_no_results {
    font-size: 18px;
    color: #6b7280;
    margin: 0;
}

/* --- Paginación --- */
.pagination-controls {
    display: flex;
    justify-content: center;
    padding-top: 40px;
    padding-bottom: 40px;
}

.pagination-controls__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.pagination-controls .page-link,
.pagination-controls .btn-change-page {
    font-size: 14px;
    font-weight: 500;
    min-height: 36px;
    padding: 6px 14px;
    border: 1px solid rgba(17, 72, 105, 0.25);
    border-radius: 8px;
    background: #fff;
    color: #114869;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.pagination-controls .page-link:hover:not(.disabled):not(.active-page),
.pagination-controls .btn-change-page:hover:not(:disabled) {
    background-color: rgba(17, 72, 105, 0.08);
}

.pagination-controls .page-link.disabled {
    border: none;
    background: transparent;
    cursor: default;
    color: #9ca3af;
}

.pagination-controls .active-page {
    background-color: #114869;
    color: #fff;
    border-color: #114869;
}

.pagination-controls .active-page:hover {
    background-color: #114869;
    color: #fff;
}

.pagination-controls .btn-change-page:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* --- Blog legacy (otras vistas) --- */
.imagen-blog-destacado {
    max-width: 100%;
}

.label-fecha-blog {
    color: black;
    font-size: 14px;
    line-height: 18px;
    font-weight: 500;
    padding-bottom: 10px;
}

.label-title-blog {
    color: #114869;
    font-family: Montserrat, sans-serif;
    font-size: 32px;
    font-weight: 700;
    line-height: 26px;
    text-transform: uppercase;
    padding-bottom: 20px;
}

.label-subtitle-blog {
    color: #000;
    font-family: Montserrat, sans-serif;
    font-size: 24px;
    font-weight: 400;
    line-height: 26px;
    padding-bottom: 15px;
}

.btn-blog-in {
    border-radius: 20px;
    background: #114869;
    border: none;
    color: #fff;
    font-family: Montserrat, sans-serif;
    font-size: 20px;
    font-weight: 600;
    padding: 10px 40px;
    text-decoration: none;
    cursor: pointer;
}

.description-box-blog {
    height: 87px;
    overflow: hidden;
    font-size: 14px;
    line-height: 23px;
    color: #616161;
}

.col_products {
    display: block;
}

/* --- Responsive --- */
@media only screen and (max-width: 991px) {
    #treeCategorias {
        margin-bottom: 24px;
    }

    .col_categories {
        margin-bottom: 8px;
    }
}

@media only screen and (max-width: 767px) {
    .container.big {
        max-width: 540px;
    }

    .sectionProductos {
        padding-top: 72px;
    }

    .product-card__title {
        font-size: 14px;
        min-height: auto;
        -webkit-line-clamp: 2;
    }
}

@media only screen and (max-width: 575px) {
    .container.big {
        max-width: 100%;
    }

    .row-items.gx-5 {
        --bs-gutter-x: 1rem;
    }
}

@media (min-width: 1400px) {
    .container.big {
        max-width: 1320px;
    }
}
