/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-smooth: always;
}

body {
    font-family: "Be Vietnam Pro", sans-serif;
    background: #FEF0E7;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    min-height: 100vh;
}

/* Header */
.header {
    position: absolute;
    top: 30px;
    left: 40px;
    z-index: 99;
}

.logo img {
    height: 40px;
    width: auto;
}

.policy {
    position: absolute;
    font-size: 14px;
    font-weight: 700;
    color: #981514;
    text-decoration: none;
    text-align: right;
    top: 20px;
    right: 20px;
    z-index: 11;
}
.policy img {
    width: 160px;
    height: auto;
}

@media (max-width: 1024px) {
    .policy {
        top: 25px;
        right: 20px;
    }
    .policy img {
        width: 130px;
        height: auto;
    }
}

@media (max-width: 480px) {
    .policy {
        top: 22px;
        right: 20px;
    }
    .policy img {
        width: 90px;
        height: auto;
    }
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 0.7fr 1fr;
    gap: 20px;
    align-items: center;
    height: 100vh;
    min-height: 700px;
    padding-top: 80px;
}

/* Left Section */
.left-section {
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: flex-start;
    position: relative;
    padding: 30px 0;
    z-index: 2;
}

.character {
    display: none;
}

.headline img {
    width: 460px;
    height: auto;
}

.cta-button {
    margin-top: 0;
    text-align: center;
    width: 100%;
}

.btn-dress-up {
    background: transparent;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
    transform: scale(1);
    margin-left: 3rem;
}
.btn-dress-up img {
    width: 316px;
    height: auto;
}

.btn-dress-up:hover {
    transform: scale(1.05);
}

/* .btn-dress-up:active {
    transform: scale(1.05);
} */

/* Right Section */
.right-section {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.character-img {
    width: 760px;
    height: auto;
    position: absolute;
    z-index: 1;
    bottom: 0;
    right: 0;
}

/* Main Section */
.mainSection {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.mainSection.active {
    opacity: 1;
    visibility: visible;
    overflow-x: hidden;
}

/* Gallery Section */
.gallerySection {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    z-index: 10;
}

#gallery-grid-container {
    display: grid;
    grid-template-columns: repeat(5, 20%);
    gap: 0;
    width: 100%;
    height: 100vh;
    /* overflow-y: auto; */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

#gallery-grid-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

#gallery-grid-container .tile {
    width: 100%;
    height: 100%;
    background-color: #F5F5F5;
    border: 0 solid #FFF;
    overflow: hidden;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
}

/* #gallery-grid-container .tile:nth-child(2n+2) {
    background-color: #E7E7E7;
} */
/* 
#gallery-grid-container .tile:nth-child(3n+1) {
    transform: translateY(150px);
}

#gallery-grid-container .tile:nth-child(5n+1) {
    transform: translateY(150px);
}
#gallery-grid-container .tile:nth-child(3n+5) {
    transform: translateY(150px);
} */

#gallery-grid-container .tile-image {
    width: 100%;
    height: 100%;
    /* transform: skewX(0) translateX(-10%); */
    background-size:cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#gallery-grid-container .tile:hover .tile-image {
    transform: scale(1.05);
}

/*#gallery-grid-container .tile:nth-child(3n+1):hover .tile-image {
    transform: skewX(15deg) scale(1.1);
}

#gallery-grid-container .tile:nth-child(3n+3):hover .tile-image {
    transform: skewX(15deg) scale(1.1);
} */

.search-result-item {
    width: calc((100% - 40px) / 3); /* 3 images with 20px gaps */
    height: 350px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    background: #AC1C1B;
    border: 1px solid #FFCD0F;
    flex-shrink: 0;
}

/* Search Slider Styles */
.search-slider-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 20px auto;
    overflow: hidden;
}

.search-slider-track {
    display: flex;
    transition: transform 0.3s ease;
    gap: 20px; /* Default gap for desktop */
}

.slider-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 205, 15, 0.9);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.slider-nav-btn:hover {
    background: rgba(255, 205, 15, 1);
    transform: translateY(-50%) scale(1.1);
}

.slider-nav-btn:disabled {
    background: rgba(255, 205, 15, 0.3);
    cursor: not-allowed;
    transform: translateY(-50%) scale(0.9);
}

.slider-prev-btn {
    left: 10px;
}

.slider-next-btn {
    right: 10px;
}
.search-result-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 1024px) {
    #gallery-grid-container {
        grid-template-columns: repeat(3, 350px);
    }

    .search-result-item {
        width: calc((100% - 20px) / 2); /* 2 images on tablet */
        height: 330px;
    }
    
    .search-slider-track {
        gap: 20px;
    }
}
@media (max-width: 768px) {
    #gallery-grid-container {
        grid-template-columns: repeat(3, 280px);
    }
    .search-result-item {
        width: calc((100% - 20px) / 2); /* 2 images on tablet */
        height: 251px;
    }
    
    .search-slider-track {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    #gallery-grid-container {
        grid-template-columns: repeat(3, 200px);
    }
    
    .search-result-item {
        width: 100%; /* 1 image on mobile */
        height: auto;
        aspect-ratio: 1/1;
    }
    
    .search-slider-track {
        gap: 0;
    }
    
    .search-slider-container {
        margin: 10px auto;
        top: 2rem;
    }
    
    .slider-nav-btn {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .slider-prev-btn {
        left: 5px;
    }
    
    .slider-next-btn {
        right: 5px;
    }
}

/* --- Modal / Popup (Giữ nguyên) --- */
.modal {
    display: none; 
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(254,240,231,0.85);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
}

.modal-content {
    display: block;
    max-width: 85%;
    max-height: 85vh;
    border-radius: 10px;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    animation-name: zoomIn;
    animation-duration: 0.4s;
    animation-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes zoomIn {
    from { transform: scale(0.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close-button {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 50px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.close-button:hover,
.close-button:focus {
    color: #ccc;
    transform: scale(1.1);
}

.mix-image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(254,240,231,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mix-image-modal button {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #AC1C1B !important;
    font-size: 30px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    border-radius: 50%;
}

.mix-image-modal img {
    width: 500px;
    height: auto;
    object-fit: contain;
}

.popup-content-img {
    position: relative;
    width: 500px;
    height: 500px;
    text-align: center;
    background: #AC1C1B;
}

@media (max-width: 480px) {
    .popup-content-img, .mix-image-modal img {
        width: 100%;
        height: auto;
        aspect-ratio: 1/1;
    }
}

/* Mix Section */
.mix-section {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    min-height: 740px;
    background: #FEF0E7;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.mix-section.active {
    opacity: 1;
    visibility: visible;
}

.mix-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px 60px;
}

.mix-image {
    width: 860px;
    height: auto;
    margin-left: 6rem;
    margin-bottom: -3rem;
    padding-top: 3rem;
}

.btn-start {
    /* position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%); */
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.btn-start:hover {
    transform: scale(1.1);
}

.btn-start img {
    width: 355px;
    height: auto;
}

/* Gallery Section */
.gallery-section {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    min-height: 740px;
    background: #FFE0CD;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    /* opacity: 0;
    visibility: hidden; */
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.gallery-section.active {
    opacity: 1;
    visibility: visible;
}

.gallery-content {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    padding: 0 0 0 40px;
    max-width: 1440px;
    margin: 0 auto;
}

.gallery-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
    padding: 30px 0;
}

.gallery-headline {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.headline-2 {
    width: 420px;
    height: auto;
}

.headline-3 {
    width: 320px;
    height: auto;
}

.gallery-cta {
    margin-top: 20px;
}

.btn-gallery {
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.btn-gallery:hover {
    transform: scale(1.05);
}

.btn-gallery img {
    width: 372px;
    height: auto;
}

.gallery-right {
    position: relative;
    display: flex;
    justify-content:center;
    align-items:center;
    height: 100%;
    /* overflow: hidden; */
}

.gallery-image {
    width: auto;
    height: 100vh;
    min-height: 740px;
    position: relative;
    z-index: 1;
}

.gallery-right::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 20%;
    background: linear-gradient(to bottom, rgba(255, 224, 205, 1) 0%, rgba(255, 224, 205, 0) 100%);
    pointer-events: none;
    z-index: 2;
}

.gallery-right::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20%;
    background: linear-gradient(to top, rgba(255, 224, 205, 1) 0%, rgba(255, 224, 205, 0) 100%);
    pointer-events: none;
    z-index: 2;
}

/* Journey Section */
.journey-section {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    min-height: 740px;
    background: #FEF0E7;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.journey-content {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    padding: 0 40px;
    max-width: 1440px;
    margin: 0 auto;
}

.journey-left {
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: flex-start;
    padding: 30px 0;
    position: relative;
    z-index: 2;
}

.journey-headline {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.headline-4 {
    width: 300px;
    height: auto;
}

.journey-right {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: 100%;
}

.journey-image {
    width: 720px;
    height: auto;
    position: relative;
    z-index: 1;
}

.foot-line {
    width: 100%;
    height: 115px;
    background: #FF6500;
}

/* Design Section */
.designSection {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    min-height: 740px;
    background: #FEF0E7;
    z-index: 10;
    /* opacity: 0;
    visibility: hidden; */
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.designSection.active {
    opacity: 1;
    visibility: visible;
}

.design-content {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    padding: 0 0 0 40px;
    max-width: 1440px;
    margin: 0 auto;
}

.design-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    margin-top: 6rem;
}

.btn-review {
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.btn-review:hover {
    transform: scale(1.05);
}

.btn-review img {
    width: 372px;
    height: auto;
}

.design-right {
    position: relative;
    display: flex;
    justify-content:center;
    align-items:center;
    height: 100%;
    min-height: 740px;
    overflow: hidden;
}

.design-right::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 22%;
    background: linear-gradient(to bottom, rgba(254, 240, 231, 1) 0%, rgba(254, 240, 231, 0) 100%);
    pointer-events: none;
    z-index: 2;
}

.design-right::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 22%;
    background: linear-gradient(to top, rgba(254, 240, 231, 1) 0%, rgba(254, 240, 231, 0) 100%);
    pointer-events: none;
    z-index: 2;
}

#grid-container {
    display: grid;
    grid-template-columns: repeat(3, 150px);
    gap: 0;
    transform: skewX(-15deg) translateX(20%);
    max-height: 100vh;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

#grid-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

#grid-container .tile {
    width: 150px;
    height: 170px;
    background-color: #F5F5F5;
    border: 3px solid #FFF;
    overflow: hidden;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
}

#grid-container .tile:nth-child(2n+2) {
    background-color: #E7E7E7;
}

#grid-container .tile:nth-child(3n+1) {
    transform: translateY(75px);
}

#grid-container .tile:nth-child(3n+3) {
    transform: translateY(75px);
}

#grid-container .tile-image {
    width: 100%;
    height: 100%;
    transform: skewX(15deg);
    background-size: 90% auto;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#grid-container .tile:hover .tile-image {
    transform: skewX(15deg) scale(1.1);
}

#grid-container .tile:nth-child(3n+1):hover .tile-image {
    transform: skewX(15deg) scale(1.1);
}

#grid-container .tile:nth-child(3n+3):hover .tile-image {
    transform: skewX(15deg) scale(1.1);
}

#grid-container-m {
    display: none;
    grid-auto-flow: column;
    grid-auto-columns: 98px;
    gap: 3px;
    transform: skewX(-15deg);
    background: #FFF;
    border: 3px solid #FFF;
    /* Cho phép cuộn ngang và ẩn thanh cuộn */
    overflow-x: auto;
    scroll-behavior: smooth;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */

    /* Allow click events and improve touch support */
    cursor: default;
    user-select: none;
    -webkit-overflow-scrolling: touch;
}

#grid-container-m::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

#grid-container-m.active {
    cursor: grabbing;
}

#grid-container-m .tile {
    width: 98px;
    height: 120px;
    background-color: #f0f0f0;
    overflow: hidden;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#grid-container-m .tile:nth-child(2n+2) {
    background-color: #E7E7E7;
}

#grid-container-m .tile-image {
    width: 100%;
    height: 100%;
    transform: skewX(15deg);
    background-size: auto 70%;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    /* Allow click events and add touch support */
    pointer-events: auto;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Make grid-container-m relative for absolute positioning of arrows */
#grid-container-m {
    position: relative;
}

.design-m {
    position: relative;
}

.design-m::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 20%;
    background: linear-gradient(to right, rgba(254, 240, 231, 1) 0%, rgba(254, 240, 231, 0) 100%);
    pointer-events: none;
    z-index: 2;
}

.design-m::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 20%;
    background: linear-gradient(to left, rgba(254, 240, 231, 1) 0%, rgba(254, 240, 231, 0) 100%);
    pointer-events: none;
    z-index: 2;
}

.design-m .scroll-arrow {
    position: absolute;
    opacity: 0.6;
    transition: all 0.3s ease;
    z-index: 3;
}

.design-m .scroll-arrow:hover {
    opacity: 0.8;
}

.design-m .left-arrow {
    left: 0.4rem;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(to right, rgba(254, 240, 231, 1) 0%, rgba(254, 240, 231, 0) 100%);
}

.design-m .right-arrow {
    right: 0.4rem;
    top: 50%;
    transform: translateY(-50%);
}

.design-m .scroll-arrow img {
    width: 16px;
    height: auto;
}

@media (max-width: 1024px) {
    .design-content {
        display: block;
        padding: 120px 0 0 0;
        overflow-x: hidden;
    }
    
    #grid-container-m {
        display: grid;
    }

    #grid-container {
        display: none;
    }
}

@media (max-width: 480px) {
    .design-content {
        display: block;
        padding: 80px 0 0 0;
        overflow-x: hidden;
    }
}

.tile:hover .tile-image {
    transform: skewX(15deg) scale(1.1);
}

/* Scroll Buttons */
.scroll-btn {
    width: 30px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: all 0.3s ease;
    position: absolute;
    z-index: 5;
}

.scroll-btn:hover {
    opacity: 0.8;
}

.scroll-btn img {
    width: 100%;
    height: auto;
}

.scroll-up-btn {
    top: 20px;
    right: 27%;
    transform: translateX(-50%);
}

.scroll-down-btn {
    bottom: 20px;
    right: 57%;
    transform: translateX(-50%);
}

/* Canvas */
#canvasWrapper {
    border: rgba(255,255,255,0.5) 2px dashed;
}

.canvas-container {
    background: #AC1C1B;
    padding: 20px;
}

@media (max-width: 480px) { 
    .canvas-container {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1/1;
        padding: 10px;
    }
    #sticker_canvas, .upper-canvas {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1/1;
    }
}

.review-cta {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 10;
}

.btn-review {
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease;
}
.btn-review img {
    width: 280px;
    height: auto;
}

/* Share Content */
.share-content {
    display: grid;
    grid-template-columns: 0.7fr 0.7fr;
    gap: 0;
    align-items: center;
    height: 100vh;
    min-height: 740px;
    padding-top: 50px;
    width: 80%;
    opacity: 0;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.end-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.name-share {
    width: 100px;
    height: auto;
    position: absolute;
    bottom: 260px;
    left: 250px;
    z-index: 2;
}

.design-share {
    width: 210px;
    height: auto;
    position: absolute;
    bottom: 40px;
    left: 130px;
    z-index: 2;
}

.character-share {
    width: 460px;
    height: auto;
    position: absolute;
    z-index: 1;
    bottom: 0;
    left: 0;
}

.headline5 img {
    width: 440px;
    height: auto;
}

.left-section5 {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 0 30px;
    z-index: 2;
}

.right-section5 {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.headline5 h3 {
    color: #981514;
    font-size: 90px;
    font-weight: 900;
    line-height: 60px;
    text-transform: uppercase;
}
.headline5 h3 small {
    font-size: 40px;
}

.cta-button5 {
    display: flex;
    gap: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.cta-button5 button {
    border: none;
    background: transparent;
    cursor: pointer;
    outline: none;
}

.cta-button5 button img {
    width: 300px;
    height: auto;
}
.cta-button5 button.btn-remix img {
    width: 280px;
    height: auto;
}
.cta-button5 button.btn-gallery2 img {
    width: 340px;
    height: auto;
}



.historical-image {
    width: 245px;
    height: auto;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 1;
}
.lang-image {
    width: 225px;
    height: auto;
    position: absolute;
    right: 0;
    top: 20%;
    z-index: 1;
}

@media (max-width: 1344px) {
    .headline5 img {
        width: 380px;
        height: auto;
    }
    .headline5 h3 {
        color: #981514;
        font-size: 78px;
        font-weight: 900;
        line-height: 50px;
    }
    .headline5 h3 small {
        font-size: 30px;
    }
    .cta-button5 button img {
        width: 260px;
        height: auto;
    }
    .cta-button5 button.btn-remix img {
        width: 240px;
        height: auto;
    }
    .cta-button5 button.btn-gallery2 img {
        width: 300px;
        height: auto;
    }
}

@media (max-width: 1134px) {
    .headline5 img {
        width: 320px;
        height: auto;
    }
    .headline5 h3 {
        color: #981514;
        font-size: 70px;
        font-weight: 900;
    }
}

@media (max-width: 1024px) {
    .share-content {
        display: block !important;
        padding: 90px 40px 30px 40px;
        width: 100%;
        height: 100%;
    }

    .left-section5 {
        padding: 0 0 10px;
        display: block;
    }
    .headline5 img {
        width: 280px;
        height: auto;
    }

    .headline5 h3 {
        color: #981514;
        font-size: 60px;
        font-weight: 900;
        line-height: 45px;
    }

    .cta-button5 {
        padding-bottom: 20px;
    }

    .m.cta-button5 {
        display: flex !important;
    }

    .cta-button5-m {
        display: flex;
        gap: 20px;
        justify-content: center;
        align-items: flex-end;
    }

    .character-share {
        width: 500px;
        height: auto;
        position: relative;
        margin: 0 auto;
    }

    .design-share {
        width: 210px;
        height: auto;
        bottom: 45px;
        left: 50%;
        transform: translateX(-50%);
    }

    .name-share {
        width: 130px;
        height: auto;
        bottom: 270px;
        left: 50%;
    }
    
    /* .btn-remix,
    .btn-share {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        background: transparent;
        border: none;
        cursor: pointer;
        transition: all 0.3s ease;
        width: 200px;
    } */

    .design-left {
        margin-top: 4rem;
    }
}

@media (max-width: 480px) {
    .share-content {
        padding-top: 70px;
    }

    .left-section5 {
        padding: 0;
        display: block;
    }
    
    .right-section5 {
        height: auto;
    }

    .headline5 img {
        width: 170px;
        height: auto;
    }

    .headline5 h3 {
        color: #981514;
        font-size: 36px;
        font-weight: 900;
        line-height: 30px;
    }

    .headline5 h3 small {
        font-size: 20px;
    }

    .character-share {
        width: 280px;
        height: auto;
        position: relative;
        margin: 0 auto;
    }

    .design-share {
        width: 120px;
        height: auto;
        bottom: 25px;
        left: 50%;
        transform: translateX(-50%);
    }

    .name-share {
        width: 55px;
        height: auto;
        bottom: 155px;
        left: 54%;
    }

    .cta-button5-m {
        display: flex;
        gap: 10px;
        justify-content: center;
        align-items: flex-end;
    }

    .cta-button5 button.btn-remix img, .cta-button5 button img {
        width: 150px;
        height: auto;
    }
    .cta-button5 button.btn-gallery2 img {
        width: 180px;
        height: auto;
        margin-top: 0.2rem;
    }
    
    .design-left {
        margin-top: 2rem;
    }
}

#error {
    text-align: right;
    display: none;
    font-size: 15px;
    font-weight: 600;
    color: #C52A2A;
    padding: 0 20px;
}

/* To Top Button */
.to-top-btn {
    position: fixed;
    bottom: 20px;
    right: 10px;
    width: 50px;
    height: 50px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 9999;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.to-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.to-top-btn:hover {
    transform: translateY(-5px);
}

.to-top-btn img {
    width: 100%;
    height: 100%;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}

.m { display: none; }
.d { display: block; }

/* Responsive Design */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .btn-text-main {
        font-size: 2rem;
    }
}

@media (max-width: 1024px) {
    .m { display: block; }
    .d { display: none; }

    .header {
        left: 50px;
    }

    .main-content {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .left-section {
        padding: 50px 30px;
        text-align: center;
        gap: 10px;
    }

    .right-section {
        display: none;
    }
   
    .btn-dress-up {
        margin-left: 0;
        margin-top: -2rem;
        width: 100%;
    }
    
    .headline {
        width: 100%;
    }

    .headline img {
        width: 72%;
    }

    .character {
        display: block;
        width: 100%;
    }
    
    .character img {
        width: 100%;
        height: auto;
        margin: 0 auto;
    }

    .character-img {
        display: none;
    }

    .cta-button {
        width: 100%;
    }
    
    .btn-dress-up img {
        width: 380px;
        height: auto;
        margin: 0 auto;
    }

    .btn-start img {
        width: 380px;
        height: auto;
    }

    /* Responsive for Gallery Section */
    .headline-2 {
        max-width: 95%;
        height: auto;
        margin: 0 auto;
    }

    .gallery-section {
        height: auto;
    }

    .gallery-content {
        grid-template-columns: 1fr;
        gap: 20px;
        /* padding: 0 20px; */
        padding: 40px 40px;
    }
    
    .gallery-left {
        order: 1;
        align-items: center;
        text-align: center;
        gap: 20px;
        overflow-x: hidden;
    }
    
    .gallery-center {
        position: relative;
        display: flex;
        justify-content:center;
        align-items:center;
        width: 115%;
    }
    
    .gallery-image {
        width: 100%;
        height: auto;
        min-height: auto;
    }
    
    .gallery-center::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 20%;
        background: linear-gradient(to bottom, rgba(255, 224, 205, 1) 0%, rgba(255, 224, 205, 0) 100%);
        pointer-events: none;
        z-index: 2;
    }
    
    .gallery-center::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 20%;
        background: linear-gradient(to top, rgba(255, 224, 205, 1) 0%, rgba(255, 224, 205, 0) 100%);
        pointer-events: none;
        z-index: 2;
    }

    .headline-3 {
        width: 60%;
        height: auto;
        margin-left: 3rem;
    }

    .btn-gallery {
        margin-top: -1rem;
    }
    
    .btn-gallery img {
        width: 280px;
        height: auto;
    }

    /* Responsive for Journey Section */
    .headline-4 {
        width: 90%;
        height: auto;
        margin: 0 auto;
    }

    .journey-content {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0 20px;
    }
    
    .journey-left {
        order: 1;
        align-items: center;
        text-align: center;
        gap: 0;
        padding: 50px 0 0;
    }
    
    .journey-right {
        order: 2;
        height: auto;
    }
    
    .journey-image {
        width: 100%;
        height: auto;
    }
    
    .mix-heading {
        width: 100%;
        height: auto;
    }

    .mix-image-m {
        width: 115%;
        height: auto;
    }

    .journey-section {
        height: auto;
    }

    .mix-section {
        height: auto;
    }

    .mix-content {
        padding: 100px 50px 80px;
    }
    
    .review-cta {
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .main-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 0;
        padding-top: 80px;
        min-height: auto;
    }
    
    .left-section {
        order: 1;
        align-items: center;
        text-align: center;
        gap: 10px;
    }
}

@media (max-width: 480px) {

    .header {
        top: 25px;
        left: 40px;
    }

    .left-section {
        padding: 25px 35px;
        gap:0;
    }
    
    .container {
        padding: 0;
    }
    
    .main-content {
        padding-top: 60px;
        gap: 0;
        display: block !important;
        height: auto;
    }
    
    .logo img {
        height: 30px;
    }
    
    .btn-dress-up {
        margin-top: -1rem;
        margin-left: 0;
        padding: 0;
    }

    .btn-dress-up img {
        width: 220px;
    }
    
    .headline {
        text-align: left;
    }
    .headline img {
        width: 70%;
    }
    
    .character {
        margin-top: 0.5rem;
    }

    .character img {
        width: 100%;
        transform: scale(1);
    }

    .mix-section {
        height: auto;
        padding: 80px 40px 40px;
    }

    .mix-content {
        padding: 0;
    }

    .mix-image-m {
        width: 100%;
        height: auto;
    }

    .btn-start {
        margin: 0 auto;
    }

    .headline-2 {
        width: 85%;
        height: auto;
    }
    .headline-3 {
        width: 50%;
        height: auto;
    }

    /* Responsive for Mix Section */
    .btn-start img {
        width: 280px;
        height: auto;
    }

    .gallery-content {
        /* padding: 0 10px; */
        gap: 15px;
    }

    .gallery-center {
        width: 120%;
    }

    .gallery-image {
        width: 90%;
        height: auto;
    }
    
    .gallery-left {
        gap: 15px;
    }
    
    .gallery-headline {
        gap: 0;
    }
    
    .btn-gallery img {
        width: 220px;
        height: auto;
        padding-bottom: 0;
    }
    
    .journey-content {
        padding: 0;
    }
    
    .journey-left {
        gap: 0;
        padding-top: 40px;
    }
    
    .journey-headline {
        gap: 0;
    }
    
    .headline-4 {
        width: 50%;
        height: auto;
    }

    .review-cta {
        margin-top: 0px;
    }

    .btn-review img {
        width: 220px;
        height: auto;
    }

    .mix-content {
        align-items: flex-start
    }

    .mix-heading {
        width: 80%;
        height: auto;
    }
    

    /* Responsive for To Top Button */
    .to-top-btn {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }

    .foot-line {
        width: 100%;
        height: 60px;
        background: #FF6500;
    }
}

/* Policy Popup Styles */
.policy-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(254,240,231,0.85);
    z-index: 77;
    justify-content: center;
    align-items: center;
}

.policy-popup.show {
    display: flex;
}

.policy-popup-content {
    position: relative;
    background: #FF6500;
    color:#FFF;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    border-radius: 10px;
    padding: 30px;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#tnc header {
    text-align: center;
    margin: 20px auto 30px;
}


.policy-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    width: 35px;
    height: 35px;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.policy-close-btn:hover {
    /* background: #C52A2A; */
    transform: scale(1.2);
}

.policy-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #FFE0CD;
}

.policy-header h2 {
    color: #981514;
    font-size: 28px;
    font-weight: 800;
    margin: 0;
    text-transform: uppercase;
}

.policy-body {
    line-height: 1.6;
}

.policy-body h2 {
    margin: 25px 0 15px 0;
    font-size: 20px;
    font-weight: 700;
}

.policy-body h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 25px 0 15px 0;
    border-left: 4px solid #FFF;
    padding-left: 15px;
}

.policy-body h3:first-child {
    margin-top: 0;
}

.policy-body p {
    margin: 0 0 15px 0;
    font-size: 14px;
    font-weight: 500;
}

.policy-body ul {
    margin: 0 0 15px 20px;
    padding: 0;
}

.policy-body li {
    margin: 8px 0;
    font-size: 16px;
    font-weight: 500;
}

.policy-body a {
    color: #FFF;
}

/* Responsive for Policy Popup */
@media (max-width: 768px) {
    .policy-popup-content {
        width: 95%;
        padding: 25px;
        max-height: 85vh;
    }
    
    .policy-header h2 {
        font-size: 24px;
    }
    
    .policy-body h3 {
        font-size: 18px;
    }
    
    .policy-body p,
    .policy-body li {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .policy-popup-content {
        width: 95%;
        padding: 20px;
        max-height: 59vh;
    }
    
    .policy-header h2 {
        font-size: 20px;
    }
    
    .policy-body h3 {
        font-size: 16px;
        margin: 20px 0 10px 0;
    }

    #tnc header {
        margin: 20px auto 20px;
    }
    
    header h1 {
        font-size: 20px;
        margin-bottom: 10px;
    }

    header p {
        font-size: 14px;
    }

    .policy-body p,
    .policy-body li {
        font-size: 12px;
    }
    
    .policy-body h2 {
        margin: 15px 0 10px 0;
        font-size: 18px;
    }
    
    .policy-close-btn {
        width: 30px;
        height: 30px;
        font-size: 20px;
        top: 10px;
        right: 15px;
    }
}

/* Popup Styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(254,240,231,0.85);
    z-index: 98;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}
.popup-overlay.popup-hidden {
    display: none;
}

.popup-content {
    background: white;
    width: 380px;
    height: 100vh;
    background: url('../images/popup.webp') no-repeat top center;
    background-size: 100% auto;
    opacity: 0;
    position: relative;
}

/* Popup close button */
.popup-close-btn {
    position: absolute;
    top: 120px;
    right: -20px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 2px solid #FF6500;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: #FF6500;
    transition: all 0.3s ease;
    z-index: 10;
}

.popup-close-btn:hover {
    border: 2px solid #C52A2A;
    color: #C52A2A;
    transform: scale(1.1);
}

.popup-close-btn:active {
    transform: scale(0.95);
}

.popup-form {
    padding: 250px 20px 80px 20px; 
    position: relative;
}

.form-field {
    margin-bottom: 10px;
    display: grid;
    grid-template-columns: 0.3fr 0.9fr;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
}

.form-field:last-child {
    margin-bottom: 0;
}

.form-field label {
    display: block;
    color: #FF0000;
    font-weight: bold;
    font-size: 18px;
}
.form-field label img {
    width: 100px;
    height: auto;
}

.form-field input {
    width: 100%;
    color: #111;
    font-weight: 800;
    padding: 10px 12px 5px;
    border-top: none;
    border-left: none;
    border-right: none;
    border-bottom: 2px solid #C52A2A;
    font-size: 15px;
    background: #FFF9F5;
    transition: all 0.3s ease;
}

.form-field input#userAddress {
    margin-top: 18px;
}

.form-field input::placeholder {
    text-transform: none;
    font-weight: 500;
}

.form-field input:focus {
    outline: none;
    background: #FFE6D5;
}

.form-field .hint {
    display: block;
    color: #111;
    font-size: 12px;
    margin-top: 8px;
    font-weight: 500;
    /* font-style: italic; */
    line-height: 1.4;
}

.popup-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: flex-end;
}

.btn-automix,
.btn-mix {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 200px;
}

.btn-automix {
    position: relative;
    margin-left: -50px;
}
.btn-mix {
    margin-right: -50px;
}

.btn-automix:hover,
.btn-mix:hover {
    transform: scale(1.05);
}

.btn-automix img {
    width: 190px;
    height: auto;
}

.btn-mix img {
    width: 195px;
    height: auto;
}

.btn-automix span,
.btn-mix span {
    text-align: center;
    line-height: 1.3;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Button Loading State */
.btn-automix:disabled,
.btn-mix:disabled {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    pointer-events: none;
}

.btn-automix:disabled .loading-spinner,
.btn-mix:disabled .loading-spinner {
    animation: spin 1s ease-in-out infinite;
}

/* Button Loading Content */
.btn-automix:disabled,
.btn-mix:disabled {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

@media (min-width: 1024px) and (min-height: 740px) {
    .popup-content {
        width: 450px;
    }

    .popup-form {
        padding: 320px 35px 80px 35px;
    }

    .form-field input {
        padding: 12px 12px 5px;
        font-size: 16px;
    }

    .form-field label img {
        width: 120px;
    }

    .form-field input#userAddress {
        margin-top: 25px;
    }

    .btn-automix img {
        width: 240px;
        height: auto;
    }

    .btn-mix img {
        width: 230px;
        height: auto;
    }

    .popup-buttons {
        gap: 80px;
    }
}

/* Mobile Responsive for Popup */
@media (max-width: 768px) {
    
    .popup-content {
        width: 550px;
    }
    
    .popup-header h2 {
        font-size: 22px;
    }
    
    .popup-form {
        padding: 380px 30px 120px 20px;
    }

    .form-field label img {
        width: 130px;
        height: auto;
    }

    .form-field input {
        font-size: 22px;
        border-bottom: 4px solid #C52A2A;
    }

    .form-field .hint {
        font-size: 15px;
    }

    .form-field input#userAddress {
        margin-top: 26px;
    }

    .btn-automix img {
        width: 280px;
        height: auto;
    }

    .btn-mix img {
        width: 270px;
        height: auto;
    }

    #error {
        font-size: 18px;
    }

    .popup-buttons {
        gap: 100px;
    }
}

@media (max-width: 480px) {
    .header {
        z-index: 77;
    }
    .popup-content {
        width: 320px;
    }

    .popup-form {
        padding: 220px 20px 50px 10px;
    }
    
    .popup-header h2 {
        font-size: 20px;
    }

    .form-field label img {
        width: 80px;
        height: auto;
    }
    
    .form-field input {
        padding: 5px 10px;
        font-size: 14px;
    }

    .form-field input#userAddress {
        margin-top: 15px;
    }

    .form-field .hint {
        font-size: 10px;
    }

    #error {
        font-size: 11px;
    }
    
    .popup-buttons {
        gap: 20px;
    }
    .btn-automix {
        margin-left: -10px;
    }
    .btn-mix {
        margin-right: -10px;
    }
    .btn-automix img {
        width: 160px;
        height: auto;
    }
    .btn-mix img {
        width: 155px;
        height: auto;
    }  
} 

/* Shirt Preview Popup */
.shirt-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(254,240,231,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition: all 0.3s ease;
}

.shirt-popup.popup-hidden {
    opacity: 0;
    visibility: hidden;
}

.shirt-popup-content {
    background: transparent;
    padding: 20px;
    text-align: center;
    max-width: 90%;
    max-height: 90%;
}

.shirt-image-container {
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.shirt-preview {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    position: relative;
}

.name-preview {
    width: 100px;
    height: auto;
    position: absolute;
    top: 80px;
    right: 90px;
}

.design-preview {
    width: 180px;
    height: auto;
    position: absolute;
    top: 140px;
    left: 50%;
    transform: translateX(-50%);
}

@media (max-width: 1024px) {
    .design-preview {
        width: 370px;
        height: auto;
        top: 240px;
    }
    .name-preview {
        width: 180px;
        height: auto;
        top: 150px;
        right: 160px;
    }
}
@media (max-width: 768px) {
    .name-preview {
        width: 110px;
        height: auto;
        top: 100px;
        right: 120px;
    }

    .design-preview {
        width: 260px;
        height: auto;
        top: 160px;
    }
}   
@media (max-width: 480px) {
    .name-preview {
        width: 80px;
        height: auto;
        top: 80px;
        right: 80px;
    }

    .design-preview {
        width: 190px;
        height: auto;
        top: 120px;
    }
}

.shirt-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.shirt-buttons {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0;
}

.btn-edit, .btn-finish {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s ease;
}
.btn-finish {
    position: relative;
}
.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.btn-edit:hover, .btn-finish:hover {
    transform: scale(1.05);
}

.btn-edit img, .btn-finish img {
    width: 320px;
    height: auto;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .shirt-popup-content {
        padding: 0;
        width: 700px;
    }

    .btn-edit img, .btn-finish img {
        width: 380px;
    }
}
@media (max-width: 768px) {
    .shirt-popup-content {
        width: 500px;
    }
    
    .shirt-buttons {
        gap: 0;
    }
    
    .btn-edit img, .btn-finish img {
        width: 330px;
    }
} 

@media (max-width: 480px) {
    .shirt-popup-content {
        width: 360px;
    }

    .btn-edit img, .btn-finish img {
        width: 250px;
    }
}

/* Prevent zoom on double-tap for mobile devices */
* {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

/* Prevent zoom on specific interactive elements */
/* button, .btn-dress-up, .btn-start, .btn-gallery, .tile, .tile-image {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
} */

/* Prevent zoom on canvas */
/* #sticker_canvas {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
} */

/* Prevent zoom on scroll containers */
/* #grid-container, #grid-container-m {
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
} */

/* Prevent zoom on scroll arrows */
/* .scroll-arrow {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}  */

/* Mobile touch improvements for grid-container-m */
@media (max-width: 768px) {
    #grid-container-m .tile-image {
        min-height: 80px; /* Larger touch target on mobile */
        min-width: 80px;
        pointer-events: auto !important; /* Force enable on mobile */
        cursor: pointer !important;
    }
    
    #grid-container-m .tile {
        min-height: 80px; /* Ensure tiles are large enough to touch */
        min-width: 80px;
    }
    
    /* Improve touch feedback */
    #grid-container-m .tile:active .tile-image {
        transform: skewX(15deg) scale(0.95);
        transition: transform 0.1s ease;
    }
} 

/* Gallery Navigation Styles */
.gallery-header {
    background: linear-gradient(to bottom, rgba(254, 240, 231, 1) 70%, rgba(254, 240, 231, 0.5) 90%, rgba(254, 240, 231, 0) 100%);
    padding: 20px 0;
    position: relative;
    z-index: 100;
}

.gallery-navigation {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 40px;
}

/* Back Button */
.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease;
    margin-right: 0;
}

.back-btn:hover {
    transform: scale(1.1);
}

.back-btn svg {
    width: 60px;
    height: 60px;
}

/* Logo Text */
.logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-left: 10px;
}

.logo-text img {
    width: 250px;
    height: auto;
}

.logo-line {
    font-family: 'SVN-Gilroy', sans-serif;
    font-weight: bold;
    line-height: 1;
    white-space: nowrap;
}

.logo-line-1 {
    font-size: 18px;
    color: #FF6B35;
    margin-bottom: 2px;
}

.logo-line-2 {
    font-size: 28px;
    color: #FF6B35;
    margin-bottom: 2px;
}

.logo-line-3 {
    font-size: 16px;
    color: #E74C3C;
    font-style: italic;
    margin-bottom: 2px;
}

.logo-line-4 {
    font-size: 20px;
    color: #E74C3C;
}

/* Search Section */
.search-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

@media (max-width: 480px) {
    .search-section {
        gap: 5px;
    }
}

.logo-back {
    display: flex;
    align-items: flex-start;
    gap: 0;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 15px;
    width: 20px;
    height: auto;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    z-index: 2;
}

.search-input {
    width: 350px;
    height: 45px;
    padding: 12px 15px 12px 45px;
    border: none;
    border-radius: 25px;
    background: #FFE0CD;
    font-size: 16px;
    color: #000;
    font-weight: 600;
    outline: none;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: #999;
    font-weight: 400;
}

.search-input:focus {
    background: #FFE6D5;
}

.search-btn {
    height: 45px;
    padding: 0 25px;
    background: #FF6B35;
    color: white;
    border: none;
    border-radius: 25px;
    font-family: 'SVN-Gilroy', sans-serif;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-btn:hover {
    background: #E55A2B;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.search-btn:active {
    transform: translateY(0);
}

/* Responsive Design for Gallery Navigation */
@media (max-width: 1024px) {
    .gallery-navigation {
        padding: 0 20px;
    }
    
    .search-input {
        width: 250px;
    }
    
    .logo-line-1 { font-size: 16px; }
    .logo-line-2 { font-size: 24px; }
    .logo-line-3 { font-size: 14px; }
    .logo-line-4 { font-size: 18px; }
}

@media (max-width: 768px) {
    .gallery-navigation {
        padding: 0 10px;
    }
    
    .logo-text {
        margin: 0;
        transform: none;
        text-align: center;
        align-items: center;
    }
    
    .search-section {
        margin: 0;
        width: 100%;
        justify-content: center;
        order: 3;
    }
    
    .search-input {
        width: 100%;
        max-width: 300px;
    }
    
    .back-btn {
        margin: 0;
        order: 1;
    }
    
    .logo-text {
        order: 3;
    }
}

@media (max-width: 480px) {
    .gallery-header {
        padding: 20px 0 80px;
    }
    .gallery-navigation {
        padding: 0 10px;
        align-items: flex-start;
        flex-direction: column;
        gap: 20px;
    }
    
    .logo-text img {
        width: 200px;
        height: auto;
    }

    .search-icon {
        width: 15px;
        height: auto;
    }

    .search-input {
        width: 250px;
        height: 40px;
        font-size: 12px;
        padding: 12px 15px 12px 38px;
    }
    
    .search-btn {
        height: 40px;
        padding: 0 20px;
        font-size: 14px;
    }
    
    .logo-line-1 { font-size: 14px; }
    .logo-line-2 { font-size: 20px; }
    .logo-line-3 { font-size: 12px; }
    .logo-line-4 { font-size: 16px; }
} 