/* Grid similar a Bootstrap */
.maa-product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
    box-sizing: border-box;
}

@media (min-width: 576px) {
    .maa-product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .maa-product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tarjeta de producto */
.maa-product-card {
    background: #fff;
    border: 2px solid #b38f00;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
}

.maa-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Contenedor de la imagen con aspecto responsive */
.maa-product-image {
    width: 100%;
    position: relative;
    overflow: hidden;
}
.maa-product-image:before {
    content: "";
    display: block;
    padding-top: 56.25%; /* Relación de aspecto 16:9 */
}
.maa-product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}

.maa-product-card:hover .maa-product-image img {
    transform: scale(1.05);
}

/* Texto para cuando no hay imagen */
.maa-no-image {
    font-size: 16px;
    color: #b38f00;
}

/* Contenedor de información del producto */
.maa-product-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

/* Título de la tarjeta con altura fija y truncado (máximo 2 líneas) */
.maa-product-card .maa-product-title {
    height: 3em; /* Aproximadamente 2 líneas con line-height 1.5 */
    line-height: 1.5em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 10px;
    text-align: center;
    font-weight: bold;
    color: black;
    font-size: 18px;
}

/* Título en el modal: se muestra completo */
.maa-modal .maa-product-title {
    height: auto;
    -webkit-line-clamp: unset;
    white-space: normal;
    text-align: center;
}

/* Botón "Ver más" rediseñado */
.maa-open-modal {
    display: inline-block;
    background-color: #fbf18952;;
    color: black;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s ease;
    font-weight: 300;
    margin-top: 10px;
}
.maa-open-modal:hover {
    background-color: #fbf189;
}

/* Botón de compra en la tarjeta */
.maa-buy-button {
    display: block;
    text-align: center;
    background: #fbf189;
    color: #333;
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
    margin-top: 10px;
}
.maa-buy-button:hover {
    background: #e2d97b;
}

/* Modal overlay */
.maa-modal-overlay {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* Modal contenedor */
.maa-modal {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    max-width: 500px;
    width: 90%;
    position: relative;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Mostrar modal */
.maa-modal.show {
    opacity: 1;
    transform: scale(1);
}

/* Descripción completa en el modal */
.maa-modal-description {
    margin-top: 20px;
    font-size: 14px;
    color: #555;
}

/* Botón de compra dentro del modal */
.maa-modal-buy-button {
    display: block;
    text-align: center;
    background: #fbf189;
    color: #333;
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
    margin-top: 20px;
}
.maa-modal-buy-button:hover {
    background: #e2d97b;
}

/* Botón de cierre del modal */
.maa-close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
}

/* Mensaje cuando no hay enlace */
.maa-no-link {
    font-size: 14px;
    color: #888;
    text-align: center;
}

.maa-buy-button {
    display: block;
    text-align: center;
    background: #fbf189;
    color: #333; /* Texto en color oscuro para buen contraste */
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
    margin-top: 10px;
}

.maa-buy-button:hover {
    background: #e2d97b; /* Variante ligeramente más oscura en hover */
}
