/* ==================================================
   FINAL POLISH — MAESTRO FLAVOR EXPLORER
================================================== */

/* Area keseluruhan */
.flavor-explorer {
  padding: 105px 5% 125px;
}

.flavor-explorer-heading {
  width: min(1320px, 100%);
  margin: 0 auto 58px;
}

.flavor-explorer-heading h2 {
  max-width: 950px;
  font-size: clamp(52px, 6vw, 82px);
  line-height: 0.95;
}

/* Kotak utama flavor */
.flavor-layout {
  width: min(1320px, 100%);
  max-width: none;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  border: 1px solid rgba(24, 21, 16, 0.18);
  background: var(--cream-light);
  box-shadow: 0 30px 80px rgba(45, 35, 23, 0.08);
}

/* Menu flavor kiri */
.flavor-menu {
  min-width: 0;
  background: #eadcc4;
  border-right: 1px solid rgba(24, 21, 16, 0.18);
}

.flavor-tab {
  width: 100%;
  min-height: 116px;
  padding: 20px 22px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(24, 21, 16, 0.16);
  background: transparent;
  color: var(--dark-text);
  text-align: left;
  cursor: pointer;
  transition:
    background 0.3s ease,
    color 0.3s ease,
    padding-left 0.3s ease;
}

.flavor-tab:last-child {
  border-bottom: 0;
}

.flavor-tab:hover,
.flavor-tab.is-selected {
  padding-left: 27px;
  background: var(--black);
  color: var(--cream);
}

.flavor-tab > span {
  color: var(--brown);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
}

.flavor-tab:hover > span,
.flavor-tab.is-selected > span {
  color: var(--gold-light);
}

.flavor-tab strong {
  min-width: 0;
  font-family: var(--heading-font);
  font-size: 27px;
  font-weight: 600;
  line-height: 1.05;
}

.flavor-tab small {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: var(--heading-font);
  font-size: 20px;
}

/* Detail produk sebelah kanan */
.flavor-detail {
  min-width: 0;
  min-height: 710px;
  display: grid;
  grid-template-columns:
    minmax(420px, 1.15fr)
    minmax(320px, 0.85fr);
  background: var(--cream-light);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.flavor-detail.is-changing {
  opacity: 0;
  transform: translateY(8px);
}

/* Area gambar */
.flavor-image-panel {
  position: relative;
  min-width: 0;
  min-height: 710px;
  display: grid;
  place-items: center;
  padding: 30px;
  background:
    radial-gradient(
      circle at center,
      rgba(181, 149, 96, 0.14),
      transparent 48%
    ),
    #12100d;
  overflow: hidden;
}

/* Bingkai tipis di area gambar */
.flavor-image-panel::before {
  content: "";
  position: absolute;
  inset: 20px;
  z-index: 1;
  border: 1px solid rgba(233, 221, 200, 0.13);
  pointer-events: none;
}

/* Gradasi ringan, tidak menutupi gambar */
.flavor-image-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.11),
      transparent 25%,
      transparent 75%,
      rgba(0, 0, 0, 0.15)
    );
  pointer-events: none;
}

/* Gambar dibuat tampil UTUH, bukan di-crop */
.flavor-image-panel img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  max-height: 650px;
  object-fit: contain;
  object-position: center;
  background: transparent;
  transition:
    opacity 0.3s ease,
    transform 0.5s ease;
}

.flavor-detail:hover .flavor-image-panel img {
  transform: scale(1.015);
}

/* Nomor dan huruf chord */
.flavor-image-panel > span,
.flavor-image-panel > strong {
  position: absolute;
  z-index: 4;
  color: var(--cream);
}

.flavor-image-panel > span {
  top: 38px;
  left: 40px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
}

.flavor-image-panel > strong {
  right: 35px;
  bottom: 18px;
  color: rgba(233, 221, 200, 0.88);
  font-family: var(--heading-font);
  font-size: 105px;
  font-weight: 500;
  line-height: 1;
}

/* Area deskripsi */
.flavor-detail-copy {
  min-width: 0;
  padding: 58px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid rgba(24, 21, 16, 0.12);
}

.flavor-detail-copy > p:first-child {
  color: var(--brown);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2.2px;
  text-transform: uppercase;
}

.flavor-detail-copy h2 {
  margin: 10px 0 23px;
  font-family: var(--heading-font);
  font-size: clamp(54px, 5.5vw, 78px);
  font-weight: 600;
  line-height: 0.88;
}

/* Tag rasa */
.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 28px;
}

.profile-tags span {
  padding: 8px 13px;
  border: 1px solid rgba(24, 21, 16, 0.18);
  color: var(--brown);
  font-family: var(--heading-font);
  font-size: 16px;
  font-style: italic;
  background: rgba(255, 255, 255, 0.13);
}

/* Deskripsi flavor */
.flavor-detail-copy > p:nth-of-type(2) {
  max-width: 490px;
  color: var(--muted-dark);
  font-size: 13px;
  line-height: 1.95;
}

/* Tombol order */
.flavor-detail-copy .button {
  width: 100%;
  max-width: 260px;
  margin-top: 30px;
  justify-content: space-between;
}

.order-note {
  margin-top: 12px;
  color: var(--muted-dark);
  font-size: 9px;
  line-height: 1.6;
}

/* ==================================================
   LAPTOP KECIL / TABLET LANDSCAPE
================================================== */

@media (max-width: 1180px) {
  .flavor-layout {
    grid-template-columns: 1fr;
  }
  .flavor-menu {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    border-right: 0;
    border-bottom: 1px solid rgba(24, 21, 16, 0.18);
  }
  .flavor-tab {
    min-height: 125px;
    padding: 18px 10px;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 7px;
    border-right: 1px solid rgba(24, 21, 16, 0.16);
    border-bottom: 0;
    text-align: center;
  }
  .flavor-tab:last-child {
    border-right: 0;
  }
  .flavor-tab:hover,
  .flavor-tab.is-selected {
    padding-left: 10px;
  }
  .flavor-tab strong {
    font-size: 20px;
  }
  .flavor-tab small {
    width: 34px;
    height: 34px;
    font-size: 17px;
  }
  .flavor-detail {
    grid-template-columns:
      minmax(390px, 1.08fr)
      minmax(320px, 0.92fr);
  }
}

/* ==================================================
   TABLET
================================================== */

@media (max-width: 850px) {
  .flavor-explorer {
    padding: 90px 24px 100px;
  }
  .flavor-menu {
    grid-template-columns: 1fr;
  }
  .flavor-tab {
    min-height: 82px;
    padding: 14px 20px;
    grid-template-columns: 34px minmax(0, 1fr) 38px;
    justify-items: initial;
    gap: 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(24, 21, 16, 0.16);
    text-align: left;
  }
  .flavor-tab:last-child {
    border-bottom: 0;
  }
  .flavor-tab:hover,
  .flavor-tab.is-selected {
    padding-left: 25px;
  }
  .flavor-tab strong {
    font-size: 25px;
  }
  .flavor-detail {
    grid-template-columns: 1fr;
  }
  .flavor-image-panel {
    min-height: 590px;
  }
  .flavor-image-panel img {
    max-height: 530px;
  }
  .flavor-detail-copy {
    padding: 55px 42px;
    border-top: 1px solid rgba(24, 21, 16, 0.12);
    border-left: 0;
  }
  .flavor-detail-copy h2 {
    font-size: 64px;
  }
}

/* ==================================================
   MOBILE
================================================== */

@media (max-width: 600px) {
  .flavor-explorer {
    padding: 75px 16px 85px;
  }
  .flavor-explorer-heading {
    margin-bottom: 40px;
  }
  .flavor-explorer-heading h2 {
    font-size: 44px;
  }
  .flavor-tab {
    min-height: 77px;
    padding: 13px 15px;
    grid-template-columns: 30px minmax(0, 1fr) 35px;
  }
  .flavor-tab:hover,
  .flavor-tab.is-selected {
    padding-left: 19px;
  }
  .flavor-tab strong {
    font-size: 23px;
  }
  .flavor-tab small {
    width: 34px;
    height: 34px;
    font-size: 17px;
  }
  .flavor-image-panel {
    min-height: 470px;
    padding: 18px;
  }
  .flavor-image-panel::before {
    inset: 12px;
  }
  .flavor-image-panel img {
    max-height: 430px;
  }
  .flavor-image-panel > span {
    top: 27px;
    left: 28px;
  }
  .flavor-image-panel > strong {
    right: 23px;
    bottom: 13px;
    font-size: 75px;
  }
  .flavor-detail-copy {
    padding: 45px 24px;
  }
  .flavor-detail-copy h2 {
    font-size: 52px;
  }
  .flavor-detail-copy .button {
    max-width: none;
  }
}
