/* Каталог товаров — premium карточки */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 14px;
}

.product-card {
    position: relative;
    background: linear-gradient(165deg, var(--surface-elevated) 0%, var(--surface) 100%);
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(var(--primary-rgb, 147, 51, 234), 0.14);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.28),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.28s ease,
        border-color 0.28s ease;
    cursor: pointer;
    animation: fadeIn 0.45s ease-out both;
    display: flex;
    flex-direction: column;
    height: 100%;
    isolation: isolate;
}

.product-card-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse 90% 60% at 50% 0%,
        rgba(var(--primary-rgb, 147, 51, 234), 0.16) 0%,
        transparent 65%
    );
    opacity: 0;
    transition: opacity 0.28s ease;
    pointer-events: none;
    z-index: 0;
}

.product-card:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--primary-rgb, 147, 51, 234), 0.42);
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.35),
        0 0 28px rgba(var(--primary-rgb, 147, 51, 234), 0.14),
        0 0 0 1px rgba(var(--primary-light-rgb, 192, 132, 252), 0.12) inset;
}

.product-card:hover .product-card-glow {
    opacity: 1;
}

.product-card:active {
    transform: scale(0.985) translateY(-1px);
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    height: 128px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 1;
    overflow: hidden;
}

.product-image-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 20%, rgba(var(--primary-rgb, 147, 51, 234), 0.12) 0%, transparent 45%),
        radial-gradient(circle at 70% 80%, rgba(var(--primary-light-rgb, 192, 132, 252), 0.08) 0%, transparent 40%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
}

.product-image-wrapper::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--primary-rgb, 147, 51, 234), 0.25), transparent);
}

.product-image {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    padding: 10px 12px;
    border: none;
    outline: none;
}

.product-card:hover .product-image {
    transform: scale(1.06);
}

.product-category-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: var(--primary-light);
    background: rgba(11, 10, 16, 0.72);
    border: 1px solid rgba(var(--primary-rgb, 147, 51, 234), 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    max-width: calc(100% - 44px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-info {
    position: relative;
    z-index: 1;
    padding: 10px 11px 11px;
    margin-top: auto;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
    line-height: 1.35;
    min-height: 32px;
}

.product-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.product-price {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 4px 14px rgba(var(--primary-rgb, 147, 51, 234), 0.35);
    white-space: nowrap;
}

.product-tap-hint {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary-light);
    background: rgba(var(--primary-rgb, 147, 51, 234), 0.12);
    border: 1px solid rgba(var(--primary-rgb, 147, 51, 234), 0.22);
    transition: all 0.25s ease;
}

.product-tap-hint svg {
    width: 14px;
    height: 14px;
}

.product-card:hover .product-tap-hint {
    background: rgba(var(--primary-rgb, 147, 51, 234), 0.22);
    transform: translateX(2px);
}

.product-share-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: rgba(11, 10, 16, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    z-index: 10;
    color: var(--primary-light);
}

.product-share-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 0 16px rgba(var(--primary-rgb, 147, 51, 234), 0.45);
}

.product-share-btn:active {
    transform: scale(0.92);
}

.product-share-btn svg {
    width: 15px;
    height: 15px;
}
