/**
 * Elementor header styles — loaded by Jelek Type theme.
 * Container Elementor harus punya CSS class: jt-header
 *
 * V5: fixed shell (.elementor-location-header), B&W icons.
 * Header always dark — tidak ikut site toggle jt-light.
 */

/* ── Header palette locked (independen dari jt-light) ── */
.jt-header {
  --header-bg: rgba(8, 8, 8, 0.92);
  --header-border: rgba(255, 255, 255, 0.08);
  --header-link: rgba(255, 255, 255, 0.88);
  --header-icon: rgba(255, 255, 255, 0.9);
  --header-active-bg: #ffffff;
  --header-active-text: #0a0a0a;
}

header.elementor-location-header,
.elementor-location-header {
  position: fixed !important;
  top: var(--jt-header-offset, 0) !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 100001 !important;
  transform: none !important;
  filter: none !important;
  perspective: none !important;
  will-change: auto;
}

.elementor-location-header .elementor-section,
.elementor-location-header .e-con,
.elementor-location-header .e-con-inner {
  transform: none !important;
  filter: none !important;
}

/* ── Top bar — full width ── */
.jt-header {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  width: 100% !important;
  max-width: 100% !important;
  height: var(--jt-header-h, 72px);
  padding: 0 40px;
  background: var(--header-bg, rgba(8, 8, 8, 0.92));
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: none;
  border-bottom: 1px solid var(--header-border, rgba(255, 255, 255, 0.08));
  border-radius: 0 !important;
  z-index: 1;
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Fallback bila tidak pakai Elementor Theme Builder shell */
body:not(:has(.elementor-location-header)) .jt-header,
.jt-fallback-header {
  position: fixed !important;
  top: var(--jt-header-offset, 0) !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 100001 !important;
}

.jt-header.jt-header--scrolled {
  background: rgba(6, 6, 6, 0.98) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

/* Site jt-light — header tetap gelap + icon/link tetap putih */
html.jt-light .jt-header,
body.jt-light .jt-header {
  --header-link: rgba(255, 255, 255, 0.88);
  --header-icon: rgba(255, 255, 255, 0.9);
  --header-active-bg: #ffffff;
  --header-active-text: #0a0a0a;
  background: rgba(8, 8, 8, 0.92) !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

html.jt-light .jt-header.jt-header--scrolled,
body.jt-light .jt-header.jt-header--scrolled {
  background: rgba(6, 6, 6, 0.98) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25) !important;
}

html.jt-light .jt-header .elementor-nav-menu--main .elementor-item,
body.jt-light .jt-header .elementor-nav-menu--main .elementor-item {
  color: rgba(255, 255, 255, 0.88) !important;
}

html.jt-light .jt-header .elementor-nav-menu--main .elementor-item:hover,
html.jt-light .jt-header .elementor-nav-menu--main .elementor-item:focus,
body.jt-light .jt-header .elementor-nav-menu--main .elementor-item:hover,
body.jt-light .jt-header .elementor-nav-menu--main .elementor-item:focus {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.1) !important;
}

html.jt-light .jt-header .elementor-nav-menu--main .elementor-item.elementor-item-active,
html.jt-light .jt-header .elementor-nav-menu--main .current-menu-item > .elementor-item,
body.jt-light .jt-header .elementor-nav-menu--main .elementor-item.elementor-item-active,
body.jt-light .jt-header .elementor-nav-menu--main .current-menu-item > .elementor-item {
  color: #0a0a0a !important;
  background: #ffffff !important;
}

html.jt-light .jt-header-icons a,
html.jt-light .jt-header-icons .jt-cart-badge,
body.jt-light .jt-header-icons a,
body.jt-light .jt-header-icons .jt-cart-badge {
  color: rgba(255, 255, 255, 0.9) !important;
}

html.jt-light .jt-header-icons svg,
body.jt-light .jt-header-icons svg {
  stroke: currentColor !important;
  fill: none !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

html.jt-light .jt-header-icons a:hover,
body.jt-light .jt-header-icons a:hover,
html.jt-light .jt-header-icons .jt-cart-badge:hover,
body.jt-light .jt-header-icons .jt-cart-badge:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

html.jt-light .jt-header .elementor-menu-toggle,
body.jt-light .jt-header .elementor-menu-toggle {
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.jt-header:hover {
  transform: none !important;
}

.jt-header > .e-con-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: 100%;
  background: transparent !important;
  gap: 16px;
}

.jt-header .e-con:first-child {
  display: flex;
  align-items: center;
  gap: 48px !important;
  flex: 1;
  min-width: 0;
  overflow: visible;
}

/* Logo jangan ambil 59% lebar — cegah menu numpuk di atas logo */
.jt-header .e-con:first-child > .elementor-widget-image {
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: 132px !important;
  position: relative;
  z-index: 3;
}

.jt-header .e-con:first-child > .elementor-widget-image .elementor-widget-container {
  width: auto !important;
  max-width: 132px !important;
}

.jt-header .e-con:first-child > .elementor-widget-nav-menu {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0;
  position: relative;
  z-index: 2;
}

.jt-header .elementor-widget-image img {
  width: 132px !important;
  max-width: 132px !important;
  height: auto !important;
  display: block;
  transition: opacity 0.25s ease;
}

.jt-header .elementor-widget-image:hover img {
  opacity: 0.88;
}

.jt-header .elementor-nav-menu--main .elementor-nav-menu {
  display: flex !important;
  align-items: center;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
  flex-wrap: nowrap;
}

.jt-header .elementor-nav-menu--main .elementor-item {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: var(--header-link, rgba(255, 255, 255, 0.88)) !important;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  transition: background 0.2s ease, color 0.2s ease;
}

/* Matikan pointer/highlight bawaan Elementor (kotak hijau) */
.jt-header .elementor-nav-menu--main .elementor-item::before,
.jt-header .elementor-nav-menu--main .elementor-item::after,
.jt-header .e--pointer-background .elementor-item::before,
.jt-header .e--pointer-framed .elementor-item::before,
.jt-header .e--pointer-underline .elementor-item::after,
.jt-header .e--pointer-double-line .elementor-item::before,
.jt-header .e--pointer-double-line .elementor-item::after,
.jt-header .e--pointer-text .elementor-item::before {
  display: none !important;
  content: none !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

.jt-header .elementor-nav-menu--main .elementor-item:hover,
.jt-header .elementor-nav-menu--main .elementor-item:focus {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
  box-shadow: none !important;
  transform: none !important;
  border-radius: 6px !important;
}

.jt-header .elementor-nav-menu--main .elementor-item.elementor-item-active,
.jt-header .elementor-nav-menu--main .current-menu-item > .elementor-item,
.jt-header .elementor-nav-menu--main .current_page_item > .elementor-item {
  background: var(--header-active-bg, #ffffff) !important;
  color: var(--header-active-text, #0a0a0a) !important;
  box-shadow: none !important;
  transform: none !important;
  border-radius: 6px !important;
}

/* Sembunyikan sub-arrow / karakter aneh dari menu */
.jt-header .elementor-nav-menu--main .sub-arrow,
.jt-header .elementor-nav-menu--main .sub-menu {
  display: none !important;
}

.jt-header-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.jt-header-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  color: var(--header-icon, rgba(255, 255, 255, 0.9));
  text-decoration: none;
  transition: background 0.22s ease, color 0.22s ease;
}

.jt-header-icons a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: none;
}

.jt-header-icons svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.jt-header-icons .jt-cart-fragment,
.jt-header-icons .jt-cart-icon-wrap {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.jt-header-icons .jt-cart-badge {
  position: relative;
  font-size: 0;
  line-height: 0;
}

.jt-header-icons .jt-cart-badge.is-empty .jt-cart-count,
.jt-header-icons .jt-cart-badge[data-jt-count="0"] .jt-cart-count,
.jt-header-icons .jt-cart-badge:not([data-jt-count]) .jt-cart-count {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  font-size: 0 !important;
}

.jt-header-icons .jt-cart-badge[data-jt-count="0"],
.jt-header-icons .jt-cart-badge.is-empty {
  background: transparent !important;
  color: var(--header-icon, rgba(255, 255, 255, 0.9)) !important;
}

.jt-header-icons .jt-cart-badge[data-jt-count="0"] svg,
.jt-header-icons .jt-cart-badge.is-empty svg {
  stroke: currentColor !important;
}

/* Cart with items — subtle B&W highlight; accent only on count pill */
.jt-header-icons .jt-cart-badge[data-jt-count]:not([data-jt-count="0"]) {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.jt-header-icons .jt-cart-badge[data-jt-count]:not([data-jt-count="0"]) svg {
  stroke: currentColor;
}

.jt-header-icons .jt-cart-badge.is-active[data-jt-count="0"] {
  background: transparent !important;
  color: var(--header-icon, rgba(255, 255, 255, 0.9)) !important;
}

.jt-header-icons .jt-cart-badge .jt-cart-count {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--jt-accent, #c6ff33);
  color: var(--jt-accent-text, #0a0a0a);
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.jt-header-icons .jt-cart-badge[data-jt-count]:not([data-jt-count="0"]) .jt-cart-count {
  display: block !important;
  visibility: visible !important;
}

/* Sembunyikan cart Elementor bawaan jika masih ada (sumber teks "(6)") */
.jt-header-icons .elementor-widget-woocommerce-menu-cart,
.jt-header .elementor-menu-cart__toggle,
.jt-header .elementor-menu-cart__toggle .elementor-button-text,
.jt-header .elementor-menu-cart__toggle .elementor-button-icon-qty {
  display: none !important;
}

.jt-header .elementor-menu-toggle {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--header-border, rgba(255, 255, 255, 0.1));
  background: rgba(255, 255, 255, 0.04);
  color: var(--header-icon, #fff);
  transition: background 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}

.jt-header .elementor-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.jt-header .elementor-nav-menu--dropdown {
  margin-top: 12px !important;
  padding: 10px !important;
  border-radius: 20px !important;
  background: rgba(10, 10, 10, 0.94) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--header-border, rgba(255, 255, 255, 0.08)) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35) !important;
  z-index: 100010 !important;
}

.jt-header .elementor-nav-menu--dropdown .elementor-item {
  border-radius: 12px !important;
  justify-content: flex-start !important;
  height: 44px !important;
  padding: 0 14px !important;
  color: var(--header-link, rgba(255, 255, 255, 0.88)) !important;
}

html.jt-light .jt-header .elementor-nav-menu--dropdown .elementor-item:hover,
body.jt-light .jt-header .elementor-nav-menu--dropdown .elementor-item:hover,
.jt-header .elementor-nav-menu--dropdown .elementor-item:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
}

@media (max-width: 1024px) {
  .jt-header {
    height: var(--jt-header-h, 64px);
    padding: 0 24px;
  }

  :root {
    --jt-header-h: 64px;
  }

  .jt-header .e-con:first-child {
    gap: 24px !important;
  }

  .jt-header .e-con:first-child > .elementor-widget-image,
  .jt-header .e-con:first-child > .elementor-widget-image .elementor-widget-container {
    max-width: 112px !important;
  }

  .jt-header .elementor-widget-image img {
    width: 112px !important;
    max-width: 112px !important;
  }
}

@media (max-width: 767px) {
  .jt-header {
    height: var(--jt-header-h, 60px);
    padding: 0 16px;
    border-radius: 0 !important;
  }

  :root {
    --jt-header-h: 60px;
  }

  .jt-header .e-con:first-child {
    gap: 16px !important;
  }

  .jt-header .e-con:first-child > .elementor-widget-image,
  .jt-header .e-con:first-child > .elementor-widget-image .elementor-widget-container {
    max-width: 96px !important;
  }

  .jt-header .elementor-widget-image img {
    width: 96px !important;
    max-width: 96px !important;
  }

  .jt-header-icons a {
    width: 36px;
    height: 36px;
  }

  .jt-header-icons svg {
    width: 18px;
    height: 18px;
  }
}

body {
  padding-top: var(--jt-header-h, 72px);
}

body.jt-has-release-bar {
  padding-top: var(--jt-top-stack-h, calc(var(--jt-header-h, 72px) + var(--jt-release-bar-h, 44px)));
}

body.jt-has-release-bar {
  --jt-header-offset: var(--jt-release-bar-h, 44px);
}

body.jt-has-top-stack .elementor-location-header,
body.jt-has-top-stack header.elementor-location-header {
  position: relative !important;
  top: auto !important;
  margin-top: 0 !important;
}

body.jt-has-release-bar:not(.jt-has-top-stack) .elementor-location-header,
body.jt-has-release-bar:not(.jt-has-top-stack) header.elementor-location-header {
  top: var(--jt-release-bar-h, 44px) !important;
}

body.jt-has-release-bar:not(.jt-has-top-stack):not(:has(.elementor-location-header)) .jt-header {
  top: var(--jt-release-bar-h, 44px) !important;
}

@media (max-width: 1024px) {
  body {
    padding-top: var(--jt-header-h, 64px);
  }

  body.jt-has-release-bar {
    padding-top: calc(var(--jt-header-h, 64px) + var(--jt-release-bar-h, 44px));
  }
}

@media (max-width: 767px) {
  body {
    padding-top: var(--jt-header-h, 60px);
  }

  body.jt-has-release-bar {
    padding-top: calc(var(--jt-header-h, 60px) + var(--jt-release-bar-h, 44px));
  }
}