/* assets/css/styles_productos.css */

/* Estilos de la grilla principal */
.main-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 20px 40px 20px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    width: 100%;
}

/* Tarjeta contenedora del producto */
.product-card-meli {
    background: #ffffff;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card-meli:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

/* Espacio de la foto/video */
.card-image-wrapper {
    position: relative;
    width: 100%;
    height: 240px;
    background-color: #f7f7f7;
    overflow: hidden;
}

/* Arreglo para que las fotos gigantes NO se desborden */
.product-card-meli .main-img,
.product-card-meli .hover-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Textos e información de compra */
.card-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #333333;
    line-height: 1.3;
}

.price-section {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.current-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #000000;
}

.shipping-free {
    color: #00a650;
    font-size: 0.75rem;
    font-weight: 700;
}

.installments {
    font-size: 0.8rem;
    color: #00a650;
    margin: 0 0 15px 0;
}

/* Botón de acción */
.btn-meli-buy {
    width: 100%;
    background: #000000;
    color: #ffffff;
    border: none;
    padding: 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.2s;
    margin-top: auto;
}

.btn-meli-buy:hover {
    background: #222222;
}

.meli-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #000000;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 6px;
    border-radius: 3px;
    letter-spacing: 0.5px;
    z-index: 10;
}