/* =======================================================
   LAYOUT GENERAL TIENDA (Sidebar + Productos)
   ======================================================= */
.shop-container {
    display: flex;
    max-width: 1300px;
    margin: 0 auto;
    padding: 40px 20px 100px 20px;
    gap: 40px; /* Espacio entre Sidebar y Productos */
    align-items: flex-start;
}

/* === SIDEBAR (IZQUIERDA) === */
.category-sidebar {
    width: 250px;
    flex-shrink: 0; /* No se achica */
    position: sticky;
    top: 20px; /* Se queda fijo al scrollear si hay espacio */
}

.sidebar-title {
    font-size: 1.2rem;
    text-transform: uppercase;
    margin-bottom: 20px;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}

.category-list-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.category-list-nav li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #fff;
    color: #000;
    text-decoration: none;
    font-size: 0.95rem;
    border: 1px solid #eee; /* Borde sutil */
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: 500;
}

/* Efecto Hover y Active */
.category-list-nav li a:hover,
.category-list-nav li a.active {
    background: #f4f4f4;
    border-left: 4px solid #000; /* Detalle elegante a la izquierda */
    padding-left: 11px; /* Compensar el borde */
}

/* Triangulito a la derecha */
.category-list-nav li a::after {
    content: '›';
    font-size: 1.2rem;
    line-height: 0;
    position: relative;
    top: -1px;
}

/* === SECCIÓN DERECHA (PRODUCTOS) === */
.products-section {
    flex-grow: 1; /* Ocupa el resto del espacio */
}

.products-container {
    display: flex;
    flex-wrap: wrap; 
    gap: 30px; 
    justify-content: flex-start;
}

/* Tarjeta de Producto */
.product-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    transition: transform 0.2s;
    width: 270px; 
    flex-shrink: 0;
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.img-container {
    height: 320px;
    width: 100%;
    overflow: hidden;
    background: #f9f9f9;
    position: relative;
}

.img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
}

/* Badge de Oferta */
.badge-offer {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #EF4444; 
    color: white;
    padding: 5px 10px;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    z-index: 5;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.product-title {
    display: block;
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 8px;
    color: #333;
    text-transform: uppercase;
}

/* Precios */
.price-normal {
    display: block;
    font-weight: 700;
    font-size: 1.2rem;
    color: #000;
}

.price-old {
    text-decoration: line-through;
    color: #999;
    font-size: 0.95rem;
}

.price-new {
    color: #EF4444;
    font-weight: 700;
    font-size: 1.2rem;
}

.btn-ver {
    display: block;
    background: #000;
    color: #fff;
    text-align: center;
    padding: 10px;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: background 0.3s;
    margin-top: auto;
}

.btn-ver:hover {
    background: #333;
}

/* =======================================================
   RESPONSIVO
   ======================================================= */

@media (max-width: 1100px) {
    .products-container {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .shop-container {
        flex-direction: column;
        padding: 12px 12px 60px;
        gap: 12px;
    }

    /* Sidebar horizontal scrolleable */
    .category-sidebar {
        width: 100%;
        position: static;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
        margin-left: 0 !important;
    }

    .sidebar-title {
        display: none;
    }

    .category-list-nav {
        flex-direction: row;
        width: max-content;
        padding-bottom: 4px;
        gap: 8px;
    }

    /* Píldoras de categoría */
    .category-list-nav li a {
        padding: 8px 16px;
        font-size: 0.82rem;
        white-space: nowrap;
        border-radius: 20px;
        border: 1.5px solid #ccc;
        background: #fff;
        color: #333;
        font-weight: 500;
        /* Resetear estilos desktop */
        border-left: 1.5px solid #ccc !important;
        padding-left: 16px !important;
        text-transform: none;
    }

    .category-list-nav li a::after {
        content: '' !important;
    }

    /* Activa: verde/oscuro en píldora */
    .category-list-nav li a.active,
    .category-list-nav li a:hover {
        background: #111;
        color: #fff;
        border-color: #111 !important;
        border-left: 1.5px solid #111 !important;
        padding-left: 16px !important;
    }

    /* 2 columnas en mobile */
    .products-container {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        justify-content: unset;
    }

    .product-card {
        width: 100% !important;
        max-width: 100% !important;
    }

    .img-container {
        height: 160px;
    }

    .product-title {
        font-size: 0.78rem;
        line-height: 1.3;
    }

    .price-normal {
        font-size: 0.95rem;
        margin-top: 4px;
    }

    .btn-ver {
        padding: 10px;
        font-size: 0.78rem;
    }
}

@media (max-width: 380px) {
    .products-container {
        grid-template-columns: 1fr !important;
    }

    .img-container {
        height: 220px;
    }
}