/* ===== CATÁLOGO ===== */
.catalog-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    text-align: left;
}
.catalog-header {
    text-align: center;
    margin-bottom: 2rem;
}
.catalog-header h2 { font-size: 2rem; margin-bottom: 0.5rem; }
.catalog-header p { color: #E19B9D; font-size: 1rem; }

.search-bar {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}
.search-bar input {
    width: 100%;
    max-width: 500px;
    padding: 12px 20px;
    border: 2px solid #E19B9D;
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
    color: #704E36;
    font-family: inherit;
}
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    text-align: left;
}
.product-card {
    border: 2px solid #FDE2E4;
    border-radius: 18px;
    overflow: hidden;
    background: #ffffff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(225, 155, 157, 0.3);
}
.product-img-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: #FDE2E4;
    cursor: pointer;
}
.product-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.product-card:hover .product-img-wrapper img {
    transform: scale(1.1);
}
.product-info { 
    padding: 1rem; 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    text-align: center; 
}
.product-name { font-weight: bold; font-size: 1rem; color: #704E36; margin: 0 0 0.4rem 0; }
.product-cat { font-size: 0.6rem; color: #a0527d; text-transform: uppercase; font-weight: bold; margin-bottom: 2px; }
.product-price { font-weight: bold; color: #704E36; font-size: 1.2rem; margin: 5px 0; }
.product-size { font-size: 0.8rem; color: #888; margin-bottom: 8px; }

.product-badge {
    position: absolute; top: 10px; right: 10px;
    padding: 4px 10px; border-radius: 20px; font-size: 0.7rem;
    color: white; font-weight: bold; text-transform: uppercase;
    z-index: 10;
    /* Oculto por defecto */
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}
/* Aparece al hacer hover en la card */
.product-card:hover .product-badge {
    opacity: 1;
    transform: translateY(0);
}
.badge-now { background: #2ecc71; }
.badge-out { background: #e74c3c; }
.badge-order { background: #f39c12; }

.btn-consultar {
    display: block;
    width: 85%;
    padding: 10px 15px;
    background: #E19B9D;
    color: white;
    border-radius: 10px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s;
    margin-top: auto;
}
.btn-out-of-stock { background: #a0527d; }
.img-sepia img { filter: grayscale(0.3) opacity(0.8); }

/* Modal */
.img-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.img-modal-overlay.active { display: flex; }
.img-modal-overlay img { max-width: 90vw; max-height: 85vh; border-radius: 12px; }
.img-modal-overlay .close-btn {
    position: absolute; top: 20px; right: 25px;
    font-size: 2rem; color: white; background: none; border: none; cursor: pointer;
}

@media (max-width: 480px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
}