/* Zimora marketplace pages — extends existing template tokens */

.zm-page {
  padding: 28px 0 64px;
}

.zm-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  color: var(--text-3, #73787d);
  font-size: 14px;
}

.zm-crumbs a:hover {
  color: var(--primary);
}

.zm-panel,
.zm-card,
.zm-side,
.zm-stat {
  background: #fff;
  border: 1px solid var(--line-2, #ececec);
  border-radius: 10px;
}

.zm-panel,
.zm-card {
  padding: 20px;
}

.zm-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.zm-side {
  width: 260px;
  flex: 0 0 260px;
  padding: 16px 12px;
}

.zm-side .zm-store {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px 16px;
  border-bottom: 1px solid var(--line-2, #ececec);
  margin-bottom: 10px;
}

.zm-side a,
.zm-filter a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  color: inherit;
  font-weight: 500;
}

.zm-side a.active,
.zm-side a:hover,
.zm-filter a.active {
  background: var(--primary);
  color: #fff;
}

.zm-main {
  flex: 1;
  min-width: 0;
}

.zm-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.zm-stat {
  padding: 16px 18px;
}

.zm-stat span {
  display: block;
  color: var(--text-3, #73787d);
  font-size: 13px;
  margin-bottom: 6px;
}

.zm-stat strong {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
}

.zm-table-wrap {
  overflow-x: auto;
}

.zm-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.zm-table th,
.zm-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line-2, #ececec);
  vertical-align: middle;
  text-align: left;
  font-size: 14px;
}

.zm-table th {
  font-size: 13px;
  color: var(--text-3, #73787d);
  font-weight: 600;
}

.zm-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #eef1f4;
  color: #333e48;
  white-space: nowrap;
}

.zm-badge.pending { background: #fff4d6; color: #8a6200; }
.zm-badge.processing { background: #e8f1ff; color: #0b4ea2; }
.zm-badge.shipped { background: #e7f7fb; color: #0b6e86; }
.zm-badge.delivered,
.zm-badge.published,
.zm-badge.active,
.zm-badge.paid,
.zm-badge.verified { background: #e7f6ef; color: #0b7a53; }
.zm-badge.cancelled,
.zm-badge.refunded,
.zm-badge.draft { background: #fdecec; color: #b42318; }

.zm-vendor-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 13px;
  color: #5c656d;
}

.zm-vendor-line img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: contain;
  background: #f6f7f8;
}

.zm-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.zm-form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 14px;
}

.zm-form input,
.zm-form select,
.zm-form textarea {
  width: 100%;
  border: 1px solid #e4e7ea;
  border-radius: 8px;
  padding: 11px 14px;
  background: #fff;
  color: inherit;
}

.zm-form textarea {
  min-height: 120px;
  resize: vertical;
}

.zm-form .zm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.zm-check {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.zm-hero-store {
  border-radius: 12px;
  overflow: hidden;
  min-height: 180px;
  background: #0b7a53 url("../images/banner/banner-30.jpg") center/cover;
  position: relative;
}

.zm-hero-store .zm-store-card {
  position: relative;
  margin: 110px 20px 20px;
  background: #fff;
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.zm-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 140px;
}

.zm-bars span {
  flex: 1;
  background: var(--primary);
  border-radius: 6px 6px 0 0;
  opacity: 0.85;
}

.zm-note {
  display: none;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #e7f6ef;
  color: #0b7a53;
}

.zm-acc {
  position: relative;
}

.zm-acc-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  min-width: 220px;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 10px;
  padding: 8px;
  z-index: 30;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.zm-acc:hover .zm-acc-menu,
.zm-acc:focus-within .zm-acc-menu {
  display: block;
}

.zm-acc-menu a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
}

.zm-acc-menu a:hover {
  background: #f4f7f6;
  color: var(--primary);
}

.zm-acc-menu hr {
  margin: 6px 0;
  border: 0;
  border-top: 1px solid #ececec;
}

.zm-gallery {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
}

.zm-gallery .zm-main-img {
  width: 100%;
  border-radius: 12px;
  background: #f7f7f7;
  object-fit: contain;
  aspect-ratio: 1;
}

.zm-thumbs button {
  border: 1px solid #ececec;
  background: #fff;
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 8px;
  width: 72px;
}

.zm-thumbs img {
  width: 100%;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
}

.zm-side-toggle {
  display: none;
}

.card-product.style-row.zm-list {
  flex-direction: row;
  gap: 16px;
  padding: 12px;
  border: 1px solid #ececec;
  border-radius: 12px;
  margin-bottom: 16px;
  background: #fff;
}

.card-product.style-row.zm-list .card-product-wrapper {
  max-width: 220px;
  width: 100%;
}

@media (max-width: 1199px) {
  .zm-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 991px) {
  .zm-layout {
    flex-direction: column;
  }
  .zm-side {
    width: 100%;
    flex-basis: auto;
    display: none;
  }
  .zm-side.open {
    display: block;
  }
  .zm-side-toggle {
    display: inline-flex;
    margin-bottom: 12px;
  }
  .zm-form .zm-grid,
  .zm-gallery {
    grid-template-columns: 1fr;
  }
  .zm-stats {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 575px) {
  .zm-stats {
    grid-template-columns: 1fr;
  }
  .card-product.style-row.zm-list {
    flex-direction: column;
  }
  .card-product.style-row.zm-list .card-product-wrapper {
    max-width: none;
  }
}

/* Consistency polish — uses existing Zimora color, radius, and type */

.zm-page h1 {
  font-size: 28px;
  line-height: 1.25;
  font-weight: 600;
  margin-bottom: 24px;
}

.zm-page h2 {
  font-size: 22px;
  line-height: 1.3;
  font-weight: 600;
}

.zm-crumbs {
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 8px;
}

.zm-crumbs span {
  color: #b0b6bb;
}

.zm-page .card-product .card-image {
  display: block;
  aspect-ratio: 1;
  background: #f4f6f5;
  border-radius: 8px;
  overflow: hidden;
}

.zm-page .card-product .card-image img,
.zm-page .card-product.style-row .card-product-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.zm-page .card-product {
  height: 100%;
}

.zm-vendor-line img {
  width: 28px;
  height: 18px;
  border-radius: 2px;
  object-fit: contain;
}

.col-lg-9 > .row > .col-xl-3,
.zm-main .col-xl-3 {
  width: 100%;
}

@media (min-width: 576px) {
  .col-lg-9 > .row > .col-xl-3 {
    width: 50%;
  }
}

@media (min-width: 1200px) {
  .col-lg-9 > .row > .col-xl-3 {
    width: 33.333%;
  }
}

.zm-form input,
.zm-form select,
.zm-form textarea,
.zm-filter input,
.zm-sort,
.zm-coupon input {
  border: 1px solid #e4e7ea;
  border-radius: 8px;
  min-height: 44px;
  background: #fff;
}

.zm-form input:focus,
.zm-form select:focus,
.zm-form textarea:focus,
.zm-filter input:focus,
.zm-sort:focus,
.zm-coupon input:focus {
  outline: none;
  border-color: var(--primary);
}

.zm-sort {
  padding: 0 12px;
  min-width: 180px;
}

.zm-toolbar .tf-btn {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 14px;
}

.zm-toolbar .tf-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.zm-filter-toggle {
  display: none;
  margin-bottom: 12px;
}

.wg-quantity .btn-decrease,
.wg-quantity .btn-increase {
  width: 32px;
  height: 32px;
  border: 1px solid #e4e7ea;
  border-radius: 8px;
  background: #fff;
}

.wg-quantity .quantity-product {
  width: 42px;
}

.tf-cart-item > img {
  width: 84px;
  height: 84px;
  object-fit: contain;
  background: #f4f6f5;
  border-radius: 8px;
  flex: 0 0 84px;
}

.zm-table tbody tr:hover {
  background: #f7faf8;
}

.zm-table td img,
.zm-table th img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  background: #f4f6f5;
  border-radius: 8px;
  vertical-align: middle;
  margin-right: 8px;
}

.zm-stat {
  min-height: 108px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.zm-trend {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  font-style: normal;
  font-weight: 600;
}

.zm-trend.up { color: var(--primary); }
.zm-trend.down { color: #b42318; }

.zm-pager {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 28px;
}

.zm-pager a {
  min-width: 40px;
  height: 40px;
  border: 1px solid #e4e7ea;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.zm-pager a.active,
.zm-pager span.active,
.zm-pager a:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.zm-empty {
  display: none;
  text-align: center;
  padding: 36px 16px;
}

.zm-empty.show {
  display: block;
}

.zm-empty .icon {
  font-size: 36px;
  color: var(--primary);
}

.zm-toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1080;
  background: #111827;
  color: #fff;
  border-radius: 8px;
  padding: 12px 14px;
  display: none;
  max-width: 280px;
}

.zm-toast.show { display: block; }

.modal-quick-view .modal-content {
  border: 0;
  border-radius: 12px;
}

.modal-quick-view img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #f4f6f5;
  border-radius: 8px;
}

.zm-page form.zm-card[style*="max-width"] {
  margin-left: auto;
  margin-right: auto;
}

.zm-gallery {
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 12px;
  padding: 12px;
}

.zm-main-img {
  background: #f4f6f5;
}

.zm-card > img[src*="images/blog"] {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 8px;
}

.nav-icon .count-box {
  position: relative;
}

@media (max-width: 991px) {
  .zm-filter {
    display: none;
  }
  .zm-filter.open {
    display: block;
  }
  .zm-filter-toggle {
    display: inline-flex;
  }
  .tf-cart-item {
    flex-wrap: wrap;
  }
  .zm-page h1 {
    font-size: 24px;
  }
}

.zm-mobile-search {
  display: none;
  padding: 0 0 14px;
}

.zm-mobile-search form {
  display: flex;
  gap: 8px;
}

.zm-mobile-search input {
  flex: 1;
  min-width: 0;
  border: 1px solid #e4e7ea;
  border-radius: 8px;
  min-height: 44px;
  padding: 0 12px;
}

@media (max-width: 991px) {
  .zm-mobile-search {
    display: block;
  }
}

@media (max-width: 767px) {
  .inner-header .support-wrap {
    display: none !important;
  }
}
