/* Fondo general */
body { 
    background-color: #f8f9fa; 
    font-family: Arial, sans-serif;
}

/* Tarjeta de producto */
.card { 
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    width: 100%; /* ancho 100% para que se ajuste a la columna */
    max-width: 320px; /* máximo ancho */
    height: auto; /* altura automática según contenido */
    display: flex;
    flex-direction: column;
    margin: auto;
}

.card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 12px 30px rgba(0,0,0,0.18);
}

/* Contenedor de imágenes */
.product-img-wrapper {
    position: relative;
    width: 100%;
    height: 400px; /* altura de imagen */
    overflow: hidden;
    border-radius: 12px;
}

/* Imagen principal y hover */
.product-img-wrapper img.product-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
    z-index: 1;
}

.product-img-wrapper img.img-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
    opacity: 0;
    z-index: 2;
}

/* Hover efecto */
.card:hover .product-img-wrapper img.product-img {
    transform: scale(1.05);
    opacity: 0;
}

.card:hover .product-img-wrapper img.img-hover {
    transform: scale(1.05);
    opacity: 1;
}

/* Precio */
.price { 
    font-size: 1.6rem; 
    color: #3f3e3e; 
    font-weight: bold; 
    margin-bottom: 12px;
}

/* Botones */
.btn-custom, .btn-dark, .btn-primary {
    border-radius: 8px; 
    font-size: 1.1rem;
    text-align: center;
}

/* Título de producto */
.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

/* Título de categoría */
h2.category-title { 
    margin-top: 50px; 
    margin-bottom: 25px; 
    font-weight: 600;
    color: #333;
}

/* Sidebar categorías */
.list-group-item {
    cursor: pointer;
    font-weight: 500;
}

.list-group-item.active {
    background-color: #3f3e3e;
    color: #fff;
    border-color: #3f3e3e;
}

.catalog-container {
    padding-top: 140px;
    padding-bottom: 40px;
}

/* HEADER */
.catalog-header h1 {
    font-weight: 700;
    margin-top: 60px;
    text-align: center;
}

.search-result {
    color: #777;
    font-weight: 500;
}

/* SIDEBAR */
.categories-desktop {
    display: block;
}

.categories-mobile {
    display: none;
}

.container > .row {
    margin-top: 70px;
}
/* MOBILE CATEGORY PILLS */
.scroll-categories {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 10px;
}

.cat-pill {
    flex: 0 0 auto;
    padding: 8px 14px;
    border-radius: 20px;
    background: #f1f1f1;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    white-space: nowrap;
}

.cat-pill.active {
    background: #000;
    color: #fff;
}

/* PRODUCT CARD */
.product-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-img-wrapper {
    position: relative;
    overflow: hidden;
}

.product-img {
    width: 100%;
    transition: 0.3s;
}

.img-hover {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.product-card:hover .img-hover {
    opacity: 1;
}

.cart-icon {
    width: 17px;
    height: 17px;
    filter: brightness(0) invert(1); /* la convierte a blanco */
    object-fit: contain;
    display: block;
    transform: translateY(-2px);
}

/* 💻 SOLO DESKTOP */
@media (min-width: 992px) {
    .catalog-header h1 {
        transform: translateX(180px); /* ajusta este valor a tu gusto */
    }
}

/* MOBILE */
@media (max-width: 991px) {

.catalog-header h1 {
        transform: none;
        margin-left: 0;
        padding: 0 10px;
    }

    .categories-desktop {
        display: none;
    }

    .categories-mobile {
        display: block;
        margin-bottom: 20px;
    }

    .catalog-container {
        padding-top: 120px;
    }
}

/* EXTRA SMALL */
@media (max-width: 576px) {

    .catalog-header h1 {
        font-size: 22px;
        margin-top: 20px;
        margin-bottom: 15px;
    }

    .search-result {
        margin-bottom: 10px;
    }

    .container > .row {
        margin-top: 40px;
    }

    .product-card {
        border-radius: 10px;
    }

    .card-title {
        font-size: 1rem;
    }

    .price {
        font-size: 0.90rem;
    }

    .card {
        border-radius: 10px;
        transform: scale(0.95);
    }
    
    .product-img-wrapper {
        height: 300px !important;
    }

    .btn-custom,
    .btn-primary,
    .btn-dark {
        font-size: 0.65rem;
        padding: 6px 10px;
    }

    .card-body {
        padding: 10px;
    }
    .cart-btn-text {
        font-size: 0.65rem;
    }
    .cart-icon {
    width: 12px;
    height: 12px;
    filter: brightness(0) invert(1); /* la convierte a blanco */
    object-fit: contain;
    display: block;
    transform: translateY(-2px);
    }
    .catalog-container {
    padding-bottom: 20px;
}
}