:root {
  --bg: #0b1020;
  --panel: #0f1730;
  --panel2: #121c38;
  --text: #e9ecf5;
  --muted: #aeb6d3;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #6ea8ff;
  --accent2: #55f1c6;
  --danger: #ff5f7a;
  --ok: #3ee98a;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --radius2: 22px;
  --wrap: 1100px;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    "Apple Color Emoji",
    "Segoe UI Emoji";
  background:
    radial-gradient(
      1200px 800px at 30% -10%,
      rgba(110, 168, 255, 0.22),
      transparent 60%
    ),
    radial-gradient(
      900px 700px at 80% 0%,
      rgba(85, 241, 198, 0.12),
      transparent 60%
    ),
    var(--bg);
  color: var(--text);
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 16px;
}
.main {
  padding: 22px 0 120px;
}

a {
  color: inherit;
}
code {
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 10px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--panel2);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.skip-link:focus {
  left: 12px;
  z-index: 9999;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(11, 16, 32, 0.7);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand__mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    rgba(110, 168, 255, 0.95),
    rgba(85, 241, 198, 0.85)
  );
  color: #081022;
  font-weight: 900;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}
.brand__name {
  font-weight: 900;
  letter-spacing: 0.2px;
}
.brand__tag {
  font-size: 12px;
  color: var(--muted);
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge {
  font-size: 12px;
  letter-spacing: 0.6px;
  border: 1px solid rgba(110, 168, 255, 0.4);
  background: rgba(110, 168, 255, 0.12);
  padding: 6px 10px;
  border-radius: 999px;
}

.promo {
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 48, 0.65);
}
.promo__inner {
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.center {
  text-align: center;
}

.controls {
  background: rgba(15, 23, 48, 0.55);
  border: 1px solid var(--line);
  border-radius: var(--radius2);
  padding: 14px;
  box-shadow: var(--shadow);
}
.controls__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.controls__row + .controls__row {
  margin-top: 10px;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tab {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 9px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.tab.is-active {
  border-color: rgba(110, 168, 255, 0.45);
  background: rgba(110, 168, 255, 0.16);
}

.btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 14px;
  cursor: pointer;
}
.btn:hover {
  background: rgba(255, 255, 255, 0.09);
}
.btn:focus {
  outline: 2px solid rgba(110, 168, 255, 0.55);
  outline-offset: 2px;
}
.btn--primary {
  border-color: rgba(110, 168, 255, 0.5);
  background: linear-gradient(
    135deg,
    rgba(110, 168, 255, 0.95),
    rgba(85, 241, 198, 0.65)
  );
  color: #071022;
  font-weight: 800;
}
.btn--ghost {
  background: transparent;
}
.btn--block {
  width: 100%;
}

.iconbtn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 14px;
  padding: 8px 10px;
  cursor: pointer;
}
.iconbtn:hover {
  background: rgba(255, 255, 255, 0.08);
}
.iconbtn:focus {
  outline: 2px solid rgba(110, 168, 255, 0.55);
  outline-offset: 2px;
}

.input,
.select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 14px;
}
.input:focus,
.select:focus {
  outline: 2px solid rgba(110, 168, 255, 0.55);
  outline-offset: 2px;
}
.search {
  flex: 1;
  min-width: 220px;
}

.pill {
  margin-left: 8px;
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line);
  font-weight: 800;
  font-size: 12px;
}

.grid {
  margin-top: 14px;
}
.grid__items {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 980px) {
  .grid__items {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 720px) {
  .grid__items {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 460px) {
  .grid__items {
    grid-template-columns: 1fr;
  }
}

.card {
  border: 1px solid var(--line);
  background: rgba(15, 23, 48, 0.55);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: 24px 24px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-2px);
}
.item {
  display: flex;
  flex-direction: column;
  min-height: 320px;
}
.thumb {
  aspect-ratio: 4/3;
  background: rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid var(--line);
  position: relative;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.meta {
  padding: 12px;
}
.title-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.h3 {
  font-weight: 900;
  margin: 0;
  font-size: 16px;
}
.desc {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.bottom-row {
  margin-top: auto;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
}
.price {
  font-weight: 900;
}
.badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.badge2 {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(11, 16, 32, 0.6);
}
.badge2--low {
  border-color: rgba(255, 215, 0, 0.35);
  background: rgba(255, 215, 0, 0.12);
}
.badge2--out {
  border-color: rgba(255, 95, 122, 0.45);
  background: rgba(255, 95, 122, 0.12);
}
.fav {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(11, 16, 32, 0.6);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.fav:hover {
  background: rgba(255, 255, 255, 0.08);
}
.fav[aria-pressed="true"] {
  border-color: rgba(110, 168, 255, 0.55);
  background: rgba(110, 168, 255, 0.18);
}

.grid__skeleton {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 980px) {
  .grid__skeleton {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 720px) {
  .grid__skeleton {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 460px) {
  .grid__skeleton {
    grid-template-columns: 1fr;
  }
}

.skeleton {
  height: 320px;
  border-radius: var(--radius2);
  border: 1px solid var(--line);
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.03)
  );
  background-size: 300% 100%;
  animation: shimmer 1.1s infinite linear;
}
@keyframes shimmer {
  0% {
    background-position: 0% 0;
  }
  100% {
    background-position: 100% 0;
  }
}

.mini-cart {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  border-top: 1px solid var(--line);
  background: rgba(11, 16, 32, 0.82);
  backdrop-filter: blur(14px);
  z-index: 60;
}
.mini-cart__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
}
.mini-cart__title {
  font-weight: 900;
}
.mini-cart__summary {
  font-size: 13px;
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 420px;
  max-width: 100%;
  background: rgba(15, 23, 48, 0.92);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  z-index: 80;
  display: flex;
  flex-direction: column;
}
.drawer__header {
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.drawer__body {
  padding: 12px;
  overflow: auto;
  flex: 1;
}
.drawer__footer {
  padding: 12px;
  border-top: 1px solid var(--line);
}
.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 70;

  pointer-events: auto; /* ✅ aktif bila visible */
}
.backdrop[hidden] {
  pointer-events: none; /* ✅ bila hidden, tak ganggu click */
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 720px;
  max-width: calc(100% - 24px);
  background: rgba(15, 23, 48, 0.96);
  border: 1px solid var(--line);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  z-index: 90;
  display: flex;
  flex-direction: column;
  max-height: calc(100% - 24px);
}
.modal__header {
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.modal__body {
  padding: 14px;
  overflow: auto;
  flex: 1;
}
.modal__footer {
  padding: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.modal__price {
  text-align: right;
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.row > * {
  flex: 1;
}

.cart-item {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  padding: 10px;
  display: flex;
  gap: 10px;
}
.cart-item__img {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  overflow: hidden;
  flex: 0 0 auto;
}
.cart-item__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cart-item__mid {
  flex: 1;
}
.cart-item__name {
  font-weight: 900;
}
.cart-item__opts {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
.cart-item__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}
.qty {
  display: flex;
  align-items: center;
  gap: 8px;
}
.qty button {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
}
.qty button:hover {
  background: rgba(255, 255, 255, 0.09);
}
.qty span {
  min-width: 18px;
  text-align: center;
  font-weight: 900;
}

.totals {
  margin-top: 10px;
}
.totals__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
}
.totals__grand {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 10px;
}

.empty {
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: var(--radius2);
  padding: 18px;
  text-align: center;
  color: var(--muted);
}

.cred {
  margin-top: 16px;
  margin-top: 64px;
  margin-bottom: 64px;
}
.cred__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px; /* <-- ini penting */
}
@media (max-width: 980px) {
  .cred__grid {
    grid-template-columns: 1fr;
  }
}

.list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
}
.support {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.support__meta {
  color: var(--muted);
  font-size: 13px;
}

.faq-item {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  overflow: hidden;
}
.faq-btn {
  width: 100%;
  text-align: left;
  padding: 12px 12px;
  background: transparent;
  border: 0;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 900;
}
.faq-panel {
  padding: 0 12px 12px;
  color: var(--muted);
  display: none;
}
.faq-item.is-open .faq-panel {
  display: block;
}

.toasts {
  position: fixed;
  right: 14px;
  bottom: 78px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 120;
}
.toast {
  width: 320px;
  max-width: calc(100vw - 28px);
  border: 1px solid var(--line);
  background: rgba(15, 23, 48, 0.92);
  border-radius: 16px;
  padding: 12px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.toast__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent2);
  margin-top: 5px;
}
.toast__dot--danger {
  background: var(--danger);
}
.toast__title {
  font-weight: 900;
}
.toast__msg {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.chat {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  padding: 10px;
  height: 260px;
  overflow: auto;
  margin-bottom: 10px;
}
.chat__b {
  margin: 8px 0;
  display: flex;
}
.chat__b.is-me {
  justify-content: flex-end;
}
.bubble {
  max-width: 78%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}
.bubble.is-me {
  background: rgba(110, 168, 255, 0.16);
  border-color: rgba(110, 168, 255, 0.35);
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  height: 34px;
  width: auto;
  object-fit: contain;
}

.brand-name {
  font-weight: 900;
  letter-spacing: 0.5px;
}
.drawer-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}
.modal,
.drawer {
  pointer-events: auto;
}

.modal .iconbtn,
.drawer .iconbtn {
  position: relative;
  z-index: 200; /* ✅ sentiasa paling atas */
}
/* ===============================
   HARD KILL hidden layers
   =============================== */
[hidden] {
  display: none !important;
  pointer-events: none !important;
}
