/* =========================================================
   FASTSHOT STUDIO - Komponen lanjutan
   Gradien teks, kartu paket unggulan, fade hero, toggle tema,
   galeri pengerjaan + lightbox, dan widget WhatsApp interaktif.
   ========================================================= */

/* ---------- Gradien teks ---------- */
.headline-gradient {
  background-image: linear-gradient(90deg, #67e8f9, #ffffff, #38bdf8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-gradient {
  background-image: linear-gradient(90deg, #67e8f9, #38bdf8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Kartu paket unggulan ---------- */
.plan-featured {
  background: linear-gradient(180deg, #0e192c 0%, #091120 55%, #070c16 100%);
  border-color: rgba(53, 216, 255, 0.4);
  box-shadow: 0 0 40px rgba(53, 216, 255, 0.18);
}

/* ---------- Fade bawah hero ---------- */
.hero-fade {
  background-image: linear-gradient(to top, #030509, transparent);
}

/* =========================================================
   Toggle tema
   ========================================================= */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: #cbd5e1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.theme-toggle:hover {
  border-color: rgba(53, 216, 255, 0.45);
  color: #7fe4ff;
  transform: translateY(-1px);
}
.theme-toggle .material-symbols-outlined { font-size: 19px; }
.theme-toggle .icon-light { display: none; }
html[data-theme="light"] .theme-toggle .icon-dark { display: none; }
html[data-theme="light"] .theme-toggle .icon-light { display: block; }

/* =========================================================
   Galeri pengerjaan
   ========================================================= */
.gallery-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.filter-chip {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.filter-chip:hover { border-color: rgba(53, 216, 255, 0.4); }
.filter-chip.is-active {
  border-color: rgba(53, 216, 255, 0.5);
  background: rgba(53, 216, 255, 0.1);
  color: #bff6ff;
}
.filter-count { opacity: 0.6; font-weight: 500; }

.gallery-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 190px;
  }
}

.gallery-item {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0a0f18;
  cursor: pointer;
  aspect-ratio: 4 / 3;
  transition: border-color 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@media (min-width: 1024px) {
  .gallery-item { aspect-ratio: auto; height: 100%; }
}
.gallery-item:hover { border-color: rgba(53, 216, 255, 0.4); transform: translateY(-3px); }
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
.gallery-item:hover img { transform: scale(1.07); }
.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(3, 5, 9, 0.9) 0%, rgba(3, 5, 9, 0.15) 52%, transparent 100%);
  opacity: 0.92;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.gallery-item:hover::after { opacity: 1; }

.gallery-item[data-span="hero"] { grid-column: span 2; }
@media (min-width: 1024px) {
  .gallery-item[data-span="hero"] { grid-column: span 2; grid-row: span 2; }
  .gallery-item[data-span="wide"] { grid-column: span 2; }
}

.gallery-tag {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(3, 5, 9, 0.65);
  border: 1px solid rgba(53, 216, 255, 0.35);
  color: #bff6ff;
  backdrop-filter: blur(6px);
}
.gallery-zoom {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(3, 5, 9, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #eaf1f9;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  backdrop-filter: blur(6px);
}
.gallery-item:hover .gallery-zoom,
.gallery-item:focus-visible .gallery-zoom { opacity: 1; transform: translateY(0); }
.gallery-zoom .material-symbols-outlined { font-size: 18px; }

.gallery-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 0.9rem 1rem;
  text-align: left;
}
.gallery-caption strong {
  display: block;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
}
.gallery-sub {
  display: block;
  color: #a9b8cc;
  font-size: 0.7rem;
  margin-top: 0.2rem;
}
.gallery-item[data-span="hero"] .gallery-caption strong { font-size: 1.05rem; }

.gallery-item.is-filtered { display: none; }

/* =========================================================
   Lightbox galeri
   ========================================================= */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(3, 5, 9, 0.93);
  backdrop-filter: blur(10px);
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { animation: lightboxIn 0.25s ease; }
@keyframes lightboxIn { from { opacity: 0; } to { opacity: 1; } }

.lightbox-figure {
  position: relative;
  width: 100%;
  max-width: min(1080px, 94vw);
  background: #0a0f18;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9);
}
.lightbox-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #05080e;
  display: grid;
  place-items: center;
}
.lightbox-media img { width: 100%; height: 100%; object-fit: contain; }

.lightbox-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.lightbox-text { min-width: 0; }
.lightbox-title {
  display: block;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
}
.lightbox-desc {
  display: block;
  color: #93a2b8;
  font-size: 0.72rem;
  margin-top: 0.15rem;
}
.lightbox-counter {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: #93a2b8;
  white-space: nowrap;
}

.lightbox-btn {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(9, 14, 23, 0.85);
  color: #e2e8f0;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.lightbox-btn:hover { border-color: rgba(53, 216, 255, 0.5); color: #7fe4ff; }
.lightbox-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.lightbox-close { position: absolute; top: 0.75rem; right: 0.75rem; z-index: 3; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; }
.lightbox-prev { left: 0.75rem; }
.lightbox-next { right: 0.75rem; }

@media (max-width: 640px) {
  .lightbox-btn { width: 38px; height: 38px; }
  .lightbox-nav { top: auto; bottom: 5.2rem; transform: none; }
  .lightbox-meta { flex-direction: column; align-items: flex-start; gap: 0.35rem; }
}

/* =========================================================
   Widget WhatsApp interaktif
   ========================================================= */
.wa-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(140deg, #34d77a, #1eb457);
  display: grid;
  place-items: center;
  z-index: 1100;
  border: 0;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.wa-float:hover { transform: scale(1.07); }
.wa-float::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, 0.55);
  animation: pulseWa 2.8s ease-out infinite;
  pointer-events: none;
}
.wa-float .icon-open,
.wa-float .icon-close { position: absolute; color: #ffffff; transition: opacity 0.2s ease, transform 0.25s ease; }
.wa-float .icon-close { opacity: 0; transform: rotate(-90deg) scale(0.7); }
.wa-float.is-open .icon-open { opacity: 0; transform: rotate(90deg) scale(0.7); }
.wa-float.is-open .icon-close { opacity: 1; transform: rotate(0) scale(1); }
.wa-float.is-open::after { animation: none; opacity: 0; }

.wa-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
  border: 2px solid #030509;
}
html[data-theme="light"] .wa-badge { border-color: #f4f7fb; }

.wa-panel {
  position: fixed;
  right: 24px;
  bottom: 94px;
  width: min(372px, calc(100vw - 32px));
  z-index: 1090;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(16, 24, 39, 0.97), rgba(8, 13, 22, 0.99));
  backdrop-filter: blur(18px);
  box-shadow: 0 26px 64px -26px rgba(0, 0, 0, 0.85);
  overflow: hidden;
}
.wa-panel[hidden] { display: none; }
.wa-panel.is-open { animation: waPanelIn 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes waPanelIn {
  from { opacity: 0; transform: translateY(14px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

.wa-panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #0f766e, #0e7490);
  color: #ecfeff;
}
.wa-avatar {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(140deg, #34d77a, #128c7e);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #ffffff;
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25) inset;
}
.wa-status-dot {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #4ade80;
  border: 2px solid #0b3b3a;
}
.wa-panel-title { min-width: 0; flex: 1; }
.wa-panel-title strong { display: block; font-size: 0.85rem; font-weight: 700; }
.wa-panel-title span { display: block; font-size: 0.68rem; opacity: 0.85; }
.wa-panel-close {
  background: rgba(255, 255, 255, 0.14);
  border: 0;
  color: inherit;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.wa-panel-close:hover { background: rgba(255, 255, 255, 0.24); }
.wa-panel-close .material-symbols-outlined { font-size: 18px; }

.wa-panel-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: min(42vh, 320px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.wa-bubble {
  max-width: 88%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 0.78rem;
  line-height: 1.6;
}
.wa-bubble-in {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #dbe4f0;
  border-bottom-left-radius: 5px;
}
.wa-bubble-time {
  display: block;
  font-size: 0.6rem;
  opacity: 0.55;
  margin-top: 4px;
}

.wa-typing { display: inline-flex; gap: 4px; align-items: center; padding: 4px 2px; }
.wa-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8aa0bb;
  animation: waTyping 1.2s infinite;
}
.wa-typing span:nth-child(2) { animation-delay: 0.15s; }
.wa-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes waTyping {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.wa-quick-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 12px;
}
.wa-quick {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(53, 216, 255, 0.28);
  background: rgba(53, 216, 255, 0.07);
  color: #bff6ff;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.wa-quick:hover { background: rgba(53, 216, 255, 0.16); transform: translateY(-1px); }

.wa-panel-foot {
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.wa-input-row { display: flex; gap: 8px; align-items: flex-end; }
.wa-input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #070b12;
  color: #eaf1f9;
  font-family: inherit;
  font-size: 0.78rem;
  resize: none;
  max-height: 90px;
}
.wa-input:focus { outline: none; border-color: rgba(37, 211, 102, 0.55); box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.12); }
.wa-send {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 12px;
  border: 0;
  background: #25d366;
  color: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease;
}
.wa-send:hover { filter: brightness(1.1); transform: translateY(-1px); }
.wa-panel-note {
  display: block;
  margin-top: 9px;
  font-size: 0.62rem;
  color: #7d8ba0;
  text-align: center;
}

@media (max-width: 480px) {
  .wa-float { right: 16px; bottom: 16px; width: 54px; height: 54px; }
  .wa-panel { right: 12px; left: 12px; width: auto; bottom: 82px; }
  .wa-panel-body { max-height: 38vh; }
}

@media (prefers-reduced-motion: reduce) {
  .wa-float::after { animation: none; opacity: 0; }
  .wa-typing span { animation: none; }
}

/* =========================================================
   Toko produk digital
   ========================================================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge-live { background: rgba(52, 211, 153, 0.13); border-color: rgba(52, 211, 153, 0.38); color: #a7f3d0; }
.badge-contacted { background: rgba(251, 191, 36, 0.13); border-color: rgba(251, 191, 36, 0.38); color: #fde68a; }
.badge-archived { background: rgba(148, 163, 184, 0.12); border-color: rgba(148, 163, 184, 0.3); color: #cbd5e1; }

.license-key {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px dashed rgba(53, 216, 255, 0.45);
  background: rgba(53, 216, 255, 0.07);
  color: #7fe4ff;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  letter-spacing: 0.04em;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.license-key:hover { border-color: rgba(53, 216, 255, 0.7); background: rgba(53, 216, 255, 0.13); transform: translateY(-1px); }
.license-key .material-symbols-outlined { font-size: 16px; opacity: 0.75; }
.license-key.is-copied { border-style: solid; border-color: rgba(52, 211, 153, 0.65); color: #a7f3d0; }

.mono { font-family: 'JetBrains Mono', monospace; }

.divider { height: 1px; background: rgba(255, 255, 255, 0.1); margin: 18px 0; }

.meta-list { display: flex; flex-direction: column; gap: 14px; }
.meta-item { display: flex; flex-direction: column; gap: 3px; }
.meta-label { font-size: 10.5px; color: #93a2b8; text-transform: uppercase; letter-spacing: 0.09em; font-weight: 600; }
.meta-value { font-size: 13px; color: #eaf1f9; }

/* QR code pembayaran */
.qr-canvas { width: 220px; height: 220px; display: grid; place-items: center; }
.qr-canvas canvas, .qr-canvas img { width: 220px; height: 220px; display: block; }
.qr-canvas.is-failed { width: auto; height: auto; }
.qr-fallback {
  display: block;
  font-size: 11px;
  color: #55637a;
  max-width: 220px;
  line-height: 1.5;
}
html[data-theme="light"] .qr-fallback { color: #6b7789; }
