/* Shop / archive catalog — ACEFULLY Stitch (Monochrome Velocity) */

.mizhan-shop-page.borumdo-home-page .shop-page--catalog {
  background: var(--borumdo-bg, #fbf9f9);
  color: var(--borumdo-ink, #1b1c1c);
  overflow-x: clip;
}

.borumdo-home__shop-main {
  padding: clamp(32px, 4vw, 48px) 0 clamp(48px, 6vw, 72px);
}

.borumdo-home__shop-main .shop-page__shell {
  width: var(--borumdo-shell, min(100%, 1600px));
  max-width: 100%;
  margin: 0 auto;
  padding: 0 var(--borumdo-margin-desktop, 64px);
  box-sizing: border-box;
}

.mizhan-shop-page .shop-page.shop-page--catalog .woocommerce-notices-wrapper {
  margin: 0;
}

.mizhan-shop-page .shop-page.shop-page--catalog .woocommerce-notices-wrapper:has(
  .woocommerce-message,
  .woocommerce-info,
  .woocommerce-error,
  .woocommerce-notice
) {
  margin-bottom: 24px;
}

/* ---------- Hero & breadcrumbs ---------- */

.shop-catalog-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0 0 24px;
  font-family: var(--borumdo-font-body, "Inter", sans-serif);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--borumdo-muted, #5d5f5f);
}

.shop-catalog-breadcrumbs a {
  color: inherit;
  text-decoration: none;
  transition: color 160ms ease;
}

.shop-catalog-breadcrumbs a:hover {
  color: var(--borumdo-dark, #000000);
}

.shop-catalog-breadcrumbs__sep {
  color: var(--borumdo-line, #cfc4c5);
}

.shop-catalog-breadcrumbs__current {
  color: var(--borumdo-ink, #1b1c1c);
}

.shop-catalog-hero {
  margin-bottom: clamp(32px, 4vw, 64px);
}

.shop-catalog-hero__text {
  max-width: 42rem;
}

.shop-catalog-hero h1 {
  margin: 0 0 16px;
  font-family: var(--borumdo-font-headline, "Archivo Narrow", sans-serif);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--borumdo-dark, #000000);
  text-wrap: balance;
}

.shop-catalog-hero__subtitle {
  margin: 0;
  max-width: 40ch;
  font-family: var(--borumdo-font-body, "Inter", sans-serif);
  font-size: clamp(16px, 1.8vw, 18px);
  font-weight: 400;
  line-height: 1.6;
  color: var(--borumdo-muted, #5d5f5f);
}

/* ---------- Toolbar (count + sort) ---------- */

.shop-catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--borumdo-line, #cfc4c5);
}

.shop-catalog-toolbar__left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.shop-catalog-filter__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--borumdo-dark, #000000);
  border-radius: 0;
  background: transparent;
  color: var(--borumdo-dark, #000000);
  font-family: var(--borumdo-font-body, "Inter", sans-serif);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.shop-catalog-filter__toggle:hover,
.shop-catalog-filter__toggle:focus-visible {
  background: var(--borumdo-dark, #000000);
  color: #ffffff;
}

.shop-catalog-filter__toggle[aria-expanded="true"] {
  background: var(--borumdo-dark, #000000);
  color: #ffffff;
}

.shop-catalog-filter__icon svg {
  width: 18px;
  height: 18px;
}

.shop-catalog-toolbar .woocommerce-result-count {
  float: none;
  margin: 0;
  font-family: var(--borumdo-font-body, "Inter", sans-serif);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--borumdo-muted, #5d5f5f);
}

.shop-catalog-toolbar__sort {
  flex: 0 0 auto;
  margin: 0;
  margin-inline-start: auto;
}

.shop-catalog-intro__sort .shop-sort-by {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--borumdo-muted, #5d5f5f);
}

.shop-catalog-intro__sort .woocommerce-ordering {
  float: none;
  margin: 0;
  position: relative;
}

/* Sort dropdown (shop-catalog-sort.js) */
.shop-sort-select {
  position: relative;
}

.shop-sort-select__native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.shop-sort-select__trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--borumdo-dark, #000000);
  font-family: var(--borumdo-font-body, "Inter", sans-serif);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
  cursor: pointer;
  appearance: none;
  outline: none;
}

.shop-sort-select__trigger:hover,
.shop-sort-select__trigger:focus-visible {
  color: var(--borumdo-muted, #5d5f5f);
}

.shop-sort-select__value {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-sort-select__chevron {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 1px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.shop-sort-select.is-open .shop-sort-select__chevron {
  margin-top: 4px;
  transform: rotate(-135deg);
}

.shop-sort-select__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  min-width: 220px;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background: #ffffff;
  border: 1px solid var(--borumdo-line, #cfc4c5);
  border-radius: 0;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  max-height: min(320px, 70vh);
  overflow-y: auto;
}

.shop-sort-select__option {
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--borumdo-ink, #1b1c1c);
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.shop-sort-select__option:hover,
.shop-sort-select__option.is-focused {
  background: var(--borumdo-surface-container-low, #f5f3f3);
  color: var(--borumdo-dark, #000000);
}

.shop-sort-select__option.is-selected {
  background: var(--borumdo-surface-container, #efeded);
  color: var(--borumdo-dark, #000000);
  font-weight: 600;
}

/* ---------- Category icon nav ---------- */

.shop-catalog-filters {
  margin-bottom: clamp(40px, 5vw, 64px);
}

.shop-catalog-category-nav {
  margin-bottom: 0;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--borumdo-line, #cfc4c5);
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.shop-catalog-category-nav::-webkit-scrollbar {
  display: none;
}

.shop-catalog-category-nav__list {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: nowrap;
  gap: clamp(32px, 5vw, 64px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.shop-catalog-category-nav__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--borumdo-muted, #5d5f5f);
  text-decoration: none;
  transition: color 200ms ease, transform 200ms ease;
}

.shop-catalog-category-nav__link:hover {
  color: var(--borumdo-dark, #000000);
}

.shop-catalog-category-nav__link.is-active {
  color: var(--borumdo-dark, #000000);
}

.shop-catalog-category-nav__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 200ms ease;
}

.shop-catalog-category-nav__icon svg {
  width: 32px;
  height: 32px;
  stroke-width: 1.25;
}

.shop-catalog-category-nav__link:hover .shop-catalog-category-nav__icon {
  transform: scale(1.08);
}

.shop-catalog-category-nav__label {
  padding-bottom: 8px;
  font-family: var(--borumdo-font-body, "Inter", sans-serif);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}

.shop-catalog-category-nav__link.is-active .shop-catalog-category-nav__label {
  border-bottom-color: var(--borumdo-dark, #000000);
}

/* ---------- Product grid (Stitch cards) ---------- */

.shop-catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 48px var(--borumdo-gutter, 24px);
  margin-bottom: clamp(48px, 6vw, 96px);
}

.shop-catalog-grid .borumdo-home__product-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  scroll-snap-align: unset;
}

.shop-catalog-grid .borumdo-home__product-card:hover {
  border-color: transparent;
}

.shop-catalog-grid .borumdo-home__product-media {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: none;
  margin: 0 0 24px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--borumdo-surface-container-low, #f5f3f3);
  overflow: hidden;
}

.shop-catalog-grid .borumdo-home__product-media picture,
.shop-catalog-grid .borumdo-home__product-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: none;
  transition: transform 700ms ease;
}

.shop-catalog-grid .borumdo-home__product-card:hover .borumdo-home__product-media img {
  transform: scale(1.08);
}

.shop-catalog-grid .mizhan-product-card__media-badges {
  top: 16px;
  left: 16px;
  gap: 8px;
}

.shop-catalog-grid .mizhan-product-card__media-badges .borumdo-home__badge,
.shop-catalog-grid .mizhan-product-card__media-badges .mizhan-product-card__discount,
.shop-catalog-grid .mizhan-product-card__media-badges .mizhan-product-card__custom-badge {
  padding: 4px 12px;
  border-radius: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shop-catalog-grid .mizhan-product-card__media-badges .borumdo-home__badge {
  background: var(--borumdo-dark, #000000);
  color: #ffffff;
}

.shop-catalog-grid .borumdo-home__product-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  min-width: 0;
}

.shop-catalog-grid .borumdo-home__product-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  min-width: 0;
}

.shop-catalog-grid .borumdo-home__product-title-link {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  font-family: var(--borumdo-font-headline, "Archivo Narrow", sans-serif);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.25;
  text-transform: uppercase;
  color: var(--borumdo-dark, #000000);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-catalog-grid .borumdo-home__product-title-link:hover {
  color: var(--borumdo-muted, #5d5f5f);
}

.shop-catalog-grid .borumdo-home__product-specs--card {
  margin: 0;
  color: var(--borumdo-muted, #5d5f5f);
  font-family: var(--borumdo-font-body, "Inter", sans-serif);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.35;
  text-transform: uppercase;
}

.shop-catalog-grid .borumdo-home__product-price-row {
  margin-top: 8px;
}

.shop-catalog-grid .mizhan-product-card-price__current,
.shop-catalog-grid .mizhan-product-card-price__current .amount {
  font-family: var(--borumdo-font-body, "Inter", sans-serif);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--borumdo-dark, #000000);
}

.shop-catalog-grid .mizhan-product-card-price.is-on-sale .mizhan-product-card-price__current,
.shop-catalog-grid .mizhan-product-card-price.is-on-sale .mizhan-product-card-price__current .amount {
  color: var(--borumdo-dark, #000000);
}

.shop-catalog-grid .mizhan-product-card-price__original,
.shop-catalog-grid .mizhan-product-card-price__original .amount {
  color: var(--borumdo-muted, #5d5f5f);
  font-size: 14px;
}

.shop-catalog-grid .borumdo-home__product-rating {
  margin-top: 4px;
}

.shop-catalog-grid .borumdo-home__product-rating-value {
  color: var(--borumdo-muted, #5d5f5f);
}

/* Flash Sale badge — keep existing markup & logic */
.shop-catalog-grid .mizhan-product-card__flash {
  flex: 0 0 auto;
}

/* ---------- Pagination ---------- */

.shop-catalog-pagination {
  margin: 0 0 clamp(40px, 5vw, 64px);
}

.shop-catalog-pagination .woocommerce-pagination {
  margin: 0;
}

.shop-catalog-pagination .woocommerce-pagination ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.shop-catalog-pagination .woocommerce-pagination ul li {
  margin: 0;
}

.shop-catalog-pagination .woocommerce-pagination a,
.shop-catalog-pagination .woocommerce-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 8px;
  border-radius: 0;
  border: 1px solid var(--borumdo-line, #cfc4c5);
  background: transparent;
  color: var(--borumdo-dark, #000000);
  font-family: var(--borumdo-font-body, "Inter", sans-serif);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.shop-catalog-pagination .woocommerce-pagination a:hover,
.shop-catalog-pagination .woocommerce-pagination a:focus-visible {
  border-color: var(--borumdo-dark, #000000);
}

.shop-catalog-pagination .woocommerce-pagination span.current {
  border: 2px solid var(--borumdo-dark, #000000);
  background: var(--borumdo-dark, #000000);
  color: #ffffff;
}

/* ---------- Empty state & trust bar ---------- */

.mizhan-shop-empty {
  padding: 48px 24px;
  border: 1px solid var(--borumdo-line, #cfc4c5);
  border-radius: 0;
  background: var(--borumdo-surface-container-low, #f5f3f3);
  color: var(--borumdo-muted, #5d5f5f);
  text-align: center;
  margin-bottom: 32px;
}

.shop-trust-bar.shop-note {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-top: 0;
  padding-top: 32px;
  border-top: 1px solid var(--borumdo-line, #cfc4c5);
}

.shop-trust-bar__item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  min-width: 0;
}

.shop-trust-bar__icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 0;
  background: var(--borumdo-surface-container-low, #f5f3f3);
  color: var(--borumdo-dark, #000000);
}

.shop-trust-bar__icon svg {
  display: block;
  width: 22px;
  height: 22px;
}

.shop-trust-bar__text strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--borumdo-font-headline, "Archivo Narrow", sans-serif);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--borumdo-dark, #000000);
}

.shop-trust-bar__text span {
  display: block;
  font-size: 13px;
  line-height: 1.45;
  color: var(--borumdo-muted, #5d5f5f);
}

/* ---------- Legacy static shop (non borumdo shell) ---------- */

.shop-page--catalog:not(.borumdo-home__shop-main) {
  --shop-shell-max: min(100%, 1640px);
  --shop-shell-pad-x: 40px;
}

.shop-page--catalog:not(.borumdo-home__shop-main) > .container {
  width: 100%;
  max-width: var(--shop-shell-max);
  padding: 0 var(--shop-shell-pad-x) 56px;
  box-sizing: border-box;
}

/* ---------- Responsive ---------- */

@media (max-width: 1200px) {
  .shop-catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 979px) {
  .shop-catalog-filter__toggle {
    display: inline-flex;
  }

  .shop-catalog-filters:not(.is-open) {
    display: none;
  }

  .shop-catalog-filters.is-open .shop-catalog-category-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .shop-catalog-filters.is-open .shop-catalog-category-nav__link {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--borumdo-line, #cfc4c5);
  }

  .shop-catalog-filters.is-open .shop-catalog-category-nav__label {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .shop-catalog-filters.is-open .shop-catalog-category-nav__link.is-active {
    border-color: var(--borumdo-dark, #000000);
  }
}

@media (min-width: 980px) {
  .shop-catalog-filter__toggle {
    display: none;
  }

  .shop-catalog-filters {
    display: block;
  }
}

@media (max-width: 980px) {
  .shop-catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px var(--borumdo-gutter, 24px);
  }

  .shop-catalog-category-nav__list {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .borumdo-home__shop-main .shop-page__shell {
    padding: 0 var(--borumdo-margin-mobile, 16px);
  }

  .shop-catalog-grid {
    gap: 24px 12px;
  }

  .shop-catalog-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .shop-catalog-toolbar__sort {
    margin-inline-start: 0;
    width: 100%;
  }

  .shop-catalog-intro__sort .shop-sort-select {
    width: 100%;
  }

  .shop-catalog-intro__sort .shop-sort-select__trigger {
    width: 100%;
    justify-content: space-between;
  }

  .shop-catalog-intro__sort .shop-sort-select__menu {
    left: 0;
    right: 0;
    min-width: 0;
    width: 100%;
  }

  .shop-trust-bar.shop-note {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .shop-trust-bar.shop-note {
    grid-template-columns: 1fr;
  }
}

/* Mobile: product grid stays 2 columns (overrides stale minify cache) */
@media (max-width: 767px) {
  .acefully-stitch-shop .shop-catalog-grid,
  .mizhan-shop-page .shop-catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 24px 12px !important;
  }
}
