/* Lista móvil: un producto por fila + stepper de carrito */
.product-stock-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    z-index: 5;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1;
}
.product-stock-badge i { font-size: 0.6rem; }
.product-stock-badge.stock-ok { background: #16a34a; color: #fff; box-shadow: 0 2px 6px rgba(22,163,74,0.35); }
.product-stock-badge.stock-agotado { background: #f3a4a4; color: #7f1d1d; box-shadow: 0 2px 6px rgba(220,38,38,0.2); }

.tamca-cart-add-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 999px;
    background: #ffcc21;
    color: #1a2224;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(255,204,33,0.45);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.tamca-cart-add-btn:hover { transform: scale(1.05); box-shadow: 0 4px 12px rgba(255,204,33,0.5); }
.tamca-cart-add-btn i { font-size: 1rem; }

.tamca-cart-stepper {
    display: inline-flex;
    align-items: center;
    gap: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(26,34,36,0.08);
}
.tamca-cart-stepper__btn {
    width: 34px;
    height: 34px;
    border: none;
    background: #f9fafb;
    color: #1a2224;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.tamca-cart-stepper__btn:hover { background: #ffcc21; }
.tamca-cart-stepper__qty {
    min-width: 2rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 800;
    color: #1a2224;
    padding: 0 0.15rem;
}

.tamca-cart-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    z-index: 6;
}
.tamca-cart-actions .tamca-cart-fav {
    width: 36px;
    height: 36px;
    background: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(26,34,36,0.1);
}
.tamca-cart-actions .tamca-cart-fav:hover { background: #f3f4f6; }

.tamca-product-card__code {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.2rem;
}

@media (max-width: 767.98px) {
    .tamca-products-grid.row {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        margin-left: 0;
        margin-right: 0;
        gap: 0.65rem;
    }
    .tamca-product-col {
        flex: 0 0 100%;
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
        margin-bottom: 0 !important;
    }
    .tamca-product-card {
        display: grid;
        grid-template-columns: 88px minmax(0, 1fr) auto;
        grid-template-areas: "media info actions";
        gap: 0.65rem 0.75rem;
        align-items: center;
        text-align: left;
        padding: 0.7rem 0.75rem;
        border: 1px solid #e8eaed;
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 2px 10px rgba(26,34,36,0.06);
        min-height: unset;
    }
    .tamca-product-card__media {
        grid-area: media;
        margin-bottom: 0 !important;
        min-height: 88px;
        width: 88px;
        border-radius: 10px;
        overflow: hidden;
        background: #f8f9fa;
    }
    .tamca-product-card__media img {
        max-height: 88px;
        width: 100%;
        object-fit: contain;
    }
    .tamca-product-card__info {
        grid-area: info;
        min-width: 0;
    }
    .tamca-product-card__info a {
        font-size: 0.9rem !important;
        line-height: 1.35;
        margin-bottom: 0;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: normal;
    }
    .tamca-cart-actions {
        grid-area: actions;
        position: static !important;
        padding: 0 !important;
        align-self: center;
    }
    .tamca-product-card .product-stock-badge {
        font-size: 0.55rem;
        padding: 2px 6px;
        top: 4px;
        left: 4px;
    }
}

@media (min-width: 768px) {
    .tamca-product-card {
        display: flex;
        flex-direction: column;
        height: 100%;
    }
    .tamca-product-card__media {
        position: relative;
        width: 100%;
    }
    .tamca-cart-actions {
        position: absolute;
        top: 0;
        right: 0;
        padding: 6%;
    }
}
