/* ==========================================================================
   TURBOMEISTER — Mobile Responsive Overrides
   Breakpoints: 960px (tablet), 768px (large mobile), 480px (small mobile)
   ========================================================================== */

/* ── Navbar ─────────────────────────────────────────────────────────────── */

/* Fix burger icon: navbar bg is white, spans must be dark */
.nav-burger span {
  background: #0a0a0a !important;
}

@media (max-width: 960px) {
  :root { --nav-height: 54px; }

  .navbar {
    height: 54px !important;
  }

  .navbar .container {
    padding: 0 14px;
  }

  /* Logo: override large inline styles */
  .nav-logo img {
    width: auto !important;
    height: 74px !important;
    margin: 0 !important;
  }

  .nav-burger {
    margin-left: auto;
    padding: 6px;
  }

  .nav-burger span {
    width: 20px !important;
  }
}



/* ── Hero ─────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero {
    min-height: 88vh;
    background-position: center center;
  }

  .hero-content {
    padding: var(--sp-xl) 0 var(--sp-lg);
  }

  .hero-grid {
    padding-left: 20px;
    padding-right: 20px;
    grid-template-columns: 1fr !important;
  }

  .hero-eyebrow {
    font-size: 0.58rem;
    letter-spacing: 0.14em;
    margin-bottom: 12px;
  }

  .hero-headline {
    font-size: clamp(2.4rem, 10vw, 3.2rem) !important;
    line-height: 1.02 !important;
    margin-bottom: 16px;
  }

  .hero-sub {
    font-size: 0.9rem;
    line-height: 1.65;
    margin-bottom: 20px;
    max-width: 100%;
  }

  /* Garansi badge row: allow wrap */
  .hero-content .reveal > div[style*="inline-flex"] {
    flex-wrap: wrap !important;
    padding: 8px 14px !important;
    gap: 6px !important;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 4px;
  }

  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .hero-badges {
    gap: 6px;
    margin-top: 16px;
  }

  .hero-badge {
    font-size: 0.58rem;
    padding: 5px 9px;
  }
}

/* ── Tech Strip ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .tech-strip {
    padding: 12px 0;
  }

  .tech-strip-inner {
    flex-direction: column;
    gap: 0;
  }

  .tech-item {
    width: 100%;
    border-right: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 12px 20px;
    gap: 14px;
  }

  .tech-item:last-child {
    border-bottom: none;
  }

  .tech-text strong {
    font-size: 0.9rem;
  }

  .tech-text em {
    font-size: 0.6rem;
  }
}

/* ── Stats Strip ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .stats-strip .container {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .stat-item {
    padding: 20px 12px;
  }

  .stat-number {
    font-size: clamp(1.8rem, 7vw, 2.4rem) !important;
  }

  .stat-label {
    font-size: 0.58rem;
    letter-spacing: 0.1em;
  }
}

/* ── Section Headings & Spacing ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .section {
    padding: var(--sp-xl) 0;
  }

  .section-header {
    margin-bottom: var(--sp-lg);
  }

  .section-title {
    font-size: clamp(1.75rem, 7vw, 2.5rem) !important;
  }

  .section-sub {
    font-size: 0.88rem;
    line-height: 1.65;
  }

  .eyebrow {
    font-size: 0.6rem;
  }
}

/* ── Cutaway / Hotspot Section ───────────────────────────────────────────── */
@media (max-width: 900px) {
  /* Override inline grid style */
  section > .container > div[style*="grid-template-columns:1fr 380px"],
  section > .container > div[style*="grid-template-columns: 1fr 380px"] {
    display: block !important;
  }

  section > .container > div[style*="grid-template-columns:1fr 380px"] > div:last-child,
  section > .container > div[style*="grid-template-columns: 1fr 380px"] > div:last-child {
    position: static !important;
    top: auto !important;
    margin-top: 24px;
  }

  /* Hotspot tabs wrap */
  #hp-tabs {
    gap: 6px !important;
  }

  /* Panel font sizes */
  #hp-panel > div:nth-child(2) {
    font-size: 1.4rem !important;
  }
}

/* ── Comparison Table ────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .comparison-section .reveal {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .comparison-table {
    min-width: 480px;
    font-size: 0.8rem;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 10px 10px;
    font-size: 0.78rem;
  }
}

/* ── Beli Produk (gallery) ─────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Show logo only, hide text */
  .g-buy-btn {
    font-size: 0 !important;
    padding: 10px 8px !important;
    gap: 0 !important;
    justify-content: center;
    border-radius: 8px !important;
  }

  .g-buy-btn img {
    height: 18px !important;
    width: auto;
    flex-shrink: 0;
  }

  .g-label-title {
    font-size: 0.75rem !important;
  }

  .g-label-sub {
    font-size: 0.55rem !important;
  }
}


  .preview-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  .card-model-name {
    font-size: 1.4rem;
  }

  .spec-value {
    font-size: 0.9rem;
  }

  /* Fix Shopee/Tokopedia btn-row overflow in product cards */
  .card-actions .btn-row {
    grid-template-columns: 1fr 1fr !important;
    gap: 6px;
  }

  .card-actions .btn-row .btn {
    padding: 8px 6px !important;
    font-size: 0.58rem !important;
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }

  .card-actions .btn-row a[style*="inline-flex"] {
    padding: 7px 8px !important;
    font-size: 0.58rem !important;
    gap: 4px !important;
    min-width: 0;
    overflow: hidden;
  }

  .card-actions .btn-row a[style*="inline-flex"] img {
    height: 13px !important;
  }
}

/* ── Simulator ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sim-canvas-area {
    grid-template-columns: 1fr !important;
  }

  .sim-widget {
    gap: 16px !important;
  }

  #sim-tube-canvas,
  #sim-qh-canvas {
    height: 220px !important;
  }

  .sim-metrics {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .sim-metric-val {
    font-size: 1.6rem !important;
  }
}

/* ── Calculator ──────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .calc-inputs-grid {
    grid-template-columns: 1fr !important;
  }

  .calc-widget {
    border-radius: 12px !important;
  }

  .calc-btn-row {
    padding: 16px 16px !important;
  }

  #calc-submit {
    width: 100%;
    justify-content: center;
  }
}

/* ── Brochure Images ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Full-width brochure images already 100% — ensure no overflow */
  img[src*="brochure"] {
    width: 100%;
    max-width: 100%;
    object-fit: cover;
  }
}

/* ── CTA Section ─────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .cta-title {
    font-size: clamp(1.7rem, 7vw, 2.2rem) !important;
  }

  .cta-sub {
    font-size: 0.88rem;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .cta-buttons .btn {
    text-align: center;
    justify-content: center;
    width: 100%;
  }
}

/* ── Marketplace Section ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Override inline flex layout for marketplace */
  section[style*="background:#fff"] > div[style*="justify-content:space-between"] {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 20px !important;
    padding: 0 20px !important;
  }

  section[style*="background:#fff"] > div > div[style*="gap:16px"] {
    flex-direction: column !important;
    width: 100%;
  }

  section[style*="background:#fff"] > div > div[style*="gap:16px"] > a {
    width: 100% !important;
    justify-content: center !important;
    padding: 12px 20px !important;
  }

  section[style*="background:#fff"] {
    padding: 32px 0 !important;
  }
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  footer {
    padding: var(--sp-xl) 0 var(--sp-lg);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: var(--sp-lg);
  }

  .footer-brand-logo img {
    height: 80px !important;
  }

  .footer-desc {
    max-width: 100%;
    font-size: 0.82rem;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr !important;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-disclaimer {
    text-align: left !important;
    max-width: 100%;
  }
}

/* ── Page Hero (inner pages) ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .page-hero {
    padding-top: calc(var(--nav-height) + var(--sp-xl));
    padding-bottom: var(--sp-lg);
  }

  .page-hero-title {
    font-size: clamp(2.2rem, 8vw, 3rem) !important;
  }

  .page-hero-sub {
    font-size: 0.9rem;
  }
}

/* ── Utility: prevent horizontal overflow ─────────────────────────────────── */
@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  .container {
    padding: 0 16px !important;
  }
}
