/* ═══════════════════════════════════════════
   Belantara.net — P2P Preloved Marketplace CSS
   ═══════════════════════════════════════════ */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ── Belantara.net — Earthy Marketplace Palette ──
     Terracotta (hangat, bumi, "belantara"): aksi jual-beli, CTA
       → distinct from Shopee orange, more natural/preloved feel
     Forest Teal (kepercayaan, alam): verifikasi, link, secondary
       → trust signal for P2P transactions
     Warm cream: nuansa thrift shop cozy, organic feel
     Indonesian color psychology: warm earth = kepercayaan + kenyamanan ── */
  --coral: #c2703a; --coral-dark: #a35a2b; --coral-light: #faf0e6;
  --teal: #1a7a6d; --teal-dark: #14665b; --teal-light: #e0f5f0;
  --red: #dc2626; --red-light: #fee2e2;
  --yellow: #f59e0b;
  --cream: #fdf8f6; --cream-dark: #f5e6e0;
  --card-bg: #fefcf8; --card-border: rgba(194,112,58,0.06);
  --header-bg: rgba(254,252,248,0.95); --nav-bg: rgba(254,252,248,0.98);
  --gray-50: #fafaf9; --gray-100: #f5f5f4; --gray-200: #e7e5e4;
  --gray-300: #d6d3d1; --gray-400: #a8a29e; --gray-500: #78716c;
  --gray-600: #57534e; --gray-700: #44403c; --gray-800: #292524;
  --gray-900: #1c1917;
  --radius: 12px; --radius-sm: 8px; --radius-lg: 16px;
  --shadow: 0 2px 8px rgba(194,112,58,0.08);
  --shadow-lg: 0 4px 16px rgba(194,112,58,0.12);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --gray-50: #1c1917; --gray-100: #292524; --gray-200: #44403c;
    --gray-300: #57534e; --gray-400: #78716c; --gray-500: #a8a29e;
    --gray-600: #d6d3d1; --gray-700: #e7e5e4; --gray-800: #f5f5f4;
    --gray-900: #fafaf9;
    --cream: #1a140e; --cream-dark: #2b2015;
    --card-bg: #2a221a; --card-border: rgba(255,255,255,0.06);
    --header-bg: rgba(26,15,12,0.95); --nav-bg: rgba(26,15,12,0.98);
    --shadow: 0 2px 8px rgba(0,0,0,0.4);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.5);
    --coral-light: #2b2015; --teal-light: #1a2e2b;
  }
  body { background: #1a140e; color: #e7e5e4; }
  .hero { background: linear-gradient(135deg, #a35a2b, #c2703a); }
  .form-input, .filter-select { background: var(--card-bg); color: #e7e5e4; border-color: #4a3520; }
  .gallery-main { background: var(--card-bg); }
  .search-input { background: var(--card-bg); color: #e7e5e4; border-color: #4a3520; }
  .pill { background: #4a3520; color: #fde8e4; }
  .variant-pill { background: var(--card-bg); color: #e7e5e4; border-color: #4a3520; }
  .share-btn { background: var(--card-bg); color: #e7e5e4; border-color: #4a3520; }
  .specs-table tr:nth-child(even) { background: rgba(255,255,255,0.03); }
  .order-summary { background: var(--card-bg); }
  .checkout-item { border-bottom-color: #4a3520 !important; }
  a { color: #5eead4; }
  .offer-price-input { background: var(--card-bg); color: #e7e5e4; border-color: #4a3520; }
  .offer-sheet { background: var(--card-bg); }
}

html { font-family: var(--font); font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { background: var(--cream); color: var(--gray-800); line-height: 1.5; padding-top: 56px; padding-bottom: calc(64px + var(--safe-bottom)); -webkit-overflow-scrolling: touch; }
a { color: var(--teal); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ── Header ── */
.header { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: var(--header-bg); backdrop-filter: blur(10px); border-bottom: 1px solid var(--card-border); height: 56px; transition: transform 0.3s; }
.header-inner { max-width: 1200px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 12px; }
.logo { font-size: 1.25rem; font-weight: 800; color: var(--coral); white-space: nowrap; }
.search-form { display: flex; flex: 1; }
.search-input { flex: 1; padding: 8px 12px; border: 1px solid var(--gray-300); border-radius: var(--radius-sm) 0 0 var(--radius-sm); font-size: 0.875rem; outline: none; min-width: 0; }
.search-input:focus { border-color: var(--coral); }
.search-btn { padding: 8px 12px; background: var(--coral); color: #fff; border: none; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; cursor: pointer; display: flex; align-items: center; }
.search-bar { flex: 1; }

/* ── Bottom Nav ── */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 100; background: var(--nav-bg); backdrop-filter: blur(10px); border-top: 1px solid var(--card-border); display: flex; justify-content: space-around; padding: 4px 0 calc(4px + var(--safe-bottom)); align-items: flex-end; }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 12px; font-size: 0.625rem; color: var(--gray-500); text-decoration: none; min-width: 48px; min-height: 48px; justify-content: center; border: none; background: none; cursor: pointer; transition: color 0.2s; }
.nav-item.active { color: var(--coral); }
.nav-item svg { width: 22px; height: 22px; }

/* ── Sell FAB (center bottom nav) ── */
.nav-item.sell-fab { background: var(--coral); color: #fff !important; border-radius: 50%; width: 48px; height: 48px; margin-top: -16px; box-shadow: 0 2px 8px rgba(232,96,76,0.4); }
.nav-item.sell-fab svg { width: 24px; height: 24px; }

/* ── Hero ── */
.hero { background: linear-gradient(135deg, #a35a2b 0%, #c2703a 50%, #1a7a6d 100%); color: #fff; padding: 2rem 0; text-align: center; }
.hero-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.5rem; }
.hero-subtitle { font-size: 0.875rem; opacity: 0.9; margin-bottom: 1.25rem; max-width: 500px; margin-left: auto; margin-right: auto; }
.hero-search { display: flex; max-width: 500px; margin: 0 auto 1rem; }
.hero-search-input { flex: 1; padding: 12px 16px; border: none; border-radius: var(--radius) 0 0 var(--radius); font-size: 1rem; outline: none; }
.hero-search-btn { padding: 12px 20px; background: var(--teal); color: #fff; border: none; border-radius: 0 var(--radius) var(--radius) 0; font-weight: 600; font-size: 1rem; cursor: pointer; transition: background 0.2s; }
.hero-search-btn:hover { background: var(--teal-dark); }
.hero-tags { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.tag { background: rgba(255,255,255,0.2); color: #fff; padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; transition: background 0.2s; }
.tag:hover { background: rgba(255,255,255,0.3); }

/* ── Section ── */
.section { padding: 1.5rem 0; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.section-header h2 { font-size: 1.125rem; font-weight: 700; }
.see-all { font-size: 0.8125rem; color: var(--teal); font-weight: 500; }

/* ── Carousel (horizontal scroll-snap) ── */
.carousel { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding: 4px 0; scrollbar-width: none; }
.carousel::-webkit-scrollbar { display: none; }
.carousel > * { scroll-snap-align: start; flex-shrink: 0; }

/* ── Category Card ── */
.category-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 16px; background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 80px; text-align: center; transition: transform 0.2s; border: 1px solid var(--card-border); }
.category-card:active { transform: scale(0.95); }
.category-icon { font-size: 1.5rem; }
.category-name { font-size: 0.6875rem; color: var(--gray-700); font-weight: 500; white-space: nowrap; }

/* ── Product Grid ── */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
@media (min-width: 900px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1200px) { .product-grid { grid-template-columns: repeat(5, 1fr); } }

/* ── Product Card (base, kept for compatibility) ── */
.product-card { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; transition: transform 0.2s, box-shadow 0.2s; border: 1px solid var(--card-border); }
.product-card:active { transform: scale(0.98); }
.product-img { aspect-ratio: 1; overflow: hidden; background: var(--gray-100); }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-info { padding: 8px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.product-name { font-size: 0.75rem; font-weight: 500; color: var(--gray-800); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.product-brand { font-size: 0.6875rem; color: var(--gray-500); }
.product-price { font-size: 0.8125rem; font-weight: 700; color: var(--red); }
.product-price-range { font-size: 0.6875rem; color: var(--gray-500); }
.product-meta { display: flex; gap: 8px; font-size: 0.6875rem; color: var(--gray-500); flex-wrap: wrap; margin-top: auto; }
.rating { color: var(--yellow); }
.distance { color: var(--teal); font-weight: 500; }

/* ── Listing Card (P2P style - portrait photos, condition badges, time) ── */
.listing-card { position: relative; background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; transition: transform 0.2s, box-shadow 0.2s; border: 1px solid var(--card-border); }
.listing-card:active { transform: scale(0.98); }
.listing-card .time-badge { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,0.6); color: #fff; padding: 2px 6px; border-radius: 4px; font-size: 0.625rem; z-index: 2; }
.listing-card .condition-badge { position: absolute; top: 8px; left: 8px; z-index: 2; }
.listing-img { aspect-ratio: 4/5; overflow: hidden; background: var(--gray-100); }
.listing-img img { width: 100%; height: 100%; object-fit: cover; }
.listing-info { padding: 8px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.listing-name { font-size: 0.75rem; font-weight: 500; color: var(--gray-800); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.listing-price { font-size: 0.8125rem; font-weight: 700; color: var(--red); }
.listing-original-price { text-decoration: line-through; color: var(--gray-400); font-size: 0.6875rem; }
.listing-discount { color: var(--coral); font-size: 0.6875rem; font-weight: 600; }
.listing-location { font-size: 0.6875rem; color: var(--gray-500); }
.listing-engagement { display: flex; gap: 8px; font-size: 0.6875rem; color: var(--gray-400); }
.listing-seller { display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 4px; }
.listing-seller-avatar { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.listing-seller-name { font-size: 0.6875rem; color: var(--gray-500); }

/* ── Condition Badges ── */
.condition-badge { padding: 2px 8px; border-radius: 12px; font-size: 0.625rem; font-weight: 600; text-transform: uppercase; }
.condition-baru { background: #dcfce7; color: #166534; }
.condition-seperti-baru { background: #dbeafe; color: #1e40af; }
.condition-bagus { background: #fef3c7; color: #92400e; }
.condition-layak { background: #fed7aa; color: #9a3412; }
.condition-rusak { background: #fee2e2; color: #991b1b; }

/* ── Like Button ── */
.like-btn { background: none; border: none; cursor: pointer; font-size: 1.25rem; padding: 4px; transition: transform 0.2s; }
.like-btn:active { transform: scale(1.2); }
.like-btn.liked { color: var(--coral); }

/* ── Product Detail Page ── */
.product-detail { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 768px) { .product-detail { grid-template-columns: 1fr 1fr; } }

.gallery-main { aspect-ratio: 4/5; border-radius: var(--radius); overflow: hidden; background: var(--gray-100); }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; }
.thumb { width: 56px; height: 56px; border: 2px solid transparent; border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; background: none; padding: 0; flex-shrink: 0; }
.thumb.active { border-color: var(--coral); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }

.product-title { font-size: 1.25rem; font-weight: 700; line-height: 1.3; }
.product-meta-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.badge { padding: 2px 8px; border-radius: 12px; font-size: 0.6875rem; font-weight: 500; }
.badge.brand { background: var(--gray-100); color: var(--gray-700); }
.badge.rating { background: var(--teal-light); color: var(--teal-dark); }
.badge.sellers { background: var(--coral-light); color: var(--coral-dark); }
.badge.sold { background: var(--gray-100); color: var(--gray-600); }

.price-box { margin: 12px 0; }
.price-main { font-size: 1.5rem; font-weight: 800; color: var(--red); }
.price-range { font-size: 0.875rem; color: var(--gray-500); }

.variants-section { margin: 0.75rem 0; }
.variants-section h3 { font-size: 0.8125rem; color: var(--gray-500); margin-bottom: 6px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.variant-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.variant-pill { padding: 8px 16px; border: 2px solid var(--gray-300); border-radius: var(--radius-sm); background: var(--card-bg); cursor: pointer; font-size: 0.8125rem; transition: all 0.2s; font-weight: 500; position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 60px; }
.variant-pill:hover { border-color: var(--coral); }
.variant-pill.active { border-color: var(--coral); background: var(--coral-light); color: var(--coral-dark); box-shadow: 0 0 0 1px var(--coral); }
.variant-price { font-size: 0.625rem; color: var(--gray-500); font-weight: 400; }
.variant-pill.active .variant-price { color: var(--coral-dark); }

.buy-actions { display: flex; gap: 12px; margin: 1rem 0; }
.btn { padding: 10px 20px; border: none; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.875rem; cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--coral); color: #fff; }
.btn-primary:hover { background: var(--coral-dark); }
.btn-secondary { background: var(--teal); color: #fff; }
.btn-secondary:hover { background: var(--teal-dark); }
.btn-outline { background: transparent; border: 1px solid var(--coral); color: var(--coral); }
.btn-outline:hover { background: var(--coral-light); }
.btn-whatsapp { background: #25d366; color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 0.75rem; min-height: 36px; }
.btn-lg { padding: 14px 24px; font-size: 1rem; }
.btn-block { width: 100%; }

.share-row { display: flex; gap: 8px; }
.share-btn { display: flex; align-items: center; gap: 6px; padding: 8px 16px; border: 1px solid var(--gray-300); border-radius: var(--radius-sm); background: var(--card-bg); cursor: pointer; font-size: 0.8125rem; color: var(--gray-600); }
.link-btn { background: none; border: none; color: var(--teal); cursor: pointer; font-size: inherit; text-decoration: underline; padding: 0; }

/* ── Sticky CTA Bar (listing detail) ── */
.sticky-cta { position: fixed; bottom: 64px; left: 0; right: 0; background: var(--card-bg); border-top: 1px solid var(--card-border); padding: 8px 16px calc(8px + var(--safe-bottom)); display: flex; gap: 8px; z-index: 90; }
.sticky-cta .btn { flex: 1; }

/* ── Offer/Tawar Bottom Sheet ── */
.offer-sheet { position: fixed; bottom: 0; left: 0; right: 0; background: var(--card-bg); border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: 24px; box-shadow: 0 -4px 20px rgba(0,0,0,0.15); z-index: 200; transform: translateY(100%); transition: transform 0.3s ease; }
.offer-sheet.open { transform: translateY(0); }
.offer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 199; display: none; }
.offer-backdrop.open { display: block; }
.offer-sheet-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.offer-sheet-header h3 { font-size: 1.125rem; font-weight: 700; }
.offer-sheet-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--gray-500); padding: 4px 8px; }
.offer-current-price { text-align: center; font-size: 0.875rem; color: var(--gray-500); margin-bottom: 12px; }
.offer-current-price strong { color: var(--gray-800); font-size: 1rem; }
.offer-price-input { font-size: 1.5rem; font-weight: 700; text-align: center; border: 2px solid var(--gray-300); border-radius: var(--radius); padding: 12px; width: 100%; font-family: var(--font); }
.offer-price-input:focus { border-color: var(--coral); outline: none; box-shadow: 0 0 0 3px rgba(232,96,76,0.1); }
.offer-ai-note { text-align: center; font-size: 0.75rem; color: var(--gray-400); margin-top: 8px; }
.offer-submit-row { margin-top: 16px; }

/* ── Seller Listings ── */
.seller-list { display: flex; flex-direction: column; gap: 8px; }
.seller-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); position: relative; border: 1px solid var(--card-border); }
.seller-row.recommended { border: 2px solid var(--coral); }
.rec-badge { position: absolute; top: -8px; left: 12px; background: var(--coral); color: #fff; font-size: 0.625rem; padding: 2px 8px; border-radius: 8px; font-weight: 600; }
.seller-info { flex: 1; min-width: 0; }
.seller-name a { color: var(--gray-800); font-weight: 600; font-size: 0.875rem; }
.verified-badge { color: var(--teal); font-size: 0.75rem; margin-left: 4px; }
.seller-city { display: block; font-size: 0.75rem; color: var(--gray-500); }
.seller-rating { font-size: 0.75rem; color: var(--yellow); }
.seller-distance { font-size: 0.6875rem; color: var(--teal); font-weight: 500; display: block; }
.seller-price-col { text-align: right; min-width: 100px; }
.seller-price { display: block; font-size: 1rem; font-weight: 700; color: var(--red); }
.seller-stock, .seller-condition { display: block; font-size: 0.6875rem; color: var(--gray-500); }

/* ── Specs Table ── */
.specs-table { width: 100%; border-collapse: collapse; }
.specs-table tr:nth-child(even) { background: var(--gray-50); }
.specs-table td { padding: 8px 12px; font-size: 0.875rem; border-bottom: 1px solid var(--gray-200); }
.spec-key { font-weight: 600; color: var(--gray-600); width: 40%; }

/* ── Reviews ── */
.reviews-list { display: flex; flex-direction: column; gap: 12px; }
.review-card { padding: 12px; background: var(--card-bg); border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.review-header { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; font-size: 0.8125rem; }
.review-rating { color: var(--yellow); }
.review-header time { color: var(--gray-400); font-size: 0.75rem; margin-left: auto; }
.review-text { font-size: 0.875rem; color: var(--gray-700); }

/* ── Breadcrumb ── */
.breadcrumb { font-size: 0.75rem; color: var(--gray-500); padding: 12px 0; overflow-x: auto; white-space: nowrap; }
.breadcrumb a { color: var(--teal); }
.breadcrumb-sep { margin: 0 4px; }
.breadcrumb-current { color: var(--gray-700); font-weight: 500; }

/* ── Filters ── */
.filters-bar { display: flex; gap: 12px; margin-bottom: 1rem; overflow-x: auto; align-items: center; padding: 8px 0; }
.filter-group { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.filter-group label { font-size: 0.75rem; color: var(--gray-500); white-space: nowrap; }
.filter-select { padding: 6px 10px; border: 1px solid var(--gray-300); border-radius: var(--radius-sm); font-size: 0.8125rem; background: var(--card-bg); }
.filter-pills { display: flex; gap: 6px; overflow-x: auto; }
.pill { padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; background: var(--gray-100); color: var(--gray-600); border: none; cursor: pointer; white-space: nowrap; text-decoration: none; }
.pill.active { background: var(--coral); color: #fff; }

/* ── Pagination ── */
.pagination { display: flex; justify-content: center; align-items: center; gap: 12px; padding: 1.5rem 0; }
.page-btn { padding: 8px 16px; background: var(--teal); color: #fff; border-radius: var(--radius-sm); font-size: 0.875rem; }
.page-info { font-size: 0.8125rem; color: var(--gray-500); }

/* ── Value Props ── */
.props-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 768px) { .props-grid { grid-template-columns: repeat(4, 1fr); } }
.prop-card { background: var(--card-bg); border-radius: var(--radius); padding: 1.25rem; text-align: center; box-shadow: var(--shadow); border: 1px solid var(--card-border); }
.prop-icon { font-size: 2rem; margin-bottom: 8px; }
.prop-card h3 { font-size: 0.875rem; margin-bottom: 4px; }
.prop-card p { font-size: 0.75rem; color: var(--gray-500); }

/* ── User Profile ── */
.profile-header { text-align: center; padding: 24px 16px; }
.profile-avatar { width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 12px; object-fit: cover; }
.profile-name { font-size: 1.25rem; font-weight: 700; }
.profile-joined { font-size: 0.75rem; color: var(--gray-500); }
.profile-badges { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 8px 0; }
.profile-badge { padding: 2px 8px; border-radius: 12px; font-size: 0.625rem; font-weight: 600; }
.profile-badge.verified { background: #dbeafe; color: #1e40af; }
.profile-badge.trusted { background: #dcfce7; color: #166534; }
.profile-badge.fast-shipper { background: #fef3c7; color: #92400e; }
.profile-stats { display: flex; justify-content: center; gap: 24px; margin: 12px 0; }
.profile-stat { text-align: center; }
.profile-stat-val { display: block; font-size: 1.25rem; font-weight: 700; }
.profile-stat-label { font-size: 0.6875rem; color: var(--gray-500); }
.profile-bio { font-size: 0.875rem; color: var(--gray-600); text-align: center; max-width: 400px; margin: 8px auto; }
.profile-actions { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }

/* ── Offer Status Pills ── */
.offer-status { padding: 2px 8px; border-radius: 12px; font-size: 0.6875rem; font-weight: 600; }
.offer-pending { background: #fef3c7; color: #92400e; }
.offer-accepted { background: #dcfce7; color: #166534; }
.offer-declined { background: #fee2e2; color: #991b1b; }
.offer-countered { background: #dbeafe; color: #1e40af; }

/* ── Seller Page ── */
.seller-header-card { display: flex; gap: 16px; padding: 20px; background: var(--card-bg); border-radius: var(--radius-lg); box-shadow: var(--shadow); margin-bottom: 1.5rem; flex-wrap: wrap; }
.seller-avatar img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; }
.avatar-placeholder { width: 80px; height: 80px; border-radius: 50%; background: var(--coral); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 700; }
.seller-header-info { flex: 1; min-width: 200px; }
.seller-header-info h1 { font-size: 1.25rem; }
.seller-meta-row { display: flex; gap: 12px; flex-wrap: wrap; font-size: 0.8125rem; color: var(--gray-500); margin: 8px 0; }
.meta-item { display: flex; align-items: center; gap: 4px; }
.seller-desc { font-size: 0.875rem; color: var(--gray-600); margin-top: 8px; }
.seller-actions { display: flex; gap: 8px; align-items: flex-start; flex-shrink: 0; }

/* ── All Categories Page ── */
.all-categories { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.category-block { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.category-block-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.category-icon-lg { font-size: 2rem; }
.category-block h2 { font-size: 1rem; color: var(--gray-800); }
.subcategory-list { display: flex; flex-wrap: wrap; gap: 6px; }
.subcategory-link { font-size: 0.8125rem; color: var(--teal); padding: 4px 8px; background: var(--teal-light); border-radius: 6px; }

/* ── Forms ── */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.8125rem; font-weight: 500; margin-bottom: 4px; color: var(--gray-700); }
.form-input { width: 100%; padding: 10px 12px; border: 1px solid var(--gray-300); border-radius: var(--radius-sm); font-size: 0.9375rem; font-family: var(--font); }
.form-input:focus { outline: none; border-color: var(--coral); box-shadow: 0 0 0 3px rgba(194,112,58,0.1); }
.form-input.auto-filled { background: var(--teal-light); border-color: var(--teal); font-weight: 600; }
.form-input[readonly] { opacity: 0.8; cursor: not-allowed; }

/* ── Modal ── */
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-end; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.modal-content { position: relative; background: var(--card-bg); border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: 24px; width: 100%; max-width: 480px; max-height: 80vh; overflow-y: auto; }
@media (min-width: 640px) { .modal-content { border-radius: var(--radius-lg); margin-bottom: 10vh; } .modal { align-items: center; } }

/* ── Chat Widget ── */
.chat-widget { position: fixed; bottom: 72px; right: 16px; width: calc(100% - 32px); max-width: 380px; background: var(--card-bg); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); z-index: 150; display: flex; flex-direction: column; max-height: 60vh; }
.chat-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--gray-200); background: var(--coral); color: #fff; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.chat-close { background: none; border: none; color: #fff; font-size: 1.25rem; cursor: pointer; padding: 4px 8px; }
.chat-messages { flex: 1; padding: 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 200px; }
.chat-msg { padding: 8px 12px; border-radius: var(--radius-sm); font-size: 0.875rem; max-width: 85%; word-break: break-word; }
.chat-msg.ai { background: var(--gray-100); color: var(--gray-800); align-self: flex-start; }
.chat-msg.user { background: var(--coral); color: #fff; align-self: flex-end; }
.chat-input-form { display: flex; padding: 8px; gap: 8px; border-top: 1px solid var(--gray-200); }
.chat-input { flex: 1; padding: 8px 12px; border: 1px solid var(--gray-300); border-radius: 20px; font-size: 0.875rem; outline: none; }
.chat-send { padding: 8px 16px; background: var(--coral); color: #fff; border: none; border-radius: 20px; font-size: 0.8125rem; font-weight: 600; cursor: pointer; }

/* ── Dashboard ── */
.dash-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 1rem 0; }
.stat-card { background: var(--card-bg); border-radius: var(--radius); padding: 16px; text-align: center; box-shadow: var(--shadow); }
.stat-val { display: block; font-size: 1.5rem; font-weight: 800; color: var(--coral); }
.stat-label { font-size: 0.75rem; color: var(--gray-500); }
.dash-tabs { display: flex; gap: 4px; margin-bottom: 1rem; overflow-x: auto; }
.dash-tab { padding: 8px 16px; border: none; background: var(--gray-100); border-radius: var(--radius-sm); font-size: 0.875rem; cursor: pointer; white-space: nowrap; }
.dash-tab.active { background: var(--coral); color: #fff; }

/* ── Checkout ── */
.checkout-items { margin-bottom: 1.5rem; }
.order-summary { background: var(--gray-100); border-radius: var(--radius); padding: 16px; margin: 1.5rem 0; }
.summary-total { display: flex; justify-content: space-between; padding-top: 12px; margin-top: 12px; border-top: 2px solid var(--gray-300); font-size: 1.125rem; }
.checkout-note { text-align: center; font-size: 0.75rem; color: var(--gray-500); margin-top: 12px; }
.payment-result { text-align: center; padding: 2rem 0; }
.result-icon { font-size: 3rem; color: var(--coral); margin-bottom: 1rem; }
.payment-note { font-size: 0.875rem; color: var(--gray-500); margin-top: 1rem; }

/* ── Auth Form ── */
.auth-form, .dash-auth { max-width: 400px; margin: 2rem auto; }

/* ── Empty states ── */
.empty { text-align: center; padding: 2rem 0; color: var(--gray-400); font-size: 0.875rem; }
.empty-search { text-align: center; padding: 3rem 0; grid-column: 1 / -1; }

/* ── Skeleton loading ── */
.skeleton { animation: shimmer 1.5s ease-in-out infinite; }
.skeleton-img { aspect-ratio: 4/5; background: var(--gray-200); border-radius: var(--radius-sm); }
.skeleton-line { height: 12px; background: var(--gray-200); border-radius: 6px; margin-top: 8px; }
.skeleton-line.w80 { width: 80%; }
.skeleton-line.w60 { width: 60%; }
.skeleton-line.w40 { width: 40%; }
@keyframes shimmer { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ── Blog / Articles ── */
.blog-header { text-align: center; padding: 2rem 0 1rem; }
.blog-header h1 { font-size: 1.5rem; }
.blog-subtitle { color: var(--gray-500); margin-top: 4px; font-size: 0.9375rem; }

.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.article-card { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; border: 1px solid var(--card-border); transition: transform 0.2s, box-shadow 0.2s; }
.article-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.article-img { aspect-ratio: 16/9; overflow: hidden; background: var(--gray-100); }
.article-img img { width: 100%; height: 100%; object-fit: cover; }
.article-img-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, var(--coral-light), var(--teal-light)); }
.article-card-body { padding: 14px; }
.article-card-body h2 { font-size: 1rem; line-height: 1.3; margin-bottom: 6px; color: var(--gray-800); }
.article-card-body p { font-size: 0.8125rem; color: var(--gray-500); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-card-body time { font-size: 0.75rem; color: var(--gray-400); margin-top: 8px; display: block; }

/* ── Article Page ── */
.article-page { max-width: 800px; }
.article-header { margin-bottom: 1.5rem; }
.article-header h1 { font-size: 1.75rem; line-height: 1.3; margin-bottom: 8px; }
.article-subtitle { font-size: 1.0625rem; color: var(--gray-500); margin-bottom: 12px; }
.article-meta { display: flex; gap: 12px; font-size: 0.75rem; color: var(--gray-400); flex-wrap: wrap; margin-bottom: 8px; }
.affiliate-disclosure { font-size: 0.6875rem; color: var(--gray-400); background: var(--gray-100); padding: 8px 12px; border-radius: var(--radius-sm); border-left: 3px solid var(--teal); }
.article-hero-img { margin: 1rem 0; border-radius: var(--radius); overflow: hidden; }
.article-hero-img img { width: 100%; height: auto; }
.article-content { font-size: 1rem; line-height: 1.7; color: var(--gray-700); }
.article-content h2 { font-size: 1.25rem; margin: 2rem 0 0.75rem; color: var(--gray-800); border-bottom: 2px solid var(--coral-light); padding-bottom: 6px; }
.article-content h3 { font-size: 1.0625rem; margin: 1.5rem 0 0.5rem; }
.article-content p { margin-bottom: 1rem; }
.article-content ul, .article-content ol { margin: 0.5rem 0 1rem 1.5rem; }
.article-content li { margin-bottom: 0.5rem; }
.article-tags { display: flex; gap: 8px; margin-top: 2rem; flex-wrap: wrap; }

/* ── Quick Picks Box ── */
.quick-picks { background: var(--coral-light); border: 2px solid var(--coral); border-radius: var(--radius); padding: 20px; margin: 1.5rem 0; }
.quick-picks h2 { font-size: 1rem; color: var(--coral-dark); margin-bottom: 12px; }
.picks-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.pick-card { background: var(--card-bg); border-radius: var(--radius-sm); padding: 12px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; border: 1px solid var(--card-border); }
.pick-card:hover { border-color: var(--coral); }
.pick-label { font-size: 0.625rem; text-transform: uppercase; font-weight: 700; color: var(--coral); letter-spacing: 0.5px; }
.pick-card img { width: 60px; height: 60px; object-fit: contain; border-radius: var(--radius-sm); }
.pick-card strong { font-size: 0.75rem; color: var(--gray-800); line-height: 1.3; }
.pick-price { font-size: 0.8125rem; font-weight: 700; color: var(--red); }

/* ── Review Product Cards ── */
.review-product-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius); margin: 1.5rem 0; padding: 20px; position: relative; box-shadow: var(--shadow); }
.review-badge { position: absolute; top: -10px; left: 16px; background: var(--teal); color: #fff; font-size: 0.6875rem; font-weight: 700; padding: 3px 12px; border-radius: 12px; }
.review-product-inner { display: flex; gap: 20px; flex-wrap: wrap; }
.review-product-img { width: 160px; flex-shrink: 0; }
.review-product-img img { width: 100%; height: auto; border-radius: var(--radius-sm); }
.review-product-info { flex: 1; min-width: 200px; }
.review-product-info h3 { font-size: 1.0625rem; margin-bottom: 4px; }
.review-product-info h3 a { color: var(--gray-800); }
.review-brand { font-size: 0.75rem; color: var(--gray-500); }
.review-price { font-size: 1.25rem; font-weight: 800; color: var(--red); margin: 8px 0; }
.review-rating { font-size: 0.8125rem; color: var(--yellow); margin-bottom: 8px; }
.review-pros-cons { font-size: 0.8125rem; margin: 12px 0; }
.review-pros-cons .pros { color: var(--teal-dark); margin-bottom: 4px; }
.review-pros-cons .cons { color: var(--gray-500); }
@media (max-width: 480px) { .review-product-img { width: 100%; } }

/* ── Product Horizontal Scroll (mobile swipe, desktop arrows) ── */
.product-scroll { position: relative; }
.product-carousel { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 4px 0; }
.product-carousel::-webkit-scrollbar { display: none; }
.product-carousel > .product-card,
.product-carousel > .listing-card { scroll-snap-align: start; flex-shrink: 0; width: 140px; }
@media (min-width: 640px) { .product-carousel > .product-card, .product-carousel > .listing-card { width: 160px; } }
@media (min-width: 1024px) { .product-carousel > .product-card, .product-carousel > .listing-card { width: 180px; } }

/* Scroll arrows (desktop only) */
.scroll-btn { display: none; position: absolute; top: 50%; transform: translateY(-50%); z-index: 10; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--card-border); background: var(--card-bg); color: var(--gray-600); font-size: 1.25rem; cursor: pointer; box-shadow: var(--shadow); transition: all 0.2s; }
.scroll-btn:hover { background: var(--coral); color: #fff; border-color: var(--coral); }
.scroll-left { left: -12px; }
.scroll-right { right: -12px; }
@media (min-width: 768px) { .scroll-btn { display: flex; align-items: center; justify-content: center; } }

/* ── View Transition ── */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: fade-out 200ms ease; }
::view-transition-new(root) { animation: fade-in 200ms ease; }
@keyframes fade-out { to { opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ── Focus visible ── */
:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }

/* ── Orders Page ── */
.order-card { display: block; background: var(--card-bg, #fff); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; text-decoration: none; color: var(--text, #1a1a2e); box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.order-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.order-code { font-size: .8rem; font-weight: 700; color: var(--muted, #6b7280); }
.order-status { font-size: .7rem; color: #fff; padding: 3px 10px; border-radius: 20px; font-weight: 600; }
.order-card-body { display: flex; justify-content: space-between; align-items: center; }
.order-card-body strong { font-size: .9rem; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.order-amount { font-size: .95rem; font-weight: 700; color: var(--coral); flex-shrink: 0; margin-left: 12px; }
.order-card-footer { font-size: .75rem; color: var(--muted, #6b7280); margin-top: 6px; }
.order-detail-card { background: var(--card-bg, #fff); border-radius: 12px; padding: 16px; margin: 16px 0; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.order-detail-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border, #e5e7eb); font-size: .9rem; }
.order-detail-row:last-child { border-bottom: none; }
.order-detail-row span { color: var(--muted, #6b7280); }
.order-actions { display: flex; gap: 10px; margin-top: 16px; }

/* ── Chat Page ── */
.chat-list { display: flex; flex-direction: column; }
.chat-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none; color: var(--text, #1a1a2e); border-bottom: 1px solid var(--border, #e5e7eb); }
.chat-row.unread { background: rgba(232,96,76,.04); }
.chat-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--coral); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.1rem; flex-shrink: 0; }
.chat-row-body { flex: 1; min-width: 0; }
.chat-row-top { display: flex; justify-content: space-between; align-items: center; }
.chat-row-top strong { font-size: .9rem; }
.chat-time { font-size: .7rem; color: var(--muted, #6b7280); }
.chat-listing-ref { font-size: .75rem; color: var(--teal); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-last-msg { font-size: .8rem; color: var(--muted, #6b7280); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-unread-badge { background: var(--coral); color: #fff; font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 20px; flex-shrink: 0; }
.chat-thread-header { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border, #e5e7eb); margin-bottom: 12px; }
.chat-thread-info strong { display: block; font-size: .95rem; }
.chat-listing-link { font-size: .75rem; color: var(--teal); text-decoration: none; }
.chat-messages { display: flex; flex-direction: column; gap: 8px; max-height: 55vh; overflow-y: auto; padding: 8px 0; }
.chat-bubble { max-width: 80%; padding: 10px 14px; border-radius: 16px; font-size: .9rem; line-height: 1.5; }
.chat-bubble.mine { align-self: flex-end; background: var(--coral); color: #fff; border-bottom-right-radius: 4px; }
.chat-bubble.theirs { align-self: flex-start; background: var(--card-bg, #f5f5f5); color: var(--text); border-bottom-left-radius: 4px; }
.chat-bubble-time { display: block; font-size: .65rem; opacity: .7; margin-top: 4px; text-align: right; }
.chat-input-bar { display: flex; gap: 8px; padding: 12px 0; border-top: 1px solid var(--border, #e5e7eb); margin-top: 12px; }
.chat-input-bar .form-input { flex: 1; }

/* ── Akun Page ── */
.akun-section { background: var(--card-bg, #fff); border-radius: 12px; padding: 16px; margin-top: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.akun-row { padding: 12px 0; border-bottom: 1px solid var(--border, #e5e7eb); display: flex; justify-content: space-between; align-items: center; font-size: .9rem; }
.akun-row:last-child { border-bottom: none; }
.akun-row span { color: var(--muted, #6b7280); }

/* ── Auth Modal ── */
.modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 500; display: flex; align-items: center; justify-content: center; }
.modal-backdrop { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.5); }
.modal-content { position: relative; background: var(--card-bg, #fff); border-radius: 16px; padding: 24px; width: calc(100% - 32px); max-width: 400px; z-index: 1; }
