/* ============================================
   STOKIN.ID - Main Stylesheet
   ============================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green: #1D9E75;
  --green-dark: #0F6E56;
  --green-light: #E1F5EE;
  --text: #1a1a1a;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --bg: #ffffff;
  --bg-secondary: #f9fafb;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
}

body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: var(--text); background: var(--bg); font-size: 15px; line-height: 1.6; }

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* NAV */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 32px; border-bottom: 1px solid var(--border);
  background: var(--bg); position: sticky; top: 0; z-index: 100;
}
.logo { font-size: 22px; font-weight: 700; color: var(--text); }
.logo span { color: var(--green); }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { font-size: 14px; color: var(--text-muted); transition: color .2s; }
.nav-links a:hover { color: var(--text); }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 20px; border-radius: var(--radius); font-size: 14px; font-weight: 500; cursor: pointer; border: none; transition: all .2s; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--bg-secondary); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-wa { background: #25D366; color: #fff; }
.btn-wa:hover { background: #1ebe5d; }

/* HERO */
.hero { padding: 72px 24px 60px; text-align: center; max-width: 680px; margin: 0 auto; }
.hero h1 { font-size: 40px; font-weight: 700; line-height: 1.2; margin-bottom: 16px; }
.hero h1 span { color: var(--green); }
.hero p { font-size: 17px; color: var(--text-muted); margin-bottom: 32px; }

.search-bar { display: flex; max-width: 540px; margin: 0 auto 48px; border: 1.5px solid var(--border); border-radius: 50px; overflow: hidden; background: var(--bg); box-shadow: var(--shadow); }
.search-bar input { flex: 1; border: none; padding: 14px 20px; font-size: 15px; outline: none; background: transparent; }
.search-bar select { border: none; border-left: 1px solid var(--border); padding: 0 14px; font-size: 14px; color: var(--text-muted); background: transparent; cursor: pointer; outline: none; }
.search-bar button { background: var(--green); color: #fff; border: none; padding: 14px 24px; font-size: 14px; font-weight: 600; cursor: pointer; }
.search-bar button:hover { background: var(--green-dark); }

/* STATS */
.stats { display: flex; justify-content: center; gap: 48px; margin-bottom: 0; }
.stat-num { font-size: 26px; font-weight: 700; color: var(--green); }
.stat-label { font-size: 13px; color: var(--text-muted); }

/* SECTION */
.section { padding: 48px 24px; }
.section-header { display: flex; align-items: center; justify-content: space-between; max-width: 1100px; margin: 0 auto 28px; }
.section-title { font-size: 22px; font-weight: 700; }
.section-subtitle { color: var(--text-muted); font-size: 14px; margin-top: 4px; }
.section-bg { background: var(--bg-secondary); }

/* CATEGORY PILLS */
.categories { display: flex; gap: 10px; flex-wrap: wrap; max-width: 1100px; margin: 0 auto 32px; }
.cat-pill { display: flex; align-items: center; gap: 6px; padding: 8px 16px; border: 1px solid var(--border); border-radius: 50px; font-size: 14px; cursor: pointer; transition: all .2s; background: var(--bg); }
.cat-pill:hover, .cat-pill.active { background: var(--green-light); border-color: var(--green); color: var(--green-dark); }

/* PRODUCT GRID */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; max-width: 1100px; margin: 0 auto; }
.product-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s, transform .2s; cursor: pointer; }
.product-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); transform: translateY(-2px); }
.product-img { height: 160px; background: var(--bg-secondary); display: flex; align-items: center; justify-content: center; font-size: 48px; border-bottom: 1px solid var(--border); }
.product-body { padding: 14px; }
.product-name { font-weight: 600; font-size: 14px; margin-bottom: 6px; line-height: 1.4; }
.product-supplier { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.product-price { font-size: 16px; font-weight: 700; color: var(--green); margin-bottom: 8px; }
.product-moq { font-size: 12px; color: var(--text-muted); }
.badge { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; padding: 2px 8px; border-radius: 20px; font-weight: 500; }
.badge-verified { background: #dcfce7; color: #166534; }
.badge-limited { background: #fef9c3; color: #854d0e; }
.badge-available { background: var(--green-light); color: var(--green-dark); }

/* SUPPLIER GRID */
.supplier-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; max-width: 1100px; margin: 0 auto; }
.supplier-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; cursor: pointer; transition: box-shadow .2s; }
.supplier-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.supplier-avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--green-light); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; color: var(--green-dark); margin-bottom: 12px; }
.supplier-name { font-weight: 600; font-size: 15px; }
.supplier-city { font-size: 13px; color: var(--text-muted); margin: 2px 0 8px; }
.stars { color: #f59e0b; font-size: 13px; }
.rating-num { font-size: 13px; color: var(--text-muted); margin-left: 4px; }

/* MODAL OVERLAY */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 200; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.open { display: flex; }
.modal { background: var(--bg); border-radius: 16px; width: 100%; max-width: 580px; max-height: 90vh; overflow-y: auto; padding: 28px; position: relative; }
.modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text-muted); line-height: 1; }
.modal-close:hover { color: var(--text); }
.modal h2 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.modal .subtitle { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; }

/* FORMS */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--text); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 14px; color: var(--text); background: var(--bg); outline: none; transition: border .2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--green); }
.form-group textarea { resize: vertical; min-height: 90px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-tabs { display: flex; gap: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; }
.form-tab { flex: 1; padding: 10px; font-size: 14px; font-weight: 500; border: none; background: var(--bg); cursor: pointer; text-align: center; transition: all .2s; }
.form-tab.active { background: var(--green); color: #fff; }
.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 14px; margin-top: 12px; display: none; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-error { background: #fee2e2; color: #991b1b; }

/* DETAIL PAGE */
.detail-grid { display: grid; grid-template-columns: 1fr 360px; gap: 32px; max-width: 1100px; margin: 0 auto; padding: 32px 24px; align-items: start; }
.detail-img { aspect-ratio: 1; background: var(--bg-secondary); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 80px; border: 1px solid var(--border); }
.detail-title { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.detail-price { font-size: 28px; font-weight: 700; color: var(--green); margin-bottom: 4px; }
.detail-desc { color: var(--text-muted); font-size: 14px; line-height: 1.7; margin: 16px 0; }
.info-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--text-muted); }
.info-val { font-weight: 500; }
.sticky-card { position: sticky; top: 80px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.sticky-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 16px; }

/* HERO CTA SECTION */
.cta-section { background: var(--green); color: #fff; padding: 60px 24px; text-align: center; }
.cta-section h2 { font-size: 28px; font-weight: 700; margin-bottom: 12px; }
.cta-section p { font-size: 16px; margin-bottom: 28px; opacity: .9; }
.cta-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-white { background: #fff; color: var(--green); font-weight: 600; }
.btn-white:hover { background: #f0fdf4; }
.btn-ghost { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.6); }
.btn-ghost:hover { background: rgba(255,255,255,.1); }

/* FOOTER */
.footer { background: #111; color: #9ca3af; padding: 40px 32px 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; max-width: 1100px; margin: 0 auto 32px; }
.footer-logo { font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 10px; }
.footer-logo span { color: var(--green); }
.footer p, .footer li { font-size: 14px; line-height: 1.8; }
.footer h4 { color: #fff; font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.footer ul { list-style: none; }
.footer a { color: #9ca3af; transition: color .2s; }
.footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #333; padding-top: 20px; text-align: center; font-size: 13px; max-width: 1100px; margin: 0 auto; }

/* LOADING */
.loading { text-align: center; padding: 40px; color: var(--text-muted); font-size: 15px; }
.spinner { display: inline-block; width: 28px; height: 28px; border: 3px solid var(--border); border-top-color: var(--green); border-radius: 50%; animation: spin .7s linear infinite; margin-bottom: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-icon { font-size: 48px; margin-bottom: 12px; }

/* BREADCRUMB */
.breadcrumb { padding: 14px 24px; font-size: 13px; color: var(--text-muted); max-width: 1100px; margin: 0 auto; }
.breadcrumb a { color: var(--green); }
.breadcrumb a:hover { text-decoration: underline; }

/* PAGE HEADER */
.page-header { background: var(--bg-secondary); border-bottom: 1px solid var(--border); padding: 28px 24px; }
.page-header h1 { font-size: 24px; font-weight: 700; max-width: 1100px; margin: 0 auto; }
.page-header p { color: var(--text-muted); font-size: 14px; max-width: 1100px; margin: 6px auto 0; }

/* TOAST */
.toast { position: fixed; bottom: 24px; right: 24px; background: #111; color: #fff; padding: 12px 20px; border-radius: var(--radius); font-size: 14px; z-index: 999; transform: translateY(80px); opacity: 0; transition: all .3s; pointer-events: none; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: var(--green); }
.toast.error { background: #dc2626; }

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav { padding: 12px 16px; }
  .nav-links { gap: 12px; }
  .hero h1 { font-size: 28px; }
  .stats { gap: 24px; }
  .detail-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .form-row { grid-template-columns: 1fr; }
  .section { padding: 32px 16px; }
}
