/* ==========================================================================
   ALIGO UI — layer kustom di atas style.css (Tailwind build lama).
   Semua kelas diawali .ag- supaya tidak bentrok dengan utility Tailwind.
   ========================================================================== */

/* Font di-host sendiri: tidak ada request ke Google Fonts. */
@font-face {
  font-family: "Chakra Petch";
  src: url("/assets/fonts/chakra-petch-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Chakra Petch";
  src: url("/assets/fonts/chakra-petch-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Chakra Petch";
  src: url("/assets/fonts/chakra-petch-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Barlow";
  src: url("/assets/fonts/barlow-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Barlow";
  src: url("/assets/fonts/barlow-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Barlow";
  src: url("/assets/fonts/barlow-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --ag-bg: #0b1622;
  --ag-bg-soft: #0f1e2e;
  --ag-panel: #14263a;
  --ag-panel-2: #1a3149;
  --ag-line: rgba(255, 255, 255, .09);
  --ag-line-strong: rgba(255, 255, 255, .16);

  --ag-text: #eaf2fb;
  --ag-muted: #8ea4bc;

  --ag-lime: #7fdb4d;
  --ag-lime-ink: #0d2110;
  --ag-blue: #2a689f;
  --ag-amber: #ffb020;
  --ag-pink: #ff4d8d;

  --ag-font-display: "Chakra Petch", "Barlow", ui-sans-serif, system-ui, sans-serif;
  --ag-font-body: "Barlow", ui-sans-serif, system-ui, sans-serif;

  --ag-r-sm: 8px;
  --ag-r: 14px;
  --ag-r-lg: 20px;

  --ag-shell: 1200px;
  --ag-header: 60px;
  --ag-bottombar: 62px;
}

/* ---------- reset lokal ---------- */
.ag-scope,
.ag-scope * {
  box-sizing: border-box;
}

.ag-scope [hidden] {
  display: none !important;
}

.ag-scope .hidden {
  display: none !important;
}

.ag-scope img {
  max-width: 100%;
  height: auto;
}

body.ag-body {
  background: var(--ag-bg);
  color: var(--ag-text);
  font-family: var(--ag-font-body);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

/* Display font untuk elemen bernada "brand": judul, nav, tombol, nama produk. */
.ag-scope :is(h1, h2, h3),
.ag-nav__link,
.ag-btn,
.ag-account,
.ag-tab,
.ag-chip,
.ag-scope .catalog-tab,
.ag-scope .load-more-btn,
.ag-scope .popular-name,
.ag-scope .product-name,
.ag-drawer__link,
.ag-ticker__tag {
  font-family: var(--ag-font-display);
  letter-spacing: .005em;
}

.ag-scope :is(h1, h2, h3) {
  letter-spacing: -.005em;
}

@media (max-width: 767px) {
  body.ag-body {
    padding-bottom: calc(var(--ag-bottombar) + env(safe-area-inset-bottom));
  }
}

.ag-shell {
  width: 100%;
  max-width: var(--ag-shell);
  margin-inline: auto;
  padding-inline: 16px;
}

@media (min-width: 1024px) {
  .ag-shell {
    padding-inline: 24px;
  }
}

.ag-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.ag-scope a {
  color: inherit;
  text-decoration: none;
}

:where(.ag-scope button) {
  font: inherit;
  color: inherit;
}

/* Tombol yang tampil seperti item menu/drawer. */
button.ag-drawer__link,
button.ag-menu__item {
  width: 100%;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: left;
}

:where(.ag-scope a, .ag-scope button, .ag-scope input):focus-visible {
  outline: 2px solid var(--ag-lime);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ==========================================================================
   HEADER
   ========================================================================== */

.ag-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--ag-bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--ag-line);
}

/* --- ticker: transaksi berjalan (desktop only) --- */
.ag-ticker {
  display: none;
  border-bottom: 1px solid var(--ag-line);
  background: linear-gradient(90deg, rgba(127, 219, 77, .10), transparent 45%);
  font-size: 12px;
  color: var(--ag-muted);
}

@media (min-width: 900px) {
  .ag-ticker {
    display: block;
  }
}

.ag-ticker__row {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 30px;
  overflow: hidden;
}

.ag-ticker__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  font-weight: 600;
  color: var(--ag-lime);
  letter-spacing: .02em;
}

.ag-ticker__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ag-lime);
  box-shadow: 0 0 0 0 rgba(127, 219, 77, .6);
  animation: ag-pulse 2s ease-out infinite;
}

@keyframes ag-pulse {
  70% {
    box-shadow: 0 0 0 7px rgba(127, 219, 77, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(127, 219, 77, 0);
  }
}

.ag-ticker__viewport {
  flex: 1 1 auto;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 24px, #000 88%, transparent);
}

.ag-ticker__track {
  display: flex;
  gap: 28px;
  width: max-content;
  animation: ag-marquee 38s linear infinite;
}

.ag-ticker__item {
  white-space: nowrap;
}

.ag-ticker__item b {
  color: var(--ag-text);
  font-weight: 600;
}

@keyframes ag-marquee {
  to {
    transform: translateX(-50%);
  }
}

.ag-ticker__meta {
  flex: none;
  display: flex;
  gap: 14px;
}

.ag-ticker__meta a:hover {
  color: var(--ag-text);
}

/* --- bar utama --- */
.ag-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--ag-header);
}

.ag-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.ag-brand img {
  height: 30px;
  width: auto;
  display: block;
}

@media (min-width: 900px) {
  .ag-brand img {
    height: 34px;
  }
}

/* nav desktop: rail ikon + label, indikator garis lime */
.ag-nav {
  display: none;
  align-items: center;
  gap: 2px;
  margin-left: 6px;
}

@media (min-width: 900px) {
  .ag-nav {
    display: flex;
  }
}

.ag-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ag-muted);
  transition: color .15s ease, background-color .15s ease;
  white-space: nowrap;
}

.ag-nav__link svg {
  width: 17px;
  height: 17px;
}

.ag-nav__link:hover {
  color: var(--ag-text);
  background: rgba(255, 255, 255, .05);
}

.ag-nav .ag-nav__link.is-active {
  color: var(--ag-text);
  background: rgba(127, 219, 77, .12);
}

.ag-nav .ag-nav__link.is-active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -13px;
  height: 2px;
  background: var(--ag-lime);
  border-radius: 2px;
}

.ag-nav__caret {
  width: 13px;
  height: 13px;
  transition: transform .2s ease;
}

.ag-nav__group {
  position: relative;
}

.ag-nav__group.is-open .ag-nav__caret {
  transform: rotate(180deg);
}

.ag-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  z-index: 70;
  width: 300px;
  padding: 6px;
  border: 1px solid var(--ag-line-strong);
  border-radius: var(--ag-r);
  background: var(--ag-panel);
  box-shadow: 0 20px 44px rgba(0, 0, 0, .5);
  display: none;
}

.ag-nav__group.is-open .ag-menu,
.ag-menu.is-open {
  display: block;
}

.ag-menu--right {
  left: auto;
  right: 0;
  width: 224px;
}

.ag-menu__item {
  display: flex;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 13px;
  transition: background-color .15s ease;
}

.ag-menu__item:hover {
  background: rgba(255, 255, 255, .06);
}

.ag-menu__item svg {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 2px;
  color: var(--ag-lime);
}

.ag-menu__item strong {
  display: block;
  font-weight: 600;
  font-size: 13.5px;
}

.ag-menu__item span {
  color: var(--ag-muted);
  font-size: 12px;
  line-height: 1.45;
}

.ag-menu__sep {
  height: 1px;
  margin: 5px 4px;
  background: var(--ag-line);
}

.ag-menu__item--danger {
  color: var(--ag-pink);
}

.ag-menu__item--danger svg {
  color: var(--ag-pink);
}

/* --- search --- */
.ag-search {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  display: none;
}

@media (min-width: 900px) {
  .ag-search {
    display: block;
    max-width: 380px;
    margin-left: auto;
  }
}

.ag-search__field {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--ag-line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  transition: border-color .15s ease, background-color .15s ease;
}

.ag-search__field:focus-within {
  border-color: var(--ag-lime);
  background: rgba(127, 219, 77, .06);
}

.ag-search__field svg {
  width: 16px;
  height: 16px;
  color: var(--ag-muted);
  flex: none;
}

.ag-search input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--ag-text);
  font-size: 13.5px;
}

.ag-search input::placeholder {
  color: var(--ag-muted);
}

.ag-search input:focus {
  outline: none;
}

.ag-search__hint {
  flex: none;
  padding: 2px 6px;
  border: 1px solid var(--ag-line-strong);
  border-radius: 6px;
  font-size: 10.5px;
  color: var(--ag-muted);
}

.ag-search__panel {
  position: absolute;
  inset-inline: 0;
  top: calc(100% + 8px);
  z-index: 70;
  max-height: 62vh;
  overflow-y: auto;
  border: 1px solid var(--ag-line-strong);
  border-radius: var(--ag-r);
  background: var(--ag-panel);
  box-shadow: 0 20px 44px rgba(0, 0, 0, .5);
}

.ag-search__panel ul {
  list-style: none;
  margin: 0;
  padding: 6px;
}

.ag-search__panel li+li {
  border-top: 1px solid var(--ag-line);
}

.ag-search__panel a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13.5px;
}

.ag-search__panel a:hover {
  background: rgba(255, 255, 255, .06);
}

.ag-search__panel img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
  flex: none;
}

.ag-search__empty {
  padding: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--ag-muted);
}

/* --- aksi kanan --- */
.ag-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

@media (min-width: 900px) {
  .ag-actions {
    margin-left: 0;
  }
}

.ag-iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--ag-line-strong);
  border-radius: 11px;
  background: rgba(255, 255, 255, .03);
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}

.ag-iconbtn:hover {
  background: rgba(255, 255, 255, .08);
}

.ag-iconbtn svg {
  width: 18px;
  height: 18px;
}

@media (min-width: 900px) {
  .ag-iconbtn--mobile {
    display: none;
  }
}

.ag-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .12s ease, background-color .15s ease, border-color .15s ease;
}

.ag-btn:active {
  transform: translateY(1px);
}

.ag-btn svg {
  width: 16px;
  height: 16px;
}

.ag-btn--primary {
  background: var(--ag-lime);
  color: var(--ag-lime-ink);
}

.ag-btn--primary:hover {
  background: #8fe85e;
}

.ag-btn--ghost {
  border-color: var(--ag-line-strong);
  color: var(--ag-text);
  background: transparent;
}

.ag-btn--ghost:hover {
  background: rgba(255, 255, 255, .06);
}

.ag-btn--block {
  width: 100%;
}

.ag-btn--lg {
  height: 46px;
  padding-inline: 22px;
  font-size: 15px;
  border-radius: 13px;
}

.ag-auth-desktop {
  display: none;
  align-items: center;
  gap: 8px;
}

@media (min-width: 900px) {
  .ag-auth-desktop {
    display: flex;
  }
}

.ag-account {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px 0 8px;
  border: 1px solid var(--ag-line-strong);
  border-radius: 11px;
  background: rgba(255, 255, 255, .03);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
}

.ag-avatar {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--ag-lime), var(--ag-blue));
  color: var(--ag-lime-ink);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}

/* toast header */
.ag-toast {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--ag-panel-2);
  border: 1px solid var(--ag-line-strong);
  font-size: 13.5px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .5);
}

.ag-toast svg {
  width: 16px;
  height: 16px;
  color: var(--ag-lime);
}

/* ==========================================================================
   DRAWER (kiri)
   ========================================================================== */

.ag-drawer {
  position: fixed;
  inset: 0;
  z-index: 95;
  pointer-events: none;
}

.ag-drawer.is-open {
  pointer-events: auto;
}

@media (min-width: 900px) {
  .ag-drawer {
    display: none;
  }
}

.ag-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 14, .72);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity .28s ease;
}

.ag-drawer.is-open .ag-drawer__backdrop {
  opacity: 1;
}

.ag-drawer .drawer-panel {
  position: absolute;
  inset-block: 0;
  left: 0;
  width: min(320px, 86vw);
  display: flex;
  flex-direction: column;
  background: var(--ag-bg-soft);
  border-right: 1px solid var(--ag-line);
  transform: translateX(-100%);
  transition: transform .3s cubic-bezier(.32, .72, 0, 1);
}

.ag-drawer.is-open .drawer-panel {
  transform: translateX(0);
}

.ag-drawer__head {
  padding: 16px;
  border-bottom: 1px solid var(--ag-line);
  background: linear-gradient(160deg, rgba(127, 219, 77, .14), transparent 70%);
}

.ag-drawer__head img {
  height: 28px;
  width: auto;
}

.ag-drawer__search {
  margin-top: 14px;
}

.ag-drawer__search .ag-search {
  display: block;
}

.ag-drawer__body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 12px;
}

.ag-drawer__label {
  padding: 12px 10px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--ag-muted);
}

.ag-drawer__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 10px;
  border-radius: 11px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ag-text);
}

.ag-drawer__link svg {
  width: 18px;
  height: 18px;
  color: var(--ag-muted);
  flex: none;
}

.ag-drawer__link:active {
  background: rgba(255, 255, 255, .06);
}

.ag-drawer__link.is-active {
  background: rgba(127, 219, 77, .13);
}

.ag-drawer__link.is-active svg {
  color: var(--ag-lime);
}

.ag-drawer__link .ag-chevron {
  margin-left: auto;
  width: 15px;
  height: 15px;
  transition: transform .2s ease;
}

.ag-drawer__link--danger {
  color: var(--ag-pink);
}

.ag-drawer__link--danger svg {
  color: var(--ag-pink);
}

[data-role="mobile-calc-toggle"][aria-expanded="true"] .ag-chevron {
  transform: rotate(180deg);
}

.ag-drawer__sub {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .28s ease;
}

.ag-drawer__sub.is-open {
  grid-template-rows: 1fr;
}

.ag-drawer__sub>div {
  overflow: hidden;
}

.ag-drawer__sub a {
  display: block;
  padding: 9px 10px 9px 40px;
  font-size: 13.5px;
  color: var(--ag-muted);
  border-radius: 10px;
}

.ag-drawer__sub a:active {
  background: rgba(255, 255, 255, .06);
}

.ag-drawer__foot {
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--ag-line);
  display: grid;
  gap: 8px;
}

.ag-drawer__social {
  display: flex;
  gap: 12px;
  padding-top: 4px;
}

.ag-drawer__social a {
  color: var(--ag-muted);
}

.ag-drawer__social svg {
  width: 20px;
  height: 20px;
}

/* ==========================================================================
   BOTTOM BAR (mobile)
   ========================================================================== */

.ag-bottombar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: calc(var(--ag-bottombar) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--ag-bg-soft) 94%, transparent);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--ag-line);
}

@media (min-width: 768px) {
  .ag-bottombar {
    display: none;
  }
}

.ag-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ag-muted);
  position: relative;
}

.ag-tab svg {
  width: 20px;
  height: 20px;
}

.ag-tab.is-active {
  color: var(--ag-lime);
}

.ag-tab.is-active::before {
  content: "";
  position: absolute;
  top: 0;
  width: 22px;
  height: 2px;
  border-radius: 0 0 3px 3px;
  background: var(--ag-lime);
}

.ag-tab--main {
  justify-content: flex-start;
}

.ag-tab--main .ag-tab__fab {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin-top: -20px;
  border-radius: 17px;
  background: var(--ag-lime);
  color: var(--ag-lime-ink);
  box-shadow: 0 8px 22px rgba(127, 219, 77, .34);
  border: 3px solid var(--ag-bg-soft);
}

.ag-tab--main .ag-tab__fab svg {
  width: 23px;
  height: 23px;
}

.ag-tab--main span {
  margin-top: 2px;
}

.ag-tab--main.is-active {
  color: var(--ag-lime);
}

.ag-tab--main.is-active::before {
  display: none;
}

/* ==========================================================================
   SECTION SHELL
   ========================================================================== */

.ag-main {
  padding-bottom: 56px;
}

.ag-section {
  padding-block: 34px;
}

.ag-section--tight {
  padding-block: 22px;
}

.ag-sechead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.ag-sechead h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.01em;
}

@media (min-width: 768px) {
  .ag-sechead h2 {
    font-size: 24px;
  }
}

.ag-sechead p {
  margin: 5px 0 0;
  font-size: 16px;
  color: var(--ag-muted);
  max-width: 60ch;
}

.ag-sechead a {
  flex: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--ag-lime);
}

/* ==========================================================================
   BANNER / HERO CAROUSEL
   Ditulis mandiri (tidak bergantung pada build Tailwind di style.css).
   ========================================================================== */

.ag-banner {
  background: var(--ag-bg-soft);
  border-bottom: 1px solid var(--ag-line);
  padding: 14px 16px;
}

@media (min-width: 1024px) {
  .ag-banner {
    padding: 24px;
  }
}

.ag-banner__frame {
  position: relative;
  width: 100%;
  max-width: var(--ag-shell);
  margin-inline: auto;
  aspect-ratio: 1080 / 424;
  overflow: hidden;
  border-radius: var(--ag-r);
  background: var(--ag-panel);
}

.ag-banner__track {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform .5s cubic-bezier(.32, .72, 0, 1);
}

.ag-banner__slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
}

.ag-banner__slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ag-banner__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(6, 14, 22, .45);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transition: opacity .18s ease, background-color .18s ease;
}

.ag-banner__arrow svg {
  width: 18px;
  height: 18px;
}

.ag-banner__arrow--prev {
  left: 10px;
}

.ag-banner__arrow--next {
  right: 10px;
}

.ag-banner__arrow:hover {
  background: rgba(6, 14, 22, .8);
}

@media (min-width: 768px) {
  .ag-banner__arrow {
    display: flex;
  }

  .ag-banner__frame:hover .ag-banner__arrow,
  .ag-banner__arrow:focus-visible {
    opacity: 1;
  }
}

.ag-banner__dots {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
}

.ag-banner__dots .carousel-dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .5);
  cursor: pointer;
  transition: width .25s ease, background-color .25s ease;
}

.ag-banner__dots .carousel-dot:hover {
  background: rgba(255, 255, 255, .8);
}

.ag-banner__dots .carousel-dot.is-active {
  width: 22px;
  background: var(--ag-lime);
}

/* ==========================================================================
   CHIP RAIL (kategori cepat)
   ========================================================================== */

.ag-rail {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 720px) {
  .ag-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

@media (min-width: 721px) and (max-width: 1024px) {
  .ag-rail {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.ag-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--ag-line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, .03);
  font-size: 13px;
  font-weight: 500;
  white-space: normal;
  overflow: hidden;
}

.ag-chip img {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  object-fit: cover;
  flex: none;
}

.ag-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  line-height: 1.2;
  font-size: 14px;
}

.ag-chip:hover {
  border-color: var(--ag-lime);
  color: var(--ag-lime);
}

@media (max-width: 720px) {
  .ag-chip {
    padding: 10px 14px;
    font-size: 14.5px;
    border-radius: 16px;
  }

  .ag-chip img {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }
}

/* ==========================================================================
   POPULER — daftar berperingkat
   ========================================================================== */

.popular-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 640px) {
  .popular-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
}

@media (min-width: 1024px) {
  .popular-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.ag-scope .popular-item {
  position: relative;
}

.ag-scope .popular-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--ag-line);
  border-radius: var(--ag-r);
  background: var(--ag-panel);
  box-shadow: none;
  transition: border-color .16s ease, background-color .16s ease;
}

.ag-scope .popular-card:hover {
  border-color: rgba(127, 219, 77, .55);
  background: var(--ag-panel-2);
  transform: none;
}

.ag-scope .popular-card>div {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  min-width: 0;
}

.ag-scope .popular-image {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  flex: none;
}

@media (min-width: 768px) {
  .ag-scope .popular-image {
    width: 58px;
    height: 58px;
  }
}

.ag-scope .popular-info {
  min-width: 0;
}

.ag-scope .popular-name {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ag-scope .popular-publisher {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--ag-muted);
  opacity: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* ==========================================================================
   KATALOG
   ========================================================================== */

.catalog-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.ag-scope .catalog-tab {
  height: 36px;
  padding: 0 16px;
  border: 1px solid var(--ag-line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ag-muted);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.ag-scope .catalog-tab.is-active {
  background: var(--ag-lime);
  border-color: var(--ag-lime);
  color: var(--ag-lime-ink);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

@media (min-width: 640px) {
  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 24px;
    row-gap: 32px;
  }
}

@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .product-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.ag-scope .product-card {
  display: block;
}

.ag-scope .product-card__inner {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: var(--ag-panel);
  transition: box-shadow .3s ease, outline-color .2s ease;
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.ag-scope .product-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 6;
  object-fit: cover;
  object-position: center;
}

.ag-scope .product-card__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--ag-bg) 0%, rgba(11, 22, 34, .5) 34%, transparent 68%);
  pointer-events: none;
}

.ag-scope .product-name {
  position: absolute;
  inset-inline: 12px;
  bottom: 12px;
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ag-text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 640px) {
  .ag-scope .product-name {
    inset-inline: 16px;
    bottom: 16px;
    font-size: 15px;
  }
}

@media (hover: hover) {
  .ag-scope .product-card:hover .product-card__inner {
    outline-color: var(--ag-lime);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
  }

  .ag-scope .product-card:hover .product-image {
    transform: scale(1.04);
  }
}

.ag-scope .product-image {
  transition: transform .4s ease;
}

.ag-scope .product-card:focus-visible .product-card__inner {
  outline-color: var(--ag-lime);
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  padding-top: 22px;
}

.ag-scope .load-more-btn {
  height: 42px;
  padding: 0 24px;
  border: 1px solid var(--ag-line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ag-text);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.ag-scope .load-more-btn:hover {
  border-color: var(--ag-lime);
  color: var(--ag-lime);
  background: transparent;
}

/* ==========================================================================
   KABAR — grid 4 kolom
   ========================================================================== */

.ag-news {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

@media (min-width: 600px) {
  .ag-news {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (min-width: 1024px) {
  .ag-news {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }
}

.ag-news__card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--ag-line);
  border-radius: var(--ag-r);
  background: var(--ag-panel);
  transition: border-color .18s ease, transform .18s ease;
}

@media (hover: hover) {
  .ag-news__card:hover {
    border-color: rgba(127, 219, 77, .5);
    transform: translateY(-2px);
  }

  .ag-news__card:hover .ag-news__thumb--cover img {
    transform: scale(1.05);
  }
}

/* --- thumbnail --- */
.ag-news__thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--ag-panel-2);
}

.ag-news__thumb img {
  width: 100%;
  height: 100%;
  display: block;
}

.ag-news__thumb--cover img {
  object-fit: cover;
  object-position: center top;
  transition: transform .35s ease;
}

/* Untuk logo (QRIS, logo brand): jangan dipotong. */
.ag-news__thumb--logo {
  background: #fff;
}

.ag-news__thumb--logo img {
  object-fit: contain;
  padding: 18px;
}

/* Untuk banner lebar: tampilkan utuh, jangan di-crop. */
.ag-news__thumb--wide {
  background: var(--ag-panel-2);
}

.ag-news__thumb--wide img {
  object-fit: contain;
  padding: 10px;
}

.ag-news__cat {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(11, 22, 34, .82);
  backdrop-filter: blur(4px);
  color: var(--ag-lime);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .02em;
}

/* --- isi --- */
.ag-news__body {
  display: flex;
  flex-direction: column;
  padding: 14px 16px 18px;
}

.ag-news__date {
  font-size: 11.5px;
  color: var(--ag-muted);
  letter-spacing: .03em;
}

.ag-news__card h3 {
  margin: 7px 0 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}

.ag-news__card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.ag-news__card h3 a:hover {
  color: var(--ag-lime);
}

.ag-news__card p {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ag-muted);
}

/* ==========================================================================
   KEUNGGULAN
   ========================================================================== */

.ag-why {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 1024px) {
  .ag-why {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }
}

.ag-why__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 22px 16px;
  border: 1px solid var(--ag-line);
  border-radius: var(--ag-r);
  background: var(--ag-panel);
}

.ag-why__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
}

.ag-why__icon svg {
  width: 21px;
  height: 21px;
}

.ag-why__icon--lime {
  background: rgba(127, 219, 77, .14);
  color: var(--ag-lime);
}

.ag-why__icon--blue {
  background: rgba(82, 156, 224, .16);
  color: #7cbdf0;
}

.ag-why__icon--amber {
  background: rgba(255, 176, 32, .15);
  color: var(--ag-amber);
}

.ag-why__icon--pink {
  background: rgba(255, 77, 141, .15);
  color: var(--ag-pink);
}

.ag-why__card h3 {
  margin: 14px 0 0;
  font-size: 15px;
  font-weight: 600;
}

.ag-why__card p {
  margin: 5px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ag-muted);
}

/* ==========================================================================
   METODE BAYAR
   ========================================================================== */

.ag-paygrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 640px) {
  .ag-paygrid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
  }
}

@media (min-width: 1024px) {
  .ag-paygrid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}

.ag-paygrid__item {
  display: grid;
  place-items: center;
  height: 56px;
  padding: 10px;
  border: 1px solid var(--ag-line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.ag-paygrid__item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.ag-footer {
  border-top: 1px solid var(--ag-line);
  background: var(--ag-bg-soft);
}

.ag-footer__top {
  display: grid;
  gap: 26px;
  padding-block: 30px;
}

@media (min-width: 768px) {
  .ag-footer__top {
    grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
    gap: 32px;
    padding-block: 42px;
  }
}

.ag-footer__brand img {
  height: 34px;
  width: auto;
}

.ag-footer__brand p {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--ag-muted);
  max-width: 42ch;
}

.ag-social {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.ag-social a {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--ag-line-strong);
  border-radius: 10px;
  color: var(--ag-muted);
}

.ag-social a:hover {
  border-color: var(--ag-lime);
  color: var(--ag-lime);
}

.ag-social svg {
  width: 17px;
  height: 17px;
}

.ag-footer h3 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ag-text);
}

.ag-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.ag-footer li a {
  font-size: 13px;
  color: var(--ag-muted);
}

.ag-footer li a:hover {
  color: var(--ag-lime);
}

/* di mobile kolom link jadi baris ringkas */
.ag-footer__cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

@media (min-width: 768px) {
  .ag-footer__cols {
    display: contents;
  }
}

.ag-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-block: 16px;
  border-top: 1px solid var(--ag-line);
  font-size: 12px;
  color: var(--ag-muted);
}

.ag-footer__bottom nav {
  display: flex;
  gap: 16px;
}

.ag-footer__bottom nav a:hover {
  color: var(--ag-text);
}

/* ==========================================================================
   WHATSAPP FAB
   ========================================================================== */

.ag-wa {
  position: fixed;
  right: 16px;
  bottom: calc(var(--ag-bottombar) + env(safe-area-inset-bottom) + 14px);
  z-index: 70;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #25d366;
  color: #05240f;
  box-shadow: 0 10px 26px rgba(37, 211, 102, .3);
}

.ag-wa svg {
  width: 24px;
  height: 24px;
}

@media (min-width: 768px) {
  .ag-wa {
    bottom: 20px;
    right: 20px;
    width: 52px;
    height: 52px;
  }
}

/* ==========================================================================
   PAGE HEADER (halaman non-beranda: invoices, leaderboard, dsb.)
   ========================================================================== */

.ag-page {
  padding: 28px 0 56px;
  min-height: calc(100vh - var(--ag-header) - 300px);
}

.ag-page__head {
  margin-bottom: 22px;
}

.ag-page__head h1 {
  font-family: var(--ag-font-display);
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px;
}

.ag-page__head p {
  color: var(--ag-muted);
  font-size: 13.5px;
  margin: 0;
}

.ag-card {
  background: var(--ag-panel);
  border: 1px solid var(--ag-line);
  border-radius: var(--ag-r);
  padding: 20px;
}

/* ==========================================================================
   FORM FIELDS (dipakai di invoices, auth, dashboard, kalkulator)
   ========================================================================== */

.ag-field {
  display: block;
  margin-bottom: 14px;
}

.ag-field__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ag-muted);
  margin-bottom: 6px;
}

.ag-input,
.ag-select {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--ag-line-strong);
  background: rgba(255,255,255,.03);
  color: var(--ag-text);
  font-size: 14px;
  font-family: var(--ag-font-body);
}

.ag-input::placeholder { color: var(--ag-muted); }

.ag-input:focus,
.ag-select:focus {
  outline: none;
  border-color: var(--ag-lime);
}

.ag-input-wrap { position: relative; }

.ag-input-wrap .ag-input { padding-right: 42px; }

.ag-input-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--ag-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 4px;
}

.ag-input-toggle svg { width: 18px; height: 18px; }
.ag-input-toggle .icon-eye-off { display: none; }
.ag-input-toggle.is-visible .icon-eye { display: none; }
.ag-input-toggle.is-visible .icon-eye-off { display: block; }

.ag-form-error {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ag-pink);
  font-size: 13px;
  font-weight: 600;
  margin: -4px 0 14px;
}

.ag-form-error svg { width: 16px; height: 16px; flex: none; }

/* ==========================================================================
   AUTH (masuk / daftar)
   ========================================================================== */

.ag-auth {
  min-height: calc(100vh - var(--ag-header) - 260px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 48px 16px;
  text-align: center;
}

.ag-auth__logo img { height: 44px; width: auto; }

.ag-auth__card {
  width: 100%;
  max-width: 420px;
  background: var(--ag-panel);
  border: 1px solid var(--ag-line);
  border-radius: var(--ag-r-lg);
  padding: 28px 24px;
  text-align: left;
}

.ag-auth__title {
  font-family: var(--ag-font-display);
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 4px;
}

.ag-auth__subtitle {
  color: var(--ag-muted);
  font-size: 13.5px;
  text-align: center;
  margin: 0 0 22px;
}

.ag-auth__form { margin: 0; }

.ag-auth__forgot {
  margin-top: 6px;
  background: none;
  border: none;
  padding: 0;
  color: var(--ag-lime);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.ag-auth__footer {
  margin: 18px 0 0;
  text-align: center;
  font-size: 13.5px;
  color: var(--ag-muted);
}

.ag-auth__footer a { color: var(--ag-lime); font-weight: 600; }

.ag-toast.page-toast { position: fixed; }

/* ==========================================================================
   PRODUCT PAGE — hero + purchase panel
   ========================================================================== */

.product-hero {
  background: var(--ag-panel);
  border-bottom: 1px solid var(--ag-line);
}

.product-hero__inner {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px 0 20px;
}

@media (min-width: 640px) {
  .product-hero__inner { flex-direction: row; align-items: flex-end; }
}

.product-hero__avatar {
  position: relative;
  flex: none;
  width: 96px;
  height: 96px;
  border-radius: var(--ag-r-lg);
  overflow: hidden;
  box-shadow: 0 0 0 4px var(--ag-bg);
}

@media (min-width: 640px) {
  .product-hero__avatar { width: 128px; height: 128px; }
}

.product-hero__avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-hero__meta { flex: 1; padding-bottom: 4px; }

.product-hero__title {
  font-family: var(--ag-font-display);
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  margin: 0;
}

@media (min-width: 640px) {
  .product-hero__title { font-size: 28px; }
}

.product-hero__publisher {
  color: var(--ag-muted);
  font-size: 13.5px;
  margin: 2px 0 0;
}

.product-hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--ag-muted);
}

.product-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.product-hero__badge svg { width: 15px; height: 15px; color: var(--ag-lime); flex: none; }

.product-panel {
  max-width: var(--ag-shell);
  margin: 0 auto;
  padding: 22px 16px 40px;
}

@media (min-width: 1024px) { .product-panel { padding-inline: 24px; } }

.pp-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  margin-bottom: 18px;
}

@media (min-width: 1024px) { .pp-tabs { display: none; } }

.pp-tab {
  border: none;
  background: none;
  color: var(--ag-muted);
  font-weight: 600;
  font-size: 13.5px;
  padding: 9px 0;
  border-radius: 999px;
  cursor: pointer;
}

.pp-tab.is-active {
  background: var(--ag-lime);
  color: var(--ag-lime-ink);
}

.pp-grid {
  display: grid;
  gap: 20px;
}

@media (min-width: 1024px) {
  .pp-grid { grid-template-columns: 2fr 1fr; align-items: start; }
}

.pp-main { display: flex; flex-direction: column; gap: 16px; }
.pp-keterangan { display: flex; flex-direction: column; gap: 16px; }

.pp-step {
  border-radius: var(--ag-r);
  border: 1px solid var(--ag-line);
  overflow: hidden;
  background: var(--ag-panel);
}

.pp-step__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(255,255,255,.03);
  border-bottom: 1px solid var(--ag-line);
}

.pp-step__number {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--ag-lime);
  color: var(--ag-lime-ink);
  font-size: 12px;
  font-weight: 700;
  flex: none;
}

.pp-step__title {
  font-size: 14px;
  font-weight: 700;
  margin: 0;
}

.pp-step__body { padding: 16px; }

.pp-field-grid {
  display: grid;
  gap: 12px;
}

@media (min-width: 560px) {
  .pp-field-grid { grid-template-columns: 1fr 1fr; }
}

.pp-field__label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ag-muted);
  margin-bottom: 6px;
}

.pp-input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--ag-line-strong);
  background: rgba(255,255,255,.03);
  color: var(--ag-text);
  font-size: 14px;
  font-family: var(--ag-font-body);
}

.ag-scope select.pp-input { appearance: none; }

.pp-input:focus { outline: none; border-color: var(--ag-lime); }

.pp-note {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--ag-amber);
  background: rgba(255,176,32,.1);
  border: 1px solid rgba(255,176,32,.25);
  border-radius: 8px;
  padding: 8px 10px;
}

.pp-hint {
  font-size: 11.5px;
  color: var(--ag-muted);
  margin: 6px 0 0;
}

.pp-nominal-categories { display: flex; flex-direction: column; gap: 18px; }

.pp-nominal-category__label {
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 10px;
}

.pp-nominal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 480px) { .pp-nominal-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) and (max-width: 1200px) { .pp-nominal-grid { grid-template-columns: repeat(2, 1fr); } }

.pp-nominal-btn {
  position: relative;
  text-align: left;
  border: 1px solid var(--ag-line-strong);
  background: rgba(255,255,255,.02);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  color: var(--ag-text);
  transition: border-color .15s ease, background-color .15s ease;
}

.pp-nominal-btn:hover { border-color: var(--ag-line-strong); background: rgba(255,255,255,.05); }

.pp-nominal-btn.is-selected {
  border-color: var(--ag-lime);
  background: rgba(127,219,77,.1);
}

.pp-nominal-btn__note {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 11px;
  color: var(--ag-muted);
  cursor: help;
}

.pp-nominal-btn__name {
  font-size: 12.5px;
  font-weight: 600;
  margin: 0 0 6px;
  padding-right: 16px;
  line-height: 1.3;
}

.pp-nominal-btn__price {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ag-lime);
  margin: 0;
}

.pp-nominal-btn__icon { width: 14px; height: 14px; border-radius: 3px; }

.pp-nominal-btn__footer { margin-top: 6px; }

.pp-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(127,219,77,.15);
  color: var(--ag-lime);
}

.pp-quantity-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pp-quantity-row .pp-input { flex: 1; text-align: center; }

.pp-btn {
  height: 42px;
  width: 42px;
  flex: none;
  border-radius: 10px;
  border: 1px solid var(--ag-line-strong);
  background: rgba(255,255,255,.03);
  color: var(--ag-text);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.pp-btn--primary { background: var(--ag-lime); color: var(--ag-lime-ink); border-color: var(--ag-lime); }
.pp-btn--secondary { background: rgba(255,255,255,.03); }
.pp-btn--small { width: auto; height: 38px; padding: 0 14px; font-size: 12.5px; font-weight: 600; }

.pp-payment-list { display: flex; flex-direction: column; gap: 10px; }

.pp-payment-featured {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--ag-lime);
  background: rgba(127,219,77,.08);
  cursor: pointer;
  color: var(--ag-text);
  text-align: left;
}

.pp-payment-featured.is-selected { background: rgba(127,219,77,.18); }

.pp-payment-featured__main { display: flex; align-items: center; gap: 10px; }
.pp-payment-featured__logo { height: 22px; width: auto; }
.pp-payment-featured__label { font-size: 13.5px; font-weight: 700; }
.pp-payment-featured__info { font-size: 11.5px; color: var(--ag-muted); }

.pp-payment-featured__badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--ag-lime);
  color: var(--ag-lime-ink);
}

.pp-payment-accordion {
  border: 1px solid var(--ag-line-strong);
  border-radius: 12px;
  overflow: hidden;
}

.pp-payment-accordion__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(255,255,255,.02);
  border: none;
  color: var(--ag-text);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.pp-payment-accordion__chevron { transition: transform .2s ease; color: var(--ag-muted); }
.pp-payment-accordion__toggle.is-open .pp-payment-accordion__chevron { transform: rotate(180deg); }

.pp-payment-accordion__panel {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--ag-line);
}

@media (min-width: 480px) { .pp-payment-accordion__panel { grid-template-columns: repeat(3, 1fr); } }

.pp-payment-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 8px;
  border-radius: 10px;
  border: 1px solid var(--ag-line-strong);
  background: rgba(255,255,255,.02);
  cursor: pointer;
  text-align: center;
}

.pp-payment-option.is-selected { border-color: var(--ag-lime); background: rgba(127,219,77,.1); }
.pp-payment-option__logo-wrap { height: 20px; display: flex; align-items: center; }
.pp-payment-option__logo { max-height: 20px; width: auto; }
.pp-payment-option__meta { display: flex; flex-direction: column; gap: 1px; }
.pp-payment-option__fee { font-size: 11px; font-weight: 700; color: var(--ag-text); }
.pp-payment-option__note { font-size: 10px; color: var(--ag-muted); }

.pp-promo__row { display: flex; gap: 8px; }
.pp-promo__row .pp-input { flex: 1; }
.pp-promo { display: flex; flex-direction: column; gap: 10px; }

.pp-contact { display: flex; flex-direction: column; gap: 14px; }

.product-description {
  border-radius: var(--ag-r);
  border: 1px solid var(--ag-line);
  overflow: hidden;
}

.product-description__title {
  padding: 11px 16px;
  background: rgba(255,255,255,.04);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.product-description__body {
  padding: 16px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ag-text);
}

.product-description__body ol { margin: 6px 0 0; padding: 0; list-style: none; counter-reset: step; }
.product-description__body ol li { counter-increment: step; padding-left: 24px; position: relative; margin-bottom: 4px; }
.product-description__body ol li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 17px;
  height: 17px;
  border-radius: 5px;
  background: rgba(127,219,77,.15);
  color: var(--ag-lime);
  font-size: 10.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.product-rating-card,
.product-help-card {
  border-radius: var(--ag-r);
  background: var(--ag-panel);
  border: 1px solid var(--ag-line);
  padding: 16px;
}

.product-rating-card__label { font-size: 12.5px; font-weight: 600; color: var(--ag-muted); margin: 0 0 8px; }
.product-rating-card__row { display: flex; align-items: center; gap: 10px; }
.product-rating-card__value { font-family: var(--ag-font-display); font-size: 30px; font-weight: 700; }
.product-rating-card__stars { display: flex; gap: 2px; color: var(--ag-amber); }
.product-rating-card__stars svg { width: 16px; height: 16px; }
.product-rating-card__count { font-size: 11.5px; color: var(--ag-muted); margin: 6px 0 0; }

.product-help-card { display: flex; align-items: center; gap: 12px; }
.product-help-card svg { width: 22px; height: 22px; color: var(--ag-lime); flex: none; }
.product-help-card__title { font-size: 13.5px; font-weight: 700; margin: 0; }
.product-help-card__body { font-size: 11.5px; color: var(--ag-muted); margin: 2px 0 0; }

.pp-sidebar { display: flex; flex-direction: column; gap: 14px; }

.pp-order-summary {
  border-radius: var(--ag-r);
  border: 1px dashed var(--ag-line-strong);
  background: rgba(255,255,255,.02);
  padding: 18px;
  text-align: center;
}

.pp-order-summary__body { text-align: left; }
.pp-order-summary__name { font-size: 13.5px; font-weight: 700; margin: 0 0 4px; }
.pp-order-summary__qty { font-size: 12px; color: var(--ag-muted); margin: 0 0 10px; }
.pp-order-summary__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--ag-line);
  font-size: 13px;
  font-weight: 700;
}
.pp-order-summary__total-value { color: var(--ag-lime); font-size: 15px; }
[data-role="pp-order-summary-empty"] { color: var(--ag-muted); font-size: 13px; }

.pp-order-btn {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  border: none;
  background: var(--ag-lime);
  color: var(--ag-lime-ink);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pp-order-btn:hover { background: #8fe85e; }
.pp-order-btn svg { width: 17px; height: 17px; }

.pp-toast {
  position: fixed;
  left: 50%;
  top: 16px;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--ag-pink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 26px rgba(0,0,0,.35);
}
.pp-toast svg { width: 16px; height: 16px; flex: none; }

/* ==========================================================================
   LEADERBOARD / INVOICES generic list & table
   ========================================================================== */

.ag-table-wrap {
  overflow-x: auto;
  border-radius: var(--ag-r);
  border: 1px solid var(--ag-line);
}

.ag-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  min-width: 560px;
}

.ag-table th,
.ag-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--ag-line);
  white-space: nowrap;
}

.ag-table th {
  background: rgba(255,255,255,.03);
  color: var(--ag-muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.ag-table tr:last-child td { border-bottom: none; }

.ag-rank-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ag-line);
}

.ag-rank-row:last-child { border-bottom: none; }

.ag-rank-row__num {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12.5px;
  color: var(--ag-muted);
  flex: none;
}

.ag-rank-row__num.is-top1 { background: var(--ag-amber); color: #2b1900; }
.ag-rank-row__num.is-top2 { background: #c9d2dc; color: #14263a; }
.ag-rank-row__num.is-top3 { background: #cf8a4c; color: #2b1900; }

.ag-rank-row__avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  flex: none;
}

.ag-rank-row__body { flex: 1; min-width: 0; }
.ag-rank-row__name { font-size: 13.5px; font-weight: 700; margin: 0; }
.ag-rank-row__meta { font-size: 11.5px; color: var(--ag-muted); margin: 2px 0 0; }
.ag-rank-row__value { font-size: 13px; font-weight: 700; color: var(--ag-lime); flex: none; }

.ag-period-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  margin-bottom: 18px;
}

.ag-period-tab {
  border: none;
  background: none;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--ag-muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.ag-period-tab.is-active { background: var(--ag-lime); color: var(--ag-lime-ink); }

.ag-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--ag-muted);
  font-size: 13.5px;
}

/* ==========================================================================
   DASHBOARD LAYOUT
   ========================================================================== */

.ag-dashboard {
  display: grid;
  gap: 20px;
  padding: 24px 0 56px;
}

@media (min-width: 900px) {
  .ag-dashboard { grid-template-columns: 240px 1fr; align-items: start; }
}

.ag-dashboard__sidebar {
  background: var(--ag-panel);
  border: 1px solid var(--ag-line);
  border-radius: var(--ag-r);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

@media (min-width: 900px) { .ag-dashboard__sidebar { position: sticky; top: 76px; } }

.ag-dashboard__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--ag-text);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
}

.ag-dashboard__link svg { width: 17px; height: 17px; color: var(--ag-muted); flex: none; }
.ag-dashboard__link:hover { background: rgba(255,255,255,.05); }
.ag-dashboard__link.is-active { background: rgba(127,219,77,.13); color: var(--ag-lime); }
.ag-dashboard__link.is-active svg { color: var(--ag-lime); }

.ag-dashboard__sep { height: 1px; background: var(--ag-line); margin: 8px 4px; }

.ag-dashboard__link--danger { color: var(--ag-pink); background: none; border: none; cursor: pointer; text-align: left; width: 100%; }
.ag-dashboard__link--danger svg { color: var(--ag-pink); }

.ag-dashboard__main { min-width: 0; display: flex; flex-direction: column; gap: 18px; }

.ag-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 640px) { .ag-stat-grid { grid-template-columns: repeat(4, 1fr); } }

.ag-stat-card {
  background: var(--ag-panel);
  border: 1px solid var(--ag-line);
  border-radius: var(--ag-r);
  padding: 16px;
}

.ag-stat-card__label { font-size: 11.5px; color: var(--ag-muted); margin: 0 0 6px; }
.ag-stat-card__value { font-family: var(--ag-font-display); font-size: 20px; font-weight: 700; margin: 0; }

/* ==========================================================================
   CALCULATOR
   ========================================================================== */

.ag-calc {
  display: grid;
  gap: 20px;
}

@media (min-width: 900px) { .ag-calc { grid-template-columns: 1fr 1fr; } }

.ag-calc__result {
  background: var(--ag-panel);
  border: 1px solid var(--ag-line);
  border-radius: var(--ag-r);
  padding: 20px;
}

.ag-calc__result-label { font-size: 12.5px; color: var(--ag-muted); margin: 0 0 6px; }
.ag-calc__result-value { font-family: var(--ag-font-display); font-size: 26px; font-weight: 700; color: var(--ag-lime); margin: 0; }

.ag-calc__actions { display: flex; gap: 10px; margin-top: 18px; }

/* ==========================================================================
   LEGAL PAGES (syarat & ketentuan / kebijakan privasi)
   ========================================================================== */

.ag-legal {
  max-width: 760px;
  margin: 0 auto;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ag-text);
}

.ag-legal h2 {
  font-family: var(--ag-font-display);
  font-size: 17px;
  margin: 28px 0 10px;
}

.ag-legal h2:first-child { margin-top: 0; }

.ag-legal p { margin: 0 0 12px; color: var(--ag-text); }
.ag-legal ul { margin: 0 0 12px; padding-left: 20px; }
.ag-legal li { margin-bottom: 6px; }
.ag-legal strong { color: var(--ag-lime); }

/* ==========================================================================
   DASHBOARD FILTER TOOLBAR (history / mutation / report)
   ========================================================================== */

.ag-filter-card {
  border: 1px solid var(--ag-line);
  border-radius: var(--ag-r);
  padding: 16px;
  margin-bottom: 14px;
}

.ag-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 720px) { .ag-filter-grid { grid-template-columns: repeat(4, 1fr); } }

.ag-filter-field { display: flex; flex-direction: column; gap: 6px; }
.ag-filter-field--full { grid-column: 1 / -1; }
.ag-filter-field label { font-size: 11.5px; color: var(--ag-muted); }

.ag-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 14px;
}

.ag-actions-row .ag-select { width: auto; height: 36px; font-size: 12.5px; }
.ag-actions-row .ag-btn--outline {
  border: 1px solid var(--ag-line-strong);
  background: rgba(255,255,255,.03);
  color: var(--ag-muted);
  cursor: not-allowed;
}

.ag-tabbar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  border-bottom: 1px solid var(--ag-line);
  padding-bottom: 10px;
  margin-bottom: 18px;
}

.ag-tabbar__link {
  flex: none;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ag-muted);
  white-space: nowrap;
}

.ag-tabbar__link.is-active { background: var(--ag-lime); color: var(--ag-lime-ink); }

.ag-notice-card {
  border: 1px dashed var(--ag-line-strong);
  border-radius: var(--ag-r);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ag-notice-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: center;
  background: rgba(255,77,141,.1);
  border: 1px solid rgba(255,77,141,.25);
  color: var(--ag-pink);
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}

.ag-notice-alert svg { width: 16px; height: 16px; flex: none; }

.ag-notice-help {
  margin-top: 14px;
  font-size: 13px;
  color: var(--ag-muted);
  text-align: center;
}

.ag-notice-help a { color: var(--ag-lime); font-weight: 700; }

/* ==========================================================================
   CALCULATOR PAGES
   ========================================================================== */

.ag-calc-form { display: flex; flex-direction: column; gap: 14px; }

.ag-calc-result-panel {
  border-radius: var(--ag-r);
  padding: 16px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.6;
}

.ag-calc-result-panel.result-error {
  background: rgba(255,77,141,.1);
  border: 1px solid rgba(255,77,141,.25);
  color: var(--ag-pink);
}

.ag-calc-result-panel.result-success {
  background: rgba(127,219,77,.1);
  border: 1px solid rgba(127,219,77,.3);
  color: var(--ag-lime);
}

.ag-slider-block { text-align: center; padding: 10px 0; }

.ag-slider-value {
  font-family: var(--ag-font-display);
  font-size: 15px;
  color: var(--ag-muted);
  margin-bottom: 6px;
}

.ag-slider-value strong { color: var(--ag-text); font-size: 20px; }

.ag-slider {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  appearance: none;
  outline: none;
  margin: 14px 0;
}

.ag-slider::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--ag-lime);
  cursor: pointer;
  border: 3px solid var(--ag-bg);
}

.ag-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--ag-lime);
  cursor: pointer;
  border: 3px solid var(--ag-bg);
}

.ag-diamond-result {
  margin-top: 18px;
  padding: 20px;
  border-radius: var(--ag-r);
  background: rgba(127,219,77,.08);
  border: 1px solid rgba(127,219,77,.25);
}

.ag-diamond-result__value {
  font-family: var(--ag-font-display);
  font-size: 30px;
  font-weight: 700;
  color: var(--ag-lime);
  margin: 0;
}

.ag-diamond-result__label { font-size: 12.5px; color: var(--ag-muted); margin: 4px 0 0; }

/* ==========================================================================
   MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .ag-ticker__track {
    animation: none;
  }

  .ag-drawer .drawer-panel {
    transition: none;
  }

  .ag-scope *,
  .ag-scope *::before,
  .ag-scope *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* Auth toggling: main.js menambahkan .hidden (dari style.css lama). Rule di
   file ini dimuat belakangan, jadi state hidden perlu dikunci eksplisit. */
[data-role="auth-only"].hidden,
[data-role="guest-only"].hidden {
  display: none !important;
}