/*==============================
=            GLOBAL            =
==============================*/
body[data-ready="false"] .nescafe-center-container {
    display: none;
}

body[data-ready="true"] .nescafe-center-container {
    display: flex;
}

body {
    min-height: 100vh;
    background: url("../imgs/background.png") no-repeat center center fixed;
    background-size: cover;
    background-color: #5c0502;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', sans-serif;
    color: white;
    overflow-x: hidden;
}

.nescafe-center-container {
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    justify-content: center;
}

.container {
    padding-top: 16vh;
    padding-bottom: 14vh;
}

/*==============================
=           LOGO              =
==============================*/
.logo-bottom {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    user-select: none;
    z-index: 9;
}

.logo-img {
    max-width: 292px;
    width: 68vw;
    height: auto;
    margin-top: 4vh;
    display: block;
    user-select: none;
}

@media (max-width: 450px) {
    .logo-bottom {
        max-width: 450px;
    }
}

.home-textimg {
    width: 85vw;
    max-width: 80vw;
    height: auto;
    margin-bottom: 2vh;
    margin-top: 5vh;
    user-select: none;
    filter: drop-shadow(0 4px 18px rgba(100, 50, 0, 0.15));
}

/*==============================
=         BUTTONS             =
==============================*/
.btn,
.btn-nav,
.btn-custom {
    min-width: 120px;
}

.btn-custom {
    min-width: 140px;
    border-radius: 8px;
    font-weight: 600;
}

.main-btn {
    max-width: 250px;
    width: 100%;
    margin-bottom: 14vh;
    cursor: pointer;
    user-select: none;
    transition: transform 0.1s ease, filter 0.1s ease;
    box-shadow: 0 4px 24px rgba(60, 28, 0, 0.12);
}

.main-btn:active {
    transform: scale(0.96);
    filter: brightness(0.92);
}

/*==============================
=         CANVAS & PREVIEW     =
==============================*/
#preview-area {
    position: relative;
    min-height: 340px;
    border: 1px dashed #aaa;
    background: #fff3;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#overlay-canvas {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 10;
}

.result-img,
img.result-photo {
    max-width: 80vw;
    padding: 1rem;
    /* max-height: 380px; */
    position: relative;
    /* box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); */
    z-index: 2;
}

/*==============================
=         GALLERIES           =
==============================*/
.expr-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    min-height: 130px;
}

#expressionGallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 10px;
    justify-items: center;
    align-items: start;
    margin-top: 3vh;
    margin-bottom: 24px;
}

.expr-item {
    width: 100%;
    max-width: 120px;
    text-align: center;
    cursor: pointer;
    border-radius: 15px;
    background: #fff;
    transition: border 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 4px #0001;
}

.expr-item:hover,
.expr-item.selected {
    border-color: #ffffff;
    box-shadow: 0 0 0 3px #006aff;
}

.expr-item img,
.expr-item-image img {
    width: 100%;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 2px 8px #0001;
}

.expr-item-label {
    margin-top: 8px;
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    display: none;
}

/*==============================
=         STICKERS            =
==============================*/
#stickerGallery img.sticker-item {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #fff;
    object-fit: cover;
    box-shadow: 0 1px 4px #0002;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

#stickerGallery.disabled {
    opacity: 0.1;
    pointer-events: none;
    filter: grayscale(0.7);
}

#sticker-section img {
    max-width: 100px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

#sticker-section img:hover {
    transform: scale(1.1);
}

/*==============================
=         DROPDOWNS           =
==============================*/
.dropdown-message .dropdown-menu {
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 4px 16px #0001;
    padding: 4px 0;
    background: #fff;
    position: absolute;
    z-index: 1000;
}

.dropdown-message .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.dropdown-message .dropdown-item:hover {
    background: #f2f2f2;
}

.dropdown-item img {
    width: 24px;
    height: 24px;
    object-fit: cover;
    margin-right: 8px;
    vertical-align: middle;
}

/*==============================
=         SPLIDE/CAROUSEL     =
==============================*/
.splide {
    width: 90vw;
    max-width: 1200px;
}

.splide__slide {
    display: flex;
    justify-content: center;
    align-items: center;
    background: white;
    border-radius: 10px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.25);
    transform-origin: center center;
}

.splide__slide.is-active {
    transform: scale(1);
    opacity: 1;
    filter: none;
}

.splide__slide:not(.is-active) {
    transform: scale(0.97);
    opacity: 0.5;
    filter: blur(1px);
}

.carousel-item {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    padding: 5px;
}

.splide__pagination {
    position: relative !important;
    bottom: -16px;
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 1rem;
    z-index: 1;
}

.splide__pagination__page {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    background-color: transparent;
    transition: all 0.3s ease;
    opacity: 1;
}

.splide__pagination__page.is-active {
    background-color: white;
    border-color: white;
}

/*==============================
=       ANIMATION LAYERS      =
==============================*/
#animation-container {
    position: relative;
    width: 80%;
    max-width: 430px;
    aspect-ratio: 430 / 465;
    margin-bottom: 3vh;
}

#animation-container img {
    position: absolute;
    transition: all 0.6s ease;
    will-change: opacity, transform;
    opacity: 0;
}

#packshot-bg {
    width: 100%;
    top: 0;
    left: 0;
}

#packshot-01 {
    width: 70%;
    top: 35%;
    left: 16%;
    transform: scale(0.8);
}

#packshot-02 {
    width: 30%;
    top: 52%;
    left: 5%;
}

#callout-message {
    width: 28%;
    top: 39%;
    left: 1%;
    transform: scale(0.8);
}

@keyframes float {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }

    100% {
        transform: translateY(0);
    }
}

/*==============================
=         RESPONSIVE          =
==============================*/
@media (max-width: 768px) {
    .splide__slide {
        height: auto !important;
    }

    .expr-item-template {
        aspect-ratio: 3 / 4;
        height: auto !important;
    }

    .expr-item-template img {
        height: auto !important;
        width: 100% !important;
        object-fit: cover;
        padding: 5px;
    }
}