/* =====================================================
   style.css - Stylesheet Utama Katalog Pelanggan
   Teknologi Store Indonesia
   ===================================================== */

/* ─── CSS Variables ─────────────────────────────── */
:root {
  --blue:      #2878B5;
  --blue-dark: #1e5f96;
  --blue-light:#e8f2fb;
  --black:     #000000;
  --white:     #FFFFFF;
  --gray-50:   #F9FAFB;
  --gray-100:  #F3F4F6;
  --gray-200:  #E5E7EB;
  --gray-400:  #9CA3AF;
  --gray-500:  #6B7280;
  --gray-700:  #374151;
  --gray-900:  #111827;
  --green:     #16a34a;
  --green-bg:  #dcfce7;
  --orange:    #d97706;
  --orange-bg: #fef3c7;
  --red:       #dc2626;
  --red-bg:    #fee2e2;

  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 12px;
  --shadow:    0 1px 4px rgba(0,0,0,.08), 0 2px 8px rgba(0,0,0,.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,.12);
  --transition: 0.18s ease;
}

/* ─── Reset ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: -apple-system, "Segoe UI", system-ui, sans-serif;
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* ─── Typography ─────────────────────────────────── */
h1 { font-size: 2rem; font-weight: 700; color: var(--black); line-height: 1.25; }
h2 { font-size: 1.5rem; font-weight: 700; color: var(--black); }
h3 { font-size: 1.15rem; font-weight: 600; color: var(--black); }
h4 { font-size: 1rem; font-weight: 600; color: var(--gray-700); }
p  { color: var(--gray-700); }

/* ─── Layout ─────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.section    { padding: 3rem 0; }
.section-title { margin-bottom: 1.5rem; }

/* ─── Buttons ────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: .55rem 1.25rem; font-size: .9rem; font-weight: 600;
  border: 2px solid transparent; border-radius: var(--radius);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap; text-decoration: none; user-select: none;
}
.btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.btn-primary   { background: var(--blue); color: var(--white); border-color: var(--blue); }
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn-secondary { background: var(--gray-100); color: var(--gray-900); border-color: var(--gray-200); }
.btn-secondary:hover { background: var(--gray-200); }
.btn-outline   { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn-outline:hover { background: var(--blue-light); }
.btn-danger    { background: var(--red); color: var(--white); border-color: var(--red); }
.btn-danger:hover { background: #b91c1c; }
.btn-success   { background: var(--green); color: var(--white); border-color: var(--green); }
.btn-success:hover { background: #15803d; }
.btn-warning   { background: var(--orange); color: var(--white); border-color: var(--orange); }
.btn-sm   { padding: .35rem .75rem; font-size: .82rem; }
.btn-lg   { padding: .75rem 1.75rem; font-size: 1rem; }
.link-btn { background: none; border: none; color: var(--blue); cursor: pointer; font-size: inherit; text-decoration: underline; }

/* ─── Navigation ─────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.navbar-inner {
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 1rem; padding: .75rem 1rem;
  max-width: 1200px; margin: 0 auto;
}
.navbar-brand {
  display: flex; align-items: center; gap: .75rem;
  font-weight: 700; font-size: 1.1rem; color: var(--black);
}
.navbar-logo { height: 44px; width: auto; object-fit: contain; }
.navbar-logo-text {
  display: flex; flex-direction: column; line-height: 1.2;
}
.navbar-logo-text span:first-child { font-size: 1rem; font-weight: 700; color: var(--blue); }
.navbar-logo-text span:last-child  { font-size: .7rem; color: var(--gray-500); font-weight: 400; }
.nav-menu { display: flex; align-items: center; gap: .25rem; list-style: none; }
.nav-menu a {
  padding: .45rem .85rem; border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 500; color: var(--gray-700);
  transition: background var(--transition), color var(--transition);
}
.nav-menu a:hover { background: var(--blue-light); color: var(--blue); text-decoration: none; }
.nav-menu a.active { background: var(--blue-light); color: var(--blue); }
.hamburger {
  display: none; background: none; border: none;
  font-size: 1.4rem; padding: .25rem .5rem; color: var(--gray-700);
}
.hamburger:focus-visible { outline: 3px solid var(--blue); }

/* ─── Hero / Banner ──────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: var(--white);
  padding: 4.5rem 1rem;
  text-align: center;
}
.hero h1 { color: var(--white); font-size: 2.4rem; margin-bottom: .75rem; }
.hero p  { color: rgba(255,255,255,.88); font-size: 1.05rem; max-width: 620px; margin: 0 auto 1.75rem; }
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-cta .btn-primary { background: var(--white); color: var(--blue); border-color: var(--white); }
.hero-cta .btn-primary:hover { background: var(--gray-100); }
.hero-cta .btn-outline { color: var(--white); border-color: rgba(255,255,255,.8); }
.hero-cta .btn-outline:hover { background: rgba(255,255,255,.15); }
.hero-meta { font-size: .85rem; opacity: .8; margin-top: 1rem; }

/* ─── Filter Bar ──────────────────────────────────── */
#catalog-section { padding: 2.5rem 0; }
.catalog-controls {
  display: flex; flex-wrap: wrap; gap: .75rem;
  margin-bottom: 1.5rem; align-items: center;
}
.search-wrapper { position: relative; flex: 1; min-width: 200px; }
.search-wrapper input {
  width: 100%; padding: .55rem 1rem .55rem 2.4rem;
  border: 1.5px solid var(--gray-200); border-radius: var(--radius);
  font-size: .9rem; transition: border-color var(--transition);
}
.search-wrapper input:focus { outline: none; border-color: var(--blue); }
.search-icon {
  position: absolute; left: .75rem; top: 50%; transform: translateY(-50%);
  color: var(--gray-400); pointer-events: none;
}
.filter-group { display: flex; gap: .5rem; flex-wrap: wrap; }
.filter-group select {
  padding: .5rem .75rem; border: 1.5px solid var(--gray-200);
  border-radius: var(--radius); font-size: .85rem; background: var(--white);
  color: var(--gray-700); cursor: pointer;
}
.filter-group select:focus { outline: none; border-color: var(--blue); }

/* Tombol kategori */
.category-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.filter-chip {
  padding: .35rem .9rem; font-size: .82rem; border-radius: 20px;
  border: 1.5px solid var(--gray-200); background: var(--white);
  color: var(--gray-700); cursor: pointer; transition: all var(--transition);
}
.filter-chip:hover { border-color: var(--blue); color: var(--blue); }
.filter-chip.active { background: var(--blue); border-color: var(--blue); color: var(--white); }

.result-info {
  font-size: .85rem; color: var(--gray-500); margin-bottom: 1.25rem;
}

/* ─── Product Grid ───────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

/* ─── Product Card ───────────────────────────────── */
.product-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition);
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.product-card:focus-visible { outline: 3px solid var(--blue); }

.product-card-img-wrapper {
  position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--gray-100);
}
.product-card-img {
  width: 100%; height: 100%; object-fit: contain;
  transition: transform .3s ease;
}
.product-card:hover .product-card-img { transform: scale(1.03); }

/* Badges di atas gambar */
.badge-condition {
  position: absolute; top: .6rem; left: .6rem;
  padding: .2rem .55rem; font-size: .72rem; font-weight: 600;
  border-radius: 20px;
}
.badge-new  { background: #dcfce7; color: #15803d; }
.badge-used { background: #fef9c3; color: #92400e; }
.badge-out-of-stock {
  position: absolute; top: .6rem; right: .6rem;
  padding: .2rem .55rem; font-size: .72rem; font-weight: 600;
  background: var(--red-bg); color: var(--red); border-radius: 20px;
}

.product-card-body {
  padding: 1rem; flex: 1; display: flex; flex-direction: column; gap: .35rem;
}
.product-card-category {
  font-size: .75rem; color: var(--blue); font-weight: 600; text-transform: uppercase; letter-spacing: .03em;
}
.product-card-name {
  font-size: .95rem; font-weight: 600; color: var(--black); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-card-specs { margin-top: .25rem; }
.product-card-specs li { font-size: .78rem; color: var(--gray-500); line-height: 1.5; }
.spec-label { font-weight: 500; color: var(--gray-700); }

.product-card-price {
  font-size: 1.1rem; font-weight: 700; color: var(--blue); margin-top: auto; padding-top: .5rem;
}

/* Status stok */
.stock-available { font-size: .78rem; color: var(--green); font-weight: 600; }
.stock-low       { font-size: .78rem; color: var(--orange); font-weight: 600; }
.stock-empty     { font-size: .78rem; color: var(--red); font-weight: 600; }

.product-card-footer {
  padding: .75rem 1rem;
  border-top: 1px solid var(--gray-100);
  display: flex; gap: .5rem; flex-wrap: wrap;
}
.product-card-footer .btn { flex: 1; justify-content: center; }

/* ─── Product Modal ──────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.modal-box {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 1.75rem; width: 100%; max-height: 90vh; overflow-y: auto;
  position: relative;
}
.modal-close-btn {
  position: absolute; top: 1rem; right: 1rem;
  background: var(--gray-100); border: none; border-radius: 50%;
  width: 32px; height: 32px; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-700);
  transition: background var(--transition);
}
.modal-close-btn:hover { background: var(--gray-200); }

.product-modal-box { max-width: 900px; }
.product-modal-overlay { padding: 1rem; }

.product-modal-layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;
}
.product-modal-gallery { position: sticky; top: 0; }
.product-modal-main-img {
  width: 100%; aspect-ratio: 4/3; object-fit: contain;
  border-radius: var(--radius); background: var(--gray-100); margin-bottom: .75rem;
}
.product-modal-thumbs {
  display: flex; gap: .5rem; flex-wrap: wrap;
}
.product-modal-thumb {
  width: 64px; height: 64px; object-fit: cover;
  border-radius: var(--radius-sm); border: 2px solid var(--gray-200);
  cursor: pointer; transition: border-color var(--transition);
}
.product-modal-thumb:hover, .product-modal-thumb.active { border-color: var(--blue); }

.product-modal-info { display: flex; flex-direction: column; gap: 1rem; }
.product-modal-meta { display: flex; flex-wrap: wrap; gap: .5rem; }
.meta-tag {
  padding: .2rem .55rem; font-size: .78rem;
  background: var(--gray-100); border-radius: 20px; color: var(--gray-700);
}
.product-modal-price { font-size: 1.6rem; font-weight: 700; color: var(--blue); }
.product-modal-stock { font-size: .88rem; font-weight: 600; }
.product-modal-desc { font-size: .9rem; color: var(--gray-700); line-height: 1.65; }

.spec-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.spec-table td { padding: .4rem .5rem; border-bottom: 1px solid var(--gray-100); vertical-align: top; }
.spec-key { font-weight: 600; color: var(--gray-700); width: 40%; }

.product-modal-warranty {
  font-size: .85rem; color: var(--green);
  background: var(--green-bg); padding: .6rem .9rem;
  border-radius: var(--radius-sm);
}

.product-modal-order {
  display: flex; gap: .75rem; align-items: center; flex-wrap: wrap;
  padding-top: .75rem; border-top: 1px solid var(--gray-200);
}
.product-modal-order label { font-weight: 500; }
.qty-input { width: 80px; padding: .45rem; border: 1.5px solid var(--gray-200); border-radius: var(--radius); text-align: center; }

/* ─── Toast ──────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  z-index: 999; display: flex; flex-direction: column; gap: .5rem;
  max-width: 340px;
}
.toast {
  display: flex; align-items: center; gap: .75rem;
  padding: .8rem 1rem; border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  font-size: .88rem; font-weight: 500;
  opacity: 0; transform: translateX(16px);
  transition: opacity .22s ease, transform .22s ease;
}
.toast-visible { opacity: 1; transform: translateX(0); }
.toast-success { background: #dcfce7; color: #166534; border-left: 4px solid var(--green); }
.toast-error   { background: var(--red-bg); color: #991b1b; border-left: 4px solid var(--red); }
.toast-warning { background: var(--orange-bg); color: #92400e; border-left: 4px solid var(--orange); }
.toast-info    { background: var(--blue-light); color: #1e5f96; border-left: 4px solid var(--blue); }
.toast-icon    { font-size: 1rem; flex-shrink: 0; }

/* ─── Modal Konfirmasi ───────────────────────────── */
.modal-box h3 { margin-bottom: .75rem; }
.modal-box p  { color: var(--gray-700); margin-bottom: 1.25rem; white-space: pre-wrap; }
.modal-buttons { display: flex; gap: .75rem; justify-content: flex-end; }

/* ─── Empty & Error State ───────────────────────── */
.empty-state {
  text-align: center; padding: 4rem 2rem;
  color: var(--gray-500);
}
.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h3 { color: var(--gray-700); margin-bottom: .5rem; }
.empty-state p { max-width: 400px; margin: 0 auto 1.25rem; }
.error-state {
  padding: 2rem; text-align: center; color: var(--red);
  background: var(--red-bg); border-radius: var(--radius); margin: 1rem 0;
}

/* ─── About Section ──────────────────────────────── */
.about-section {
  background: var(--gray-50); border-top: 1px solid var(--gray-200);
}
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.about-text h2 { margin-bottom: 1rem; }
.about-text p { color: var(--gray-700); line-height: 1.75; }
.contact-list { display: flex; flex-direction: column; gap: .75rem; margin-top: 1rem; }
.contact-item { display: flex; align-items: center; gap: .75rem; font-size: .9rem; }
.contact-icon { flex-shrink: 0; font-size: 1.1rem; line-height: 1; }

/* ─── Contact CTA ────────────────────────────────── */
.contact-section { text-align: center; padding: 3rem 1rem; }
.contact-section h2 { margin-bottom: .75rem; }
.contact-section p { margin-bottom: 1.5rem; }
.contact-section .btn { gap: .5rem; }

/* ─── Footer ─────────────────────────────────────── */
.footer {
  background: var(--black); color: var(--gray-400);
  padding: 2.5rem 1rem;
  border-top: 1px solid #222;
  font-size: .85rem;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 1.5rem;
  justify-content: space-between; align-items: flex-start;
}
.footer-brand { color: var(--white); font-weight: 700; font-size: 1rem; margin-bottom: .35rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; }
.footer-links a { color: var(--gray-400); font-size: .85rem; }
.footer-links a:hover { color: var(--white); }
.footer-copy { color: var(--gray-500); margin-top: 1.5rem; font-size: .8rem; text-align: center; }

/* ─── Responsive ─────────────────────────────────── */
@media (max-width: 768px) {
  h1 { font-size: 1.6rem; }
  .hero { padding: 3rem 1rem; }
  .hero h1 { font-size: 1.75rem; }

  .hamburger { display: flex; align-items: center; }
  .nav-menu {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white); border-top: 1px solid var(--gray-200);
    flex-direction: column; padding: 1rem;
    box-shadow: var(--shadow-md);
  }
  .nav-menu.nav-open { display: flex; }
  .navbar { position: relative; }

  .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .75rem; }
  .product-card-img-wrapper { aspect-ratio: 1; }

  .product-modal-layout { grid-template-columns: 1fr; }
  .product-modal-box { padding: 1.25rem; }

  .about-grid { grid-template-columns: 1fr; }

  #toast-container { left: 1rem; right: 1rem; max-width: none; }
}

@media (max-width: 480px) {
  .catalog-controls { flex-direction: column; }
  .search-wrapper { width: 100%; }
  .filter-group { width: 100%; }
  .filter-group select { flex: 1; }
  .product-modal-order { flex-direction: column; align-items: stretch; }
  .btn-lg { width: 100%; justify-content: center; }
}

/* ═══════════════════════════════════════════════════
   CHATBOT WIDGET
   ═══════════════════════════════════════════════════ */

/* ── FAB (tombol mengambang) ── */
/* ── FAB wrapper (menampung tombol + popup) ── */
.chatbot-fab-wrapper {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .6rem;
}

/* ── Popup note ajakan ── */
.chatbot-popup {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  border-bottom-right-radius: 4px;
  box-shadow: var(--shadow-md);
  padding: .65rem .9rem;
  max-width: 220px;
  font-size: .82rem;
  line-height: 1.5;
  color: var(--gray-900);
  position: relative;
  /* Animasi muncul */
  animation: popup-in .4s cubic-bezier(.34,1.4,.64,1) forwards;
  transform-origin: bottom right;
}
.chatbot-popup strong { color: var(--blue); }
/* Ekor segitiga kanan bawah */
.chatbot-popup::after {
  content: '';
  position: absolute;
  bottom: -7px;
  right: 18px;
  border-left: 7px solid transparent;
  border-right: 0px solid transparent;
  border-top: 7px solid var(--white);
  filter: drop-shadow(0 1px 0 var(--gray-200));
}
/* Tombol dismiss (×) di dalam popup */
.chatbot-popup-dismiss {
  position: absolute;
  top: 4px;
  right: 6px;
  background: none;
  border: none;
  font-size: .75rem;
  color: var(--gray-400);
  cursor: pointer;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 50%;
  transition: color var(--transition);
}
.chatbot-popup-dismiss:hover { color: var(--gray-700); }
@keyframes popup-in {
  from { opacity: 0; transform: scale(.7); }
  to   { opacity: 1; transform: scale(1);  }
}
.chatbot-popup-hide {
  animation: popup-out .2s ease forwards;
}
@keyframes popup-out {
  to { opacity: 0; transform: scale(.8); }
}

/* ── FAB (tombol bulat) ── */
.chatbot-fab {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--white);
  border: 2.5px solid var(--blue);
  box-shadow: 0 4px 16px rgba(40,120,181,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .15s ease, box-shadow var(--transition);
  overflow: hidden;
  padding: 0;
  flex-shrink: 0;
}
.chatbot-fab:hover  { transform: scale(1.08); box-shadow: 0 6px 22px rgba(40,120,181,.5); }
.chatbot-fab:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.chatbot-fab-avatar {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.chatbot-fab-close-icon {
  font-size: 1.3rem;
  color: var(--blue);
  pointer-events: none;
  display: none;
}

/* Avatar kecil di header panel */
.chatbot-avatar-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

/* ── Panel ── */
.chatbot-panel {
  position: fixed;
  bottom: 6rem;
  right: 1.75rem;
  z-index: 300;
  width: 360px;
  max-width: calc(100vw - 2rem);
  height: 520px;
  max-height: calc(100vh - 8rem);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Header ── */
.chatbot-header {
  background: var(--blue);
  color: var(--white);
  padding: .85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-shrink: 0;
}
.chatbot-header-info { display: flex; align-items: center; gap: .65rem; }
.chatbot-avatar { font-size: 1.5rem; line-height: 1; }
.chatbot-title  { font-weight: 700; font-size: .95rem; line-height: 1.2; }
.chatbot-subtitle { font-size: .72rem; opacity: .85; }
.chatbot-close-btn {
  background: rgba(255,255,255,.15);
  border: none;
  color: var(--white);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: .85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition);
}
.chatbot-close-btn:hover { background: rgba(255,255,255,.3); }
.chatbot-close-btn:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }

/* ── Pesan ── */
.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: .85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  scroll-behavior: smooth;
}
.chatbot-messages::-webkit-scrollbar { width: 4px; }
.chatbot-messages::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 4px; }

.chatbot-msg { display: flex; }
.chatbot-msg-bot  { justify-content: flex-start; }
.chatbot-msg-user { justify-content: flex-end; }

.chatbot-bubble {
  max-width: 86%;
  padding: .6rem .85rem;
  border-radius: var(--radius-lg);
  font-size: .85rem;
  line-height: 1.6;
  word-break: break-word;
}
.chatbot-msg-bot  .chatbot-bubble {
  background: var(--gray-100);
  color: var(--gray-900);
  border-bottom-left-radius: var(--radius-sm);
}
.chatbot-msg-user .chatbot-bubble {
  background: var(--blue);
  color: var(--white);
  border-bottom-right-radius: var(--radius-sm);
}
.chatbot-bubble strong { font-weight: 700; }
.chatbot-hr {
  border: none;
  border-top: 1px solid var(--gray-200);
  margin: .4rem 0;
}

/* ── Indikator loading (tiga titik animasi) ── */
.chatbot-loading {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: .65rem .85rem;
}
.chatbot-loading span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gray-400);
  animation: chatbot-bounce .9s infinite ease-in-out;
}
.chatbot-loading span:nth-child(2) { animation-delay: .15s; }
.chatbot-loading span:nth-child(3) { animation-delay: .30s; }
@keyframes chatbot-bounce {
  0%, 80%, 100% { transform: scale(.65); opacity: .5; }
  40%           { transform: scale(1);   opacity: 1;  }
}

/* ── Saran pertanyaan ── */
.chatbot-suggestions {
  padding: .5rem .75rem;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  border-top: 1px solid var(--gray-100);
  flex-shrink: 0;
}
.chatbot-suggestion-chip {
  padding: .3rem .7rem;
  font-size: .75rem;
  border: 1.5px solid var(--gray-200);
  border-radius: 20px;
  background: var(--white);
  color: var(--blue);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.chatbot-suggestion-chip:hover {
  background: var(--blue-light);
  border-color: var(--blue);
}

/* ── Input row ── */
.chatbot-input-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem .75rem;
  border-top: 1px solid var(--gray-200);
  flex-shrink: 0;
  background: var(--white);
}
.chatbot-input {
  flex: 1;
  padding: .5rem .75rem;
  border: 1.5px solid var(--gray-200);
  border-radius: 20px;
  font-size: .875rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
  background: var(--gray-50);
}
.chatbot-input:focus { border-color: var(--blue); background: var(--white); }
.chatbot-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition);
}
.chatbot-send-btn:hover { background: var(--blue-dark); }
.chatbot-send-btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* ── Responsive mobile ── */
@media (max-width: 480px) {
  .chatbot-fab-wrapper { bottom: 1.25rem; right: 1.25rem; }
  .chatbot-popup { max-width: 180px; font-size: .78rem; }
  .chatbot-panel {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    max-height: 85vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
}

