/* ═══════════════════════════════════════════
   UNIFIED PRODUCT CARD — CS2 Skin Store
   Single source for all product card styles.
   Loaded LAST — overrides style.css / shop.css / discount.css.
   Do NOT add product-card rules elsewhere.
═══════════════════════════════════════════ */

/* ── Card container ── */
.product-card {
    background: #111f11;
    border: 1px solid #1e3a1e;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 0;
    transition: border-color .25s ease, box-shadow .25s ease;
    transform: none;
    cursor: default;
}

.product-card:hover {
    border-color: #7fff00;
    box-shadow: 0 0 16px rgba(127, 255, 0, .15);
    transform: none;
}

/* ── Image / media area ── */
.product-card__media {
    position: relative;
    background: #0a1a0a;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card__img-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.product-card__img {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    object-fit: contain;
    display: block;
    transition: transform .25s ease;
}

.product-card:hover .product-card__img {
    transform: scale(1.05);
}

/* ── Discount badge ── */
.product-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    background: #ff3a3a;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    padding: 3px 7px;
    border-radius: 4px;
    pointer-events: none;
}

/* ── Wishlist button ── */
.product-card__wish {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 8px;
    background: rgba(0, 0, 0, .5);
    border: 1px solid #2a4a2a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: border-color .2s ease;
}

.product-card__wish:hover { border-color: #7fff00; }

.product-card__wish svg {
    fill: none;
    stroke: currentColor;
    transition: fill .2s ease, stroke .2s ease;
    pointer-events: none;
    flex-shrink: 0;
}

.product-card__wish.is-wishlisted svg,
.product-card__wish.active svg {
    fill: #fff;
    stroke: #fff;
}

/* ── Boost tags (discount page overlay) ── */
.disc-boosts {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 4px;
    pointer-events: none;
}

.disc-product-card .product-card__badge {
    display: none;
}

/* ── Card body ── */
.product-card__body {
    padding: 12px 16px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0;
}

/* ── Product name ── */
.product-card__name {
    font-size: 14px;
    font-weight: 600;
    color: #e8e8e8;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    transition: color .2s ease;
    margin: 0 0 4px;
}

.product-card__name:hover { color: #7fff00; }

/* ── Category label ── */
.product-card__cat {
    font-size: 11px;
    color: #6aaa6a;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin: 0 0 8px;
    line-height: 1.2;
}

/* ── Price row ── */
.product-card__price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 0 0 12px;
    flex-wrap: wrap;
}

.product-card__price {
    font-size: 18px;
    font-weight: 700;
    color: #7fff00;
    line-height: 1;
}

.product-card__old {
    font-size: 13px;
    color: #555;
    text-decoration: line-through;
}

/* ── Add to Cart button ── */
.product-card__add {
    width: 100%;
    height: 36px;
    margin-top: auto;
    background: #7fff00;
    color: #0a1a0a;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background .2s ease, transform .15s ease;
    flex-shrink: 0;
}

.product-card__add:hover { background: #a8ff3e; transform: scale(.98); }
.product-card__add:active { transform: scale(.96); }

.product-card__add.loading,
.product-card__add:disabled {
    opacity: .7;
    cursor: wait;
    transform: none;
}

/* ── Hide legacy card elements (replaced in new structure) ── */
.product-card__sale,
.product-card__basket { display: none !important; }

/* Exterior / skin sub-name line must not appear on product cards */
.dc-exterior { display: none !important; }

/* Old link wrapper — hide when cards use new __media structure */
.product-card:has(.product-card__media) > .product-card__link { display: none !important; }

/* ── Rarity glow — keep subtle variants on new cards ── */
.card-bg--rare:hover        { box-shadow: 0 0 20px rgba(75,105,255,.2); }
.card-bg--legendary:hover   { box-shadow: 0 0 20px rgba(136,71,255,.2); }
.card-bg--immortal:hover    { box-shadow: 0 0 20px rgba(228,174,57,.2); }
.card-bg--exceedingly:hover { box-shadow: 0 0 20px rgba(211,44,230,.2); }

/* ── Grid layout (shared) ── */
.shop-grid,
.disc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 1200px) {
    .shop-grid,
    .disc-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .shop-grid,
    .disc-grid { grid-template-columns: repeat(2, 1fr); padding: 16px; }
}

@media (max-width: 480px) {
    .shop-grid,
    .disc-grid { grid-template-columns: 1fr; }
}

/* ── Home page slider cards — fit inside mush-slider ── */
.mush-page .product-card {
    flex-shrink: 0;
    width: 290px;
}


/* ════════════════════════════════════════════════════════════
   PER-RARITY CARD BACKGROUNDS — FULL CARD
   The Card-weapon-*.png files are semi-transparent faceted overlays;
   we layer them over a dark gradient across the ENTIRE card (image +
   info, no separate dark bottom), one image per rarity. Applied to
   every product card incl. home (.mush-scard has no rarity → default).
   `background` shorthand keeps specificity above shop/discount.
   Files: img/Card-weapon-*.png (typos: anciant=ancient, mmortal=immortal)
════════════════════════════════════════════════════════════ */

/* Remove the old grid-line texture overlay AND the coloured rarity glow,
   so the faceted weapon background shows on its own. */
.product-card__img-wrap::after  { content: none !important; display: none !important; }
.product-card__img-wrap::before { display: none !important; background: none !important; }

/* Faceted rarity background painted DIRECTLY on the card areas — image area
   AND info area together = the whole card (no separate dark bottom). This is
   the proven-visible approach (background-image on the real elements).
   Default image (cards without a rarity, incl. home .mush-scard). */
.product-card .dc-img-area,
.product-card .dc-info,
.product-card .product-card__media,
.product-card .product-card__body,
.mush-page .mush-scard-img,
.mush-page .mush-scard-body {
    background-image: url('../img/card-weapon.png') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* Per-rarity (dc-cards: .dc-img-area + .dc-info; wishlist: __media + __body) */
.product-card.card-bg--rare .dc-img-area,        .product-card.card-bg--rare .dc-info,
.product-card.card-bg--rare .product-card__media,.product-card.card-bg--rare .product-card__body {
    background-image: url('../img/Card-weapon-rare.png') !important;
}
.product-card.card-bg--ancient .dc-img-area,        .product-card.card-bg--ancient .dc-info,
.product-card.card-bg--ancient .product-card__media,.product-card.card-bg--ancient .product-card__body {
    background-image: url('../img/Card-weapon-anciant.png') !important;
}
.product-card.card-bg--legendary .dc-img-area,        .product-card.card-bg--legendary .dc-info,
.product-card.card-bg--legendary .product-card__media,.product-card.card-bg--legendary .product-card__body {
    background-image: url('../img/Card-weapon-legendary.png') !important;
}
.product-card.card-bg--common .dc-img-area,        .product-card.card-bg--common .dc-info,
.product-card.card-bg--common .product-card__media,.product-card.card-bg--common .product-card__body {
    background-image: url('../img/Card-weapon-common.png') !important;
}
.product-card.card-bg--uncommon .dc-img-area,        .product-card.card-bg--uncommon .dc-info,
.product-card.card-bg--uncommon .product-card__media,.product-card.card-bg--uncommon .product-card__body {
    background-image: url('../img/Card-weapon-uncommon.png') !important;
}
.product-card.card-bg--exceedingly .dc-img-area,        .product-card.card-bg--exceedingly .dc-info,
.product-card.card-bg--exceedingly .product-card__media,.product-card.card-bg--exceedingly .product-card__body {
    background-image: url('../img/Card-weapon-exceedingly.png') !important;
}
.product-card.card-bg--immortal .dc-img-area,        .product-card.card-bg--immortal .dc-info,
.product-card.card-bg--immortal .product-card__media,.product-card.card-bg--immortal .product-card__body {
    background-image: url('../img/Card-weapon-mmortal.png') !important;
}
