/* Codemola Legacy Fit v2.1.0 — dark "Shop the Look" section */

.cmlf {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: clamp(24px, 5vw, 72px);
    align-items: center;
    background: #0e0e0e;
    color: #fff;
    padding: clamp(40px, 7vw, 96px) clamp(20px, 6vw, 96px);
}

.cmlf--image-left .cmlf__rail { order: 2; }
.cmlf--image-left .cmlf__look { order: 1; }

/* ── Left rail ──────────────────────────────────────────────── */

.cmlf__title {
    margin: 0 0 6px;
    color: #fff;
    font-size: clamp(30px, 3.4vw, 46px);
    font-weight: 400;
    letter-spacing: .01em;
}

.cmlf__subtitle {
    margin: 0 0 10px;
    color: rgba(255, 255, 255, .62);
    font-size: 15px;
    letter-spacing: .04em;
}

.cmlf__viewport {
    overflow: hidden;
    margin-top: clamp(20px, 3vw, 44px);
}

.cmlf__track {
    display: flex;
    gap: 24px;
    transition: transform .5s cubic-bezier(.22, .61, .36, 1);
    will-change: transform;
}

.cmlf-card {
    flex: 0 0 calc((100% - 24px) / var(--cmlf-per, 2));
    min-width: 0;
    text-decoration: none;
    color: #fff;
    display: block;
    transition: opacity .4s ease, filter .4s ease, transform .4s ease;
}

/* Cross-highlight: hotspot hover lights one card, dims the rest */
.cmlf--focus .cmlf-card {
    opacity: .28;
    filter: grayscale(.7) brightness(.75);
    transform: scale(.975);
}

.cmlf--focus .cmlf-card--hot {
    opacity: 1;
    filter: none;
    transform: scale(1.025);
}

.cmlf--focus .cmlf-card--hot .cmlf-card__media {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .5), 0 12px 40px rgba(0, 0, 0, .5);
}

/* Reverse: hovering a card makes its hotspot glow on the photo */
.cmlf-spot--hot {
    transform: translate(-50%, -50%) scale(1.22) !important;
    box-shadow: 0 0 0 5px rgba(201, 163, 92, .55), 0 2px 18px rgba(0, 0, 0, .4) !important;
    animation: none !important;
}

.cmlf-card__media {
    position: relative;
    display: block;
    overflow: hidden;
    background: #1a1a1a;
}

.cmlf-card__media img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
    transition: transform .6s ease;
}

.cmlf-card:hover .cmlf-card__media img {
    transform: scale(1.045);
}

.cmlf-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    background: #e5654f;
    color: #fff;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 999px;
}

.cmlf-card__name {
    display: block;
    margin-top: 16px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    line-height: 1.5;
}

.cmlf-card__price {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    color: rgba(255, 255, 255, .8);
}

.cmlf-card__price .woocommerce-Price-amount {
    color: rgba(255, 255, 255, .8);
}

.cmlf-card__price del,
.cmlf-card__price del .woocommerce-Price-amount {
    color: rgba(255, 255, 255, .4);
}

/* ── Pagination ─────────────────────────────────────────────── */

.cmlf__nav {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: clamp(20px, 3vw, 40px);
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    padding: 6px 10px;
}

.cmlf__arrow {
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    width: 32px;
    height: 32px;
    cursor: pointer;
    border-radius: 50%;
    transition: background .2s ease;
}

.cmlf__arrow:hover {
    background: rgba(255, 255, 255, .12);
}

.cmlf__counter {
    font-size: 14px;
    letter-spacing: .08em;
    min-width: 42px;
    text-align: center;
}

/* ── Lookbook photograph + hotspots ─────────────────────────── */

.cmlf__look {
    position: relative;
    margin: 0;
}

.cmlf__photo {
    width: 100%;
    height: auto;
    display: block;
}

.cmlf-spot {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #0e0e0e;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 14px rgba(0, 0, 0, .3);
    transition: transform .2s ease;
    z-index: 3;
    animation: cmlf-pulse 2.4s ease-out infinite;
}

.cmlf-spot:hover,
.cmlf-spot[aria-expanded="true"] {
    transform: translate(-50%, -50%) scale(1.12);
    animation: none;
}

@keyframes cmlf-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(255, 255, 255, .45); }
    70%  { box-shadow: 0 0 0 14px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.cmlf-pop {
    position: absolute;
    transform: translate(24px, -50%);
    background: #fff;
    color: #0e0e0e;
    text-decoration: none;
    padding: 16px 20px;
    min-width: 200px;
    max-width: 250px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .35);
    z-index: 4;
    border-radius: 2px;
}

.cmlf-pop--flip {
    transform: translate(calc(-100% - 24px), -50%);
}

.cmlf-pop__name {
    display: block;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.45;
    margin-bottom: 6px;
}

.cmlf-pop__price {
    display: block;
    font-size: 14px;
    color: #55504a;
}

.cmlf-pop__price .woocommerce-Price-amount {
    color: #55504a;
}

/* ── Responsive ─────────────────────────────────────────────── */

@media (max-width: 900px) {
    .cmlf {
        grid-template-columns: 1fr;
    }
    .cmlf__look {
        order: -1;
    }
    .cmlf--image-left .cmlf__rail,
    .cmlf--image-left .cmlf__look {
        order: initial;
    }
    .cmlf--image-left .cmlf__look {
        order: -1;
    }
    .cmlf-pop {
        max-width: 200px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cmlf__track,
    .cmlf-card__media img,
    .cmlf-spot {
        transition: none;
        animation: none;
    }
}
