/* Shop / Marketplace page — landing UI */

.marketplace-page {
  background: #f8f9fb;
}

/* ─── Page header (centered text only, no banner) ─── */
.shop-page-header {
  margin-top: 5rem;
  padding: 0rem 1.5rem 1.75rem;
  text-align: center;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.shop-page-title {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.85rem;
}

.shop-page-title-dark {
  color: #111827;
}

.shop-page-title-accent {
  color: #1f4377;
}

.shop-page-subtitle {
  font-size: clamp(0.9375rem, 2vw, 1.0625rem);
  color: #6b7280;
  line-height: 1.65;
  max-width: 580px;
  margin: 0 auto;
}

/* ─── Layout ─── */
.marketplace-layout {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
  gap: 1.75rem;
  align-items: flex-start;
}

.marketplace-sidebar {
  flex: 0 0 300px;
  padding: 0;
  position: sticky;
  top: 5.5rem;
}

/* ─── Filter card ─── */
.shop-filter-card {
  background: #fff;
  border-radius: 20px;
  border: 1px solid #e8ecf1;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.07);
  overflow: hidden;
}

.shop-filter-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 1.15rem 1.25rem;
  background: #fff;
  border-bottom: 1px solid #f0f2f5;
}

.shop-filter-card-head-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #eef3fa 0%, #e0eaf7 100%);
  color: #1f4377;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.shop-filter-card-head h2 {
  font-size: 0.9375rem;
  font-weight: 700;
  margin: 0;
  color: #111827;
  letter-spacing: 0.01em;
}

.shop-filter-card-head p {
  font-size: 0.75rem;
  margin: 0;
  color: #9ca3af;
}

.marketplace-filters {
  padding: 1rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.shop-filter-panel {
  padding: 1rem;
  background: #f8fafc;
  border-radius: 14px;
  border: 1px solid #eef2f6;
}

.shop-filter-panel--categories {
  max-height: 340px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.shop-filter-panel--categories::-webkit-scrollbar {
  width: 5px;
}

.shop-filter-panel--categories::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.marketplace-filter-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4b5563;
  margin: 0 0 0.7rem;
}

.shop-filter-icon {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #1f4377;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
}

/* Search field */
.shop-search-field {
  position: relative;
}

.shop-search-field-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 0.875rem;
  pointer-events: none;
}

.shop-search-input {
  width: 100%;
  padding: 0.7rem 0.85rem 0.7rem 2.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  font-size: 0.875rem;
  background: #fff;
  color: #111827;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.shop-search-input::placeholder {
  color: #9ca3af;
}

.shop-search-input:focus {
  border-color: #1f4377;
  box-shadow: 0 0 0 3px rgba(31, 67, 119, 0.12);
}

.shop-filter-select {
  width: 100%;
  padding: 0.7rem 2.25rem 0.7rem 0.85rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E") no-repeat right 12px center;
  appearance: none;
  color: #111827;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.shop-filter-select:focus {
  border-color: #1f4377;
  box-shadow: 0 0 0 3px rgba(31, 67, 119, 0.12);
  outline: none;
}

/* Price row */
.shop-price-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shop-price-field {
  flex: 1;
  min-width: 0;
  position: relative;
  display: flex;
  align-items: center;
}

.shop-price-prefix {
  position: absolute;
  left: 12px;
  color: #9ca3af;
  font-size: 0.8125rem;
  font-weight: 600;
  pointer-events: none;
  z-index: 1;
}

.shop-price-row .marketplace-price-input {
  width: 100%;
  padding: 0.65rem 0.75rem 0.65rem 1.65rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  font-size: 0.875rem;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.shop-price-row .marketplace-price-input:focus {
  border-color: #1f4377;
  box-shadow: 0 0 0 3px rgba(31, 67, 119, 0.12);
  outline: none;
}

.shop-price-sep {
  width: 12px;
  height: 2px;
  background: #d1d5db;
  border-radius: 1px;
  flex-shrink: 0;
}

.marketplace-filter-hint {
  font-size: 0.75rem;
  color: #9ca3af !important;
  margin: -0.25rem 0 0.65rem !important;
}

/* Category blocks */
.shop-filter-categories {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shop-filter-cat-block {
  padding: 0.75rem;
  background: linear-gradient(135deg, #eef4fb 0%, #e4edf8 100%);
  border-radius: 12px;
  border: 1px solid #c8d9ee;
  border-left: 3px solid #1f4377;
}

.shop-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.shop-filter-chip {
  margin: 0;
  cursor: pointer;
}

.shop-filter-chip input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.shop-filter-chip-text {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #374151;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  transition: all 0.18s ease;
  user-select: none;
}

.shop-filter-chip--parent .shop-filter-chip-text {
  font-weight: 600;
  font-size: 0.8125rem;
  padding: 0.45rem 0.9rem;
  background: #fff;
  border-color: #b8cce4;
  box-shadow: 0 1px 4px rgba(31, 67, 119, 0.1);
}

.shop-filter-chip--parent:hover .shop-filter-chip-text {
  background: #fff;
  border-color: #1f4377;
}

.shop-filter-chip:hover .shop-filter-chip-text {
  border-color: #c7d7ec;
  background: #eef3fa;
  color: #1f4377;
}

.shop-filter-chip input:checked + .shop-filter-chip-text {
  background: linear-gradient(135deg, #1f4377 0%, #2d5a9e 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(31, 67, 119, 0.28);
}

.shop-filter-subgroup {
  margin-top: 0.6rem;
  padding: 0.55rem 0.6rem 0.5rem;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #dce6f2;
}

.shop-filter-subgroup-label {
  display: block;
  width: 100%;
  flex-basis: 100%;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.15rem;
}

.shop-filter-subgroup .shop-filter-chip-text {
  font-size: 0.75rem;
  padding: 0.32rem 0.65rem;
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.shop-filter-subgroup .shop-filter-chip:hover .shop-filter-chip-text {
  background: #e8eef5;
  border-color: #c7d7ec;
}

/* Filter actions */
.shop-filter-actions {
  padding-top: 0.25rem;
}

.marketplace-price-apply-btn {
  width: 100%;
  padding: 0.8rem 1rem;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #1f4377 0%, #2d5a9e 100%);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(31, 67, 119, 0.28);
}

.marketplace-price-apply-btn:hover {
  background: linear-gradient(135deg, #16325c 0%, #1f4377 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(31, 67, 119, 0.35);
}

.marketplace-filter-clear-link {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 0.6rem !important;
  padding: 0.55rem;
  color: #6b7280 !important;
  font-size: 0.8125rem !important;
  font-weight: 500;
  text-decoration: none !important;
  border-radius: 10px;
  border: 1px dashed #d1d5db;
  background: transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.marketplace-filter-clear-link:hover {
  color: #1f4377 !important;
  border-color: #1f4377;
  background: #f8fafc;
}

/* Mobile filter toggle */
.marketplace-filter-toggle {
  display: none;
  width: 100%;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 0.75rem 1.25rem;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  color: #1f4377;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
  margin-bottom: 0.5rem;
  transition: all 0.2s;
}

.marketplace-filter-toggle:hover {
  background: #f0f4fa;
  border-color: #c7d7ec;
}

.marketplace-filter-toggle.active {
  background: #1f4377;
  color: #fff;
  border-color: #1f4377;
}

/* ─── Main content ─── */
.marketplace-main {
  padding: 0;
  background: transparent;
}

.marketplace-products-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem !important;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e8ecf1;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
}

.marketplace-products-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827;
  opacity: 1;
}

.marketplace-products-count::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}

.marketplace-sort-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.marketplace-sort-wrap label {
  font-size: 0.8125rem;
  color: #6b7280;
  font-weight: 500;
  margin: 0;
  white-space: nowrap;
}

.marketplace-sort-select {
  padding: 0.6rem 2.25rem 0.6rem 0.85rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 0.8125rem;
  font-weight: 500;
  background: #f9fafb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E") no-repeat right 10px center;
  appearance: none;
  cursor: pointer;
  min-width: 160px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.marketplace-sort-select:focus {
  border-color: #1f4377;
  box-shadow: 0 0 0 3px rgba(31, 67, 119, 0.12);
  outline: none;
}

.shop-active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 1.25rem;
}

.shop-active-filters-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9ca3af;
  margin-right: 4px;
}

.shop-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #1f4377;
  color: #fff;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.shop-filter-tag a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
}

.marketplace-empty-state {
  background: #fff;
  border-radius: 16px;
  border: 1px dashed #d1d5db;
  padding: 4rem 2rem !important;
}

.marketplace-empty-state i {
  color: #1f4377;
  opacity: 0.35 !important;
}

/* ─── Shop detail page ─── */
.shop-detail-section {
  padding-top: 5.5rem;
}

.shop-detail-image-wrap {
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shop-detail-image {
  max-height: 720px;
  min-height: 480px;
  width: 100%;
  object-fit: cover;
}

@media (max-width: 991.98px) {
  .shop-page-header {
    margin-top: 4rem;
    padding: 2rem 1.25rem 1.25rem;
  }

  .marketplace-layout {
    padding: 0 1.25rem 3rem;
  }

  .marketplace-sidebar {
    position: static;
    flex: none;
    width: 100%;
  }

  .shop-detail-image-wrap {
    min-height: 400px;
  }

  .shop-detail-image {
    max-height: 560px;
    min-height: 360px;
  }
}

@media (max-width: 767.98px) {
  .marketplace-filter-toggle {
    display: flex;
  }

  .marketplace-sidebar {
    display: none !important;
  }

  .marketplace-sidebar.active {
    display: block !important;
    padding: 1rem;
  }

  .marketplace-sidebar.active .shop-filter-card {
    max-width: 420px;
    margin: 0 auto;
    box-shadow: 0 8px 40px rgba(15, 23, 42, 0.15);
  }

  .marketplace-products-header {
    flex-direction: column;
    align-items: stretch;
  }

  .marketplace-sort-wrap {
    width: 100%;
  }

  .marketplace-sort-select {
    flex: 1;
    min-width: 0;
  }

  .shop-filter-panel--categories {
    max-height: none;
  }

  .shop-detail-image-wrap {
    min-height: 320px;
  }

  .shop-detail-image {
    max-height: 480px;
    min-height: 280px;
  }
}

@media (max-width: 575.98px) {
  .shop-page-header {
    padding: 1.75rem 1rem 1rem;
  }

  .marketplace-layout {
    padding: 0 1rem 2.5rem;
  }
}
