/* NinetySeven Bangjeff-inspired layout override
 * Visual direction only: dark commerce panel, orange action color,
 * compact product cards and a focused checkout sidebar.
 * Does not copy third-party logos, images or brand assets.
 */
:root {
  --ns-bj-bg: #171717;
  --ns-bj-panel: #252525;
  --ns-bj-panel-2: #303030;
  --ns-bj-line: rgba(255,255,255,.08);
  --ns-bj-text: #f7f7f7;
  --ns-bj-muted: #a7a7a7;
  --ns-bj-orange: #ff7300;
  --ns-bj-orange-2: #ff9a2f;
}

html, body {
  background: var(--ns-bj-bg) !important;
  color: var(--ns-bj-text) !important;
}

body {
  background-image: none !important;
  overflow-x: hidden !important;
}

header.sticky {
  background: #202020 !important;
  border-bottom: 1px solid var(--ns-bj-line) !important;
  backdrop-filter: none !important;
}

header.sticky > div,
header.sticky .container {
  background: transparent !important;
  border-color: transparent !important;
}

header.sticky .container {
  width: min(100% - 28px, 920px) !important;
  max-width: 920px !important;
  height: 64px !important;
}

header.sticky input {
  height: 36px !important;
  border: 1px solid #3b3b3b !important;
  border-radius: 20px !important;
  background: #303030 !important;
  color: #fff !important;
}

header.sticky button {
  border-color: #444 !important;
  color: #eee !important;
}

main > .container,
body > .container,
.container:has(#flashdata),
.container:has(#popular-cards-container),
.container:has(#semua-kategori) {
  width: min(100% - 28px, 920px) !important;
  max-width: 920px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Hero becomes a compact commerce banner, not a full-screen landing block. */
.ns-banner-hero,
.container section[style*="height: 600px"] {
  min-height: 255px !important;
  height: 255px !important;
  max-height: 255px !important;
  border-radius: 10px !important;
  background-color: #282828 !important;
  box-shadow: none !important;
}

.ns-banner-copy {
  left: 28px !important;
  max-width: 390px !important;
}

.ns-banner-copy h1 {
  font-size: clamp(28px, 4vw, 46px) !important;
  letter-spacing: -.03em !important;
}

.ns-banner-copy p {
  max-width: 330px !important;
  font-size: 13px !important;
  color: #d4d4d4 !important;
}

.ns-banner-button {
  min-width: 150px !important;
  padding: 12px 18px !important;
  border-radius: 0 8px 0 0 !important;
  background: linear-gradient(135deg, var(--ns-bj-orange-2), var(--ns-bj-orange)) !important;
  color: #fff !important;
  box-shadow: 0 0 18px rgba(255,115,0,.25) !important;
}

/* Flash-sale row similar to the reference product strip. */
#flashdata {
  margin: 18px auto 22px !important;
}

#flashdata .ns-flashsale-panel {
  border: 1px solid var(--ns-bj-line) !important;
  border-radius: 10px !important;
  background: var(--ns-bj-panel) !important;
}

#flashdata .ns-flash-card,
.ns-promo-card {
  border: 1px solid rgba(255,255,255,.06) !important;
  border-radius: 8px !important;
  background: linear-gradient(145deg, #4a4a4a, #353535) !important;
  box-shadow: none !important;
}

/* Product catalog: three cards per row like the attached reference. */
#games-container:not([hidden]),
#pulsa-data-container:not([hidden]),
#ewallet-container:not([hidden]),
#voucher-container:not([hidden]) {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 14px !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 auto 26px !important;
}

.catalog-panel-title,
#semua-kategori,
#semua-kategori + * {
  color: var(--ns-bj-text) !important;
}

#games-container > .card-tabs,
#pulsa-data-container > .card-tabs,
#ewallet-container > .card-tabs,
#voucher-container > .card-tabs {
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

#games-container > .card-tabs > div,
#pulsa-data-container > .card-tabs > div,
#ewallet-container > .card-tabs > div,
#voucher-container > .card-tabs > div {
  min-height: 154px !important;
  height: 154px !important;
  overflow: hidden !important;
  border: 1px solid rgba(255,255,255,.06) !important;
  border-radius: 9px !important;
  background: #303030 !important;
  box-shadow: none !important;
}

#games-container img,
#pulsa-data-container img,
#ewallet-container img,
#voucher-container img {
  width: 100% !important;
  height: 106px !important;
  min-height: 106px !important;
  max-height: 106px !important;
  object-fit: cover !important;
  border-radius: 8px 8px 0 0 !important;
}

#games-container h2,
#pulsa-data-container h2,
#ewallet-container h2,
#voucher-container h2 {
  padding: 7px 9px 0 !important;
  color: #fff !important;
  font-size: 11px !important;
  line-height: 14px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#games-container p,
#pulsa-data-container p,
#ewallet-container p,
#voucher-container p {
  padding: 2px 9px !important;
  color: #bdbdbd !important;
  font-size: 9px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Orange action controls echo the reference without changing checkout logic. */
button,
a.btn,
.btn-primary,
input[type="submit"] {
  border-color: transparent !important;
}

.btn-primary,
button.bg-primary,
button[class*="bg-primary"],
.ns-promo-button {
  background: linear-gradient(135deg, var(--ns-bj-orange-2), var(--ns-bj-orange)) !important;
  color: #fff !important;
}

@media (max-width: 700px) {
  header.sticky .container,
  main > .container,
  body > .container,
  .container:has(#flashdata),
  .container:has(#popular-cards-container),
  .container:has(#semua-kategori) {
    width: calc(100% - 20px) !important;
  }

  .ns-banner-hero,
  .container section[style*="height: 600px"] {
    min-height: 205px !important;
    height: 205px !important;
    max-height: 205px !important;
  }

  .ns-banner-copy {
    left: 18px !important;
    bottom: 76px !important;
    width: calc(100% - 36px) !important;
  }

  .ns-banner-copy h1 {
    font-size: 30px !important;
  }

  #games-container:not([hidden]),
  #pulsa-data-container:not([hidden]),
  #ewallet-container:not([hidden]),
  #voucher-container:not([hidden]) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px !important;
  }

  #games-container > .card-tabs > div,
  #pulsa-data-container > .card-tabs > div,
  #ewallet-container > .card-tabs > div,
  #voucher-container > .card-tabs > div {
    min-height: 136px !important;
    height: 136px !important;
  }

  #games-container img,
  #pulsa-data-container img,
  #ewallet-container img,
  #voucher-container img {
    height: 88px !important;
    min-height: 88px !important;
    max-height: 88px !important;
  }
}

/* Home: header lebih ringkas, banner lebih tinggi */
body:has(#semua-kategori) header.sticky {
  width: min(100% - 56px, 1180px) !important;
  margin: 10px auto 0 !important;
  border-radius: 10px !important;
  overflow: hidden !important;
}

body:has(#semua-kategori) header.sticky .container {
  width: min(100% - 28px, 920px) !important;
  max-width: 920px !important;
  height: 58px !important;
}

body:has(#semua-kategori) .ns-banner-hero,
body:has(#semua-kategori) .container section[style*="height: 600px"] {
  min-height: 360px !important;
  height: 360px !important;
  max-height: 360px !important;
}

@media (max-width: 700px) {
  body:has(#semua-kategori) header.sticky {
    width: calc(100% - 20px) !important;
    margin-top: 6px !important;
  }

  body:has(#semua-kategori) .ns-banner-hero,
  body:has(#semua-kategori) .container section[style*="height: 600px"] {
    min-height: 285px !important;
    height: 285px !important;
    max-height: 285px !important;
  }
}


/* Layout homepage mengikuti referensi Bangjeff */
body:has(#semua-kategori) {
  background: #181818 !important;
}

body:has(#semua-kategori) header.sticky {
  position: relative !important;
  top: auto !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #1d1d1d !important;
  box-shadow: none !important;
}

body:has(#semua-kategori) header.sticky > .container,
body:has(#semua-kategori) header.sticky .container {
  width: min(100% - 32px, 1280px) !important;
  max-width: 1280px !important;
  margin-inline: auto !important;
}

body:has(#semua-kategori) header.sticky > .container {
  min-height: 68px !important;
  height: 68px !important;
}

body:has(#semua-kategori) header.sticky nav {
  width: min(100% - 32px, 1280px) !important;
  max-width: 1280px !important;
  height: 42px !important;
  margin-inline: auto !important;
}

body:has(#semua-kategori) header.sticky + main,
body:has(#semua-kategori) main {
  background: #181818 !important;
}

body:has(#semua-kategori) main > .container,
body:has(#semua-kategori) main .container {
  width: min(100% - 32px, 1280px) !important;
  max-width: 1280px !important;
  margin-inline: auto !important;
}

body:has(#semua-kategori) .ns-banner-hero {
  width: 100% !important;
  min-height: 490px !important;
  height: 490px !important;
  max-height: 490px !important;
  margin: 28px auto 0 !important;
  border-radius: 22px !important;
  overflow: hidden !important;
  background-size: cover !important;
  background-position: center !important;
}

body:has(#semua-kategori) .ns-banner-hero img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

body:has(#semua-kategori) .ns-banner-hero + *,
body:has(#semua-kategori) .ns-banner-hero ~ section {
  max-width: 920px !important;
  margin-inline: auto !important;
}

@media (max-width: 700px) {
  body:has(#semua-kategori) header.sticky > .container {
    min-height: 60px !important;
    height: 60px !important;
  }

  body:has(#semua-kategori) header.sticky nav {
    width: calc(100% - 20px) !important;
  }

  body:has(#semua-kategori) main > .container,
  body:has(#semua-kategori) main .container {
    width: calc(100% - 20px) !important;
  }

  body:has(#semua-kategori) .ns-banner-hero {
    min-height: 270px !important;
    height: 270px !important;
    max-height: 270px !important;
    margin-top: 16px !important;
    border-radius: 14px !important;
  }
}
