/* Preloved marketplace listing */
.amal-preloved-page {
  background: linear-gradient(180deg, #f8fafc 0%, #fff 28%, #fff 100%);
  padding-bottom: 56px;
}

.amal-preloved-page .amal-all-clubs-hero__content {
  max-width: 680px;
}

.amal-preloved-toolbar-wrap {
  padding-top: 28px;
  padding-bottom: 8px;
}

.amal-preloved-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.amal-preloved-toolbar__field {
  position: relative;
  flex: 1 1 220px;
  min-width: 0;
}

.amal-preloved-toolbar__field--select {
  flex: 0 1 220px;
}

.amal-preloved-toolbar__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
}

.amal-preloved-toolbar__input,
.amal-preloved-toolbar__select {
  width: 100%;
  height: 48px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0 14px 0 42px;
  font-size: 0.95rem;
  color: #0f172a;
  background: #fff;
}

.amal-preloved-toolbar__select {
  padding-left: 14px;
  cursor: pointer;
}

.amal-preloved-toolbar__input:focus,
.amal-preloved-toolbar__select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.amal-preloved-toolbar__submit {
  flex: 0 0 auto;
  height: 48px;
  padding: 0 22px;
  border: none;
  border-radius: 12px;
  background: #0f172a;
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.amal-preloved-toolbar__submit:hover {
  background: #020617;
  transform: translateY(-1px);
}

.amal-preloved-toolbar__reset {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
}

.amal-preloved-toolbar__reset:hover {
  color: #0f172a;
  border-color: #cbd5e1;
}

.amal-preloved-list-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0 16px;
}

.amal-preloved-list-head h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
}

.amal-preloved-grid {
  padding-bottom: 24px;
}

.amal-preloved-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.amal-preloved-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.amal-preloved-card__media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  min-height: 200px;
  background: #f8fafc;
  overflow: hidden;
  padding: 10px;
}

.amal-preloved-card__media img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain !important;
  object-position: center;
}

.amal-preloved-card:hover .amal-preloved-card__media img {
  transform: none;
}

.amal-preloved-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border-radius: 8px;
  background: #b9101a;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.amal-preloved-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px 16px 14px;
  gap: 8px;
}

.amal-preloved-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.amal-preloved-card__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  flex: 1;
}

.amal-preloved-card__title a {
  color: #0f172a;
  text-decoration: none;
}

.amal-preloved-card__title a:hover {
  color: #2563eb;
}

.amal-preloved-card__price {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #2563eb;
  white-space: nowrap;
}

.amal-preloved-card__location {
  margin: 0;
  font-size: 0.85rem;
  color: #64748b;
}

.amal-preloved-card__location i {
  color: #2563eb;
  margin-right: 4px;
}

.amal-preloved-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.amal-preloved-card__meta li {
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
}

.amal-preloved-card__cat {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid rgba(37, 99, 235, 0.2);
  font-size: 0.75rem;
  font-weight: 700;
  color: #1d4ed8;
}

.amal-preloved-card__footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.amal-preloved-card__date {
  font-size: 0.78rem;
  color: #94a3b8;
}

.amal-preloved-card__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.amal-preloved-card__like {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.amal-preloved-card__like.is-liked {
  color: #e11d48;
  border-color: rgba(225, 29, 72, 0.35);
  background: #fff1f2;
}

.amal-preloved-card__cta {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 10px;
  background: #0f172a;
  color: #fff !important;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.amal-preloved-card__cta:hover {
  background: #020617;
  color: #fff !important;
}

.amal-preloved-empty {
  text-align: center;
  padding: 48px 16px;
  color: #64748b;
  font-weight: 600;
}

.amal-preloved-pagination {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.amal-preloved-pagination .pagination {
  gap: 6px;
}

@media (max-width: 575.98px) {
  .amal-preloved-toolbar__field--select {
    flex: 1 1 100%;
  }

  .amal-preloved-toolbar__submit,
  .amal-preloved-toolbar__reset {
    flex: 1 1 calc(50% - 6px);
    justify-content: center;
  }
}

/* All preloved categories grid — icon tile (matches blog categories) */
.amal-all-preloved-cats-page .amal-club-card__icon-wrap {
  background: linear-gradient(145deg, #334155, #475569);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.2);
}

.amal-all-preloved-cats-page .amal-club-card__icon {
  filter: none;
}

.amal-preloved-category-page .amal-blog-category-hero__icon-wrap {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.amal-preloved-category-page .amal-blog-category-hero__icon {
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.amal-preloved-subcats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 24px;
  padding-bottom: 4px;
}

.amal-preloved-subcats__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.amal-preloved-subcats__chip:hover {
  border-color: #cbd5e1;
  color: #0f172a;
}

.amal-preloved-subcats__chip.is-active {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

.amal-preloved-subcats__count {
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0.85;
}

/* ============================================================
   Single preloved product — grid-area layout (v2)
   ============================================================ */
.amal-pd-page {
  background: #f8fafc;
  padding-bottom: 64px;
}

.amal-pd-topbar {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 16px 0;
}

.amal-pd-topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.amal-pd-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 0.85rem;
}

.amal-pd-breadcrumb a {
  color: #64748b;
  text-decoration: none;
  font-weight: 500;
}

.amal-pd-breadcrumb a:hover {
  color: #2563eb;
}

.amal-pd-breadcrumb span {
  color: #0f172a;
  font-weight: 700;
}

.amal-pd-breadcrumb i {
  color: #cbd5e1;
  font-size: 0.65rem;
  margin: 0 2px;
}

.amal-pd-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #0f172a;
  color: #fff !important;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  flex-shrink: 0;
}

.amal-pd-back:hover {
  background: #020617;
}

.amal-pd-container {
  padding-top: 28px;
}

/* Grid-area layout: buy box sits right after gallery on every breakpoint,
   avoiding the "price hidden below the fold" bug of Bootstrap column stacking. */
.amal-pd-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "gallery"
    "buybox"
    "details"
    "similar";
  gap: 28px;
}

@media (min-width: 992px) {
  .amal-pd-grid {
    grid-template-columns: minmax(0, 1fr) 380px;
    grid-template-areas:
      "gallery buybox"
      "details buybox"
      "similar similar";
    column-gap: 32px;
    row-gap: 32px;
    align-items: start;
  }
}

.amal-pd-area--gallery { grid-area: gallery; }
.amal-pd-area--buybox { grid-area: buybox; }
.amal-pd-area--details { grid-area: details; min-width: 0; }
.amal-pd-area--similar { grid-area: similar; }

/* Gallery */
.amal-pd-gallery__stage {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.amal-pd-gallery__stage img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.amal-pd-gallery__premium {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #b9101a;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.amal-pd-gallery__float {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.amal-pd-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.16);
  transition: transform 0.15s ease, color 0.15s ease;
}

.amal-pd-icon-btn:hover {
  transform: translateY(-1px);
}

.amal-pd-icon-btn.is-active {
  color: #e11d48;
}

.amal-pd-gallery__thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.amal-pd-gallery__thumb {
  width: 68px;
  height: 68px;
  padding: 4px;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
}

.amal-pd-gallery__thumb.is-active {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}

.amal-pd-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Buy box */
.amal-pd-buybox {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

@media (min-width: 992px) {
  .amal-pd-buybox {
    position: sticky;
    top: 24px;
  }
}

.amal-pd-title {
  margin: 0 0 8px;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
}

.amal-pd-price {
  margin: 0 0 18px;
  font-size: 1.85rem;
  font-weight: 800;
  color: #2563eb;
}

.amal-pd-specs {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  border-top: 1px solid #f1f5f9;
}

.amal-pd-specs li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.88rem;
}

.amal-pd-specs li i {
  color: #2563eb;
  font-size: 1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.amal-pd-specs__label {
  color: #94a3b8;
  font-weight: 600;
  flex-shrink: 0;
  min-width: 74px;
}

.amal-pd-specs__value {
  color: #1e293b;
  font-weight: 700;
  margin-left: auto;
  text-align: right;
}

.amal-pd-contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.amal-pd-contact__row {
  display: flex;
  gap: 10px;
}

.amal-pd-contact__row .amal-pd-contact__btn {
  flex: 1 1 0;
}

.amal-pd-contact__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 16px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.amal-pd-contact__btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.amal-pd-contact__btn--chat {
  background: #2563eb;
  color: #fff !important;
}

.amal-pd-contact__btn--outline {
  background: #fff;
  color: #334155 !important;
  border-color: #e2e8f0;
}

.amal-pd-contact__btn--wa {
  color: #047857 !important;
  border-color: rgba(4, 120, 87, 0.25);
}

.amal-pd-seller {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid #f1f5f9;
}

.amal-pd-seller__avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}

.amal-pd-seller__info {
  min-width: 0;
}

.amal-pd-seller__name {
  margin: 0;
  font-weight: 700;
  font-size: 0.92rem;
  color: #0f172a;
}

.amal-pd-seller__meta {
  margin: 0;
  font-size: 0.78rem;
  color: #94a3b8;
}

.amal-pd-trust {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 16px 0 0;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.4;
}

.amal-pd-trust i {
  color: #16a34a;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Description / details */
.amal-pd-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
  margin-bottom: 20px;
}

.amal-pd-card:last-child {
  margin-bottom: 0;
}

.amal-pd-card--stats {
  padding-top: 18px;
  padding-bottom: 18px;
}

.amal-pd-card__title {
  margin: 0 0 14px;
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
}

.amal-pd-desc {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #334155;
}

.amal-pd-desc img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

/* Similar listings */
.amal-pd-similar-link {
  text-decoration: none !important;
  color: #1d4ed8 !important;
  background: #eff6ff !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 575.98px) {
  .amal-pd-topbar .container {
    flex-direction: row;
  }

  .amal-pd-specs__label {
    min-width: 60px;
  }
}
