/* =======================================================
   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 (CELULARES)
   ======================================================= */
@media (max-width: 768px) {
    .shop-container {
        flex-direction: column; /* Columna: Categorías arriba, productos abajo */
        padding: 20px 10px;
        gap: 20px;
    }

    /* Sidebar en móvil: Barra horizontal scrolleable */
    .category-sidebar {
        width: 100%;
        position: static;
        overflow-x: auto; /* Scroll lateral */
    }
    
    .sidebar-title {
        display: none; /* Ocultamos titulo para ganar espacio */
    }

    .category-list-nav {
        flex-direction: row; /* Horizontal */
        width: max-content; /* Permitir que sea ancho */
        padding-bottom: 10px;
    }

    .category-list-nav li a {
        padding: 8px 15px;
        font-size: 0.85rem;
        white-space: nowrap;
        border-radius: 20px; /* Estilo píldora en móvil */
        border: 1px solid #ddd;
    }
    
    .category-list-nav li a.active {
        background: #000;
        color: #fff;
        border-color: #000;
        border-left: 1px solid #000; /* Reset del borde de escritorio */
    }
    
    .category-list-nav li a::after {
        content: ''; /* Sin flechita en móvil */
    }

    /* Carrusel y Productos */
    section[style*="height: 60vh"] {
        height: 300px !important;
        max-height: 300px !important;
    }

    .products-container {
        justify-content: center;
        gap: 20px;
    }

    .product-card {
        width: 100%; 
        max-width: 350px; 
    }

    .img-container {
        height: 350px; 
    }
}