/* ============================================
   CATEGORY TABS
   ============================================ */
.cat-section {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: var(--nav-h);
  z-index: 100;
}
.cat-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.cat-inner::-webkit-scrollbar { display: none }
.cat-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-2);
  padding: 14px 16px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: var(--tr);
  flex-shrink: 0;
}
.cat-btn:hover { color: var(--maroon) }
.cat-btn.active {
  color: var(--maroon);
  border-bottom-color: var(--maroon);
  font-weight: 700;
}
.cat-btn .cat-emoji { font-size: 16px }

/* ============================================
   PRODUCTS SECTION
   ============================================ */
.products-section {
  background: var(--off);
  min-height: 60vh;
}
.products-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 24px 60px;
}

/* Sort Bar */
.sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
  flex-wrap: wrap;
}
.sort-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sort-label { font-size: 13px; color: var(--gray); font-weight: 500 }
.sort-btn {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-2);
  padding: 7px 14px;
  border-radius: 100px;
  border: 1.5px solid var(--border-2);
  background: var(--white);
  transition: var(--tr);
}
.sort-btn:hover { border-color: var(--maroon); color: var(--maroon) }
.sort-btn.active {
  background: var(--maroon);
  color: rgb(var(--maroon-fg-rgb));
  border-color: var(--maroon);
}
.sort-bar-right { display:flex; align-items:center; gap:8px }
.products-count {
  font-size: 13px;
  color: var(--gray);
  font-weight: 500;
}
.products-count span { font-weight: 700; color: var(--text) }

/* Price Dropdown */
.harga-wrap { position: relative }
.harga-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-2);
  padding: 7px 14px;
  border-radius: 100px;
  border: 1.5px solid var(--border-2);
  background: var(--white);
  transition: var(--tr);
}
.harga-btn:hover { border-color: var(--maroon); color: var(--maroon) }
.harga-btn svg { width:14px; height:14px; transition:transform .2s }
.harga-btn.open svg { transform: rotate(180deg) }
.harga-dd {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  box-shadow: var(--shadow-md);
  min-width: 160px;
  overflow: hidden;
  display: none;
  z-index: 50;
}
.harga-dd.open { display: block }
.harga-dd-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
  padding: 11px 16px;
  transition: var(--tr);
  cursor: pointer;
}
.harga-dd-item:hover { background: var(--maroon-pale); color: var(--maroon) }
.harga-dd-item.active { color: var(--maroon); background: var(--maroon-pale) }
.harga-dd-item.active::before { content:'✓ '; font-weight:800 }

/* Product Grid */
.prod-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* Product Card */
.prod-card {
  background: var(--white);
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  transition: var(--tr);
  position: relative;
  display: flex;
  flex-direction: column;
}
.prod-card:hover {
  border-color: var(--maroon);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.prod-card:hover .prod-img img { transform: scale(1.06) }

.prod-img {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--light);
  position: relative;
}
.prod-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.prod-img-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  background: linear-gradient(135deg, var(--maroon-pale), var(--gold-pale));
}

/* Badges */
.prod-badges {
  position: absolute;
  top: 10px; left: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 2;
}
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 100px;
  letter-spacing: 0.3px;
}
.badge-sale   { background: var(--maroon); color: rgb(var(--maroon-fg-rgb)) }
.badge-new    { background: var(--green); color: white }
.badge-hot    { background: #EA580C; color: white }
.badge-promo  { background: var(--gold); color: var(--maroon-d) }
.badge-habis  { background: var(--gray); color: white }

/* Wishlist Btn */
.prod-wish {
  position: absolute;
  top: 10px; right: 10px;
  width: 32px; height: 32px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  opacity: 0;
  transition: var(--tr);
  z-index: 2;
  box-shadow: var(--shadow-sm);
}
.prod-card:hover .prod-wish { opacity: 1 }
.prod-wish:hover { background: white; transform: scale(1.1) }

/* Product Info */
.prod-info {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.prod-cat {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 5px;
}
.prod-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.prod-price-row {
  display: flex;
  align-items: baseline;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.prod-price {
  font-size: 17px;
  font-weight: 800;
  color: var(--maroon);
  line-height: 1;
}
.prod-ori {
  font-size: 12px;
  font-weight: 500;
  color: var(--gray);
  text-decoration: line-through;
}
.prod-disc {
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  background: var(--green-pale);
  padding: 2px 6px;
  border-radius: 100px;
}
.prod-terjual {
  font-size: 12px;
  color: var(--gray);
  font-weight: 500;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 5px;
}
.prod-terjual-dot { width:5px; height:5px; background:var(--green); border-radius:50%; flex-shrink:0 }

/* Add to Cart Button */
.prod-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--maroon);
  color: rgb(var(--maroon-fg-rgb));
  font-size: 13px;
  font-weight: 700;
  padding: 10px;
  width: 100%;
  transition: var(--tr);
  margin-top: 8px;
  border-radius: var(--r-sm);
}
.prod-add-btn:hover { background: var(--maroon-d) }

/* ============================================
   LOADING / EMPTY STATES
   ============================================ */
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.skeleton-card {
  background: var(--white);
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  overflow: hidden;
}
.skeleton-img {
  aspect-ratio: 1;
  background: linear-gradient(90deg, var(--light) 25%, var(--light2) 50%, var(--light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
.skeleton-text {
  height: 12px;
  background: linear-gradient(90deg, var(--light) 25%, var(--light2) 50%, var(--light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
  margin: 14px 14px 8px;
}
.skeleton-text.short { width: 60%; margin-top: 6px }
@keyframes shimmer {
  0% { background-position: -200% 0 }
  100% { background-position: 200% 0 }
}
