/* =========================
   PRODUCTS GRID
========================= */

.products-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
    width: 100%;
}

/* =========================
   PRODUCT CARD
========================= */

.product-card {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    background: #0b1220;
    transition:
        transform .45s cubic-bezier(.2,.8,.2,1),
        box-shadow .45s ease;
    box-shadow:
        0 10px 30px rgba(0,0,0,.35);
    min-height: 480px;
}

.product-card:hover {
    transform:
        translateY(-10px)
        scale(1.02);

    box-shadow:
        0 25px 60px rgba(0,0,0,.5),
        0 0 40px rgba(0,140,255,.18);
}

/* =========================
   IMAGE CONTAINER
========================= */

.image-container {
    background:
        radial-gradient(
            circle at top,
            rgba(0,166,255,.12),
            transparent 55%
        ),
        linear-gradient(
            180deg,
            #0b1220,
            #050816
        );
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 480px;
    overflow: hidden;
}

/* =========================
   OUT OF STOCK
========================= */

.product-card.out-of-stock {
    opacity: 1;
}

.product-card.out-of-stock .card-img-top {
    filter:
        grayscale(.35)
        brightness(.7);
}

.product-card.out-of-stock .product-actions {
    justify-content: center;
}

.product-card.out-of-stock .btn-quick-cart {
    width: 100%;
}




.product-card.out-of-stock .card-overlay {
    background:
        linear-gradient(
            to top,
            rgba(0,0,0,.96) 5%,
            rgba(0,0,0,.75) 45%,
            rgba(0,0,0,.45) 100%
        );
}

.product-card.out-of-stock::after {
    content: 'OUT OF STOCK';

    position: absolute;

    top: 18px;
right: -52px;

    width: 160px;

    text-align: center;

    padding: 10px 0;

    background:
        linear-gradient(
            135deg,
            #ff3b30,
            #ff6b6b
        );

    color: #fff;

    font-size: .72rem;
    font-weight: 800;
    letter-spacing: 2px;

    transform: rotate(45deg);

    z-index: 6;

    box-shadow:
        0 10px 30px rgba(255,59,48,.35);
}

.product-card.out-of-stock .btn-quick-cart:not(.out-stock-favorite) {

    background: rgba(255,255,255,.08);

    color: rgba(255,255,255,.5);

    cursor: not-allowed;

    box-shadow: none;
}

.product-card.out-of-stock:hover {
    transform: none;
}
.product-card.out-of-stock .card-title,
.product-card.out-of-stock .price-tag,
.product-card.out-of-stock .studio-name {
    opacity: .7;
}

/* =========================
   PRODUCT IMAGE
========================= */

.card-img-top {
    width: 100%;
    height: 100%;

    object-fit: scale-down;

    padding: 12px;

    display: block;

    transition: transform .7s ease;
}

.product-card:hover .card-img-top {
    transform: scale(1.08);
}

/* =========================
   OVERLAY
========================= */

.card-overlay {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            to top,
            rgba(0,0,0,.95) 5%,
            rgba(0,0,0,.45) 45%,
            rgba(0,0,0,.1) 100%
        );

    z-index: 1;
}

/* =========================
   BADGES
========================= */

.top-badges {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    gap: 8px;
    z-index: 5;
}

.product-badge {
    padding: 8px 14px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .5px;

    backdrop-filter: blur(10px);
}

.product-badge.new {
    background: rgba(0,255,170,.15);
    color: #00ffaa;
}

.product-badge.used {
    background: rgba(255,180,0,.15);
    color: #ffb347;
}

.product-badge.sale {
    background: rgba(255,0,90,.15);
    color: #ff4f88;
}

.product-badge.outofstock {
    background: rgba(255,0,0,.15);
    color: #ff6b6b;
}

/* =========================
   FAVORITE BUTTON
========================= */

.btn-favorite {
    position: absolute;
    top: 16px;
    right: 16px;

    width: 46px;
    height: 46px;

    border: none;
    border-radius: 50%;

    background: rgba(255,255,255,.12);

    color: #fff;

    z-index: 10;

    backdrop-filter: blur(10px);

    transition: all .3s ease;
}

.btn-favorite:hover {
    transform: scale(1.08);
    background: rgba(255,0,90,.18);
}

/* =========================
   CARD CONTENT
========================= */

/*.card-body {*/
/*    position: absolute;*/
/*    inset: auto 0 0;*/

/*    z-index: 3;*/

/*    padding: 22px;*/

/*    display: flex;*/
/*    flex-direction: column;*/
/*    gap: 10px;*/
/*}*/

/* =========================
   TITLE
========================= */

.card-title {
    margin: 0;
    line-height: 1.3;
}

.card-title a {
    color: #fff;
    text-decoration: none;

    font-size: 1.15rem;
    font-weight: 700;
}

/* =========================
   STUDIO
========================= */

.studio-name {
    color: rgba(255,255,255,.7);

    font-size: .82rem;

    margin: 0;
}

/* =========================
   COLORS
========================= */

.color-dots {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.color-thumb {
    width: 28px;
    height: 28px;

    border-radius: 50%;

    object-fit: cover;

    border: 2px solid rgba(255,255,255,.2);
}

.color-thumb-more {
    width: 28px;
    height: 28px;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: .65rem;

    background: rgba(255,255,255,.08);

    color: #fff;
}

/* =========================
   RATING
========================= */

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stars {
    color: #ffd54a;
    font-size: .8rem;
}

.rating-count {
    color: rgba(255,255,255,.5);
    font-size: .72rem;
}

/* =========================
   PRICE
========================= */

.price-tag {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;

    margin-top: 6px;

    color: #fff;

    font-size: 1.2rem;
    font-weight: 800;
}

.price-tag del {
    color: rgba(255,255,255,.45);
    font-size: .85rem;
}

/* =========================
   ACTIONS
========================= */

.product-actions {
    position: absolute;

    left: 20px;
    right: 20px;
    bottom: 20px;

    z-index: 10;

    display: flex;
    gap: 10px;
}

.btn-quick-cart {
    backdrop-filter: blur(12px);
}
.card-content {
    padding-bottom: 90px;
}

.btn-quick-cart {
    flex: 1;

    height: 50px;

    border: none;
    border-radius: 18px;

    background:
        linear-gradient(
            135deg,
            #006fcd,
            #00a6ff
        );

    color: #fff;

    font-weight: 700;

    transition: all .3s ease;
}

.btn-quick-cart:hover {
    transform: translateY(-2px);
    box-shadow:
        0 10px 25px rgba(0,166,255,.3);
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

    .products-grid {

        grid-template-columns:
            repeat(2, 1fr);

        gap: 14px;
    }
    
    .product-colors {
    gap: 6px;
}

.color-preview {

    width: 34px;
    height: 34px;

    border-radius: 10px;
}

    .product-card {
        min-height: 330px;
        border-radius: 22px;
    }

    .image-container {
        min-height: 330px;
    }
    .card-content {

        padding:
            14px
            14px
            78px;

        gap: 6px;
    }

    .card-title {

        font-size: .95rem;
        line-height: 1.2;
    }

    .studio-name {
        font-size: .7rem;
    }

    .price-tag {

        font-size: 1rem;
        gap: 6px;
    }

    .price-tag del {
        font-size: .72rem;
    }

    .btn-quick-cart {

        height: 42px;

        border-radius: 14px;

        font-size: .82rem;
    }

    .btn-favorite {

        width: 40px;
        height: 40px;
    }

    .product-badge {

        padding: 6px 12px;

        font-size: .62rem;
    }

    .stars {
        font-size: .7rem;
    }

    .product-actions {

        left: 14px;
        right: 14px;
        bottom: 14px;
    }

    .color-thumb {

        width: 22px;
        height: 22px;
    }

    .product-card.out-of-stock::after {

        width: 145px;

        font-size: .58rem;

        top: 16px;
        right: -46px;
    }
}

.card-overlay {
    z-index: 1;
}

.card-content {
    z-index: 5;
}

.top-badges {
    z-index: 6;
}

.btn-favorite {
    z-index: 7;
}

.product-card-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}
.card-content {
    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    z-index: 5;

    padding:
        22px
        22px
        95px;

    display: flex;
    flex-direction: column;

    gap: 10px;
}
/* META */

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;
}

/* TITLE */

.card-title {
    margin: 0;

    color: #fff;

    font-size: 1.15rem;
    font-weight: 700;

    line-height: 1.3;
}

/* STUDIO */

.studio-name {
    color: rgba(255,255,255,.7);

    font-size: .8rem;
}

/* PRICE ROW */

.price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    margin-top: 8px;
}
/* =========================
   PRICE SYSTEM
========================= */

.price-tag {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 8px;

    margin-top: 8px;
}

.current-price {

    color: #fff;

    font-size: 1.5rem;
    font-weight: 800;

    letter-spacing: -.5px;
}

.current-price small {

    font-size: .72rem;

    opacity: .7;

    margin-left: 4px;
}

.old-price {

    color: rgba(255,255,255,.45);

    font-size: .9rem;
    font-weight: 500;
}

.discount-badge {

    padding: 4px 10px;

    border-radius: 999px;

    background:
        linear-gradient(
            135deg,
            #ff4f88,
            #ff7a00
        );

    color: #fff;

    font-size: .68rem;
    font-weight: 700;
}

.modern-range-price .range-price {

    display: flex;
    align-items: center;
    gap: 4px;

    color: #fff;

    font-size: 1.2rem;
    font-weight: 700;
}

.price-from {

    color: rgba(255,255,255,.55);

    font-size: .72rem;

    text-transform: uppercase;

    letter-spacing: 1px;
}

/* =========================
   PRODUCT COLORS
========================= */

.product-colors {

    display: flex;
    align-items: center;

    gap: 8px;

    margin-top: 10px;
}

.color-preview {

    position: relative;

    width: 42px;
    height: 42px;

    border-radius: 14px;

    overflow: hidden;

    background:
        rgba(255,255,255,.08);

    border:
        2px solid transparent;

    transition:
        transform .25s ease,
        border-color .25s ease,
        box-shadow .25s ease;
}

.color-preview img {

    width: 100%;
    height: 100%;

    object-fit: cover;
}

.color-preview.active {

    border-color: #00a6ff;

    box-shadow:
        0 0 20px rgba(0,166,255,.35);
}

.color-preview:hover {

    transform: translateY(-2px);

    border-color: rgba(255,255,255,.4);
}

.more-colors {

    display: flex;
    align-items: center;
    justify-content: center;

    color: #fff;

    font-size: .72rem;
    font-weight: 700;

    background:
        rgba(255,255,255,.08);

    backdrop-filter: blur(10px);
}

/* =========================
   SAVE FOR LATER
========================= */

.out-stock-favorite {
    cursor: pointer !important;

    opacity: 1 !important;

    color: #fff !important;

    background:
        linear-gradient(
            135deg,
            rgba(255,255,255,.08),
            rgba(255,255,255,.14)
        ) !important;
    border:
        1px solid rgba(255,255,255,.08);

    backdrop-filter: blur(14px);

    font-weight: 700;

    gap: 10px;

    transition:
        all .3s ease;
}

.out-stock-favorite i {

    color: #ff6fa5;

    font-size: .95rem;
}

.out-stock-favorite:hover {
    transform: translateY(-2px);

    background:
        linear-gradient(
            135deg,
            #ff4f88,
            #ff7aa8
        ) !important;

    box-shadow:
        0 12px 30px rgba(255,79,136,.35);

    border-color:
        transparent;
}

.out-stock-favorite:hover i {

    color: #fff;
}


.btn-favorite.active {

    background:
        linear-gradient(
            135deg,
            #ff4f88,
            #ff7aa8
        );

    box-shadow:
        0 10px 25px rgba(255,79,136,.35);
}

.btn-favorite.active i {

    color: #fff;

    animation:
        favoritePop .35s ease;
}

@keyframes favoritePop {

    0% {
        transform: scale(.7);
    }

    60% {
        transform: scale(1.25);
    }

    100% {
        transform: scale(1);
    }
}