/* =========================================
   FLAVORS PAGE - FINAL FIX
========================================= */

/* area intro atas */
.collection-switcher,
.collection-intro,
.flavor-layout {
  width: min(1440px, calc(100% - 40px));
}

/* intro atas */
.collection-intro {
  margin: 0 auto 34px;
  align-items: flex-start;
  gap: 48px;
}

.collection-name-wrap strong {
  font-size: clamp(46px, 4.2vw, 64px);
  line-height: 0.95;
}

.collection-intro > p {
  max-width: 700px;
  font-size: 12px;
  line-height: 1.9;
}

/* layout utama flavor */
.flavor-layout {
  display: grid;
  grid-template-columns: 360px 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 kiri */
.flavor-menu {
  background: #eadcc4;
  border-right: 1px solid rgba(24, 21, 16, 0.18);
}

/* tiap item menu */
.flavor-tab {
  width: 100%;
  min-height: 118px;
  padding: 22px 24px;

  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 52px;
  align-items: center;
  column-gap: 16px;

  border-bottom: 1px solid rgba(24, 21, 16, 0.14);

  background: transparent;
  color: var(--dark-text);

  text-align: left;
  cursor: pointer;

  transition:
    background 0.28s ease,
    color 0.28s ease,
    padding-left 0.28s ease;
}

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

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

.flavor-tab > span {
  color: var(--brown);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
  line-height: 1;
}

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

/* INI YANG BIKIN NAMA FLAVOR LEBIH AMAN */
.flavor-tab strong {
  display: block;
  min-width: 0;
  max-width: 100%;

  font-family: var(--heading-font);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.08;

  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

/* bulatan kode kanan */
.flavor-tab small {
  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  border: 1px solid currentColor;
  border-radius: 50%;

  font-family: var(--heading-font);
  font-size: 17px;
  line-height: 1;
}

/* kalo small kosong di BLAK / WHYT, tetap rapi */
.flavor-tab small:empty {
  border-color: transparent;
}

/* detail kanan */
.flavor-detail {
  min-height: 760px;

  display: grid;
  grid-template-columns: minmax(560px, 1.18fr) minmax(360px, 0.82fr);

  background: var(--cream-light);
}

/* panel gambar */
.flavor-image-panel {
  position: relative;
  min-height: 760px;
  padding: 28px;

  display: grid;
  place-items: center;

  background:
    radial-gradient(
      circle at center,
      rgba(181, 149, 96, 0.16),
      transparent 48%
    ),
    #12100d;

  overflow: hidden;
}

.flavor-image-panel::before {
  content: "";
  position: absolute;
  inset: 20px;
  border: 1px solid rgba(233, 221, 200, 0.12);
  pointer-events: none;
}

.flavor-image-panel::after {
  content: "";
  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.10),
      transparent 22%,
      transparent 78%,
      rgba(0, 0, 0, 0.14)
    );

  pointer-events: none;
}

/* INI BUAT BESARIN GAMBAR */
.flavor-image-panel img {
  position: relative;
  z-index: 1;

  width: 100%;
  height: 100%;
  max-height: 720px;

  object-fit: contain;
  object-position: center;

  transition:
    opacity 0.3s ease,
    transform 0.45s ease;
}

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

/* nomor di kiri atas */
.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: 10px;
  font-weight: 700;
  letter-spacing: 2px;
}

/* huruf gede kanan bawah */
.flavor-image-panel > strong {
  right: 36px;
  bottom: 18px;

  color: rgba(233, 221, 200, 0.88);

  font-family: var(--heading-font);
  font-size: 105px;
  font-weight: 500;
  line-height: 1;
}

/* copy kanan */
.flavor-detail-copy {
  padding: 56px 48px;
  border-left: 1px solid rgba(24, 21, 16, 0.12);
}

.flavor-detail-copy h2 {
  margin: 12px 0 22px;

  font-family: var(--heading-font);
  font-size: clamp(50px, 5vw, 76px);
  line-height: 0.92;
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 26px;
}

.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);
}

.flavor-detail-copy > p:nth-of-type(2) {
  max-width: 520px;
  font-size: 13px;
  line-height: 1.95;
}

/* =========================================
   TABLET
========================================= */
@media (max-width: 1100px) {
  .flavor-layout {
    grid-template-columns: 320px minmax(0, 1fr);
  }

  .flavor-detail {
    grid-template-columns: 1fr;
  }

  .flavor-image-panel {
    min-height: 640px;
  }

  .flavor-image-panel img {
    max-height: 590px;
  }
}

/* =========================================
   MOBILE
========================================= */
@media (max-width: 700px) {
  .collection-switcher,
  .collection-intro,
  .flavor-layout {
    width: min(100%, calc(100% - 24px));
  }

  .collection-intro {
    gap: 16px;
  }

  .collection-intro > p {
    max-width: 100%;
    text-align: left;
  }

  .flavor-layout {
    grid-template-columns: 1fr;
  }

  .flavor-tab {
    min-height: 96px;
    padding: 18px 18px;
    grid-template-columns: 48px minmax(0, 1fr) 46px;
    column-gap: 14px;
  }

  .flavor-tab:hover,
  .flavor-tab.is-selected {
    padding-left: 22px;
  }

  .flavor-tab strong {
    font-size: 18px;
    line-height: 1.1;
  }

  .flavor-tab small {
    width: 38px;
    height: 38px;
    font-size: 15px;
  }

  .flavor-detail {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .flavor-image-panel {
    min-height: 480px;
    padding: 18px;
  }

  .flavor-image-panel img {
    max-height: 430px;
  }

  .flavor-image-panel > strong {
    font-size: 72px;
    right: 22px;
    bottom: 16px;
  }

  .flavor-detail-copy {
    padding: 34px 24px;
  }

  .flavor-detail-copy h2 {
    font-size: 42px;
  }
}
