/* Buana Wisesa catalog — shared styles.
   Mobile-first. 2-column product grid. lynk.id-inspired card style. */

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Lato", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f5f5f5;
  color: #1a1a1a;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }

/* --- Tokens (CSS variables) --- */
:root {
  --bg: #f5f5f5;
  --surface: #ffffff;
  --border: #e5e5e5;
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --ink-muted: #767676;
  --brand: #1a1a1a;
  --wa: #25D366;
  --wa-dark: #1da851;
  --wa-text: #128c47;
  /* Landing-page neutrals — sticky-call uses the deep steel,
     everything else stays in the existing ink / surface palette. */
  --steel-900: #0f1419;
  --steel-700: #232b36;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --container: 600px;
}

/* --- Container --- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .container { padding: 0 24px; } }

/* --- Skip link --- */
.skip {
  position: absolute; top: -50px; left: 0;
  background: var(--ink); color: #fff;
  padding: 10px 14px; text-decoration: none;
  z-index: 100; border-radius: 0 0 8px 0;
}
.skip:focus { top: 0; }

/* --- Sticky top bar --- */
.top-bar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.top-bar .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 52px;
  gap: 12px;
}
.top-bar .brand {
  font-weight: 800; font-size: 16px; letter-spacing: -0.01em;
  text-decoration: none; color: var(--ink);
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 6px 4px;
}
.top-bar .back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; text-decoration: none; color: var(--ink-soft);
  min-height: 44px; padding: 6px 4px;
}
.top-bar .back:active { color: var(--ink); }
.top-bar .back svg { width: 18px; height: 18px; }
.top-bar .top-cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700;
  background: var(--wa); color: #fff;
  padding: 8px 14px; border-radius: 999px;
  text-decoration: none; min-height: 36px;
}
.top-bar .top-cta:active { background: var(--wa-dark); }
.top-bar .top-cta svg { width: 14px; height: 14px; }

/* --- Hero --- */
.hero {
  text-align: center;
  padding: 32px 0 24px;
}
.hero .avatar {
  width: 88px; height: 88px; border-radius: 50%;
  background: #1a1a1a; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 800; letter-spacing: -0.02em;
  margin: 0 auto 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.hero .avatar img { width: 100%; height: 100%; object-fit: cover; }

/* When a real logo image loads, switch from circular avatar to wide brand logo */
.hero[data-has-logo] .avatar {
  width: auto; height: auto;
  max-width: min(280px, 70vw);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  margin: 0 auto 12px;
  overflow: visible;
}
.hero[data-has-logo] .avatar img {
  width: 100%; height: auto;
  object-fit: contain;
  display: block;
}
/* Logo contains the brand name; hide the duplicate h1 visually but keep for screen readers + SEO */
.hero[data-has-logo] h1 {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.hero h1 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.hero .tagline {
  margin: 0; font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.45;
}
.hero .meta {
  margin-top: 4px; font-size: 14px;
  color: var(--ink-muted);
}
.hero .experience {
  display: inline-block;
  margin-top: 14px;
  padding: 6px 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px; font-weight: 600;
  color: var(--ink-soft);
}

/* Subheader for catalog pages (compact) */
.subheader {
  text-align: center;
  padding: 20px 0 8px;
}
.subheader h1 { margin: 0 0 6px; font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
.subheader p { margin: 0; font-size: 14px; color: var(--ink-muted); }

/* --- Primary WhatsApp CTA (big, lynk.id-style filled button) --- */
.cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px;
  background: var(--wa); color: #fff;
  text-decoration: none; font-weight: 700;
  font-size: 15px;
  border-radius: 12px;
  min-height: 48px;
  width: 100%;
  max-width: 360px;
  box-shadow: var(--shadow-sm);
  border: none; cursor: pointer;
  transition: transform 0.08s ease, background 0.15s ease;
}
.cta:active { transform: translateY(1px); background: var(--wa-dark); }
.cta svg { width: 18px; height: 18px; flex: 0 0 18px; }

.cta-wrap { display: flex; justify-content: center; padding: 8px 0 0; }

/* Secondary link below CTA */
.secondary-link {
  display: block; text-align: center;
  margin-top: 12px;
  font-size: 14px; color: var(--ink-soft);
  text-decoration: underline; text-underline-offset: 3px;
}

/* --- Category tile (landing page) --- */
.tile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 8px 0 24px;
}
.tile {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-decoration: none;
  color: inherit;
  min-height: 88px;
  transition: transform 0.08s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.tile:hover { border-color: #d0d0d0; box-shadow: var(--shadow-md); }
.tile:active { transform: translateY(1px); }
.tile-icon {
  width: 56px; height: 56px; flex: 0 0 56px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #f5f5f5; border-radius: var(--radius-sm);
  color: var(--ink);
}
.tile-icon svg { width: 28px; height: 28px; }
.tile-body { flex: 1; min-width: 0; }
.tile-title {
  font-weight: 700; font-size: 16px; color: var(--ink);
  margin: 0 0 2px;
}
.tile-sub {
  font-size: 13px; color: var(--ink-muted); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.tile-arrow {
  flex: 0 0 20px;
  color: var(--ink-muted);
}

/* --- Section --- */
.section {
  padding: 20px 0 28px;
}
.section + .section { padding-top: 8px; }
.section h2 {
  font-size: 18px; font-weight: 800;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.section .section-sub {
  font-size: 13px; color: var(--ink-muted);
  margin: 0 0 16px;
}

/* --- Product grid (2-column mobile, more on larger screens) --- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 720px) { .product-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 1000px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }

/* --- Product card (lynk.id-inspired) --- */
.product-card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.08s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.product-card:hover { border-color: #d0d0d0; box-shadow: var(--shadow-md); }
.product-card:active { transform: translateY(1px); }
.product-img-wrap {
  aspect-ratio: 1 / 1;
  background: #f0f0f0;
  position: relative;
  overflow: hidden;
}
.product-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.product-img-placeholder {
  display: none;
  position: absolute; inset: 0;
  align-items: center; justify-content: center;
  color: var(--ink-muted); font-size: 12px;
  font-weight: 600;
  text-align: center; padding: 12px;
  background: repeating-linear-gradient(45deg, #f5f5f5, #f5f5f5 10px, #eeeeee 10px, #eeeeee 20px);
}
.product-card[data-no-image] .product-img { display: none; }
.product-card[data-no-image] .product-img-placeholder { display: flex; }
.product-body {
  padding: 10px 12px 14px;
  display: flex; flex-direction: column; flex-grow: 1;
}
.product-name {
  font-size: 13px;
  line-height: 1.35;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}
.product-cta {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 700;
  color: var(--wa-text);
}
.product-cta svg { width: 13px; height: 13px; flex: 0 0 13px; }

/* --- Custom card --- */
.custom-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: center;
}
.custom-card h3 { margin: 0 0 6px; font-size: 18px; font-weight: 800; }
.custom-card p { margin: 0 0 16px; color: var(--ink-muted); font-size: 14px; }
.custom-card .cta { margin: 0 auto; }

/* --- Footer --- */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 28px 0 36px;
  margin-top: 32px;
  font-size: 13px;
  color: var(--ink-muted);
}
footer strong { color: var(--ink); display: block; margin-bottom: 4px; font-size: 14px; }
footer .footer-block { display: grid; gap: 4px; }
footer a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
footer .legal {
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 12px; opacity: 0.8;
}

/* --- Loading / error states --- */
.loading, .error {
  padding: 32px 16px; text-align: center; color: var(--ink-muted);
  font-size: 14px;
}
.error { color: #c0392b; }

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* --- Larger screens: keep mobile-feel column-width center --- */
@media (min-width: 720px) {
  .hero { padding: 48px 0 32px; }
  .hero h1 { font-size: 28px; }
  .hero .avatar { width: 104px; height: 104px; font-size: 36px; }
  .subheader { padding: 28px 0 8px; }
  .subheader h1 { font-size: 26px; }
}

/* ============================================================ */
/* LANDING PAGE (industrial bold) — applied via body[data-page="landing"]
   to avoid touching kotak.html / bulat.html which still use the
   lynk.id-style hero/tiles above.                                */
/* ============================================================ */

body[data-page="landing"] {
  padding-bottom: 76px; /* space for sticky bottom bar (mobile) */
}

/* Top bar additions for the landing page — small ghost call button
   next to the WhatsApp pill. Top bar itself uses the default light
   .top-bar styles defined above. */
.top-bar-ctas {
  display: inline-flex; align-items: center; gap: 8px;
}
.top-cta--light-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
  padding: 8px 10px;
  border-radius: 999px;
  min-height: 36px;
  min-width: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none;
}
.top-cta--light-ghost svg { width: 16px; height: 16px; }
.top-cta--light-ghost:active { background: var(--bg); }

/* Stacked dual-CTA in hero (WhatsApp green + Telepon outlined).
   Two rows on mobile, side-by-side on desktop (handled below). */
.cta-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  width: 100%;
  max-width: 360px;
  margin: 8px auto 0;
}
.cta-stack .cta { max-width: none; width: 100%; }

/* Outlined Telepon CTA — dark text + border, used alongside the
   green WhatsApp .cta for the dual-CTA hero. */
.cta--outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  box-shadow: none;
}
.cta--outline:active { background: var(--bg); }

/* ----- Section bands -----
   Sections sit on the body's gray bg; .band--light gives a subtle
   white-ish band for alternation when we want visual separation. */
.band { padding: 36px 0; }
.band--light { background: var(--surface); }
.band-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
}
.band-sub {
  font-size: 14px;
  color: var(--ink-muted);
  margin: 0 0 18px;
}

/* ----- Why us ----- */
.why-grid {
  display: grid; gap: 14px;
  grid-template-columns: 1fr;
  margin-top: 18px;
}
.why-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 16px;
}
.why-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}
.why-icon svg { width: 22px; height: 22px; }
.why-item h3 {
  font-size: 15px; font-weight: 800;
  margin: 0 0 4px;
  color: var(--ink);
}
.why-item p {
  margin: 0; font-size: 13.5px;
  color: var(--ink-soft); line-height: 1.5;
}

/* ----- Category block (landing product grid) ----- */
.cat-block { margin-top: 20px; }
.cat-block + .cat-block { margin-top: 28px; }
.cat-block__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.cat-block__head h3 {
  font-size: 16px; font-weight: 800;
  margin: 0;
  letter-spacing: -0.01em;
}
.cat-block__more {
  font-size: 13px; font-weight: 700;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}
.cat-block__more:hover { color: var(--ink-soft); }

/* ----- Steps (how it works) ----- */
.steps {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 12px;
}
.steps li {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 18px 18px 60px;
}
.step-num {
  position: absolute;
  left: 16px; top: 18px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px;
}
.steps h3 {
  margin: 0 0 4px;
  font-size: 15px; font-weight: 800;
  color: var(--ink);
}
.steps p {
  margin: 0; font-size: 13.5px; color: var(--ink-soft); line-height: 1.5;
}

/* ----- FAQ ----- */
.faq {
  display: grid; gap: 8px;
  margin-top: 16px;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 44px 14px 16px;
  position: relative;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  min-height: 48px;
  display: flex; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  position: absolute;
  right: 16px; top: 50%;
  width: 10px; height: 10px;
  border-right: 2px solid var(--ink-soft);
  border-bottom: 2px solid var(--ink-soft);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.18s ease;
}
.faq-item[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
}
.faq-item p {
  margin: 0;
  padding: 0 16px 16px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
}
.faq-item a { color: var(--ink); text-decoration: underline; }

/* Final CTA below FAQ */
.final-cta {
  margin-top: 24px;
  text-align: center;
}
.final-cta p {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--ink-soft);
}
.final-cta .cta { margin: 0 auto; }

/* ----- Sticky bottom CTA (mobile-first, always visible) ----- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 60;
  display: flex; gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,0.96);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
}
.sticky-cta__call,
.sticky-cta__wa {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px;
  font-weight: 700; font-size: 14.5px;
  border-radius: 12px;
  text-decoration: none;
}
.sticky-cta__call {
  flex: 0 0 auto;
  padding: 10px 16px;
  background: var(--steel-900);
  color: #fff;
}
.sticky-cta__call svg { width: 18px; height: 18px; }
.sticky-cta__call:active { background: var(--steel-700); }
.sticky-cta__wa {
  flex: 1;
  padding: 10px 14px;
  background: var(--wa);
  color: #fff;
}
.sticky-cta__wa svg { width: 18px; height: 18px; }
.sticky-cta__wa:active { background: var(--wa-dark); }

/* ----- Landing responsive ----- */
@media (min-width: 720px) {
  body[data-page="landing"] { padding-bottom: 0; }
  /* Dual hero CTAs go side-by-side on desktop */
  .cta-stack {
    grid-template-columns: 1fr 1fr;
    max-width: 600px;
  }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .band { padding: 56px 0; }
  /* Hide sticky CTA on desktop — header CTAs are enough */
  .sticky-cta { display: none; }
}
@media (min-width: 1000px) {
  body[data-page="landing"] .container { max-width: 960px; }
}

