/* ==========================================================================
   EASY3D — Catalog Product Cards & Grid
   ========================================================================== */

.catalog-products-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.4rem;
}

@keyframes cardStaggerIn {
    0% { opacity: 0; transform: translateY(16px) scale(0.97); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.product-card.card-stagger-in {
    animation: cardStaggerIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.product-card,
#catalogGrid .print-card,
.catalog-products-grid .product-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px !important;
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    padding: 0 !important;
}

.product-card:hover,
#catalogGrid .print-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 229, 255, 0.35);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7), 0 0 25px rgba(0, 229, 255, 0.12);
}

.product-image-box,
#catalogGrid .catalog-card-image,
.catalog-products-grid .catalog-card-image {
    position: relative !important;
    width: 100% !important;
    aspect-ratio: 1.18 / 1 !important;
    background: radial-gradient(circle at center, rgba(0, 229, 255, 0.06) 0%, rgba(0, 0, 0, 0.4) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden !important;
    border-radius: 23px 23px 0 0 !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.product-image-box img,
#catalogGrid .catalog-card-image img,
.catalog-products-grid .catalog-card-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 23px 23px 0 0 !important;
    display: block !important;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover .product-image-box img,
#catalogGrid .print-card:hover .catalog-card-image img {
    transform: scale(1.06);
}

.product-image-box::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 40px;
    background: linear-gradient(to top, rgba(10, 14, 22, 0.7), transparent);
    pointer-events: none;
    z-index: 1;
}

.product-image-box .catalog-icon {
    font-size: 3.6rem;
    color: var(--accent-cyan);
    filter: drop-shadow(0 0 16px rgba(0, 229, 255, 0.35));
    transition: transform 0.4s ease;
    pointer-events: none;
}

.product-card:hover .product-image-box .catalog-icon { transform: scale(1.08); }

.product-badges {
    position: absolute;
    top: 10px; left: 10px;
    display: flex; flex-direction: column; gap: 4px;
    z-index: 2;
}

.badge-hit {
    background: #00e5ff; color: #000;
    font-size: 0.7rem; font-weight: 800;
    padding: 2px 7px; border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 229, 255, 0.35);
}

/* Floating Favorite Heart Button */
.product-fav-btn {
    position: absolute;
    top: 12px; right: 12px;
    z-index: 5;
    width: 38px; height: 38px;
    border-radius: 50%;
    background: rgba(10, 14, 22, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-secondary);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0; box-sizing: border-box;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.product-fav-btn i {
    font-size: 1rem !important;
    color: var(--text-secondary) !important;
    transition: transform 0.2s ease, color 0.2s ease;
}

.product-fav-btn:hover {
    border-color: rgba(255, 51, 102, 0.5) !important;
    background: rgba(255, 51, 102, 0.15) !important;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 51, 102, 0.3);
}

.product-fav-btn:hover i { color: #ff3366 !important; }

.product-fav-btn.active {
    border-color: rgba(255, 51, 102, 0.5) !important;
    background: rgba(255, 51, 102, 0.2) !important;
    box-shadow: 0 0 12px rgba(255, 51, 102, 0.25);
}

.product-fav-btn.active i { color: #ff3366 !important; }

/* Product Body */
.product-body {
    padding: 1rem 1.1rem 1.2rem;
    display: flex; flex-direction: column; flex: 1;
    text-align: center; position: relative; z-index: 2;
}

.product-art {
    font-size: 0.72rem; color: var(--text-secondary);
    opacity: 0.75; margin-bottom: 0.3rem; font-weight: 500;
}

.product-title {
    font-size: 1.05rem; font-weight: 700;
    color: var(--text-primary); margin: 0 0 0.35rem 0; line-height: 1.3;
    min-height: 2.6rem; display: flex; align-items: center; justify-content: center;
}

.product-status {
    font-size: 0.78rem; color: #00e676; margin-bottom: 0.55rem;
    font-weight: 600; display: inline-flex; align-items: center;
    justify-content: center; gap: 5px;
}

.product-status::before {
    content: ''; display: inline-block; width: 6px; height: 6px;
    border-radius: 50%; background: #00e676; box-shadow: 0 0 6px #00e676;
}

.product-price-row {
    display: flex; align-items: baseline; justify-content: center;
    gap: 8px; margin-bottom: 1rem; line-height: 1;
}

.product-price-current {
    font-size: 1.25rem; font-weight: 800; color: var(--accent-cyan);
}

/* Action Row & Full-Width Buy Button */
.product-actions-row {
    display: flex; align-items: center; width: 100%;
    margin-top: auto; box-sizing: border-box;
}

.product-actions-row .btn-product-buy,
.product-actions-row .btn-cart-action {
    position: relative; overflow: hidden;
    display: flex !important; width: 100% !important; max-width: 100% !important;
    height: 46px; border-radius: 50px;
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.18), rgba(179, 136, 255, 0.18));
    border: 1px solid rgba(0, 229, 255, 0.35);
    color: #fff; font-family: var(--font-main); font-weight: 700;
    font-size: 0.95rem; letter-spacing: 0.3px; cursor: pointer;
    align-items: center; justify-content: center; gap: 9px;
    padding: 0 1.5rem; box-sizing: border-box;
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.12);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.btn-product-buy::before {
    content: ''; position: absolute; top: 0; left: -100%;
    width: 50%; height: 100%; border-radius: inherit;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: skewX(-20deg); transition: left 0.6s ease; pointer-events: none;
}

.btn-product-buy:hover {
    border-color: var(--accent-cyan);
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.35), rgba(179, 136, 255, 0.35));
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.35);
    transform: translateY(-2px); color: #fff;
}

.btn-product-buy:hover::before { left: 150%; }

.btn-product-buy.btn-added {
    background: rgba(0, 230, 118, 0.2) !important;
    border-color: rgba(0, 230, 118, 0.5) !important;
    color: #00e676 !important;
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.3) !important;
}

/* Mobile Responsive Cards */
@media (max-width: 992px) {
    .catalog-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    .product-card { border-radius: 18px; }
    .product-image-box { aspect-ratio: 1.15 / 1; }
    .product-image-box .catalog-icon { font-size: 2.8rem; }
    .product-fav-btn {
        top: 8px; right: 8px; width: 32px; height: 32px;
    }
    .product-fav-btn i { font-size: 0.85rem !important; }
    .product-body { padding: 0.75rem 0.65rem 0.85rem; }
    .product-art { font-size: 0.68rem; margin-bottom: 0.2rem; }
    .product-title {
        font-size: 0.86rem; margin-bottom: 0.25rem; line-height: 1.25;
        min-height: 2.15rem; display: flex; align-items: center; justify-content: center;
        word-break: break-word;
    }
    .product-status { font-size: 0.72rem; margin-bottom: 0.4rem; }
    .product-price-row { margin-bottom: 0.7rem; }
    .product-price-current { font-size: 1.05rem; }
    .product-actions-row .btn-product-buy,
    .product-actions-row .btn-cart-action {
        height: 38px; font-size: 0.84rem; gap: 6px; padding: 0 0.5rem; white-space: nowrap;
    }
}
