:root {
  --brand:       #2563eb;
  --brand-deep:  #1d4ed8;
  --brand-soft:  #eff4ff;
  --store-footer-bg: #0b1f3f;
  --store-footer-text: #ffffff;
  --store-header-bg: #ffffff;
  --bg-soft:     #f7f8fb;
  --border:      #e8eaf0;
  --border-soft: #eef0f5;
  --text:        #0b1f3f;
  --text-2:      #334155;
  --text-3:      #64748b;
  --container:   1200px;
  --nav-h:       64px;
  --shadow-lg:   0 18px 40px rgba(15,23,42,.12);
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 22px; }

.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--store-header-bg);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
  height: var(--nav-h);
}
.nav-inner { height: 100%; display: flex; align-items: center; gap: 20px; }
.nav-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; cursor: pointer; }
.nav-logo {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px;
  box-shadow: 0 6px 16px rgba(37,99,235,.32);
  overflow: hidden;
}
.nav-logo img { width: 100%; height: 100%; object-fit: cover; }
.nav-name { font-weight: 800; font-size: 15px; letter-spacing: -.2px; line-height: 1.1; }
.nav-sub  { color: var(--text-3); font-size: 11px; font-weight: 600; margin-top: 1px; }
.brand-loading-chip,
.brand-loading-text {
  position: relative;
  color: transparent !important;
  user-select: none;
}
.brand-loading-chip::after,
.brand-loading-text::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: brandShimmer 1.4s ease-in-out infinite;
}
.brand-loading-text {
  border-radius: 8px;
  min-height: 12px;
}
.brand-loading-text.brand-loading-sub {
  min-height: 10px;
}
.brand-loading-chip {
  box-shadow: none;
}
.brand-loading-chip::after {
  border-radius: 11px;
}
.brand-ready.brand-loading-chip::after,
.brand-ready.brand-loading-text::after {
  display: none;
}
.brand-ready.brand-loading-text {
  color: inherit !important;
}
.brand-ready.brand-loading-chip {
  color: #fff !important;
}
.nav-links { display: flex; gap: 6px; flex: 1; justify-content: center; }
.nav-link {
  padding: 8px 14px; border-radius: 10px;
  color: var(--text-2); font-weight: 600; font-size: 14px;
  transition: background .15s, color .15s; cursor: pointer;
}
.nav-link:hover { background: var(--bg-soft); color: var(--text); }
.nav-link.is-active { background: var(--brand-soft); color: var(--brand-deep); }
.nav-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 11px;
  border: 1px solid var(--border); background: #fff; color: var(--text-2);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative; text-decoration: none;
}
.icon-btn:hover { background: var(--bg-soft); }
.badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--brand); color: #fff;
  font-size: 10px; font-weight: 800;
  min-width: 18px; height: 18px; padding: 0 4px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.nav-burger { display: none; background: none; border: none; font-size: 18px; cursor: pointer; padding: 8px; color: var(--text-2); }
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-burger { display: block; }
}

.nav-scrim {
  display: none; position: fixed; inset: 0; z-index: 59;
  background: rgba(11,31,63,.35); backdrop-filter: blur(2px);
}
.nav-drawer {
  position: fixed; top: 0; left: -280px; bottom: 0; width: 280px; z-index: 60;
  background: #fff; padding: 60px 20px 20px;
  display: flex; flex-direction: column; gap: 4px;
  box-shadow: var(--shadow-lg);
  transition: left .25s cubic-bezier(.4,0,.2,1);
}
.nav-drawer-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; font-size: 18px; cursor: pointer; color: var(--text-3);
}
.drawer-open .nav-scrim  { display: block; }
.drawer-open .nav-drawer { left: 0; }
.nav-drawer .nav-link { justify-content: flex-start; }

.footer { background: var(--store-footer-bg); color: rgba(255,255,255,.82); padding: 56px 0 24px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 30px; margin-bottom: 36px; align-items: start; }
.footer-grid.footer-grid--marketplace { grid-template-columns: 1.6fr repeat(2, 1fr); }
.footer-grid > div { min-width: 0; }
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1/-1; }
  .footer-grid.footer-grid--marketplace { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid.footer-grid--marketplace { grid-template-columns: 1fr; }
}
.footer h5 { color: var(--store-footer-text); font-size: 13px; font-weight: 800; margin: 0 0 12px; letter-spacing: .04em; text-transform: uppercase; }
.footer a { display: flex; align-items: center; padding: 5px 0; min-height: 28px; font-size: 13.5px; color: inherit; text-decoration: none; line-height: 1.25; }
.footer a:hover { color: var(--store-footer-text); }
.footer-grid > div:not(:first-child) a { white-space: nowrap; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-brand .nav-logo { box-shadow: none; }
.footer-brand-name { color: var(--store-footer-text); font-weight: 800; font-size: 16px; }
.footer-sub { color: rgba(255,255,255,.6); font-size: 13px; line-height: 1.6; max-width: 340px; }
.footer-brand-name, .footer-sub { overflow-wrap: anywhere; }
.footer-social { display: flex; gap: 10px; margin-top: 14px; }
.footer-social a { width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; padding: 0; }
.footer-social a:hover { background: rgba(255,255,255,.16); }
.footer-bar {
  border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 14px 20px; flex-wrap: wrap; color: rgba(255,255,255,.5); font-size: 12px;
}
.footer-pay {
  flex: 1 1 auto; min-width: 0;
  display: flex; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 8px;
}
.footer-bar > #footer-powered-by { flex-shrink: 0; margin-left: auto; text-align: right; }
.footer-pay-item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px;
  font-size: 11px; font-weight: 600; line-height: 1; color: rgba(255,255,255,.78); white-space: nowrap;
}
.footer-pay-item i { font-size: 12px; opacity: .9; }

.wa-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  width: 54px; height: 54px; border-radius: 50%;
  background: #25d366; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 24px;
  box-shadow: 0 10px 28px rgba(37,211,102,.45);
  text-decoration: none;
}
.wa-fab:hover { background: #1ebe5b; }

/* ── LOADING SCREEN (shared) ── */
body.store-loading { overflow: hidden; }
body.store-loading #store-nav-root,
body.store-loading #store-footer-root,
body.store-loading #app { visibility: hidden; }

#store-loading {
  position: fixed; inset: 0; z-index: 9999;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 14px;
  transition: opacity .3s ease;
}
#store-loading.is-hidden {
  opacity: 0; pointer-events: none;
}
#store-loading .store-loading-brand {
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 800; font-size: 22px;
  color: var(--brand); letter-spacing: -.04em;
  animation: storeBrandFade 1.6s ease-in-out infinite;
}
#store-loading .store-loading-spinner {
  width: 26px; height: 26px;
  border: 3px solid var(--border-soft);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: storeSpin .7s linear infinite;
}
#store-loading .store-loading-msg {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 13px; color: var(--text-3); margin: 0;
}
@keyframes storeSpin { to { transform: rotate(360deg); } }
@keyframes storeBrandFade { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes brandShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ── Marketplace footer (merch.my.id) ── */
#index-footer-root .footer--marketplace {
  --store-footer-bg: #0b1220;
  --store-footer-text: #ffffff;
  margin-top: 0;
  padding: 24px 0 28px;
}
.footer-legal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: center;
  align-items: center;
  padding: 0 0 16px;
  margin: 0;
  border-bottom: none;
}
.footer-legal-row + .footer-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
}
.footer-legal-row a {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  padding: 4px 0;
  white-space: nowrap;
}
.footer-legal-row a:hover {
  color: #fff;
}
