/* ==================== HERO BANNER ==================== */
.hero-banner {
  width: 100%;
  margin-bottom: 40px;
}

.hero-image {
  width: 100%;
  height: 400px;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-overlay {
  text-align: center;
  color: white;
  z-index: 2;
}

.hero-title {
  font-size: 64px;
  font-weight: 900;
  letter-spacing: -1px;
  margin: 0;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
}

/* ==================== MAIN LAYOUT ==================== */
.catalog-main {
  display: flex;
  gap: 32px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==================== SIDEBAR ==================== */
.sidebar-filters {
  width: 260px;
  flex-shrink: 0;
  position: sticky;
  top: 100px;
  height: fit-content;
}

.sidebar-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
}

.filter-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  cursor: pointer;
  margin-bottom: 16px;
}

.filter-section {
  margin-bottom: 20px;
}

.filter-section-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
}

.clear-filters-sidebar {
  width: 100%;
  padding: 10px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.clear-filters-sidebar:hover {
  background: #000;
  color: white;
  border-color: #000;
}

/* ==================== CONTENT AREA ==================== */
.catalog-content {
  flex: 1;
  min-width: 0;
}

/* ==================== TOP BAR ==================== */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e5e5;
}

.category-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 4px 0;
  text-transform: uppercase;
}

.results-count {
  font-size: 14px;
  color: #767677;
}

.sort-select-mobile {
  display: none;
}

/* ==================== PRODUCT GRID (4 kolom, TANPA CELAH) ==================== */
.catalog-grid {
  margin-bottom: 60px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0; /* TANPA CELAH SAMA SEKALI */
}

/* ==================== PRODUCT CARD ==================== */
.product-card {
  background: white;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  border-right: 1px solid #e5e5e5;
  border-bottom: 1px solid #e5e5e5;
  position: relative;
}

/* Hilangkan border kanan untuk kolom terakhir */
.product-card:nth-child(4n) {
  border-right: none;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 10;
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: #f5f5f5;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.product-card:hover .card-image img {
  transform: scale(1.05);
}

.card-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}

.badge {
  background: black;
  color: white;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 3px;
  white-space: nowrap;
}

.badge.sale {
  background: #000;
}

.badge.sold-out {
  background: #dc2626;
}

.btn-wishlist {
  position: absolute;
  top: 8px;
  right: 8px;
  background: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.2s;
  opacity: 0;
  z-index: 2;
}

.product-card:hover .btn-wishlist {
  opacity: 1;
}

.btn-wishlist:hover {
  background: #000;
  color: white;
}

/* ==================== CARD BODY ==================== */
.card-body {
  padding: 12px 10px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 12px;
}

.rating {
  color: #f59e0b;
  font-weight: 600;
}

.brand {
  color: #767677;
  font-size: 11px;
  font-weight: 600;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 10px 0;
  line-height: 1.3;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-price {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.price-sale {
  font-size: 16px;
  font-weight: 700;
  color: #000;
}

.price-original {
  font-size: 13px;
  color: #9ca3af;
  text-decoration: line-through;
}

.discount-badge {
  background: #dc2626;
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
}

.popular-badge {
  font-size: 11px;
  color: #3b82f6;
  font-weight: 600;
}

/* ==================== PAGINATION ==================== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 40px 0;
}

.pager-form {
  display: inline;
}

.page-btn {
  padding: 10px 16px;
  border: 1px solid #ddd;
  background: white;
  color: #333;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.page-btn:hover {
  background: #000;
  color: white;
  border-color: #000;
}

.page-btn.active {
  background: #000;
  color: white;
  border-color: #000;
}

/* ==================== MOBILE FILTER FAB (HIDDEN) ==================== */
.filter-fab {
  display: none !important; /* BUTTON FILTER DISEMBUNYIKAN */
}

.filter-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1200px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  /* Update border untuk 3 kolom */
  .product-card:nth-child(4n) {
    border-right: 1px solid #e5e5e5;
  }
  
  .product-card:nth-child(3n) {
    border-right: none;
  }
}

@media (max-width: 1024px) {
  .catalog-main {
    gap: 20px;
  }
  
  .sidebar-filters {
    width: 220px;
  }
}

@media (max-width: 768px) {
  .sidebar-filters {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    background: white;
    z-index: 100;
    padding: 20px;
    box-shadow: 2px 0 8px rgba(0,0,0,0.1);
  }
  
  /* Button filter sudah dihapus */
  
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Update border untuk 2 kolom */
  .product-card:nth-child(3n) {
    border-right: 1px solid #e5e5e5;
  }
  
  .product-card:nth-child(2n) {
    border-right: none;
  }
  
  .hero-title {
    font-size: 48px;
  }
  
  .sort-select-mobile {
    display: block;
  }
}

@media (max-width: 640px) {
  .hero-image {
    height: 250px;
  }
  
  .hero-title {
    font-size: 36px;
  }
  
  .top-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .category-title {
    font-size: 22px;
  }
  
  .card-title {
    font-size: 13px;
  }
  
  .price-sale {
    font-size: 14px;
  }
}

/* ==================== LOADING ==================== */
.loading {
  display: flex;
  justify-content: center;
  padding: 40px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.empty {
  text-align: center;
  padding: 60px 20px;
  color: #767677;
  font-size: 16px;
  grid-column: 1 / -1;
}