/**
 * Products Listing/Search Pages
 * Estilos de cards para /productos y /productos/buscar
 */

.products-index-page .products-list-card,
.products-search-page .products-search-card,
.products-index-page .home-product-card,
.products-search-page .home-product-card {
    transition: transform 0.2s;
}

.products-index-page .products-list-card:hover,
.products-search-page .products-search-card:hover,
.products-index-page .home-product-card:hover,
.products-search-page .home-product-card:hover {
    transform: translateY(-3px);
}

.products-index-page .products-order-select {
    width: auto;
}

.products-index-page .product-card,
.products-search-page .product-card,
.products-index-page .home-product-card,
.products-search-page .home-product-card {
    position: relative;
    border-radius: 0;
    overflow: hidden;
    background: #fff;
    transition: all 0.3s ease;
}

.products-index-page .product-card:hover,
.products-search-page .product-card:hover,
.products-index-page .home-product-card:hover,
.products-search-page .home-product-card:hover {
    box-shadow: var(--shadow-lg);
}

.products-index-page .product-card .product-image,
.products-search-page .product-card .product-image,
.products-index-page .home-product-card .product-image,
.products-search-page .home-product-card .product-image {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
    background: var(--light-color);
}

.products-index-page .product-card .product-image img,
.products-search-page .product-card .product-image img,
.products-index-page .home-product-card .product-image img,
.products-search-page .home-product-card .product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s;
}

.products-index-page .product-card:hover .product-image img,
.products-search-page .product-card:hover .product-image img,
.products-index-page .home-product-card:hover .product-image img,
.products-search-page .home-product-card:hover .product-image img {
    transform: none;
}

.products-index-page .product-card .product-badge,
.products-search-page .product-card .product-badge,
.products-index-page .home-product-card .product-badge,
.products-search-page .home-product-card .product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 1;
}

.products-index-page .product-card .badge-sale,
.products-search-page .product-card .badge-sale,
.products-index-page .home-product-card .badge-sale,
.products-search-page .home-product-card .badge-sale {
    background: var(--danger-color);
    color: #fff;
}

.products-index-page .product-card .badge-new,
.products-search-page .product-card .badge-new,
.products-index-page .home-product-card .badge-new,
.products-search-page .home-product-card .badge-new {
    background: #ff007f;
    color: #fff;
    top: 8px;
    left: 6px;
    padding: 2px 8px;
    font-size: 10px;
    transform: rotate(-14deg);
    transform-origin: top left;
}

.products-index-page .product-card .product-actions,
.products-search-page .product-card .product-actions,
.products-index-page .home-product-card .product-actions,
.products-search-page .home-product-card .product-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s;
    z-index: 1;
}

.products-index-page .product-card:hover .product-actions,
.products-search-page .product-card:hover .product-actions,
.products-index-page .home-product-card:hover .product-actions,
.products-search-page .home-product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
}

.products-index-page .product-card .product-actions .btn,
.products-search-page .product-card .product-actions .btn,
.products-index-page .home-product-card .product-actions .btn,
.products-search-page .home-product-card .product-actions .btn {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    background: #fff;
    border: none;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-color);
    transition: all 0.2s;
}

.products-index-page .product-card .product-actions .btn:hover,
.products-search-page .product-card .product-actions .btn:hover,
.products-index-page .home-product-card .product-actions .btn:hover,
.products-search-page .home-product-card .product-actions .btn:hover {
    background: var(--primary-color);
    color: #fff;
}

.products-index-page .product-card .product-info,
.products-search-page .product-card .product-info,
.products-index-page .home-product-card .product-info,
.products-search-page .home-product-card .product-info {
    padding: 8px;
}

.products-index-page .product-card .product-category,
.products-search-page .product-card .product-category,
.products-index-page .home-product-card .product-category,
.products-search-page .home-product-card .product-category {
    font-size: 9px;
    color: #15803d;
    font-weight: 700;
}

.products-index-page .product-card .product-category:hover,
.products-search-page .product-card .product-category:hover,
.products-index-page .home-product-card .product-category:hover,
.products-search-page .home-product-card .product-category:hover {
    color: #166534;
}

.products-index-page .product-card .product-title,
.products-search-page .product-card .product-title,
.products-index-page .home-product-card .product-title,
.products-search-page .home-product-card .product-title {
    font-size: 11px;
    line-height: 1.2;
    margin: 4px 0;
    height: 2.4em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.products-index-page .product-card .product-title a,
.products-search-page .product-card .product-title a,
.products-index-page .home-product-card .product-title a,
.products-search-page .home-product-card .product-title a {
    color: var(--dark-color);
}

.products-index-page .product-card .product-title a:hover,
.products-search-page .product-card .product-title a:hover,
.products-index-page .home-product-card .product-title a:hover,
.products-search-page .home-product-card .product-title a:hover {
    color: var(--primary-color);
}

.products-index-page .product-card .product-purchase-row,
.products-search-page .product-card .product-purchase-row,
.products-index-page .home-product-card .product-purchase-row,
.products-search-page .home-product-card .product-purchase-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.products-index-page .product-card .product-price,
.products-search-page .product-card .product-price,
.products-index-page .home-product-card .product-price,
.products-search-page .home-product-card .product-price {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    white-space: nowrap;
    min-width: 0;
}

.products-index-page .product-card .product-price.has-sale,
.products-search-page .product-card .product-price.has-sale,
.products-index-page .home-product-card .product-price.has-sale,
.products-search-page .home-product-card .product-price.has-sale {
    align-items: baseline;
    gap: 6px;
}

.products-index-page .product-card .price-current,
.products-search-page .product-card .price-current,
.products-index-page .home-product-card .price-current,
.products-search-page .home-product-card .price-current {
    font-size: 14px;
    color: #e91e63;
    font-weight: 800;
}

.products-index-page .product-card .product-price.has-sale .price-old,
.products-search-page .product-card .product-price.has-sale .price-old,
.products-index-page .home-product-card .product-price.has-sale .price-old,
.products-search-page .home-product-card .product-price.has-sale .price-old {
    order: 1;
    color: var(--gray-color);
    font-size: 14px;
    text-decoration: line-through;
}

.products-index-page .product-card .product-price.has-sale .price-current,
.products-search-page .product-card .product-price.has-sale .price-current,
.products-index-page .home-product-card .product-price.has-sale .price-current,
.products-search-page .home-product-card .product-price.has-sale .price-current {
    order: 2;
    color: #e91e63;
    font-size: 14px;
    font-weight: 800;
}

.products-index-page .product-card .price-old,
.products-search-page .product-card .price-old,
.products-index-page .home-product-card .price-old,
.products-search-page .home-product-card .price-old {
    font-size: 10px;
}

.products-index-page .product-card .home-add-cart,
.products-search-page .product-card .home-add-cart,
.products-index-page .product-card .btn-add-cart,
.products-search-page .product-card .btn-add-cart,
.products-index-page .home-product-card .home-add-cart,
.products-search-page .home-product-card .home-add-cart,
.products-index-page .home-product-card .btn-add-cart,
.products-search-page .home-product-card .btn-add-cart {
    flex: 0 0 42px;
    width: 42px;
    height: 28px;
    padding: 0;
    border: 1px solid var(--success-color);
    border-radius: 999px;
    background: var(--success-color);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.products-index-page .product-card .home-add-cart:hover,
.products-search-page .product-card .home-add-cart:hover,
.products-index-page .product-card .btn-add-cart:hover,
.products-search-page .product-card .btn-add-cart:hover,
.products-index-page .home-product-card .home-add-cart:hover,
.products-search-page .home-product-card .home-add-cart:hover,
.products-index-page .home-product-card .btn-add-cart:hover,
.products-search-page .home-product-card .btn-add-cart:hover {
    background: #ff6a00;
    border-color: #ff6a00;
    color: #fff;
}

.products-index-page .product-card .product-rating,
.products-search-page .product-card .product-rating,
.products-index-page .home-product-card .product-rating,
.products-search-page .home-product-card .product-rating {
    font-size: 10px;
}

.products-index-page .product-card .card-footer .btn,
.products-search-page .product-card .card-footer .btn,
.products-index-page .home-product-card .card-footer .btn,
.products-search-page .home-product-card .card-footer .btn {
    font-size: 11px;
    padding: 3px 6px;
}

@media (max-width: 767px) {
    .products-index-page .products-list-card .product-title,
    .products-search-page .products-search-card .product-title,
    .products-index-page .home-product-card .product-title,
    .products-search-page .home-product-card .product-title {
        font-size: 13px;
    }

    .products-index-page .products-list-card .price-current,
    .products-search-page .products-search-card .price-current,
    .products-index-page .home-product-card .price-current,
    .products-search-page .home-product-card .price-current {
        font-size: 16px;
    }
}
