/* ===================== Marketplace (mp-*) ===================== */

/* Keep the wide layout you had on large screens */
@media (min-width: 1400px) {
  .container,
  .container-sm,
  .container-md,
  .container-lg,
  .container-xl,
  .container-xxl {
    max-width: 1600px !important;
  }
}

/* ---------- Banner + trust strip ---------- */
.mp-banner {
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.08);
}

.mp-banner img {
  display: block;
  width: 100%;
  height: auto;
}

.mp-trust {
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  justify-content: center;
  padding: 0.65rem 1rem;
  margin-bottom: 1.5rem;
  background: #fff;
  border: 1px solid #edf0ee;
  border-radius: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #495057;
}

.mp-trust i {
  color: #198754;
  margin-right: 0.35rem;
}

/* ---------- Filters ---------- */
@media (min-width: 992px) {
  .mp-sidebar {
    position: sticky;
    top: 5rem;
  }

  .mp-filters .offcanvas-body {
    padding: 1.25rem;
    background: #fff;
    border: 1px solid #edf0ee;
    border-radius: 1rem;
    box-shadow: 0 0.25rem 1rem rgba(15, 81, 50, 0.05);
  }
}

.mp-filter-title {
  margin: 1.25rem 0 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6c757d;
}

.mp-filter-title:first-of-type {
  margin-top: 0;
}

.mp-filter-list {
  max-height: 260px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.mp-filters .form-check {
  margin-bottom: 0.4rem;
}

.mp-filters .form-check-label {
  font-size: 0.9rem;
  cursor: pointer;
}

.mp-filters .form-check-input:checked {
  background-color: #198754;
  border-color: #198754;
}

.mp-filters .form-check-input:focus,
.mp-filters .form-select:focus {
  border-color: #198754;
  box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.2);
}

/* ---------- Toolbar + chips ---------- */
.mp-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.mp-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  color: #212529;
}

@media (min-width: 768px) {
  .mp-title {
    font-size: 1.9rem;
  }
}

.mp-count {
  margin: 0.6rem 0 0;
  font-size: 0.85rem;
  color: #6c757d;
}

.mp-sort {
  width: auto;
  min-width: 160px;
}

.mp-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.mp-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid #cfe8da;
  border-radius: 50rem;
  background: #e8f5ee;
  color: #146c43;
  font-size: 0.8rem;
  font-weight: 600;
}

.mp-chip:hover {
  background: #d8eee2;
}

.mp-chip i {
  font-size: 0.65rem;
}

/* ---------- Product card ---------- */
.mp-card {
  border: 1px solid #edf0ee;
  border-radius: 1rem;
  overflow: hidden;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mp-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0.75rem 1.75rem rgba(15, 81, 50, 0.12);
}

.mp-media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f3f5f4;
}

.mp-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.mp-card:hover .mp-media img {
  transform: scale(1.05);
}

.mp-noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 2.5rem;
  color: #adb5bd;
}

.mp-badges {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  max-width: calc(100% - 3.5rem);
}

.mp-tag {
  max-width: 100%;
  padding: 0.28rem 0.55rem;
  border-radius: 50rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.mp-tag--official { background: #0d6efd; color: #fff; }
.mp-tag--org { background: #0dcaf0; color: #052c35; }
.mp-tag--category { background: rgba(255, 255, 255, 0.95); color: #146c43; }
.mp-tag--preorder { background: #ffc107; color: #412f00; }

.mp-wish {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #6c757d;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease;
}

.mp-wish:hover {
  transform: scale(1.1);
}

.mp-wish .bi-heart-fill {
  color: #dc3545;
}

.mp-card .card-body {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 0.85rem 0.9rem;
}

.mp-seller {
  margin-bottom: 0.15rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mp-name {
  margin: 0 0 0.35rem;
  min-height: 2.6em;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.3;
  color: #212529;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mp-price {
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: #198754;
}

.mp-meta {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid #f1f3f2;
  font-size: 0.78rem;
  color: #6c757d;
}

.mp-meta .bi-star-fill {
  color: #ffc107;
}

/* ---------- Empty state + pagination ---------- */
.mp-empty {
  padding: 3rem 1rem;
  text-align: center;
  background: #fff;
  border: 1px dashed #d5dbd8;
  border-radius: 1rem;
}

.mp-empty > i {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 3.5rem;
  color: #ced4da;
}

.mp-pagination .page-link {
  color: #198754;
}

.mp-pagination .page-item.active .page-link {
  background-color: #198754;
  border-color: #198754;
  color: #fff;
}

.mp-pagination .page-link:focus {
  box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.2);
}

@media (max-width: 575.98px) {
  .mp-name { font-size: 0.85rem; }
  .mp-price { font-size: 0.98rem; }
}

@media (prefers-reduced-motion: reduce) {
  .mp-card,
  .mp-media img,
  .mp-wish {
    transition: none;
  }
  .mp-card:hover,
  .mp-card:hover .mp-media img {
    transform: none;
  }
}

/* ===================== Legacy classes =====================
   Kept in case other pages still use marketplace.css.
   (Duplicates from the old file merged to their final values.) */
.category-line {
  height: 6px;
  width: 60px;
  background-color: #198754;
  border-radius: 50px;
  margin-top: 8px;
}

.product-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid #f1f1f1;
  border-radius: 1.25rem;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

.img-container {
  height: 220px;
  overflow: hidden;
  position: relative;
}

.img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .img-container img {
  transform: scale(1.05);
}

.quick-view-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.product-card:hover .quick-view-overlay {
  opacity: 1;
}

.category-pill {
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  text-decoration: none !important;
}

.category-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.active-filter {
  background-color: #0d6efd !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}