/* Gallery Fancybox Popup */
.gallery-nail-section .slider .img img {
    cursor: pointer;
}

.gallery-fancybox {
    --fancybox-backdrop-bg: var(--bg-popup);
    --popup-image-width: clamp(280px, calc(100vw - 160px), 560px);
    --popup-image-height: calc(var(--popup-image-width) * 0.75);
    --popup-image-radius: 16px;
    --popup-arrow-size: 48px;
    --popup-arrow-gap: 24px;
    --popup-stack-gap: 24px;
}

.gallery-fancybox .fancybox__slide {
    flex-flow: row wrap;
    justify-content: center;
    align-items: center;
    align-content: center;
    column-gap: var(--popup-arrow-gap);
    row-gap: var(--popup-stack-gap);
}

.gallery-fancybox .fancybox__slide::before,
.gallery-fancybox .fancybox__slide::after {
    display: none;
}

.gallery-fancybox .f-caption,
.gallery-fancybox .gallery-popup-nav {
    display: contents;
}

/* Popup arrows */
.gallery-popup-arrow {
    width: var(--popup-arrow-size);
    height: var(--popup-arrow-size);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.102);
    cursor: pointer;
}

.gallery-popup-arrow.is-prev {
    order: -1;
}

.gallery-popup-arrow[aria-disabled] {
    opacity: 0.4;
    cursor: default;
}

.gallery-popup-arrow::after {
    content: "";
    display: block;
    width: 24px;
    height: 24px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    filter: brightness(0) invert(1);
}

.gallery-popup-arrow.is-prev,
.gallery-popup-arrow.is-next {
    margin: 0 !important;
    display: flex;
    justify-content: center;
}

.gallery-popup-arrow.is-prev::after {
    background-image: url("../../img/arrow-left.svg");
}

.gallery-popup-arrow.is-next::after {
    background-image: url("../../img/arrow-right.svg");
}

/* Popup caption */
.gallery-fancybox .gallery-popup-caption {
    flex: 0 0 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0 15px;
}

.popup-title {
    max-width: 100%;
    min-height: 48px;
    margin: 0;
    font-family: var(--font-heading);
    font-size: var(--heading-style-h2);
    line-height: var(--heading-line-height-h2);
    font-weight: 500;
    text-align: center;
    color: var(--text-on-primary);
}

.popup-description {
    max-width: 100%;
    min-height: 24px;
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--font-size-small);
    line-height: var(--line-height-small);
    font-weight: 400;
    text-align: center;
    color: var(--text-on-secondary);
}

.is-right .f-button {
    display: none !important;
}

/* Panzoom */
.gallery-fancybox .f-panzoom__wrapper {
    width: var(--popup-image-width);
    height: var(--popup-image-height);
    overflow: hidden;
    border-radius: var(--popup-image-radius);
    position: relative;
    contain: paint;
}

.gallery-fancybox .f-panzoom__wrapper>.f-panzoom__content.is-clone {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

/* Gallery Nails Section */
.gallery-nail-section .gallery-row {
    display: flex;
    gap: 64px;
    padding: 0 15px;
}

.gallery-nail-section .gallery-col-1 {
    flex: 1;
    max-width: 568px;
    padding: 0;
    min-width: 0;
}

/* Slider */
.gallery-nail-section .gallery-col-1 .slider-wrapper {
    width: 568px;
    max-width: 100%;
    overflow: hidden;
}

.gallery-nail-section .gallery-col-1 .slider {
    width: 568px;
    max-width: 100%;
}

.gallery-nail-section .gallery-col-1 .slider .img {
    width: 100%;
    height: 420px;
    overflow: hidden;
}

.gallery-nail-section .gallery-col-1 .slider img {
    width: 100%;
    height: 420px;
    object-fit: cover;
}

.gallery-nail-section .gallery-col-2 {
    flex: 1;
    padding: 0;
}

.gallery-nail-section .flickity-viewport {
	border-radius: 16px;
}

.gallery-nail-section .flickity-button {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    box-shadow: none;
    opacity: 1;
    top: 45%;
}

.gallery-nail-section .flickity-button.previous {
    background: rgba(255, 255, 255, 0.8) url("../../img/arrow-left.svg") center / 24px 24px no-repeat !important;
}

.gallery-nail-section .flickity-button.next {
    background: rgba(255, 255, 255, 0.8) url("../../img/arrow-right.svg") center / 24px 24px no-repeat !important;
}

.gallery-nail-section .flickity-button svg {
    display: none !important;
}

/* List */
.gallery-nail-section .gallery-col-2 p:first-child {
    margin-bottom: 12px;
}

.gallery-nail-section .nail-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 40px;
}

.gallery-nail-section .nail-list .nail-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 12px 16px;
    gap: 12px;
}

.gallery-nail-section .nail-list .nail-item .nail-icon-wrap {
    background: var(--brand-primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.gallery-nail-section .nail-list .nail-item img {
    justify-content: center;
    align-items: center;
    padding: 0px;
    width: 20px;
    height: 20px;
    background: var(--color-white);
}

.gallery-nail-section .nail-list .nail-item h3 {
    font-size: var(--font-size-h3);
    line-height: var(--line-height-h3);
    color: var(--text-heading);
    margin: 0;
    letter-spacing: 0.4px;
    font-weight: 600;
}

/* Tablet */
@media (max-width: 1024px) {
    .popup-title {
        min-height: 28px;
        font-size: var(--font-size-h3);
        line-height: var(--line-height-h3);
    }

    .gallery-fancybox {
        --popup-image-width: min(560px, calc(100vw - 2 * var(--popup-arrow-size) - 3 * var(--popup-arrow-gap) - 32px));
        --popup-arrow-size: 40px;
        --popup-arrow-gap: 16px;
    }

    .gallery-popup-arrow {
        flex-shrink: 0;
    }

    .gallery-row h2 {
        margin-bottom: 20px;
    }

    .gallery-nail-section .gallery-row {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: clamp(24px, 4vw, 40px);
        align-items: flex-start;
    }

    .gallery-nail-section .gallery-col-1,
    .gallery-nail-section .gallery-col-2 {
        flex: 1 1 0;
        min-width: 0;
        max-width: none;
    }

    .gallery-nail-section .gallery-col-1 .slider-wrapper,
    .gallery-nail-section .gallery-col-1 .slider {
        width: 100%;
        max-width: 100%;
    }

    .gallery-nail-section .gallery-col-1 .slider .img,
    .gallery-nail-section .gallery-col-1 .slider img {
        width: 100%;
        height: clamp(280px, 42vw, 320px);
    }

    .gallery-nail-section .nail-list {
		padding-top: 32px;
	}
}

/* Mobile */
@media (max-width: 767px) {
    .gallery-popup-arrow {
        background: var(--text-on-tertiary);
    }

    .gallery-nail-section .gallery-row {
        flex-direction: column;
        align-items: center;
        gap: 24px;
    }

    .gallery-nail-section .gallery-row h2 {
        margin-bottom: 24px;
        text-align: center;
    }

    .gallery-nail-section .gallery-col-1 {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
    }

    .gallery-nail-section .gallery-col-2 {
        max-width: 100%;
    }

	.gallery-nail-section .nail-list {
		padding-top: 24px;
	}

    .gallery-nail-section .gallery-col-2 p {
        text-align: center;
    }

    .gallery-nail-section .gallery-col-1 .slider .img,
    .gallery-nail-section .gallery-col-1 .slider img {
        height: clamp(220px, 56vw, 280px);
    }

    .gallery-nail-section .slider-wrapper .flickity-prev-next-button {
        display: block;
    }

    .gallery-fancybox {
        --popup-image-radius: 12px;
        --popup-arrow-gap: 12px;
        --popup-stack-gap: 16px;
        --popup-image-width: min(100%, calc(100vw - 32px));
    }

    .gallery-fancybox .gallery-popup-caption {
        flex: 0 1 auto;
        gap: 4px;
        order: 3;
    }

    .gallery-fancybox .fancybox__slide {
        flex-flow: column nowrap;
        gap: var(--popup-arrow-gap);
    }

    .gallery-fancybox .gallery-popup-nav {
        display: flex;
        flex-shrink: 0;
        justify-content: center;
        gap: var(--popup-stack-gap);
        order: 2;
    }

    .gallery-fancybox .f-panzoom__wrapper {
        order: 1;
    }
}