* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #590303;
    transition: background-color 0.3s ease;
}

body:has(.card-wrapper:hover) {
    background-color: #000000;
}

.bg-lookbook {
    width: 100%;
    height: 100vh;
    position: relative;
    background-color: #590303;
    background-image: url('../assets/img/lookbookBG.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 5vw, 5rem);
    color: #FFF;
    letter-spacing: 2px;
    margin-top: clamp(20px, 4vh, 50px);
    z-index: 10;
    transition: 0.3s ease;
}

.carousel {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    z-index: 5;
    transition: z-index 0.3s;
}

.carousel:hover {
    z-index: 15;
}

.carousel::-webkit-scrollbar {
    display: none;
}

.frame-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(1rem, 2.5vw, 3rem);
    animation: spin 30s infinite linear;
    padding-right: clamp(1rem, 2.5vw, 3rem);
    position: relative;
    z-index: 1;
}

.card-wrapper {
    position: relative;
    flex: 0 0 auto;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.carousel:hover .card-wrapper {
    filter: brightness(0.4);
}

.carousel .card-wrapper:hover {
    filter: brightness(1);
    z-index: 30;
}

.card {
    height: clamp(250px, 50vh, 400px);
    width: auto;
    object-fit: contain;
    position: relative;
    z-index: 2;
    transition: transform var(--transition-speed, 0.3s) ease;
    /* neutralize Bootstrap's .card white background and border */
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    min-width: unset;
    word-wrap: unset;
    flex-direction: unset;
    display: block !important;
}

.light-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 100vh;
    width: 155%;
    opacity: 0;
    transition: opacity 0.3s ease, transform var(--transition-speed, 0.3s) ease;
    pointer-events: none;
    z-index: 1;
}

.carousel .card-wrapper:hover .card {
    transform: translateX(var(--offset-x, 0px)) scale(1.5);
}

.carousel .card-wrapper:hover .light-effect {
    opacity: 1;
    transform: translate(calc(-50% + var(--offset-x, 0px)), -50%) scale(1.3);
    animation: fadeIn 1s ease;
}

.hover-info {
    position: absolute;
    bottom: clamp(-120px, -18vh, -95px);
    opacity: 0;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: clamp(9px, 1.2vw, 12px);
    text-align: center;
    transition: opacity 0.3s ease, transform var(--transition-speed, 0.3s) ease;
    z-index: 3;
    pointer-events: none;
}

.carousel .card-wrapper:hover .hover-info {
    opacity: 1;
    transform: translateX(var(--offset-x, 0px)) scale(1.3);
}

.arrows {
    margin-top: 5px;
}

.arrows span {
    display: block;
    width: 6px;
    height: 6px;
    border-bottom: 1px solid white;
    border-right: 1px solid white;
    transform: rotate(45deg);
    margin: 0 auto;
    margin-top: -2px;
}

.details-info {
    position: absolute;
    bottom: clamp(-160px, -18vh, -95px);
    left: 50%;
    transform: translateX(-50%);
    width: 200%;
    opacity: 0;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: clamp(11px, 1.4vw, 15px);
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    transition: opacity 0.3s ease, transform var(--transition-speed, 0.3s) ease;
    z-index: 3;
    pointer-events: none;
}

.carousel .card-wrapper:hover .details-info {
    transform: translateX(calc(-50% + var(--offset-x, 0px))) scale(1.3);
}

.carousel .card-wrapper.is-clicked .details-info {
    opacity: 1;
}

.carousel .card-wrapper.is-clicked .hover-info {
    opacity: 0 !important;
}

.stanchions {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: clamp(120px, 22vh, 250px);
    object-fit: cover;
    object-position: top;
    z-index: 1;
    pointer-events: none;
    opacity: 1;
    filter: brightness(0.8);
    transition: 0.3s ease;
}

.carousel:hover~.stanchions {
    filter: brightness(0.4);
}

.bg-lookbook:has(.carousel:hover) .title {
    color: #787E7D;
}

.blur-overlay {
    position: absolute;
    top: -20px;
    bottom: -20px;
    width: clamp(10px, 10vw, 150px);
    z-index: 16;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.blur-overlay-left {
    left: 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 20%, rgba(0, 0, 0, 0));
    -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 20%, rgba(0, 0, 0, 0));
}

.blur-overlay-right {
    right: 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    mask-image: linear-gradient(to left, rgba(0, 0, 0, 1) 20%, rgba(0, 0, 0, 0));
    -webkit-mask-image: linear-gradient(to left, rgba(0, 0, 0, 1) 20%, rgba(0, 0, 0, 0));
}

/* 
  OPTIONAL: Fade the blur out when a card is hovered.
  Currently commented out per user request to keep the blur visible.
  Uncomment these lines to activate:
*/
/*
.carousel:hover ~ .blur-overlay {
    opacity: 0;
}
*/

@keyframes spin {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-100%);
    }
}

/* Change animation to flickering lights*/
@keyframes lightBlink {
    0% {
        opacity: 0;
    }

    30% {
        opacity: 0;
    }

    35% {
        opacity: 1;
    }

    40% {
        opacity: 0;
    }

    45% {
        opacity: 1;
    }

    100% {
        opacity: 1;
    }
}

@keyframes fadeIn {

    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.mobile-instruction,
.mobile-details {
    display: none;
}


@media (max-width: 1024px) {
    .carousel .card-wrapper:hover .card {
        transform: translateX(var(--offset-x, 0px)) scale(1.25);
    }

    .carousel .card-wrapper:hover .light-effect {
        transform: translate(calc(-50% + var(--offset-x, 0px)), -50%) scale(1.1);
    }

    .carousel .card-wrapper:hover .hover-info {
        transform: translateX(var(--offset-x, 0px)) scale(1.15);
    }

    .carousel .card-wrapper:hover .details-info {
        transform: translateX(calc(-50% + var(--offset-x, 0px))) scale(1.15);
    }
}


@media (max-width: 767px) {

    .carousel .card-wrapper:hover .card {
        transform: translateX(var(--offset-x, 0px)) scale(1.15);
    }

    .carousel .card-wrapper:hover .light-effect {
        transform: translate(calc(-50% + var(--offset-x, 0px)), -50%) scale(1.10);
    }

    .hover-info {
        display: none !important;
    }

    .details-info {
        display: none !important;
    }

    .mobile-instruction {
        display: block;
        position: absolute;
        bottom: clamp(60px, 12vh, 100px);
        left: 50%;
        transform: translateX(-50%);
        color: white;
        font-family: 'Inter', sans-serif;
        font-size: clamp(11px, 1.5vh, 16px);
        letter-spacing: 0.5px;
        text-align: center;
        width: 90vw;
        z-index: 10;
        transition: 0.3s ease;
        pointer-events: auto;
        cursor: pointer;
    }

    .mobile-details {
        display: block;
        position: absolute;
        bottom: clamp(40px, 8vh, 75px);
        left: 50%;
        transform: translateX(-50%);
        color: white;
        font-family: 'Inter', sans-serif;
        font-weight: 600;
        font-size: clamp(11px, 1.5vh, 16px);
        line-height: 1.5;
        text-align: center;
        width: 70vw;
        max-width: 300px;
        z-index: 10;
        opacity: 0;
        transition: 0.3s ease;
        pointer-events: none;
        cursor: pointer;
    }

    .bg-lookbook.mobile-details-active .mobile-details {
        opacity: 1;
        pointer-events: auto;
    }

    .bg-lookbook.mobile-details-active .mobile-instruction {
        opacity: 0;
        pointer-events: none;
    }
}

@media (max-height: 600px) {
    .title {
        font-size: clamp(2rem, 4vw, 3rem);
        margin-top: 15px;
    }

    .card {
        height: clamp(200px, 40vh, 300px);
    }

    .stanchions {
        height: clamp(110px, 18vh, 140px);
    }
}

@media (orientation: landscape) and (max-height: 500px) {
    .title {
        font-size: 2rem;
        margin-top: 10px;
    }

    .card {
        height: 35vh;
    }
}

@media (max-width: 480px) and (min-height: 800px) {
    .card {
        height: clamp(320px, 50vh, 460px);
    }
    
    .mobile-instruction {
        bottom: clamp(70px, 14vh, 120px);
    }
    
    .mobile-details {
        bottom: clamp(50px, 10vh, 90px);
    }
}

@media (min-width: 768px) and (min-height: 1000px) {
    .card {
        height: clamp(450px, 50vh, 600px);
    }
}

@media (min-width: 900px) and (min-height: 1300px) {
    .card {
        height: clamp(550px, 50vh, 780px);
    }
}