/* ============================================================
   VARIABLES DE COLOR
============================================================ */
:root {
    --negro: #000000;
    --blanco: #ffffff;
    --dorado: #bf9b30;
    --dorado-oscuro: #a88326;
    --gris-suave: #f5f5f5;
}

/* ============================================================
   LAYOUT GENERAL
============================================================ */
.productos-layout {
    gap: 30px;
    padding: 20px;
    display: flex;
}

/* ============================================================
   SIDEBAR DE CATEGORÍAS
============================================================ */
.sidebar {
    width: 240px;
    background: var(--blanco);
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    height: fit-content;
    position: sticky;
    top: 120px;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--negro);
}

.categoria {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--negro);
    font-weight: 500;
    border-radius: 10px;
    text-decoration: none;
    transition: all .25s ease;
}

.categoria img {
    width: 26px;
    height: 26px;
}

.categoria:hover {
    background: var(--gris-suave);
}

.categoria.active {
    background: var(--dorado);
    color: var(--blanco);
    font-weight: 600;
}

.categoria.active img {
    filter: brightness(0) invert(1);
}

/* ============================================================
   FILTROS SUPERIORES
============================================================ */
.filtros-container {
    background: var(--blanco);
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}

.filtros-container .form-label {
    font-weight: 600;
    color: var(--negro);
}

.form-select,
.form-control {
    border-radius: 10px !important;
    border: 1px solid #ccc;
}

/* Botón aplicar */
.btn-dark {
    background: var(--negro);
    border: none;
}

.btn-dark:hover {
    background: #111;
}

/* Botón limpiar */
.btn-outline-secondary {
    border-radius: 10px !important;
    color: var(--negro);
}

.btn-outline-secondary:hover {
    background: var(--gris-suave);
}

/* ============================================================
   CARDS PREMIUM
============================================================ */
.producto-card-premium {
    background: var(--blanco);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(0,0,0,0.08);
    transition: transform .25s ease, box-shadow .25s ease;
}

.producto-card-premium:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 28px rgba(0,0,0,0.18);
}

/* ---------------- IMAGEN + HOVER ---------------- */
.img-container {
    position: relative;
    width: 100%;
    height: 260px;
    overflow: hidden;
    background: var(--negro);
}

.img-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .4s ease;
}

.producto-card-premium:hover .img-container img {
    transform: scale(1.08);
}

/* Degradado NEGRO → DORADO LIAM */
.img-container::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(191,155,48,0.75) 100%);
    opacity: 0;
    transition: opacity .35s ease;
}

.producto-card-premium:hover .img-container::after {
    opacity: 1;
}

/* ---------------- BADGES ---------------- */
.badge-desc {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--dorado);
    padding: 6px 12px;
    color: var(--blanco);
    font-weight: bold;
    border-radius: 6px;
    font-size: .9rem;
}

.agotado-overlay {
    position: absolute;
    top: 0;
    inset: 0;
    background: rgba(0,0,0,.6);
    color: var(--blanco);
    font-weight: bold;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------------- INFORMACIÓN ---------------- */
.info-container {
    padding: 18px;
}

.titulo-producto {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--negro);
    margin-bottom: 6px;
}

/* RATING */
.rating i {
    color: #FFD700;
    font-size: 1.1rem;
}

.rating-num {
    font-size: .9rem;
    margin-left: 4px;
    color: #777;
}

/* PRECIO */
.precios-premium {
    margin: 10px 0;
}

.precio-original {
    text-decoration: line-through;
    color: #999;
    font-size: .9rem;
}

.precio-final {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--negro);
}

/* MARCA */
.marca-premium {
    font-size: .95rem;
    color: #555;
}

/* BOTÓN AÑADIR */
.btn-add-premium {
    background: var(--dorado);
    color: var(--blanco);
    border-radius: 12px;
    font-weight: 600;
    padding: 10px;
    border: none;
}

.btn-add-premium:hover {
    background: var(--dorado-oscuro);
}

/* ============================================================
   PAGINACIÓN
============================================================ */
.pagination .page-link {
    color: var(--negro);
    border-radius: 8px;
}

.pagination .page-item.active .page-link {
    background: var(--dorado);
    color: var(--blanco);
    border: none;
}

.pagination .page-link:hover {
    background: var(--gris-suave);
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 992px) {
    .sidebar {
        display: none;
    }
    .productos-layout {
        display: flex; /* SOLO USAR EN DESKTOP */
    }
}

@media (max-width: 576px) {

    /* Contenedor de columnas */
    .productos-main .row {
        margin-left: -6px !important;
        margin-right: -6px !important;
    }

    .productos-main .row > .col-sm-6 {
        padding-left: 6px !important;
        padding-right: 6px !important;

        flex: 0 0 50% !important;
        max-width: 50% !important;
    }

    /* Tarjeta compacta */
    .producto-card-premium {
        border-radius: 12px;
        padding: 0;
        box-shadow: 0 3px 10px rgba(0,0,0,0.07);
        margin-bottom: 12px;
    }

    /* Imagen cuadrada estilo ecommerce */
    .img-container {
        height: 160px !important;
    }

    .img-container img {
        object-fit: cover !important;
    }

    /* Texto del producto */
    .info-container {
        padding: 10px 10px 12px;
    }

    .titulo-producto {
        font-size: 0.82rem;
        line-height: 1.15;
        min-height: 32px;
        margin-bottom: 4px;
    }

    /* Rating más compacto */
    .rating i {
        font-size: 0.75rem;
    }
    .rating-num {
        font-size: 0.72rem;
    }

    /* Precio */
    .precio-final {
        font-size: 1rem;
        font-weight: 700;
    }
    .precio-original {
        font-size: 0.75rem;
    }

    /* Marca */
    .marca-premium {
        font-size: 0.75rem;
        margin-bottom: 6px;
    }

    /* Botón optimizado */
    .btn-add-premium {
        font-size: 0.7rem;
        padding: 7px 5px;
        border-radius: 6px;
        width: 100%;
        margin-top: 6px;
    }

    /* Badge de descuento más pequeño */
    .badge-desc {
        padding: 4px 8px;
        font-size: 0.7rem;
        border-radius: 4px;
        top: 8px;
        left: 8px;
    }
}


/* ===============================================================
   CATEGORÍAS PARA MÓVIL – SCROLL HORIZONTAL TIPO LIVERPOOL
================================================================ */
.categorias-mobile {
    background: #fff;
    padding: 12px 0 6px;
    border-bottom: 1px solid #eee;
}

.scroll-categorias {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    white-space: nowrap;
    padding: 10px 14px;
    scroll-snap-type: x proximity;
}

.scroll-categorias::-webkit-scrollbar {
    display: none;
}

.cat-m-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
    text-align: center;
    scroll-snap-align: start;
    color: #444;
}

.cat-m-item img {
    width: 40px;
    height: 40px;
    margin-bottom: 6px;
    opacity: 0.85;
}

.cat-m-item span {
    font-size: 0.78rem;
    font-weight: 500;
}

.cat-m-item.active img {
    filter: brightness(1) sepia(1) hue-rotate(10deg) saturate(500%);
}

.cat-m-item.active span {
    color: #bf9b30;
}

.cat-m-item:hover span {
    color: #000;
}

.link-producto {
    text-decoration: none;
    color: inherit;
}
.link-producto:hover .producto-card-premium {
    transform: translateY(-5px);
    box-shadow: 0 8px 22px rgba(0,0,0,0.18);
}

