/**
 * ZYNENGINE — tambahan di atas Tailwind (loader, FAB, aksesibilitas)
 */
html {
  scroll-behavior: auto;
}

body {
  -webkit-tap-highlight-color: transparent;
}

.zyn-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  color: #fff;
  font-weight: 900;
}

/* Loader */
.zyn-loader {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(2 6 23);
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.dark .zyn-loader {
  background: #07040d;
}

.zyn-loader.zyn-loader-hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.zyn-loader-bar {
  width: 6rem;
  height: 3px;
  border-radius: 0;
  background: rgba(124, 58, 237, 0.25);
  overflow: hidden;
}

.zyn-loader-bar::after {
  content: "";
  display: block;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, #7c3aed, #a78bfa);
  border-radius: 0;
  animation: zyn-load 1.1s ease-in-out infinite;
}

@keyframes zyn-load {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .zyn-loader-bar::after { animation: none; width: 100%; }
}

/* FAB */
.zyn-fab-stack {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 980;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.zyn-fab {
  width: 3.35rem;
  height: 3.35rem;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  transition: transform 0.12s ease, filter 0.12s ease;
}

.zyn-fab:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

/* Warna merek resmi */
.zyn-fab-wa {
  background: #25d366;
}

.zyn-fab-tg {
  background: #229ed9;
}

.zyn-fab {
  border: none;
  cursor: pointer;
  font: inherit;
}

.zyn-gallery-scroll {
  -webkit-overflow-scrolling: touch;
}

/* Modal galeri produk: flex column + isi scroll (min-h-0 memperbaiki tinggi 0 di mobile) */
.zyn-gallery-modal.flex {
  min-height: 0;
}

.zyn-gallery-body {
  flex: 1 1 auto;
  min-height: 0;
  overscroll-behavior: contain;
}

.zyn-gallery-item {
  margin-left: auto;
  margin-right: auto;
}

.zyn-gallery-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(78vh, 640px);
  object-fit: contain;
  object-position: center;
  background: rgba(15, 15, 20, 0.6);
}

/* Tiga gambar: batasi tinggi per item supaya ketiga thumbnail terbaca + scroll halus */
.zyn-gallery-img[data-zyn-gallery-many="1"] {
  max-height: min(34vh, 320px);
}

.zyn-product-thumb:focus-visible {
  outline: 2px solid rgb(167 139 250);
  outline-offset: 2px;
}

/* Hero: judul panjang di mobile — rapi kiri–kanir, turun dari header */
@media (max-width: 639px) {
  #beranda .zyn-hero-copy {
    width: 100%;
    padding-left: 0.125rem;
    padding-right: 0.125rem;
    box-sizing: border-box;
  }

  #beranda .zyn-hero-title {
    text-wrap: pretty;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: manual;
  }
}

/* Panel menu mobile: kurangi repaint saat geser + scroll isi */
.zyn-menu-panel {
  -webkit-overflow-scrolling: touch;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.45);
  border-radius: 0;
}
