/* =========================
   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 {
    position: relative;

    width: 100%;
    height: 100%;

    min-height: 480px;

    overflow: hidden;

    background:
        radial-gradient(
            circle at top,
            rgba(0,166,255,.12),
            transparent 55%
        ),
        linear-gradient(
            180deg,
            #0b1220,
            #050816
        );
}

/* =========================
   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 {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    border-radius: 0 !important;

    object-fit: cover;
    object-position: center;

    padding: 0;

    display: block;

    transform: scale(.92);

    transition:
        transform .7s cubic-bezier(.2,.8,.2,1),
        filter .5s ease;

    z-index: 0;
}

/* hover cinematic */

.product-card:hover .card-img-top {

    transform: scale(1);

}
/* =========================
   OVERLAY
========================= */

.card-overlay {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            to top,
            rgba(0,0,0,.96) 5%,
            rgba(0,0,0,.75) 32%,
            rgba(0,0,0,.2) 58%,
            rgba(0,0,0,.05) 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: #48d977;
}

.product-badge.used {
    background: rgba(255,180,0,.15);
    color: #fff;
}

.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);
}


.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-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 {
    color: #fff;

    font-size: 1.12rem;
    font-weight: 700;

    line-height: 1.3;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    overflow: hidden;
}

/* 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: 4px;
}

.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);
    }
}


/* =========================================================
   GLOBAL FIXES
========================================================= */

html,
body {
    overflow-x: hidden !important;
    width: 100%;
}

* {
    max-width: 100%;
}

/* =========================================================
   HERO SECTION FIX
========================================================= */

.hero-section {
    width: 100%;
    min-height: 85vh;
    overflow: hidden;
}

.hero-carousel,
.hero-carousel .carousel-inner,
.hero-carousel .carousel-item {
    min-height: 85vh;
}

.hero-content {
    width: min(92%, 650px);
    z-index: 10;
}

.hero-title {
    word-break: break-word;
}

.hero-description {
    width: 100%;
}

/* =========================================================
   PRODUCT CARD FIXES
========================================================= */

.products-grid {
    align-items: stretch;
}

/*.product-card {*/
/*    height: 100%;*/
/*    min-height: unset;*/
/*    display: flex;*/
/*    flex-direction: column;*/
/*}*/

/*.image-container {*/
/*    min-height: unset;*/
/*    flex: 1;*/
/*    display: flex;*/
/*    flex-direction: column;*/
/*}*/

/*.product-card-link {*/
/*    flex: 1;*/
/*    display: flex;*/
/*    text-decoration: none;*/
/*}*/

.card-content {
    /*margin-top: auto;*/
    padding: 18px 18px 90px;
}

.product-actions {
    position: absolute;

    left: 20px;
    right: 20px;
    bottom: 20px;

    z-index: 10;
}

.card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =========================================================
   IMAGE FIX
========================================================= */

/*.card-img-top {*/
/*    width: 100%;*/
/*    aspect-ratio: 1 / 1;*/
/*    object-fit: contain;*/
/*    padding: 16px;*/
/*}*/

/* =========================================================
   MOBILE FIXES
========================================================= */

@media (max-width: 768px) {

    .hero-section,
    .hero-carousel,
    .hero-carousel .carousel-inner,
    .hero-carousel .carousel-item {
        min-height: 72vh;
        height: 72vh;
    }

    .hero-content {
        bottom: 5%!important;
        left: 16px;
        right: 16px;
        width: auto;
    }

    .hero-title {
        font-size: 2.2rem !important;
        line-height: 1;
        letter-spacing: -1px;
    }

    .hero-description {
        font-size: .9rem;
        line-height: 1.6;
    }

    .hero-actions {
        width: 100%;
        gap: 12px;
    }

    .hero-btn {
        width: 100%;
        justify-content: center;
        padding: 14px;
    }

    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .product-card {
        border-radius: 18px;
    }

    .card-content {
        padding: 12px 12px 72px;
    }

    .card-title {
        font-size: .82rem;
        line-height: 1.35;
    }

    .studio-name {
        font-size: .65rem;
    }

    .price-tag {
        font-size: .92rem;
    }

    .btn-quick-cart {
        width: 100%;
        height: 50px;
    
        border-radius: 18px;
    }

    .btn-favorite {
        width: 36px;
        height: 36px;
    }

    .top-badges {
        top: 10px;
        left: 10px;
        gap: 6px;
    }

    .product-badge {
        padding: 5px 10px;
        font-size: .55rem;
    }

    .product-colors {
        gap: 4px;
    }

    .color-preview {
        width: 28px;
        height: 28px;
        border-radius: 8px;
    }
}

/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

    .products-grid {
        gap: 10px;
    }

    .hero-title {
        font-size: 1.9rem !important;
    }

    .hero-description {
        font-size: .82rem;
    }

    .card-title {
        font-size: .75rem;
    }

    .price-tag {
        font-size: .82rem;
    }

    .btn-quick-cart {
        font-size: .65rem;
    }
}


/* =========================================================
   PRODUCT CARD FINAL FIX
========================================================= */

/*.product-card {*/
/*    position: relative;*/
/*    overflow: hidden;*/
/*    min-height: 420px;*/
/*}*/

.product-card-link {
    /*flex: 1;*/
    /*display: flex;*/
    /*flex-direction: column;*/
    text-decoration: none;
}

/*.image-container {*/
/*    position: relative;*/
/*    width: 100%;*/
/*    height: 100%;*/
/*    min-height: 480px;*/
/*    overflow: hidden;*/
/*}*/

.card-content {
    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    z-index: 5;

    padding:
        22px
        22px
        95px;

    display: flex;
    flex-direction: column;

    gap: 10px;
}

/* TITLE */
.card-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    overflow: hidden;

    min-height: 44px;
}

/* STUDIO */
.studio-name {
    font-size: .75rem;
    opacity: .8;
}

/* PRICE */
.price-tag {
    margin-top: auto;
}

/* ACTIONS */
.product-actions {
    position: absolute;

    left: 16px;
    right: 16px;
    bottom: 16px;

    z-index: 5;
}

/* BUTTON */
.btn-quick-cart {
    width: 100%;
    white-space: nowrap;
}


/* =========================================================
   MOBILE FIX
========================================================= */

@media (max-width: 768px) {

    .products-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
        gap: 12px;
    }

    .product-card {
        min-height: 300px;
        border-radius: 18px;
    }

    .image-container {
        min-height: 300px;
    }
    .card-img-top{
        inset: 0;

        width: 100%;
        height: 100%;

        object-fit: contain;

        padding: 8px;
    }
    

    .card-content {
        padding:
            10px
            10px
            68px;

        gap: 6px;
    }

    .card-title {
        font-size: .72rem;
        line-height: 1.3;
        min-height: 34px;
    }

    .studio-name {
        font-size: .58rem;
    }

    .price-tag {
        font-size: .8rem;
    }

    .price-tag del {
        font-size: .6rem;
    }

    .btn-quick-cart {
        height: 36px;
        font-size: .68rem;
        border-radius: 12px;
    }

    .product-actions {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }

    .btn-favorite {
        width: 34px;
        height: 34px;
    }

    .top-badges {
        top: 10px;
        left: 10px;
    }

    .product-badge {
        padding: 5px 8px;
        font-size: .52rem;
    }

    .stars {
        font-size: .62rem;
    }
}

/* =========================================================
   HERO MOBILE FIX
========================================================= */

@media (max-width: 768px) {

    .hero-section {
        overflow: hidden;
    }

    .hero-carousel,
    .hero-carousel .carousel-inner,
    .hero-carousel .carousel-item {
        width: 100%;
        overflow: hidden;
    }

    .hero-carousel img {
        object-position: center;
    }

    .hero-content {
        width: calc(100% - 32px);
        left: 16px;
        right: 16px;
    }

    .hero-title {
        font-size: 2.3rem !important;
        line-height: .95;
    }

    .hero-description {
        max-width: 100%;
        font-size: .88rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-btn {
        width: 100%;
        justify-content: center;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 42px;
    }
}

.hero-content {
    bottom: 50%;
    position: relative;
    z-index: 5;
    left: 8%;
    max-width: 650px;
}