/* assets/css/produk.css - Refactored to match Figma Mockup */
:root {
  --wine: #b91c1c;
  --wine-dark: #7f1d1d;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg-page: #fafaf9;
  --bg-card: #ffffff;
}

body {
  background: var(--bg-page);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  margin: 0;
  padding: 0;
}

.container { width: min(100%, 1280px); margin: 0 auto; padding: 0 24px; box-sizing: border-box; }

/* Numbered Headings */
.section-heading {
  display: flex; align-items: center; gap: 12px;
  font-size: 18px; font-weight: 700; margin: 0 0 20px; color: var(--ink);
}
.section-heading .num {
  width: 24px; height: 24px; background: var(--ink); color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.section-heading a { margin-left: auto; font-size: 13px; color: var(--wine); text-decoration: none; font-weight: 600; }

/* Breadcrumb */
.breadcrumb { font-size: 13px; color: var(--muted); padding: 24px 0; }
.breadcrumb a { color: var(--ink); text-decoration: none; font-weight: 500; }
.breadcrumb a:hover { color: var(--wine); }

/* Hero */
.hero-produk { display: flex; justify-content: space-between; align-items: center; padding: 0 0 24px; }
.hero-produk h1 { font-size: 32px; color: var(--ink); margin: 0 0 12px; line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; }
.hero-produk p { color: var(--muted); font-size: 14px; max-width: 480px; line-height: 1.6; margin: 0; }
.hero-img { width: 400px; height: 180px; max-width: 50%; object-fit: cover; border-radius: 16px; }

/* Step 1: Pilih Motormu */
.filter-motor-box { background: var(--bg-card); border: 1px solid var(--line); border-radius: 16px; padding: 24px; margin-bottom: 32px; box-shadow: 0 2px 12px rgba(0,0,0,0.02); }
.filter-grid { display: grid; grid-template-columns: repeat(4, 1fr) auto auto; gap: 16px; align-items: end; }
.filter-group { display: flex; flex-direction: column; gap: 8px; }
.filter-group label { font-size: 12px; font-weight: 600; color: var(--muted); }
.filter-group select { padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; outline: none; background: #fff; color: var(--ink); font-family: inherit; cursor: pointer; }
.btn-primary { background: var(--wine-dark); color: #fff; border: none; padding: 0 24px; border-radius: 8px; font-weight: 600; font-size: 14px; cursor: pointer; height: 44px; transition: 0.2s; white-space: nowrap; }
.btn-primary:hover { background: var(--wine); }

.motor-selected-card { display: none; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); align-items: center; gap: 20px; }
.motor-selected-card.active { display: flex; animation: fadeIn 0.4s ease; }
.motor-selected-card img { width: 100px; height: 100px; object-fit: contain; background: #f9fafb; border-radius: 12px; padding: 10px; }
.motor-selected-info { flex: 1; }
.motor-selected-info h3 { margin: 0 0 6px; font-size: 18px; font-weight: 700; }
.motor-selected-info p { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.motor-selected-info button { font-size: 13px; color: var(--wine); text-decoration: none; background: none; border: none; padding: 0; cursor: pointer; font-weight: 600; }
.motor-badge-ok { background: #ecfdf5; color: #059669; padding: 12px 20px; border-radius: 8px; font-size: 13.5px; font-weight: 600; border: 1px solid #d1fae5; display: flex; align-items: center; gap: 10px; }

/* Step 2: Kategori */
.kategori-section { margin-bottom: 40px; }
.kategori-scroll { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 12px; scrollbar-width: none; }
.kategori-scroll::-webkit-scrollbar { display: none; }
.kat-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-width: 90px; height: 90px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; transition: all 0.2s; flex: 0 0 auto; }
.kat-item:hover { border-color: #d1c7c9; }
.kat-item.active { border-color: var(--wine); background: #fef2f2; color: var(--wine); }
.kat-item svg { width: 28px; height: 28px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.kat-item span { font-size: 12px; font-weight: 600; text-align: center; }

/* Step 3 & 4: Main Layout */
.produk-layout { display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: start; margin-bottom: 32px; }
.sidebar { background: #fff; padding: 24px; border: 1px solid var(--line); border-radius: 16px; display: flex; flex-direction: column; }
.filter-section { margin-bottom: 16px; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.filter-section:last-child { margin-bottom: 0; border-bottom: none; padding-bottom: 0; }
.filter-section h4 { font-size: 14px; margin: 0 0 16px; font-weight: 700; color: var(--ink); }
.search-filter { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; margin-bottom: 12px; font-family: inherit; }
.checkbox-list { display: flex; flex-direction: column; gap: 8px; }
.checkbox-list label { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); cursor: pointer; }
.checkbox-list input { width: 16px; height: 16px; accent-color: var(--wine-dark); cursor: pointer; }

/* List View Product Card */
.produk-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.produk-head h2 { font-size: 16px; margin: 0; display: flex; align-items: center; gap: 8px;}
.sort-box select { padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; outline: none; }


.produk-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 1024px) { .produk-list { grid-template-columns: 1fr; } }

.pc-card {
  display: flex;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s;
  height: 160px; /* Fixed height for uniformity */
}
.pc-card:hover {
  border-color: #d1c7c9;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}
.pc-image {
  width: 160px;
  flex-shrink: 0;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff; /* or #f9fafb */
  border-right: 1px solid var(--line);
}
.pc-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.pc-content {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.pc-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.pc-title-area {
  flex: 1;
}
.pc-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pc-title a { color: inherit; text-decoration: none; }
.pc-subtitle {
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 8px;
}
.pc-match {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #059669;
  font-weight: 600;
  margin-bottom: 8px;
}
.pc-rating {
  display: flex;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
}
.pc-rating .star { color: #f59e0b; margin-right: 4px; }
.pc-rating .sep { width: 3px; height: 3px; background: #d1d5db; border-radius: 50%; margin: 0 6px; }
.pc-actions-top {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.pc-wishlist {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 0;
  display: flex;
}
.pc-wishlist:hover { color: var(--wine); }
.pc-stock {
  font-size: 10px;
  font-weight: 700;
  color: #059669;
}
.pc-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.pc-price {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
}
.pc-actions-bottom {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pc-btn-cart {
  background: var(--wine-dark);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.pc-btn-detail {
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}
.pc-btn-detail:hover { color: var(--wine); }

/* Remove old produk-card rules since we are using pc-card */
.produk-card { display: flex; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; gap: 24px; transition: 0.2s; height: 100%; box-sizing: border-box; }
.produk-card:hover { border-color: #d1c7c9; box-shadow: 0 4px 20px rgba(0,0,0,0.03); }
.produk-card img { width: 140px; height: 140px; object-fit: contain; border-radius: 12px; background: #f9fafb; }
.produk-info { flex: 1; display: flex; flex-direction: column; }
.produk-title { font-size: 16px; font-weight: 700; color: var(--ink); margin: 0 0 4px; line-height: 1.4; }
.produk-subtitle { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.produk-match-badge { display: inline-flex; align-items: center; gap: 6px; background: #ecfdf5; color: #059669; padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; margin-bottom: 12px; width: max-content; border: 1px solid #d1fae5; }
.produk-meta { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); margin-bottom: auto; }
.produk-meta span { display: flex; align-items: center; gap: 4px; }
.produk-price { font-size: 20px; font-weight: 800; color: var(--wine); margin-top: 16px; }

.produk-actions { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; min-width: 130px; }
.btn-wishlist { background: none; border: none; cursor: pointer; color: var(--muted); padding: 4px; }
.btn-wishlist:hover { color: var(--wine); }
.stock-status { font-size: 12px; font-weight: 600; color: #059669; }
.btn-cart { background: var(--wine-dark); color: #fff; border: none; padding: 10px 16px; border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer; display: flex; align-items: center; gap: 8px; width: 100%; justify-content: center; transition: 0.2s; }
.btn-cart:hover { background: var(--wine); }
.btn-detail { font-size: 12px; color: var(--wine); text-decoration: none; font-weight: 600; }

.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 32px; }
.page-btn { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--ink); background: #fff; cursor: pointer; text-decoration: none; }
.page-btn.active { background: var(--wine-dark); color: #fff; border-color: var(--wine-dark); }

/* Range Slider */
.range-slider { position: relative; width: 100%; height: 6px; background: #e5e7eb; border-radius: 5px; margin: 24px 0 16px; }
.range-slider .progress { position: absolute; left: 0%; right: 0%; height: 100%; background: var(--wine-dark); border-radius: 5px; }
.range-slider input[type="range"] { position: absolute; top: -7px; width: 100%; height: 6px; -webkit-appearance: none; background: none; pointer-events: none; margin: 0; outline: none; }
.range-slider input[type="range"]::-webkit-slider-thumb { pointer-events: auto; -webkit-appearance: none; width: 18px; height: 18px; background: #fff; border: 2.5px solid var(--wine-dark); border-radius: 50%; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.range-slider input[type="range"]::-moz-range-thumb { pointer-events: auto; width: 18px; height: 18px; background: #fff; border: 2.5px solid var(--wine-dark); border-radius: 50%; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }

/* Bantuan Box */
.bantuan-box { background: #fef2f2; border: 1px solid #fecaca; border-radius: 12px; padding: 20px; text-align: center; }
.bantuan-box h4 { margin: 0 0 8px; font-size: 14px; color: var(--wine-dark); }
.bantuan-box p { font-size: 12px; color: var(--muted); margin: 0 0 16px; line-height: 1.5; }
.bantuan-box button { width: 100%; background: #fff; border: 1px solid var(--wine); color: var(--wine); padding: 10px; border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }

/* Step 5: Features */
.features-bar { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 32px 0; background: #fff; margin-bottom: 40px; }
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.feature-item { display: flex; align-items: flex-start; gap: 16px; }
.feature-icon { width: 48px; height: 48px; background: #fef2f2; color: var(--wine); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.feature-icon svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.feature-text h4 { margin: 0 0 4px; font-size: 15px; font-weight: 700; color: var(--ink); }
.feature-text p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }

/* Inovasi Tambahan */
.inovasi-section { background: #fff; padding: 40px 0; margin-bottom: 120px; }
.inovasi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.inovasi-card { background: #fafaf9; border: 1px solid var(--line); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 12px; position: relative; }
.inovasi-icon { color: var(--wine); }
.inovasi-icon svg { width: 32px; height: 32px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.inovasi-card h4 { margin: 0; font-size: 14px; font-weight: 700; color: var(--ink); }
.inovasi-card p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.badge-segera { position: absolute; bottom: -10px; left: 24px; background: #fef2f2; color: var(--wine); border: 1px solid #fecaca; padding: 4px 10px; font-size: 10px; font-weight: 700; border-radius: 100px; }

/* Sticky Keranjang */
.sticky-keranjang { position: fixed; bottom: 0; left: 0; right: 0; background: #450a0a; color: #fff; padding: 16px 0; transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); z-index: 50; border-top: 1px solid #7f1d1d; }
.sticky-keranjang.show { transform: translateY(0); }
.sk-container { display: flex; justify-content: space-between; align-items: center; width: min(100%, 1280px); margin: 0 auto; padding: 0 24px; box-sizing: border-box; }
.sk-info { display: flex; align-items: center; gap: 16px; }
.sk-img-box { width: 48px; height: 48px; background: #fff; border-radius: 8px; overflow: hidden; padding: 2px; box-sizing: border-box; }
.sk-img-box img { width: 100%; height: 100%; object-fit: contain; }
.sk-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.sk-qty { font-size: 12px; color: #d1d5db; }
.sk-action { display: flex; align-items: center; gap: 24px; }
.sk-total { display: flex; flex-direction: column; align-items: flex-end; }
.sk-total span { font-size: 11px; color: #d1d5db; margin-bottom: 2px; }
.sk-total strong { font-size: 18px; font-weight: 800; color: #fff; }
.btn-cart-sticky { background: var(--wine); color: #fff; border: none; padding: 12px 24px; border-radius: 8px; font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; transition: 0.2s; }
.btn-cart-sticky:hover { background: #dc2626; }

/* Global Header adjustments */
.site-header { background: #fff; border-bottom: 1px solid var(--line); padding: 16px 0; }
.header-right { display: flex; align-items: center; gap: 24px; }
.header-nav { display: flex; align-items: center; gap: 20px; }
.header-nav a { color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 600; transition: 0.2s; }
.header-nav a:hover { color: var(--wine); }
.header-icons { display: flex; align-items: center; gap: 16px; border-left: 1px solid var(--line); padding-left: 24px; }
.header-icon { color: var(--ink); text-decoration: none; position: relative; }
.header-icon:hover { color: var(--wine); }
.header-icon svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.cart-badge { position: absolute; top: -6px; right: -8px; background: var(--wine); color: #fff; width: 16px; height: 16px; border-radius: 50%; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

.btn-grid-cart:hover { background: #fef2f2; }














