/* ============================================
   PRODUCT CARD
   ============================================ */
.mm-product-card {
    background: #fff;
    display: flex;
    flex-direction: column;
    border-radius: var(--mm-radius-xl);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    height: 100%;
    position: relative;
    transition: var(--mm-transition);
}

.mm-product-card:hover {
    box-shadow: var(--mm-shadow-hover);
}

/* Neutralizar estilos WooCommerce en el grid */
.woocommerce ul.products li.product.mm-product-card {
    background: #fff;
    border: none;
    border-radius: var(--mm-radius-xl);
    padding: 0;
    margin: 0;
}

.woocommerce ul.products li.product.mm-product-card:hover {
    box-shadow: var(--mm-shadow-hover);
}

/* ── Imagen ── */
.mm-product-card__image {
    aspect-ratio: 1 / 1;
    padding: 8%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    overflow: hidden;
}

.mm-product-card__image a {
    display: flex;
    width: 100%;
    height: 100%;
}

.mm-product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.mm-product-card:hover .mm-product-card__image img {
    transform: scale(1.04);
}

/* ── Contenido ── */
.mm-product-card__content {
    padding: 12px 14px 0;
    background: #fff;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.mm-product-card__category {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #aaa;
    margin-bottom: 6px;
}

.mm-product-card__title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--mm-on-surface);
    margin-bottom: 8px;
    line-height: 1.4;
    min-height: 40px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mm-product-card__title a {
    color: inherit;
    text-decoration: none;
}

/* ── Precio ── */
.mm-product-card__price {
    text-align: right;
    margin-top: auto;
    padding: 6px 0;
}

.mm-product-card__price .price {
    display: block;
    color: var(--mm-primary);
    font-weight: 700;
    font-size: 1.2rem;
    line-height: 1.3;
}

.mm-product-card__price del {
    font-size: 0.8rem;
    color: #ccc;
    margin-right: 4px;
    font-weight: 400;
}

.mm-product-card__price ins {
    text-decoration: none;
}

/* ── Footer (qty + botón) ── */
.mm-product-card__footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0 12px;
}

/* Selector de cantidad */
.mm-qty-wrapper {
    display: flex;
    align-items: center;
    background: var(--mm-primary);
    border-radius: var(--mm-radius-md);
    height: 34px;
    overflow: hidden;
    flex-shrink: 0;
}

.mm-qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 34px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: opacity 0.2s;
    padding: 0;
}

.mm-qty-btn:hover { opacity: 0.75; }

.mm-qty-input {
    width: 28px;
    height: 34px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
    padding: 0;
    -moz-appearance: textfield;
}

.mm-qty-input::-webkit-inner-spin-button,
.mm-qty-input::-webkit-outer-spin-button { -webkit-appearance: none; }

/* Botón añadir — especificidad igual a .woocommerce a.add_to_cart_button (0,2,1) */
.mm-product-card__footer a.mm-add-btn {
    flex: 1;
    height: 34px;
    background: var(--mm-primary);
    color: #fff;
    border: none;
    border-radius: var(--mm-radius-md);
    padding: 0 10px;
    font-weight: 600;
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s;
    box-sizing: border-box;
}

.mm-product-card__footer a.mm-add-btn:hover {
    background: var(--mm-primary-dim);
    color: #fff;
    transform: none;
}

.mm-product-card__footer a.mm-add-btn i {
    font-size: 0.75rem;
    line-height: 1;
}

/* Botón "Elegir Modelo" (producto variable) */
.mm-product-card__footer a.mm-btn-primary {
    flex: 1;
    height: 34px;
    font-size: 0.78rem;
    padding: 0 10px;
}

/* ── Badges ── */
.mm-product-card__sale-badge,
.woocommerce span.onsale {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--mm-primary);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: var(--mm-radius-sm);
    z-index: 1;
}

.mm-product-card__stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e53e3e;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: var(--mm-radius-sm);
    z-index: 1;
}

/* ── Animación feedback carrito ── */
.mm-cart-added {
    animation: mm-pulse 0.4s ease-in-out;
}

@keyframes mm-pulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.15); }
    100% { transform: scale(1); }
}
