/* -- Color tokens: light (default) --------------------------- */
:root {
  /* "Marketplace Trust" - Carikno's own front-end identity, distinct from
     Vertext's shared admin palette. --clr-accent is foreground-safe
     (text/links/borders) and flips for dark mode below; --clr-accent-fill
     is a stable, slightly deeper blue in both modes for solid fills with
     white text (buttons, badges, prices), since the lighter dark-mode
     accent reads fine as text but is too pale for a filled button. */
  --clr-accent:      #0B5FE0;
  --clr-accent-fill: #0B5FE0;
  --clr-accent-rgb:  11, 95, 224;
  --clr-text:    #14213D;
  --clr-muted:   #5B6B85;
  --clr-faint:   #8E9BB3;
  --clr-border:  #DCE3EE;
  --clr-surface: #F3F6FB;
  --clr-bg:      #ffffff;
  --clr-bg-rgb:  255, 255, 255;
  --shadow-sm:   0 4px 12px rgba(11,95,224,.08);
  --radius-sm:   0.375rem;
  --radius-md:   0.625rem;

  /* --ps-/--clr-* bridge - front themes and the admin panel are separate
     CSS systems; these aliases let shared/imported component CSS written
     against either naming resolve sensibly in this theme. */
  --ps-primary:      var(--clr-accent);
  --ps-text-primary: var(--clr-text);
  --ps-text-muted:   var(--clr-muted);
  --ps-border:       var(--clr-border);
  --ps-bg-surface:   var(--clr-surface);
  --ps-bg-base:      var(--clr-bg);
}

/* -- Color tokens: dark (system preference) -------------------
   Neutral grays (Google's own Material dark-surface family), not another
   navy-tinted dark - the first cut of this theme's dark mode reused the
   same "slate navy + pale sky-blue" neighborhood the inherited Vertext
   "default" theme's dark mode already occupies, so the two were
   indistinguishable at night even though the light-mode palettes are
   genuinely different. --clr-accent-fill is deliberately a shade deeper
   than --clr-accent here (unlike light mode, where they're equal) - the
   lighter, text-safe accent reads as too pale for a solid filled button
   with white text on a dark background. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --clr-accent:      #8AB4F8;
    --clr-accent-fill: #669DF6;
    --clr-accent-rgb:  138, 180, 248;
    --clr-text:    #E8EAED;
    --clr-muted:   #9AA0A6;
    --clr-faint:   #5F6368;
    --clr-border:  #3C4043;
    --clr-surface: #303134;
    --clr-bg:      #202124;
    --clr-bg-rgb:  32, 33, 36;
    --shadow-sm:   0 4px 12px rgba(0,0,0,.4);
  }
}

/* -- Color tokens: dark (explicit toggle) --------------------- */
[data-theme="dark"] {
  --clr-accent:      #8AB4F8;
  --clr-accent-fill: #669DF6;
  --clr-accent-rgb:  138, 180, 248;
  --clr-text:    #E8EAED;
  --clr-muted:   #9AA0A6;
  --clr-faint:   #5F6368;
  --clr-border:  #3C4043;
  --clr-surface: #303134;
  --clr-bg:      #202124;
  --clr-bg-rgb:  32, 33, 36;
  --shadow-sm:   0 4px 12px rgba(0,0,0,.4);
}

/* -- Reset & base -------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

:focus-visible {
  outline: 2px solid var(--clr-accent);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

body {
  margin: 0;
  /* Roboto - self-hosted (styles.css @font-face), Google's own typeface and
     no other bundled theme uses it - genuinely distinct from the inherited
     Vertext "default" theme (and the admin panel's "Precision Ledger"
     identity), both of which use IBM Plex Sans. */
  font-family: 'Roboto', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  color: var(--clr-text);
  background: var(--clr-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--clr-accent);
  text-decoration: none;
}

.ps-home a:hover {
  text-decoration: none;
}

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

/* -- Layout -------------------------------------------------- */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
}

.container-wide {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
}

.container-prose {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
}

main {
  padding: 2.5rem 0 4rem;
  min-height: 60vh;
}

/* -- Site header --------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--clr-border);
  height: 56.8px;
  padding: 0;
  background: var(--clr-bg);
  position: sticky;
  top: 0;
  z-index: 300;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 100%;
  padding: 0 1rem;
}

.site-name {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--clr-text);
  letter-spacing: -.01em;
  flex-shrink: 1;
  min-width: 0;
  min-height: 0;
}

.site-logo-wordmark-light,
.site-logo-wordmark-dark {
  height: 36px;
  width: auto;
  flex-shrink: 1;
  min-width: 0;
  max-width: 100%;
  max-height: 100%;
}

/* Dark wordmark on light backgrounds, light wordmark on dark backgrounds */
.site-logo-wordmark-dark { display: none; }
.site-logo-wordmark-light { display: inline-block; }

[data-theme="dark"] .site-logo-wordmark-light { display: none; }
[data-theme="dark"] .site-logo-wordmark-dark  { display: inline-block; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .site-logo-wordmark-light { display: none; }
  :root:not([data-theme="light"]) .site-logo-wordmark-dark  { display: inline-block; }
}

.site-name:hover {
  text-decoration: none;
  color: var(--clr-accent);
}

/* Mobile-only (<=640px, see the min-width:641px override below): full-height
   off-canvas drawer, opened only by the hamburger (.nav-toggle, itself
   hidden >640px). Sits closed (off-screen left) by default and slides
   left-to-right into view on .is-open, alongside a dimming .nav-backdrop.
   >640px restores the original always-visible inline nav row instead. */
.site-nav {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(300px, 80vw);
  background: var(--clr-bg);
  border-right: 1px solid var(--clr-border);
  box-shadow: var(--shadow-sm);
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 4.5rem 0 1rem;
  z-index: 250;
  transform: translateX(-100%);
  visibility: hidden;
  transition: transform .25s ease, visibility .25s ease;
}

.site-nav.is-open {
  transform: translateX(0);
  visibility: visible;
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .4);
  z-index: 240;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.nav-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.site-nav a {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .9375rem;
  color: var(--clr-muted);
  transition: color .15s;
  white-space: nowrap;
  padding: .625rem 1.5rem;
  width: 100%;
}

.site-nav a .pi {
  width: 1rem;
  height: 1rem;
}

.site-nav a:hover {
  color: var(--clr-accent);
  text-decoration: none;
}

/* Desktop/tablet: restore the original always-visible inline nav row
   instead of the mobile slide-in drawer above, and hide the mobile-only
   header controls (account icon, language placeholder, hamburger) - the
   inline nav already includes an Account link, and there's no drawer to
   open. Theme toggle stays visible at every width. */
@media (min-width: 641px) {
  .site-nav {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
    justify-content: flex-end;
    width: auto;
    height: auto;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    transform: none;
    visibility: visible;
    transition: none;
  }

  .site-nav a {
    display: inline-flex;
    gap: .375rem;
    padding: 0;
    width: auto;
  }

  .nav-backdrop {
    display: none;
  }

  .header-icon-btn.header-mobile-only,
  .header-icon-btn.nav-toggle {
    display: none;
  }
}

/* -- Nav dropdown -------------------------------------------- */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + .5rem);
  left: 0;
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  min-width: 160px;
  box-shadow: var(--shadow-sm);
  z-index: 200;
  padding: .375rem 0;
}

.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu a {
  display: block;
  padding: .4rem .875rem;
  font-size: .875rem;
  color: var(--clr-muted);
}

.nav-dropdown-menu a:hover {
  background: var(--clr-surface);
  color: var(--clr-accent);
  text-decoration: none;
}

/* -- Header search-on-scroll (desktop/tablet only) ------------
   Hidden by default; theme.js adds .is-search-visible to .site-header once
   the page's own main search input scrolls out of view (or, on pages with
   no such input, past a small scroll threshold). Overlays the inline nav
   above rather than competing with it for row space. Mobile skips this
   entirely - the bottom tab bar's Search tab already covers it. */
.header-search {
  display: none;
}

@media (min-width: 641px) {
  .header-search {
    display: flex;
    align-items: center;
    gap: .5rem;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, calc(-50% + 6px));
    width: min(380px, 40vw);
    padding: .4375rem .875rem;
    border: 1px solid var(--clr-border);
    border-radius: 999px;
    background: var(--clr-bg);
    box-shadow: var(--shadow-sm);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
  }

  .header-search .pi {
    width: .875rem;
    height: .875rem;
    color: var(--clr-faint);
    flex-shrink: 0;
  }

  .header-search input {
    flex: 1;
    min-width: 0;
    border: none;
    background: none;
    color: var(--clr-text);
    font-size: .875rem;
  }

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

  .site-header.is-search-visible .header-search {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%);
    pointer-events: auto;
  }

  .site-header.is-search-visible .site-nav {
    opacity: 0;
    pointer-events: none;
  }
}

/* -- Header actions (account / theme / language / hamburger) - all 4 are
   icon-only buttons sharing one box style; each keeps only what's unique
   to it (theme-toggle's sun/moon swap, nav-toggle's 3 bars). ------------- */
.header-actions {
  display: flex;
  align-items: center;
  gap: .375rem;
  flex-shrink: 0;
}

.header-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: none;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--clr-muted);
  text-decoration: none;
  line-height: 1;
  transition: color .15s, border-color .15s;
}

.header-icon-btn:hover {
  color: var(--clr-text);
  border-color: var(--clr-muted);
  text-decoration: none;
}

.header-icon-btn .pi {
  width: 1rem;
  height: 1rem;
}

.header-icon-btn[disabled] {
  opacity: .4;
  cursor: not-allowed;
  pointer-events: none;
}

/* Language switcher - shows the OTHER locale's 2-letter code (EN/ID), not
   an icon, since a plain globe glyph doesn't communicate which language a
   click switches to. */
.header-lang-toggle {
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .02em;
}

/* Light mode: show moon (click to go dark) */
.icon-sun  { display: none; }
.icon-moon { display: block; }

/* Dark mode: show sun (click to go light) */
[data-theme="dark"] .icon-sun  { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun  { display: block; }
  :root:not([data-theme="light"]) .icon-moon { display: none; }
}

/* Hamburger: always visible now (opens the full nav at every width, see
   .site-nav above) - just the 3 bars, box styling from .header-icon-btn. */
.nav-toggle {
  flex-direction: column;
  gap: 0;
}

.nav-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  margin: 2px 0;
  transition: transform .2s, opacity .2s;
}

/* -- Site footer --------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--clr-border);
  padding: 2.5rem 0 1.75rem;
}

.site-footer-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.site-footer-col {
  display: flex;
  flex-direction: column;
  gap: .625rem;
}

.site-footer-col h3 {
  margin: 0 0 .25rem;
  font-size: .8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--clr-text);
}

.site-footer-col a {
  font-size: .875rem;
}

.site-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--clr-border);
}

.site-footer p {
  margin: 0;
  font-size: .8125rem;
  color: var(--clr-faint);
}

.site-footer a {
  color: var(--clr-faint);
}

.site-footer a:hover {
  color: var(--clr-accent);
  text-decoration: none;
}

@media (max-width: 640px) {
  .site-footer-columns {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* -- Bottom tab bar (mobile only) - app-style quick nav, 5 tabs built in
   layout.php from the same nav data as the header dropdown. ------------- */
.bottom-nav {
  display: none;
}

@media (max-width: 640px) {
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--clr-bg);
    border-top: 1px solid var(--clr-border);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .1875rem;
    padding: .5rem 0 .375rem;
    color: var(--clr-muted);
    font-size: .6875rem;
    text-decoration: none;
  }

  .bottom-nav-item:hover {
    color: var(--clr-muted);
    text-decoration: none;
  }

  .bottom-nav-item .pi {
    width: 1.25rem;
    height: 1.25rem;
  }

  .bottom-nav-item.is-active {
    color: var(--clr-accent);
  }

  /* Room for the fixed bottom bar so it never covers page content -
     a common bug with fixed bottom bars, accounted for explicitly. */
  body {
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0));
  }
}

/* -- Landing Page Blocks --------------------------------------
   Shared class vocabulary across all themes - visual identity comes
   entirely from this theme's own */
.vtx-lb-page { display: flex; flex-direction: column; }

.vtx-lb-btn {
  display: inline-block;
  padding: .75rem 1.75rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: .9375rem;
  text-decoration: none;
  transition: opacity .15s, transform .15s;
}
.vtx-lb-btn:hover { opacity: .88; transform: translateY(-1px); }
.vtx-lb-btn-primary { background: var(--clr-accent-fill); color: #fff; }

.vtx-lb-section { padding: 3.5rem 0; }
.vtx-lb-section-title {
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin: 0 0 2.25rem;
  color: var(--clr-text);
}

/* -- Hero -- */
.vtx-lb-hero {
  padding: 5rem 0;
  text-align: center;
  background: var(--clr-surface);
}
.vtx-lb-hero--has-image {
  background-size: cover;
  background-position: center;
  position: relative;
  color: #fff;
}
.vtx-lb-hero--has-image::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(0,0,0,.45);
}
.vtx-lb-hero--has-image .container { position: relative; z-index: 1; }
.vtx-lb-hero-headline {
  font-size: clamp(1.875rem, 4vw, 3rem);
  font-weight: 700;
  margin: 0 0 1rem;
  line-height: 1.15;
}
.vtx-lb-hero--has-image .vtx-lb-hero-headline,
.vtx-lb-hero--has-image .vtx-lb-hero-subheadline { color: #fff; }
.vtx-lb-hero-subheadline {
  font-size: 1.125rem;
  color: var(--clr-muted);
  max-width: 640px;
  margin: 0 auto 2rem;
}

/* -- Feature Grid -- */
.vtx-lb-feature-grid-items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.vtx-lb-feature-grid-items.vtx-lb-cols-2 { grid-template-columns: repeat(2, 1fr); }
.vtx-lb-feature-grid-items.vtx-lb-cols-4 { grid-template-columns: repeat(4, 1fr); }
.vtx-lb-feature-item { text-align: center; }
.vtx-lb-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  background: var(--clr-surface);
  color: var(--clr-accent);
  font-size: 1.375rem;
  margin-bottom: 1rem;
}
.vtx-lb-feature-title { font-size: 1.0625rem; font-weight: 600; margin: 0 0 .5rem; color: var(--clr-text); }
.vtx-lb-feature-text { font-size: .9375rem; color: var(--clr-muted); margin: 0; line-height: 1.6; }

/* -- Testimonials -- */
.vtx-lb-testimonials-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.vtx-lb-testimonial-card {
  padding: 1.75rem;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
}
.vtx-lb-testimonial-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; margin-bottom: 1rem; }
.vtx-lb-testimonial-quote { font-size: 1rem; color: var(--clr-text); line-height: 1.6; margin: 0 0 1rem; }
.vtx-lb-testimonial-author { font-weight: 600; font-size: .9375rem; color: var(--clr-text); }
.vtx-lb-testimonial-role { font-size: .8125rem; color: var(--clr-muted); }

/* -- Gallery -- */
.vtx-lb-gallery-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.vtx-lb-gallery-item { margin: 0; border-radius: var(--radius-md); overflow: hidden; }
.vtx-lb-gallery-item img { display: block; width: 100%; height: 220px; object-fit: cover; }

/* -- CTA Banner -- */
.vtx-lb-cta-banner {
  text-align: center;
  background: var(--clr-accent-fill);
  color: #fff;
  border-radius: var(--radius-md);
  margin: 0 auto;
}
.vtx-lb-cta-banner .container { max-width: 720px; }
.vtx-lb-cta-headline { font-size: 1.75rem; font-weight: 700; margin: 0 0 .75rem; color: #fff; }
.vtx-lb-cta-text { font-size: 1rem; opacity: .9; margin: 0 0 1.5rem; }
.vtx-lb-cta-banner .vtx-lb-btn-primary { background: #fff; color: var(--clr-accent-fill); }

/* -- Rich Text -- */
.vtx-lb-rich-text-content { max-width: 740px; margin: 0 auto; color: var(--clr-text); line-height: 1.7; }
.vtx-lb-rich-text-content img { max-width: 100%; border-radius: var(--radius-sm); }

/* -- Stats -- */
.vtx-lb-stats-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.5rem;
  text-align: center;
}
.vtx-lb-stat-number { font-size: 2.25rem; font-weight: 700; color: var(--clr-accent); }
.vtx-lb-stat-label { font-size: .875rem; color: var(--clr-muted); margin-top: .25rem; }

@media (max-width: 720px) {
  .vtx-lb-feature-grid-items { grid-template-columns: 1fr !important; }
}
