/*
 * Shop & product category/tag archive layout
 * Enqueued only on the pages that need it (see mshop_enqueue_conditional_styles()
 * in functions.php) to keep the CSS payload smaller on the rest of the site.
 * Loads after main.css, so it can safely build on the shared base styles.
 */

/* Shop & category archive layout (filters, sidebar, pagination) */
.mshop-shop-page {
  padding-top: 28px;
  padding-bottom: 60px;
}

.mshop-shop-header {
  margin-bottom: 22px;
}

.mshop-shop-header__title {
  margin: 0 0 6px;
  color: #222a3a;
  font-size: 29px;
  font-weight: 950;
}

.mshop-shop-header .term-description,
.mshop-category-hero .term-description {
  margin: 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.9;
}

.mshop-category-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 26px;
  padding: 20px;
  border: 1px solid #e8eaf0;
  border-radius: 18px;
  background: linear-gradient(180deg, #fafbfc, #f5f6f8);
}

.mshop-category-hero__image {
  display: grid;
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  place-items: center;
}

.mshop-category-hero__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mshop-category-hero__content {
  min-width: 0;
}

.mshop-shop-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  align-items: start;
  gap: 28px;
}

.mshop-shop-sidebar {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mshop-filter-group {
  padding: 18px;
  border: 1px solid #e8eaf0;
  border-radius: 16px;
  background: #fff;
}

.mshop-filter-group__title {
  margin: 0 0 12px;
  color: #222a3a;
  font-size: 14px;
  font-weight: 850;
}

.mshop-filter-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mshop-filter-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 10px;
  color: #4a5164;
  font-size: 12.5px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.mshop-filter-list a:hover {
  background: #f6f7fb;
  color: #222a3a;
}

.mshop-filter-list a small {
  color: #9298a5;
  font-weight: 700;
}

.mshop-filter-list li.is-active a {
  background: var(--mshop-accent);
  color: #fff;
}

.mshop-filter-list li.is-active a small {
  color: rgba(255, 255, 255, 0.85);
}

.mshop-filter-group--price .price_slider_wrapper {
  padding-top: 6px;
}

.mshop-filter-group--price .price_slider {
  margin-bottom: 16px;
}

.mshop-filter-group--price .ui-slider .ui-slider-handle {
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--mshop-accent);
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.35);
  outline: none;
}

.mshop-filter-group--price .ui-slider .ui-slider-range {
  background: var(--mshop-accent);
}

.mshop-filter-group--price .price_slider_amount {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mshop-filter-group--price .price_slider_amount .button {
  padding: 7px 12px;
  border-radius: 8px;
  background: var(--mshop-accent);
  color: #fff;
  font-size: 11px;
}

.mshop-filter-group--price .price_label {
  color: #667085;
  font-size: 11.5px;
}

.mshop-shop-main {
  min-width: 0;
}

.mshop-shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding: 12px 16px;
  border: 1px solid #e8eaf0;
  border-radius: 14px;
  background: #fff;
}

.mshop-shop-toolbar .woocommerce-result-count {
  margin: 0;
  color: #667085;
  font-size: 12.5px;
}

.mshop-shop-toolbar .woocommerce-ordering {
  margin: 0;
}

.mshop-shop-toolbar .woocommerce-ordering select {
  min-height: 38px;
  padding: 6px 30px 6px 12px;
  border: 1px solid #dfe2e8;
  border-radius: 9px;
  background: #fff;
  color: #343b4b;
  font-size: 12px;
}

.mshop-products-grid--shop {
  grid-template-columns: repeat(3, 1fr);
}

.mshop-shop-pagination {
  margin-top: 28px;
}

.mshop-shop-pagination nav.woocommerce-pagination {
  display: flex;
  justify-content: center;
}

.mshop-shop-pagination .woocommerce-pagination ul.page-numbers {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mshop-shop-pagination .woocommerce-pagination .page-numbers {
  display: grid;
  min-width: 40px;
  height: 40px;
  border: 1px solid #e8eaf0;
  border-radius: 10px;
  background: #fff;
  color: #4a5164;
  font-size: 13px;
  font-weight: 700;
  place-items: center;
}

.mshop-shop-pagination .woocommerce-pagination a.page-numbers:hover {
  border-color: var(--mshop-accent);
  color: var(--mshop-accent);
}

.mshop-shop-pagination .woocommerce-pagination .page-numbers.current {
  border-color: var(--mshop-accent);
  background: var(--mshop-accent);
  color: #fff;
}

@media (max-width: 1180px) {
  .mshop-shop-layout {
    grid-template-columns: 220px 1fr;
    gap: 20px;
  }

  .mshop-products-grid--shop {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .mshop-shop-layout {
    grid-template-columns: 1fr;
  }

  .mshop-shop-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .mshop-filter-group {
    flex: 1 1 240px;
  }

  .mshop-category-hero {
    flex-wrap: wrap;
  }
}

@media (max-width: 620px) {
  .mshop-shop-toolbar {
    flex-wrap: wrap;
  }

  .mshop-products-grid--shop {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .mshop-shop-sidebar {
    flex-direction: column;
  }
}

