/* Estilos base - aplicables a todos los tama���os */
.contenedor {
    background-image: linear-gradient(60deg, #64b3f4 0%, #c2e59c 100%);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    height: 30vh;
    width: 100%;
    margin: 100px auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    border-radius: 10px;
    max-width: 1300px;
}

.contenedor h1 {
    color: #000;
    font-size: 2.5rem;
    text-align: center;
    font-weight: 700;
}

.btn-mirar {
    display: inline-block;
    padding: 10px 28px;
    background: var(--text-color);
    color: var(--bg-color);
    font-size: 0.9em;
    font-weight: 500;
    border: 2px solid transparent;
    transition: all .6s;
    border-radius: 5%;
    text-decoration: none;
}

.btn-mirar:hover {
    transform: scale(0.9) translateY(-6px);
    border: 2px solid #000;
    background: transparent;
    color: #000;
}

.productos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding: 20px;
    justify-content: center;
    max-width: 1300px;
    margin: 0 auto;
}

.botones-catalogo {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn-verde {
    background-color: #64b3f4;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 14px;
}

.btn-verde.active {
    background-color: #218838;
}

.producto {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    padding-bottom: 60px; 
}

.producto:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.producto img {
    width: 100%;
    height: 18rem;
    margin-bottom: 20px;
    border-radius: 30px;
    object-fit: contain;
}

.producto-info {
    flex-grow: 1;
}

.producto .btn-comprar,
.producto .btn-agotado {
    position: absolute;
    bottom: 15px;
    left: 15px;
    right: 15px;
    width: calc(100% - 30px);
}

.btn-agotado {
    background-color: #6c757d;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: not-allowed;
    text-align: center;
}

.pagination {
    margin-top: 2rem;
}

.pagination .page-item .page-link {
    color: black;
    border-color: #1abc9c;
}

.pagination .page-item.active .page-link {
    border-color: #1abc9c;
    background-color: white;
}

.product-modal-image {
    width: 100%;
    height: 400px;
    object-fit: contain;
    border-radius: 8px;
}

.quantity-selector input {
    width: 60px;
}

.titulo-catalogo {
    margin-top: 2rem;
    text-align: center;
}

@media (min-width: 1200px) {
    .productos-grid {
        grid-template-columns: repeat(4, 1fr); 
    }
    
    .producto img {
        height: 20rem;
    }
    
    .contenedor {
        height: 35vh;
    }
    
    .contenedor h1 {
        font-size: 3rem;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .productos-grid {
        grid-template-columns: repeat(3, 1fr); 
    }
    
    .producto img {
        height: 16rem;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .contenedor {
        height: 28vh;
        width: 95%;
        margin: 80px auto;
    }
    
    .contenedor h1 {
        font-size: 2.2rem;
    }
    
    .productos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .producto img {
        height: 15rem;
    }
    
    .botones-catalogo {
        gap: 8px;
    }
    
    .product-modal-image {
        height: 350px;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .contenedor {
        width: 95%;
        height: 25vh;
        margin: 70px auto;
    }
    
    .contenedor h1 {
        font-size: 1.8rem;
    }
    
    .productos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .producto {
        padding: 12px;
        padding-bottom: 60px;
    }
    
    .producto img {
        height: 14rem;
        border-radius: 20px;
    }
    
    .botones-catalogo {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .btn-verde {
        padding: 8px 15px;
        font-size: 13px;
    }
    
    .product-modal-image {
        height: 300px;
    }
}

@media (max-width: 575px) {
    .contenedor {
        width: 95%;
        height: 25vh;
        margin: 60px auto;
    }
    
    .contenedor h1 {
        font-size: 1.6rem;
    }
    
    .btn-mirar {
        padding: 8px 20px;
        font-size: 0.8em;
    }
    
    .productos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 10px;
    }
    
    .producto {
        padding: 10px;
        padding-bottom: 60px;
    }
    
    .producto img {
        height: 12rem;
        border-radius: 15px;
    }
    
    .botones-catalogo {
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }
    
    .botones-catalogo form {
        position: relative;
    }
    
    .btn-verde {
        width: 100%;
        max-width: 200px;
        padding: 8px 12px;
        font-size: 12px;
        margin-bottom: 5px;
    }
    
    .product-modal-image {
        height: 250px;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .titulo-catalogo {
        font-size: 1.5rem;
    }
    
    .search-results {
        position: absolute;
        width: 100%;
    }
}

@media (max-width: 400px) {
    .productos-grid {
        grid-template-columns: 2fr; 
        gap: 10px;
    }
    
    .producto img {
        height: 20rem;
        border-radius: 40px;
    }
    
    .contenedor {
        height: 22vh;
        margin: 50px auto;
    }
    
    .contenedor h1 {
        font-size: 1.3rem;
    }
    
    .product-modal-image {
        height: 220px;
    }
    
    .modal-body .row {
        flex-direction: column;
    }
    
    .modal-body .col-md-6 {
        width: 100%;
    }
    
    .producto .btn-comprar,
    .producto .btn-agotado {
        font-size: 14px;
    }
}

.search-results {
    display: none;
}

.search-result-item {
    display: none;
}

.search-result-name {
    display: none;
}

.search-result-price {
    display: none;
}

.no-results {
    display: none;
}
