/* ==========================================================================
   CIC BUYER - SHOPEE-STYLE PRODUCT CATALOG DESIGN SYSTEM
   Brand Identity: Teal Green (#00826b), Plus Jakarta Sans, Ultra Fast & Responsive
   ========================================================================== */

/* ── 5-Column Grid Layout (Desktop) ──────────────────────────────────────── */
.products-5-col-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

@media (max-width: 1400px) {
  .products-5-col-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
  }
}

@media (max-width: 1200px) {
  .products-5-col-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }
}

@media (max-width: 992px) {
  .products-5-col-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
}

@media (max-width: 768px) {
  .products-5-col-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .products-5-col-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
}

/* ── Shopee-Style Top Sort & Filter Bar ──────────────────────────────────── */
.shopee-sort-bar {
  background-color: #ededed;
  border-radius: 8px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  border: 1px solid #e2e8f0;
}

.shopee-sort-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.shopee-sort-label {
  font-size: 0.88rem;
  color: #4b5563;
  font-weight: 600;
  margin-right: 4px;
}

.shopee-sort-btn {
  border: none;
  background-color: #ffffff;
  color: #1f2937;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.shopee-sort-btn:hover {
  background-color: #f8fafc;
  color: var(--primary-green);
  transform: translateY(-1px);
}

.shopee-sort-btn.active {
  background-color: var(--primary-green) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(0, 130, 107, 0.25) !important;
}

/* Price Dropdown Button */
.shopee-sort-dropdown .dropdown-toggle::after {
  display: none;
}

.shopee-price-btn {
  min-width: 140px;
  justify-content: space-between;
}

.shopee-price-btn.active {
  background-color: var(--primary-green) !important;
  color: #ffffff !important;
}

/* Mini Pagination on top right */
.shopee-sort-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shopee-mini-page {
  font-size: 0.88rem;
  color: #4b5563;
  font-weight: 600;
}

.shopee-mini-page-btn {
  width: 34px;
  height: 34px;
  border: 1px solid #cbd5e1;
  background-color: #ffffff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: #4b5563;
  cursor: pointer;
  transition: all 0.15s ease;
}

.shopee-mini-page-btn:hover:not(:disabled) {
  background-color: #f1f5f9;
  border-color: var(--primary-green);
  color: var(--primary-green);
}

.shopee-mini-page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background-color: #f8fafc;
}

/* ── Shopee-Style Product Card ───────────────────────────────────────────── */
.shopee-product-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.22s ease, border-color 0.22s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.shopee-product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 130, 107, 0.12);
  border-color: var(--primary-green);
  color: inherit;
}

/* 1:1 Aspect Ratio Image Container */
.shopee-img-wrapper {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 1:1 Aspect Ratio */
  background-color: #f8fafc;
  overflow: hidden;
}

.shopee-img-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.shopee-product-card:hover .shopee-img-wrapper img {
  transform: scale(1.06);
}

/* Top Badge Overlays on Image */
.shopee-badge-left {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
}

.badge-umkm {
  background: var(--primary-green);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-bottom-right-radius: 6px;
  display: inline-block;
  letter-spacing: 0.4px;
  box-shadow: 0 2px 5px rgba(0, 130, 107, 0.3);
}

/* Top-Right Discount Ribbon */
.shopee-discount-tag {
  position: absolute;
  top: 0;
  right: 0;
  background-color: rgba(255, 230, 0, 0.95);
  color: #ee4d2d;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 6px;
  text-align: center;
  line-height: 1.1;
  z-index: 5;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.shopee-discount-tag .disc-text {
  font-size: 0.58rem;
  color: #dc2626;
  display: block;
  font-weight: 700;
}

/* Bottom Promo Ribbon Sticker on Image */
.shopee-promo-sticker {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(90deg, rgba(238, 77, 45, 0.95), rgba(249, 115, 22, 0.9));
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 5;
}

.shopee-promo-sticker.ongkir {
  background: linear-gradient(90deg, #00826b, #00b48a);
}

/* Wishlist Button Overlay */
.shopee-wishlist-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.88);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 6;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.shopee-wishlist-btn:hover {
  transform: scale(1.15);
  color: #ef4444;
  background-color: #ffffff;
}

.shopee-wishlist-btn.active {
  color: #ef4444 !important;
  background-color: #ffffff;
}

/* ── Card Content Body ───────────────────────────────────────────────────── */
.shopee-card-body {
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
}

/* Product Title (2 Lines Clamp) */
.shopee-title {
  font-size: 0.82rem;
  font-weight: 500;
  color: #1e293b;
  line-height: 1.35;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 2.25rem;
}

/* Price Section */
.shopee-price-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.shopee-price-currency {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary-green);
}

.shopee-price-amount {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--primary-green);
  letter-spacing: -0.2px;
}

.shopee-price-original {
  font-size: 0.7rem;
  color: #94a3b8;
  text-decoration: line-through;
  margin-left: 2px;
}

.shopee-price-disc-pill {
  font-size: 0.62rem;
  font-weight: 800;
  color: #ef4444;
  background-color: #fee2e2;
  padding: 1px 4px;
  border-radius: 3px;
  margin-left: 2px;
}

/* Rating and Sold */
.shopee-rating-row {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: #64748b;
  margin-bottom: 6px;
}

.shopee-star-icon {
  color: #f59e0b;
  font-size: 0.8rem;
}

.shopee-rating-val {
  font-weight: 700;
  color: #1e293b;
}

.shopee-sold-text {
  color: #64748b;
}

/* Location & Delivery Footer */
.shopee-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
  border-top: 1px dashed #f1f5f9;
  font-size: 0.7rem;
  color: #64748b;
}

.shopee-delivery-badge {
  display: flex;
  align-items: center;
  gap: 3px;
  color: var(--primary-green);
  font-weight: 600;
}

.shopee-location-text {
  max-width: 60%;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #64748b;
}

/* ── Sidebar Filters ─────────────────────────────────────────────────────── */
.shopee-filter-card {
  border: 1.5px solid #f1f5f9;
  border-radius: 14px;
  background-color: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
  padding: 18px;
}

.shopee-filter-header {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  letter-spacing: -0.2px;
}

.shopee-filter-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.shopee-filter-divider {
  border-top: 1px solid #f1f5f9;
  margin: 14px 0;
}

/* Custom Checkbox / Radio List */
.shopee-filter-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: background-color 0.15s ease;
}

.shopee-filter-item:hover {
  background-color: #f8fafc;
}

.shopee-filter-item.active {
  background-color: var(--light-green);
}

.shopee-filter-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: #374151;
  font-weight: 500;
  user-select: none;
  flex: 1;
}

.shopee-filter-checkbox {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid #cbd5e1;
  border-radius: 4px;
  display: inline-grid;
  place-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
  background-color: #ffffff;
}

.shopee-filter-checkbox:checked {
  border-color: var(--primary-green);
  background-color: var(--primary-green);
}

.shopee-filter-checkbox:checked::before {
  content: "";
  width: 8px;
  height: 8px;
  transform: scale(1);
  box-shadow: inset 1em 1em #ffffff;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

.shopee-filter-count {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 600;
}

/* Price Range Inputs */
.shopee-price-input {
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 10px;
  background-color: #f8fafc;
  width: 100%;
  transition: all 0.2s ease;
}

.shopee-price-input:focus {
  border-color: var(--primary-green);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 130, 107, 0.12);
  outline: none;
}

.shopee-btn-apply-price {
  background-color: var(--primary-green);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 12px;
  width: 100%;
  margin-top: 8px;
  transition: all 0.2s ease;
}

.shopee-btn-apply-price:hover {
  background-color: var(--medium-green);
}

/* Reset Button */
.shopee-btn-reset {
  border: 1.5px solid #e2e8f0;
  background-color: #ffffff;
  color: #64748b;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px;
  width: 100%;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.shopee-btn-reset:hover {
  border-color: #ef4444;
  color: #ef4444;
  background-color: #fef2f2;
}

/* ── Pagination ──────────────────────────────────────────────────────────── */
.shopee-pagination-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 36px;
}

.shopee-page-btn {
  width: 38px;
  height: 38px;
  border: 1.5px solid #e2e8f0;
  background-color: #ffffff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: #374151;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
}

.shopee-page-btn:hover:not(.disabled) {
  border-color: var(--primary-green);
  color: var(--primary-green);
  background-color: var(--light-green);
}

.shopee-page-btn.active {
  background-color: var(--primary-green) !important;
  border-color: var(--primary-green) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 10px rgba(0, 130, 107, 0.2);
}

.shopee-page-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
