/* =========================================================
   Modul Elektronik Custom — Gallery Theme
   Palet: Silver / Graphite ala Apple
   ========================================================= */

:root {
  --bg: #f2f2f0;
  --bg-elevated: #ffffff;
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --border: #d7d7d4;
  --silver-1: #eeeeec;
  --silver-2: #e1e1de;
  --silver-3: #c2c2be;
  --silver-4: #86868b;
  --graphite: #2c2c2e;
  --graphite-deep: #1d1d1f;
  --wa-green: #25d366;
  --wa-green-dark: #1eae53;
  /* Brass — the one signature accent, used sparingly (active states, corner marks) */
  --brass: #a9822f;
  --brass-soft: #cbaa63;
  --radius-lg: 4px;
  --radius-md: 3px;
  --radius-sm: 2px;
  --shadow-card: none;
  --shadow-card-hover: 0 12px 28px rgba(0,0,0,0.10);
  --max-width: 1240px;
  font-size: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(29,29,31,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29,29,31,0.04) 1px, transparent 1px);
  background-size: 34px 34px;
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Metallic signature divider ---------- */
.metal-divider {
  height: 3px;
  border: none;
  background: linear-gradient(90deg,
    #d8d8dc 0%, #ffffff 18%, #b7b7bc 38%, #ffffff 55%,
    #c9c9ce 72%, #ffffff 88%, #d8d8dc 100%);
  background-size: 200% 100%;
  border-radius: 3px;
  opacity: 0.9;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.brand-mark {
  position: relative;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  background: linear-gradient(155deg, var(--graphite), var(--graphite-deep));
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}
.brand-mark::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 6px; height: 6px;
  background: var(--brass);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.brand-logo {
  height: 46px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--wa-green);
  color: #fff;
  padding: 9px 18px;
  border-radius: 980px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background .2s ease, transform .2s ease;
}
.header-cta:hover { background: var(--wa-green-dark); transform: translateY(-1px); }

.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  transition: color .2s ease;
}
.header-phone svg { width: 20px; height: 20px; flex-shrink: 0; }
.header-phone:hover { color: var(--wa-green-dark); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  padding: 72px 0 48px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
  background: linear-gradient(135deg, #1d1d1f 0%, #4a4a4d 45%, #86868b 75%, #1d1d1f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto;
}

.hero .metal-divider {
  width: 120px;
  margin: 28px auto 0;
}

/* ---------- Category filter (document-index tabs) ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid var(--border);
}

.filter-pill {
  padding: 11px 16px;
  border-radius: 0;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color .2s ease, border-color .2s ease;
  cursor: pointer;
}

.filter-pill:hover {
  color: var(--text-primary);
}

.filter-pill.active {
  background: none;
  color: var(--text-primary);
  border-bottom-color: var(--graphite-deep);
}

/* ---------- Product grid ---------- */
.section { padding: 24px 0 56px; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
  margin-top: 16px;
}

.product-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  border-color: var(--graphite-deep);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

/* Nameplate strip — reads like a part label on the enclosure, not a floating badge */
.product-card__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--graphite-deep);
  color: #fff;
  padding: 8px 12px;
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
}

.product-card__label .code {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.product-card__label .cat {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--silver-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-card__image {
  aspect-ratio: 4 / 3;
  background: var(--silver-1);
  overflow: hidden;
  position: relative;
}

/* Corner registration marks — a quiet drafting/blueprint reference, brass on hover */
.product-card__image::before,
.product-card__image::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1.5px solid rgba(29,29,31,0.16);
  transition: border-color .2s ease;
  pointer-events: none;
  z-index: 1;
}
.product-card__image::before { top: 8px; left: 8px; border-right: none; border-bottom: none; }
.product-card__image::after { bottom: 8px; right: 8px; border-left: none; border-top: none; }
.product-card:hover .product-card__image::before,
.product-card:hover .product-card__image::after { border-color: var(--brass); }

.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.product-card:hover .product-card__image img { transform: scale(1.04); }

.product-card__body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.product-card__body h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}

.product-card__body p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  flex: 1;
}

.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.view-detail {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color .2s ease;
}
.product-card:hover .view-detail { color: var(--text-primary); }

.product-price {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.product-price.hubungi { color: var(--text-secondary); font-weight: 500; }

.card-arrow {
  width: 26px; height: 26px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.product-card:hover .card-arrow { background: var(--graphite-deep); border-color: var(--graphite-deep); color: #fff; }

.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-secondary);
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 20px 0 0;
}
.breadcrumb a:hover { color: var(--text-primary); }

/* ---------- Product detail ---------- */
.detail-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  padding: 32px 0 24px;
  align-items: start;
}

@media (max-width: 860px) {
  .detail-grid { grid-template-columns: 1fr; gap: 32px; }
}

.gallery-main {
  background: linear-gradient(160deg, var(--silver-1), var(--silver-2));
  border-radius: var(--radius-lg);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.gallery-main img { width: 100%; height: 100%; object-fit: contain; padding: 16px; }

.gallery-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.gallery-thumbs img {
  width: 68px; height: 68px;
  border-radius: var(--radius-sm);
  object-fit: contain;
  padding: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  background: var(--silver-1);
}
.gallery-thumbs img.active { border-color: var(--graphite-deep); }

.detail-info .eyebrow {
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  background: var(--silver-1);
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.detail-info h1 {
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}

.detail-info .short-desc {
  color: var(--text-secondary);
  font-size: 16px;
  margin: 0 0 20px;
}

.price-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.price-box .amount {
  font-size: 22px;
  font-weight: 700;
}
.price-box .amount-note {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  display: block;
  margin-top: 2px;
}

.btn-wa {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--wa-green);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  padding: 13px 22px;
  border-radius: 980px;
  transition: background .2s ease, transform .2s ease;
  white-space: nowrap;
}
.btn-wa:hover { background: var(--wa-green-dark); transform: translateY(-1px); }
.btn-wa svg { width: 18px; height: 18px; }

.tab-nav {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-top: 8px;
}
.tab-btn {
  padding: 12px 4px;
  margin-right: 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  background: none;
  border-top: none; border-left: none; border-right: none;
}
.tab-btn.active { color: var(--text-primary); border-bottom-color: var(--graphite-deep); }

.tab-panel { display: none; padding: 22px 0 8px; }
.tab-panel.active { display: block; }

.tab-panel p { color: var(--text-primary); line-height: 1.7; }

.spec-table { width: 100%; border-collapse: collapse; }
.spec-table tr { border-bottom: 1px solid var(--border); }
.spec-table tr:last-child { border-bottom: none; }
.spec-table td { padding: 12px 0; font-size: 14px; vertical-align: top; }
.spec-table td:first-child {
  color: var(--text-secondary);
  width: 40%;
  font-weight: 500;
}

.app-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.app-list li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 15px;
  padding: 10px 14px;
  background: var(--silver-1);
  border-radius: var(--radius-sm);
}
.app-list li::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--graphite-deep);
  margin-top: 7px;
  flex-shrink: 0;
}

/* ---------- Related products ---------- */
.related h2 { font-size: 20px; margin-bottom: 4px; }

/* ---------- Sticky mobile WA bar ---------- */
.mobile-wa-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 90;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  padding: 12px 16px;
}
.mobile-wa-bar .btn-wa { width: 100%; justify-content: center; }

@media (max-width: 720px) {
  .mobile-wa-bar { display: block; }
  body { padding-bottom: 78px; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--graphite-deep);
  color: #a1a1a6;
  padding: 48px 0 32px;
  margin-top: 40px;
}
.site-footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.site-footer .foot-top {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
}
.site-footer .foot-brand { color: #f5f5f7; font-weight: 600; font-size: 16px; }
.site-footer a.foot-wa { color: #f5f5f7; }
.site-footer a.foot-wa:hover { color: var(--wa-green); }
.site-footer .foot-bottom {
  font-size: 12px;
  color: #6e6e73;
  border-top: 1px solid #3a3a3c;
  padding-top: 16px;
}

/* ---------- Misc ---------- */
.section-title {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
}
.section-sub {
  text-align: center;
  color: var(--text-secondary);
  margin-top: 6px;
}