/* =====================================================
   Shared Product Card (Shop + Index)
   Single source of truth – no container, full-width layout
   ===================================================== */

.product-card {
    background: linear-gradient(180deg, #0f223a, #071a2f);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    max-width: 100%;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
}

.product-card .product-image {
    display: block;
    position: relative;
    width: 100%;
    height: 200px;
    flex-shrink: 0;
    overflow: hidden;
}

.product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
}

.product-card img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

.product-card .product-image .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 27, 45, 0.4) 0%, transparent 50%);
    pointer-events: none;
}

.product-card .product-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.6));
    pointer-events: none;
}

.product-card .product-content {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.product-card .product-title {
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.3px;
    color: #fff;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 48px;
}

.product-card .meta {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.product-card .meta .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 159, 28, 0.25);
    color: #ff9f1c;
    border-radius: 6px;
    font-weight: 600;
}

.product-card .meta .discount-pct {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Platform badge (Steam/Eneba style) – use with .platform-badge in markup */
.product-card .platform-badge {
    background: rgba(255, 255, 255, 0.06);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
}

/* Bottom area: price + button stay aligned (footer behavior) */
.product-card .price-row {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.product-card .price {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.125rem;
    white-space: nowrap;
    min-width: 0;
}

.product-card .price .current-price,
.product-card .current-price {
    white-space: nowrap;
}

.product-card .old-price {
    font-size: 13px;
    opacity: 0.6;
    text-decoration: line-through;
    color: rgba(255, 255, 255, 0.8);
}

.product-card .current-price {
    font-weight: 700;
    font-size: 18px;
    color: #ff9f1c;
    white-space: nowrap;
}

.product-card .add-to-cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    min-height: 42px;
    min-width: 42px;
    flex-shrink: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #ff9f1c, #ff7a00);
    color: #0f1b2d;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.product-card .add-to-cart-btn:hover {
    transform: scale(1.08);
    color: #0f1b2d;
}

.product-card .add-to-cart-btn i {
    font-size: 1.25rem;
}

/* Column/row stretch so cards fill grid and have equal height (Shop + Index) */
.products-grid .col-sm-6,
.products-grid .col-md-4,
.products-grid .col-lg-3,
.row .col-sm-6,
.row .col-md-4,
.row .col-lg-3 {
    display: flex;
}

.products-grid .product-card,
.row .product-card {
    width: 100%;
}

/* Prevent card stretching on narrow desktop / resized window */
@media (max-width: 1200px) {
    .product-card {
        max-width: 100%;
    }
}

/* Mobile small: spacing and price readability */
@media (max-width: 480px) {
    .product-card {
        margin-bottom: 16px;
    }

    .product-card .price {
        font-size: 16px;
    }
}

/* Mobile: single column (parent: col-12 col-sm-6 col-md-4 col-lg-3) */
@media (max-width: 576px) {
    .product-card .product-image {
        height: 200px;
    }

    .product-card .product-content {
        padding: 12px;
    }

    .product-card .product-title {
        font-size: 14px;
    }

    .product-card .current-price {
        font-size: 16px;
    }
}
