﻿/* Asegura que las cards mantengan el mismo ancho */
.producto-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border-radius: 0.5rem;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.producto-card:hover {
    transform: scale(1.02);
    box-shadow: 0 0.5rem 1rem rgba(40, 167, 69, 0.15);
    border: 2px solid #28a745 !important;
}

.producto-img {
    object-fit: contain;
    height: 150px;
    width: 100%;
    padding: 1rem;
    flex-shrink: 0;
}

.card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 1rem;
    gap: 0.5rem;
}

.sin-descuento .card-body {
    min-height: auto;
    justify-content: flex-start;
}

.tiene-descuento .card-body {
    min-height: 140px;
    justify-content: space-between;
}

.card-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    max-height: 2.4em;
    overflow: hidden;
    line-height: 1.2;
}

.descripcion-corta {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    min-height: 20px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    flex-grow: 0;
}

.precio-container {
    margin-top: auto;
    padding-top: 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.con-descuento {
    margin-top: auto;
    padding-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.badge {
    align-self: flex-start;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.card-text {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.card-text:last-child {
    margin-bottom: 0;
}

.text-muted.small {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.content-top {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ver-mas-btn {
    font-size: 0.75rem;
    padding: 0;
    margin-top: 0.25rem;
    align-self: flex-start;
}

.precio-container .card-text {
    margin-top: 0;
}




/* Responsive adjustments */
@media (max-width: 576px) {
    .producto-card {
        min-height: 280px;
    }
    .producto-img {
        height: 120px;
    }
    .card-body {
        padding: 0.75rem;
    }
}

@media (min-width: 992px) {
    .producto-card {
        min-height: 350px;
    }
}