/*----------------------------------------------------------------
|                    ISI MENU & GRID                             |
-----------------------------------------------------------------*/
.menuPageGrid {
    flex-grow: 1;
    height: 100%;
    position: relative;
    padding: 0;
    border-radius: 25px 0 0 25px;
    background-image: url(/assets/menu/background/menuBackground.webp); /*UNTUK PAKAI BACKGROUND GAMBAR*/
    /*background-color: rgb(228, 227, 218); UNTUK PAKAI BACKGROUND WARNA */
    background-color: transparent; /* aktifkan untuk menggunakan background gambar*/
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden; 
    z-index: 6;
}
.tabContent {
    display: none;
    width: 100%;
    height: 100%;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    animation: fadeIn 0.4s ease; 
}
.tabContent.active-page {
    display: flex;
    flex-direction: column;
    align-content: start;
    justify-items: center;
    width: 100%;
    height: 100%;
    padding: 10px;
    box-sizing: border-box;
    overflow-y: auto;
}

#bookCover.active-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
    padding-top: 0;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.hintBubbleContainer {
    align-items: center;
    max-width: fit-content;
}
.orderHintBubble {
    position: absolute;
    top: 20px; 
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.808); 
    backdrop-filter: blur(2px); 
    border-radius: 12px;
    padding: 0 2px;
    font-size: 12px;
    color: #550303;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    display: none; 
    z-index: 999;
    animation: fadeInBubble 0.5s ease;
}
.orderHintBubble.show {
  display: block;
  animation: fadeInBubble 0.5s ease forwards;
}
.orderHintBubble.hide {
  animation: fadeOutBubble 0.5s ease forwards;
}
@keyframes fadeInBubble {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes fadeOutBubble {
  from { opacity: 1; transform: translate(-50%, 0); }
  to   { opacity: 0; transform: translate(-50%, -10px); }
}

.coverContent h1 {
    font-size: 2rem;
    margin-bottom: 0;
    margin-top: -20px;
    color: #550303;
}
.coverContent p {
    letter-spacing: 5px;
    border-top: 2px solid #550303;
    padding-top: 10px;
}
.instructionContainer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}
.instructionContainer span {
    font-size: clamp(12px, 1.5vh, 20px);
    font-weight: 550;
    color: #550303;
}
.blinkingArrow {
    width: 15px;
    height: 15px;
    animation: blink-arrow 2s infinite;
}
@keyframes blink-arrow {
    0% { opacity: 0; transform: translateX(0); }
    50% { opacity: 1; transform: translateX(5px); }
    100% { opacity: 0; transform: translateX(0); }
}

.customerForm {
    display: flex; 
    flex-direction: column;
    text-align: left;
    gap: 7px;
    max-width: 300px;
}
.customerForm label {
    font-weight: bold;
    margin-bottom: -6px;
}
.customerForm input,
.customerForm textarea {
    font-family: 'Courier New', Courier, monospace;
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.subPage {
    padding: 0 10px;
}
#introduction.active-page {
  display: flex;
  flex-direction: column;   
  align-content: flex-start;
  justify-items: flex-start;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}
#introduction.active-page .introImageArea {
    display: block;
}
.textWrapper {
    background-color: #ffffff77;
    border-radius: 20px 10px 10px 10px;
    margin: 0;
    padding: 5px 20px;
}
.textWrapper h4 {
    margin-top: -20px;
}

#menuCoffee > .menuTitle .menuTitleInfo {
  padding-left: 30px;   
}
#menuCoffee .instructionContainer {
  padding-left: 20px;   
}
#menuCoffee .menuTitleInfo {
    padding-left: 20px;
}
#brewIntro.active-sub-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  height: 100%;                 
  box-sizing: border-box;
}



.menuTitle {
    position: relative;
    overflow: visible;
    height: 100%; 
    width: 100%;
    display: flex;
    flex-direction: row; 
    align-items: center;
    text-align: left;
    gap: 10px;
    background-color: transparent;
    transition: transform 0.3s ease;
}
.menuTitle h1,
.menuTitle h2 {
    margin-bottom: 0;
    padding: 0;
}
.menuTitle p {
    margin-top: 0;
    padding: 0;
}
#brewIntro .menuTitleInfo h2 {
    line-height: 0.1;
}
.iconText {
    display: block;
    margin-top: -5px;
    margin-bottom: 10px;
    margin-left: 28px;
    text-align: left;
    font-size: clamp(12px, 1.5vh, 20px);
}
.menuItem {
    position: relative;
    overflow: visible;
    height: 100%; 
    width: 100%;
    display: flex;
    flex-direction: row; 
    align-items: center;
    text-align: left;
    gap: 10px;
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}
.menuItem:hover {
    background-color: #b6b6b650;
    transform: scale(1.03); 
}
.menuImage {
    width: 70px;    
    height: 75px;
    position: relative;
    flex-shrink: 0;
    border-radius: 5px;
}
.menuImage img {
    width: 100%;
    height: 100%;
    rotate: -10deg;
    position: absolute;
    margin: 0 5px;
    object-fit: cover;
    background-color: transparent;
    border-radius: 5px;
    transition: transform 0.3s ease;
    top: 6px;
    left: 5px;
}
.menuItem:hover .menuImage img {
    transform: scale(1.5);
}
.menuInfo {
    padding: 10px;
}
.menuInfo h3 {
    margin: 0;
    font-size: clamp(12px, 1.5vh, 20px);
    color: #333;
}
.menuInfo p {
    margin: 0 0 10px 0;
    font-size: clamp(12px, 1.5vh, 20px);
    color: #333;
    line-height: 1;
}

/* Kontainer utama untuk daftar ukuran & qty */
/* Pastikan kontainer induknya blok penuh */
.orderControls {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 4px;
  margin-top: 6px;
}
.orderControls p {
    margin: 0;
    font-size: clamp(12px, 1.5vh, 20px);
    color: #333;
}


/* Kontainer baris ukuran & harga menggunakan Grid dengan ukuran manual */
.sizeQtyRow {
  display: grid;
  /* Kolom kiri (teks ukuran) lebarnya diatur manual, misal 220px. Kolom kanan (qty) auto. */
  grid-template-columns: 300px auto; 
  align-items: center;
  width: 100%;
  max-width: 100%;
  margin-bottom: 4px;
  gap: 10px;
}

/* Teks ukuran & harga di sebelah kiri */
.sizeQtyRow .sizeLabel {
  text-align: left;
  font-size: 0.9em;
  font-weight: 500;
  /* Jika teks kepanjangan, atur agar terpotong atau turun rapi */
  overflow: hidden;
  text-overflow: clip;
  white-space: normal;
  width: 100%;
}

/* Pembungkus Qty di sebelah kanan */
.sizeQtyRow .qtyWrapper {
  display: flex;
  align-items: center;
  gap: 5px;
  justify-self: start; /* Posisi awal kotak qty setelah kolom teks */
}

.sizeQtyRow .qtyLabel {
  font-size: 0.85em;
}

/* Kotak input Qty DIATUR MANUAL lebarnya */
.sizeQtyRow .qtyInput {
  width: 60px !important; /* Paksa lebar manual sesuai keinginan Anda (misal 60px) */
  min-width: 60px;
  text-align: center;
  padding: 3px;
  border: 1px solid #b5a48b;
  border-radius: 4px;
  background-color: #fdfbf7;
}


button {
    font-size: clamp(12px, 1.5vh, 20px);
    color: white;
    background: #550303;
    border: none;
    margin: 20px auto;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}
button:hover {
    background: #7a0a0a;    
}

.sectionDivider {
    border: none;
    border-top: 1px solid #333;
    opacity: 0.2;
    margin: 5px 0;
    width: 100%;
}
#menuNonCoffeeContent {
  padding-top: 0; 
}
#menuNonCoffee .menuTitle {
    padding-left: 80px;
}
#menuNonCoffeeContent .sectionDivider {
    margin-top: 0;   
    margin-bottom: 5px; 
}

/* BOX KONFIRMASI PESANAN SELESAI */
.confirmBox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
}
.confirmContent {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  max-width: 400px;
}
.confirmContent p {
  margin-bottom: 15px;
  font-size: 1rem;
  color: #333;
}
.confirmContent button {
  margin: 0 10px;
  padding: 8px 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}
#orderNowBtn { background: #550303; color: #fff; }
#continueBtn { background: #ccc; }


/*----------------------------------------------------------------
|                    GALLERIES & POLAROID CONTAINERS             |
-----------------------------------------------------------------*/
.polaroid {
    width: clamp(200px, 22vw, 300px);     
    height: clamp(270px, 30vw, 400px);     
    background: transparent;
    overflow: hidden;     
    box-shadow: 8px 5px 15px rgba(0, 0, 0, 0.6);   
    display: flex;
    flex-direction: column;
    padding: 5px 5px 0 5px;
    gap: 5px;
    pointer-events: none;
    background-color: #f0f0f0;
    border-radius: 5px;
    transform: translateX(0);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 999;
}

/* 1. Atur semua kontainer galeri secara umum di sini */
.introImageGallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; 
    align-items: center;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
    padding-left: 0;      
    margin-top: 40px;
    margin-bottom: 40px;
}
.miscGallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; 
    align-items: center;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
    padding-left: 0;      
    margin-top: 0;
    margin-bottom: 40px;
}
.othersGallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; 
    align-items: center;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
    margin-top: 0;
    padding-left: 80px;
}
/* KUNCI UTAMA: Biar galeri Others yang isinya cuma 1 gambar posisinya ikut ketarik ke tengah */
#others .othersGallery {
    justify-content: center !important;
}

#others .othersGallery .othersImageArea {
    margin: 0 auto; /* Memaksa elemen tunggal di dalamnya berada di tengah */
}
/* 2. Khusus .brewIntroGallery disembunyikan dulu secara default */
.brewIntroGallery {
    display: none; /* Sembunyikan galeri brew intro secara default */
    width: 100%;
    box-sizing: border-box;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding-left: 60px;
    margin-top: 40px;
    margin-bottom: 40px;
}
/* Tampilkan ketika brewIntro memiliki kelas active-sub-page */
#brewIntro.active-sub-page ~ .brewIntroGallery,
.brewIntroGallery.active-sub-page {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

/* 3. Munculkan hanya ketika aktif */
#brewIntro.active-sub-page ~ .brewIntroGallery,
.brewIntroGallery.active-sub-page {
    display: flex;
}
/* Bersihkan .feedbackGallery dari margin top dan gap */
.feedbackGallery {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1;                 /* Sisa ruang diatur fleksibel untuk gambar */
    max-width: 300px;
    box-sizing: border-box;
    padding-left: 40px;         /* Pastikan tidak ada padding kiri yang mendorong */
    margin-top: 20px;
    margin-bottom: 40px;
}

.brewIntroGallery .brewIntroImageArea {
    display: flex;
    justify-content: center;
    align-items: center;
}
/* Pastikan area pembungkus polaroid individual tidak merusak flex */
.introImageArea {
    display: flex;
    justify-content: center;
    align-items: center;
}
.introImageArea.two {
    display: flex;
    justify-content: center;
    align-items: center;
}

.othersImageArea { /*kalo mau di pisah dengan aturan masing2 gambar cukup tambah .two seperti contoh diatas*/
    display: flex;
    justify-content: center;
    align-items: center;
}
.miscImageArea {
    display: flex;
    justify-content: center;
    align-items: center;
}
.feedbackImageArea {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;                      /* Porsi gambar lebih kecil dibanding form */
}

.miscImageArea img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

#miscImage2.miscImageArea img {
  width: 100%;
  height: auto;
  object-fit: cover;   
}
.imgDisclaimer {
    margin-top: 0;
    text-align: end;
    font-size: clamp(5px, 0.5vh, 12px);
    font-weight: 100;
}
.othersImageArea img {
  width: 100%;
  height: auto;
  object-fit: contain;   
}

.menuGalleryArea {
    position: absolute;
    left: 50%;
    top: 0;
    margin-top: 0;
    width: 250px;
    height: 330px;
    background: transparent;
    overflow: hidden;
    padding: 5px;
    rotate: 5deg;
    box-shadow: 8px 5px 15px rgba(0, 0, 0, 0.6);   
    background-color: #f0f0f0;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-20px);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 999;
}
.menuTitle:hover .menuGalleryArea {
    opacity: 1;
    visibility: visible;
    transform: translateX(10px);   
    pointer-events: auto;
}
.menuTitle:hover p {
    text-decoration: underline;
    cursor: pointer;
}
.menuGallery {
    position: absolute;
    width: 97%;
    height: fit-content;
    display: flex;
    overflow: hidden;
    border-radius: 0;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}
.menuGallery::-webkit-scrollbar {
    display: none;
}
.galleryItem {
    flex: 0 0 100%;
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
}
.menuGallery img {
    width: 100%;
    height: 78%;
    object-fit: cover;
}
.closeOverlay {
    display: none;
}
.caption {
    margin-top: 10px;
    margin-bottom: 5px;
    font-size: 0.8rem;
    color: #333;
    line-height: 0.9;
    text-align: center;
    font-family: 'Courier New', Courier, monospace;
}
.menuGallery span {
    display: block;
    font-size: 0.75rem;
    margin-top: 8px;
    text-align: center;
    color: #333;
}