/* Remove overflow-x hidden on offer detail pages to allow sticky menu to work */
body:has(.current-offer) {
    overflow-x: visible;
}

.container.limit.current-offer {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 2rem;
    padding: 4rem 0;
    max-width: 1920px;
    margin-inline: auto;
    width: auto;
    overflow: visible;
}

.current-offer .header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.4rem;
    letter-spacing: 1px;
    margin-bottom: 1rem;
	text-align: center;
}

.current-offer .header hr {
    width: 50px;
    height: 1px;
    background-color: black;
}

@keyframes showHeader {
    from {
        margin-left: 600px;
    }
}

.current-offer .main-image-wrapper {
    position: relative;
    display: flex;
    width: 100%;
    max-width: 1000px;
    max-height: 600px;
    height: 100%;
    margin-bottom: 4rem;
    border-radius: 10px;
    overflow: hidden;
}

.current-offer .main-image-wrapper::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--main-img);
    background-size: contain;
    background-position: center center;
    filter: blur(5px);
    z-index: 1;
}

.current-offer .main-image {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    overflow: hidden;
    z-index: 2;
    margin-inline: auto;
}

.current-offer .box__split {
    display: grid;
    grid-template-columns: minmax(80px, 125px) 1fr;
    align-items: start;
    max-width: 750px;
    width: 100%;
    gap: 40px;
    padding-inline: 2rem;
    margin-inline: auto;
    overflow: visible;
}

.current-offer .box {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    animation: showBox 3s;
    overflow: visible;
}

@keyframes showBox {
    from {
        display: none;
        opacity: 0;
    }
}

.current-offer .box__aside {
    position: sticky;
    top: 120px;
    text-align: start;
    border-right: 1px solid;
    width: 116%;
    padding-right: 20px;
    align-self: flex-start;
    height: fit-content;
    max-height: calc(100vh - 120px);
}

@media screen and (max-width: 767px) {
    .current-offer .box__aside {
        width: 100%;
    }
}

.current-offer .box__aside ul {
    padding: 0 1rem 0 0;
}

.current-offer .box__aside ul li {
    padding-block: 1rem;
}

.current-offer .box__aside ul li a {
    font-family: 'Sucrose Bold Two HQ', sans-serif;
    letter-spacing: 1px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    color: inherit;
}

.current-offer .box__aside ul li img {
    width: 24px;
    height: 24px;
}

.current-offer .box__content {
    position: relative;
    display: flex;
    flex-direction: column;
    text-align: start;
    gap: 60px;
    max-width: 600px;
}

.current-offer .box__content h4 {
    font-family: 'Sucrose Bold Two HQ', sans-serif;
    letter-spacing: 1.5px;
    border-bottom: 1px solid;
    margin-top: 0;
    font-size: 26px;
}

@media screen and (max-width: 768px) {
    .current-offer .box__content h4 {
        font-size: 20px;
    }
}

.current-offer .box__content p {
    font-size: 18px;
}

@media screen and (max-width: 768px) {
    .current-offer .box__content p {
        font-size: 16px;
    }
}

.current-offer .box__vaucher {
    position: relative;
}

/* Use gallery masonry layout for offer images */
.current-offer .gallery-masonry {
    width: 100%;
    margin: 4rem 0 2rem;
}

.current-offer .masonry {
    column-count: 2;
    column-gap: 8px;
    transform: translateZ(0);
    will-change: contents;
    margin-inline: auto;
    padding-inline: 20px;
}

.current-offer .item {
    box-sizing: border-box;
    break-inside: avoid;
    margin-bottom: 8px;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
    will-change: opacity, transform;
}

.current-offer .item__content {
    position: relative;
    display: block;
    width: 100%;
    height: 250px;
    min-height: 550px;
    overflow: hidden;
    border-radius: 6px;
    background: #f0f0f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: height 0.2s ease, box-shadow 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    will-change: transform, box-shadow, height;
    contain: layout style paint;
}

/* Loading state - prevent jumping */
.current-offer .item__content:not(.item__content--small):not(.item__content--medium):not(.item__content--large) {
    height: 250px;
}

.current-offer .item__content:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.current-offer .item__content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease, transform 0.15s ease-in-out, filter 0.15s ease-in-out;
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
    opacity: 0;
}

.current-offer .item__content img.loaded {
    opacity: 1;
}

.current-offer .gallery-masonry:has(.item__content:hover) .item__content img {
    filter: grayscale(1);
}

.current-offer .item__content:hover img {
    transform: scale(1.01);
    z-index: 5;
    filter: grayscale(0) !important;
}

/* Size variations */
.current-offer .item__content--small {
    height: 180px;
    min-height: 550px;
}

.current-offer .item__content--medium {
    height: 250px;
    min-height: 550px;
}

.current-offer .item__content--large {
    height: 320px;
    min-height: 550px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Desktop: Ensure all images have minimum height to prevent cropping */
@media screen and (min-width: 800px) {
    .current-offer .item__content {
        min-height: 550px;
    }
    
    .current-offer .item__content--small {
        min-height: 550px;
    }
    
    .current-offer .item__content--medium {
        min-height: 550px;
    }
    
    .current-offer .item__content--large {
        min-height: 550px;
    }
}

/* Responsive Design */
@media screen and (min-width: 600px) {
    .current-offer .masonry {
        column-count: 2;
    }
    
    .current-offer .item__content {
        min-height: 550px;
    }
    
    .current-offer .item__content--small,
    .current-offer .item__content--medium,
    .current-offer .item__content--large {
        min-height: 550px;
    }
}

@media screen and (min-width: 1100px) {
    .current-offer .masonry {
        column-count: 3;
        max-width: 1000px;
    }
    
    .current-offer .item__content {
        min-height: auto;
        height: auto;
    }
    
    .current-offer .item__content--small,
    .current-offer .item__content--medium,
    .current-offer .item__content--large {
        min-height: auto;
        height: auto;
    }
}

@media screen and (max-width: 599px) {
    .current-offer .masonry {
        column-count: 2;
    }
}

@media screen and (max-width: 499px) {
    .current-offer .item__content {
        min-height: 300px;
    }
    
    .current-offer .item__content--small,
    .current-offer .item__content--medium,
    .current-offer .item__content--large {
        min-height: 300px;
    }
}

.current-offer .mask-name {
    text-align: center;
    position: relative;
    max-width: 800px;
    margin-inline: auto;
    overflow: hidden;
	user-select: none;
	pointer-events: none;
}

.current-offer .mask-name h1 {
    margin: 0;
    font-size: 5rem;
    text-transform: uppercase;
    font-family: 'Sucrose Bold Two HQ', sans-serif;
    line-height: 1;
    color: transparent;
    background-size: cover;
    background-clip: text;
    -webkit-background-clip: text;
    background-position: 0 0;
    animation: animate-text-bg 20s linear infinite;
    will-change: background-position;
}

.current-offer .mask-name img {
    display: none;
}

@keyframes animate-text-bg {
    from {
        background-position-x: 0;
    }
    to {
        background-position-x: -500px;
    }
}

@media screen and (max-width: 1000px) {
    .current-offer .header {
        font-size: 1.2rem;
    }
}

@media screen and (max-width: 800px) {
    .container.limit.current-offer {
        padding: 2rem 1rem 1rem;
    }
    
    .current-offer .header {
        font-size: 1rem;
    }

    .current-offer .box__split {
        padding-inline: 1rem;
    }
}

@media screen and (max-width: 767px) {
    .current-offer .box__aside {
        width: auto;
        padding-right: 0;
    }

    .current-offer .box__content {
        max-width: 100%;
        width: 100%;
    }

    .current-offer .box__split {
        display: flex;
        gap: 10px;
        padding-inline: 1rem;
        width: auto;
    }
    
    .current-offer .box__aside ul li a span {
        display: none;
    }
}

@media screen and (max-width: 630px) {
    .current-offer .box {
        width: 100%;
    }

    .current-offer .box__aside {
        top: 60px;
    }

    .current-offer .mask-name h1 {
        font-size: 3rem;
    }
}

@media screen and (max-width: 500px) {
    .container.limit.current-offer {
        padding: 2rem 0;
    }
}

@media screen and (max-width: 400px) {
    .current-offer .images {
        margin-bottom: 25px;
    }
}
