/**
 * Product category archive shell — TC-B08 (hero, sidebar, catalog main).
 */

.section--category .catalog-main__head .section-head h2 {
  font-size: var(--fs-h2);
}

.section--category .catalog-main__head:empty {
  display: none;
  margin: 0;
}

.category-hero__image {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-lg, 12px);
  object-fit: cover;
}

.category-hero__media-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 1.25 / 1;
  border-radius: var(--radius-lg, 12px);
}

.category-hero__media-placeholder {
  background: linear-gradient(145deg, var(--brand-soft, #eef4ff), var(--surface-2, #f5f5f5));
}

.section--category .catalog-main {
  min-width: 0;
}

.section--category .category-toolbar {
  margin-bottom: 14px;
}

.section--category .category-toolbar .pills > .pill {
  justify-content: flex-start;
  text-align: right;
}

/* Filter toggle lives in category hero (not toolbar). */
body.tax-product_cat .category-hero__meta .hero-actions,
body.arsin-brand-archive .category-hero__meta .hero-actions{
  margin: 0;
}

body.tax-product_cat .category-hero__meta .hero-actions .category-toolbar__filter-button,
body.arsin-brand-archive .category-hero__meta .hero-actions .category-toolbar__filter-button{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 40px;
  padding: 8px 12px;
  background: var(--brand);
  border: 1px solid var(--brand);
  border-radius: var(--radius, 8px);
  color: var(--white, #fff);
  font: inherit;
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

body.tax-product_cat .category-hero__meta .hero-actions .category-toolbar__filter-button .icon,
body.arsin-brand-archive .category-hero__meta .hero-actions .category-toolbar__filter-button .icon{
  font-size: 18px;
}

@media (min-width: 761px) {
  body.tax-product_cat .category-hero__meta .hero-actions .category-toolbar__filter-button,
body.arsin-brand-archive .category-hero__meta .hero-actions .category-toolbar__filter-button{
    display: none;
  }

  /* Lead already lives in category hero — avoid duplicating term description. */
  body.tax-product_cat .catalog-main > .term-description,
body.arsin-brand-archive .catalog-main > .term-description{
    display: none;
  }
}

@media (min-width: 1121px) {
  body.tax-product_cat .category-hero__title,
body.arsin-brand-archive .category-hero__title{
    justify-content: flex-start;
    max-width: none;
  }

  body.tax-product_cat .category-hero__title h1,
body.arsin-brand-archive .category-hero__title h1{
    flex: 0 1 auto;
  }

  body.tax-product_cat .category-hero__content .lead,
body.arsin-brand-archive .category-hero__content .lead{
    max-width: none;
  }

  body.tax-product_cat .category-hero__media img,
body.arsin-brand-archive .category-hero__media img,
  body.tax-product_cat .category-hero__image,
body.arsin-brand-archive .category-hero__image{
    object-fit: contain;
  }
}

.section--category .woocommerce {
  margin-top: 0;
}

.section--category .asc-shop-layout {
  margin-top: 0;
}

.section--category .asc-shop-products {
  min-width: 0;
}

.section--category .products.grid--products {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.section--category .products.grid--products > li {
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.section--category .products.grid--products .product-card {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Catalog pagination — spaced brand pills (D33 / H11d).
   Reset WC default contiguous ul/li borders (woocommerce-rtl.css). */
.section--category nav.woocommerce-pagination {
  margin-top: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  text-align: center;
}

.section--category nav.woocommerce-pagination::-webkit-scrollbar {
  display: none;
}

.section--category nav.woocommerce-pagination ul.page-numbers {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  list-style: none;
  margin: 0 auto;
  padding: 0;
  width: max-content;
  min-width: 100%;
  max-width: none;
  clear: none;
  float: none;
  white-space: nowrap;
  border: 0;
  background: transparent;
}

.section--category nav.woocommerce-pagination ul.page-numbers li {
  display: block;
  float: none;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
}

.section--category nav.woocommerce-pagination a.page-numbers,
.section--category nav.woocommerce-pagination span.page-numbers {
  display: inline-grid;
  place-items: center;
  box-sizing: border-box;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--ease, .2s ease), border-color var(--ease, .2s ease), background var(--ease, .2s ease);
}

.section--category nav.woocommerce-pagination a.page-numbers:hover,
.section--category nav.woocommerce-pagination a.page-numbers:focus-visible {
  color: var(--brand);
  border-color: var(--brand-line-strong, var(--brand));
  background: var(--brand-soft);
  outline: none;
}

.section--category nav.woocommerce-pagination span.page-numbers.current {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--white);
}

.section--category nav.woocommerce-pagination span.page-numbers.dots {
  min-width: auto;
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--muted, #6b727c);
  font-weight: 700;
}

.section--category .catalog-empty-state {
  margin-top: 0;
}

/* —— ASC bottom blocks (intro / gallery / FAQ) — Arsin presentation (H11e / D34) —— */
#asc-cat-archive-blocks.asc-cat-archive-blocks {
  margin: 28px 0 8px;
  padding: 0;
  clear: both;
}

#asc-cat-archive-blocks .asc-cat-section {
  margin: 0 0 22px;
  padding: 16px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg, 12px);
}

#asc-cat-archive-blocks .asc-cat-section__head {
  margin-bottom: 12px;
}

#asc-cat-archive-blocks .asc-cat-section__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0;
  color: var(--text-heading, #212529);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
}

#asc-cat-archive-blocks .asc-cat-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  margin-inline-start: auto;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--muted);
  font-size: var(--fs-ui);
  font-weight: 700;
  opacity: 1;
  white-space: nowrap;
}

#asc-cat-archive-blocks .asc-cat-badge em {
  font-style: normal;
  font-weight: 700;
  color: inherit;
}

#asc-cat-archive-blocks .asc-cat-intro__body,
#asc-cat-archive-blocks .asc-cat-intro__body p {
  font-size: var(--fs-ui);
  line-height: 1.75;
}

/* Longer clamped preview; fade only in the last ~20% so most text stays readable */
#asc-cat-archive-blocks .asc-cat-intro .asc-cat-intro__excerpt:not(.is-short):not(.is-expanded) {
  max-height: 320px;
  overflow: hidden;
}

#asc-cat-archive-blocks .asc-cat-intro .asc-cat-intro__excerpt:not(.is-short):not(.is-expanded) {
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 78%,
    rgba(0, 0, 0, 0.12) 100%
  );
  mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 78%,
    rgba(0, 0, 0, 0.12) 100%
  );
}

#asc-cat-archive-blocks .asc-cat-intro .asc-cat-intro__excerpt.is-expanded {
  max-height: none;
  overflow: visible;
  -webkit-mask-image: none;
  mask-image: none;
}

#asc-cat-archive-blocks .button.asc-cat-intro__toggle,
#asc-cat-archive-blocks .button.asc-cat-customer-gallery__more {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  float: none !important;
  clear: none;
  align-self: center;
  margin-top: 14px;
  margin-inline: auto;
  min-height: 40px !important;
  padding: 8px 16px !important;
  background: var(--white) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius) !important;
  box-shadow: none !important;
  color: var(--ink) !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  cursor: pointer;
  transition: color var(--ease, .18s ease), border-color var(--ease, .18s ease), background var(--ease, .18s ease);
}

#asc-cat-archive-blocks .button.asc-cat-intro__toggle:hover,
#asc-cat-archive-blocks .button.asc-cat-intro__toggle:focus-visible,
#asc-cat-archive-blocks .button.asc-cat-customer-gallery__more:hover,
#asc-cat-archive-blocks .button.asc-cat-customer-gallery__more:focus-visible {
  background: var(--brand-soft) !important;
  border-color: var(--brand-line-strong, var(--brand)) !important;
  color: var(--brand) !important;
  outline: none;
}

#asc-cat-archive-blocks .asc-cat-intro {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

#asc-cat-archive-blocks .asc-cat-customer-gallery__more-wrap {
  display: flex;
  justify-content: center;
  margin: 14px 0 0;
  text-align: unset;
  clear: none;
}

#asc-cat-archive-blocks .asc-cat-customer-gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(5.5rem, 100%), 1fr));
  gap: 10px;
  margin-top: 4px;
}

#asc-cat-archive-blocks .asc-cat-customer-gallery__item {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
  transition: border-color var(--ease, .18s ease), box-shadow var(--ease, .18s ease);
}

#asc-cat-archive-blocks .asc-cat-customer-gallery__item:hover {
  border-color: var(--brand-line-strong, var(--brand));
  box-shadow: 0 2px 10px color-mix(in srgb, var(--brand) 8%, transparent);
}

#asc-cat-archive-blocks .asc-cat-customer-gallery__item img {
  border-radius: 0;
}

#asc-cat-archive-blocks .asc-cat-faq__list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

#asc-cat-archive-blocks .asc-cat-faq__item {
  margin: 0;
  overflow: hidden;
  background: var(--soft-2, var(--soft));
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

#asc-cat-archive-blocks .asc-cat-faq__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  background: var(--white, #fff);
  border: 0;
  color: var(--ink);
  font: inherit;
  font-size: var(--type-lg, 15px);
  font-weight: 600;
  text-align: right;
  cursor: pointer;
}

#asc-cat-archive-blocks .asc-cat-faq__trigger::after {
  content: "expand_more";
  flex: 0 0 auto;
  color: var(--muted, #69737d);
  font-family: "Material Symbols Outlined", sans-serif;
  font-size: 21px;
  line-height: 1;
  direction: ltr;
}

#asc-cat-archive-blocks .asc-cat-faq__trigger[aria-expanded="true"]::after {
  content: "expand_less";
}

#asc-cat-archive-blocks .asc-cat-faq__panel {
  padding: 0 14px 12px;
  background: var(--white, #fff);
  color: var(--ink);
  font-size: var(--type-lg, 15px);
  line-height: 1.75;
}

#asc-cat-archive-blocks .asc-cat-faq__panel.is-open {
  display: block;
}

@media (max-width: 767px) {
  .section--category .catalog-sidebar {
    order: 2;
  }

  .section--category .catalog-main {
    order: 1;
  }
}

@media (min-width: 761px) and (max-width: 1120px) {
  body.tax-product_cat .category-band .category-hero,
body.arsin-brand-archive .category-band .category-hero{
    grid-template-columns: minmax(0, 1.85fr) minmax(180px, 260px);
    gap: 20px;
    align-items: center;
  }

  body.tax-product_cat .category-hero__content,
body.arsin-brand-archive .category-hero__content{
    gap: 14px;
    min-width: 0;
  }

  body.tax-product_cat .category-hero__content h1,
body.arsin-brand-archive .category-hero__content h1,
  body.tax-product_cat .category-hero__title,
body.arsin-brand-archive .category-hero__title,
  body.tax-product_cat .category-hero__content .lead,
body.arsin-brand-archive .category-hero__content .lead{
    max-width: none;
  }

  body.tax-product_cat .category-hero__media,
body.arsin-brand-archive .category-hero__media{
    width: 100%;
    max-width: 260px;
    justify-self: start;
  }

  body.tax-product_cat .category-hero__media img,
body.arsin-brand-archive .category-hero__media img,
  body.tax-product_cat .category-hero__image,
body.arsin-brand-archive .category-hero__image{
    object-fit: contain;
  }

  .section--category .catalog-main {
    min-width: 0;
  }

  .section--category .catalog-main__head {
    margin-bottom: 12px;
  }

  .section--category .catalog-main__head .section-head {
    align-items: flex-start;
    gap: 10px 12px;
  }

  .section--category .catalog-main__head .section-head h2 {
    font-size: var(--fs-h2);
    line-height: 1.45;
  }

  .section--category .category-toolbar {
    margin-bottom: 12px;
  }

  .section--category .category-toolbar .pills > .pill {
    min-height: 36px;
    padding: 7px 10px;
    font-size: 12px;
  }

  #asc-cat-archive-blocks.asc-cat-archive-blocks {
    margin-top: 24px;
  }

  #asc-cat-archive-blocks .asc-cat-section {
    margin-bottom: 18px;
    padding: 14px;
    border-radius: var(--radius, 8px);
  }

  #asc-cat-archive-blocks .asc-cat-section__head {
    margin-bottom: 10px;
  }

  #asc-cat-archive-blocks .asc-cat-section__title {
    gap: 8px 10px;
    font-size: 17px;
    line-height: 1.4;
  }

  #asc-cat-archive-blocks .asc-cat-badge {
    padding: 0;
    font-size: var(--fs-ui);
  }

  #asc-cat-archive-blocks .asc-cat-intro .asc-cat-intro__excerpt:not(.is-short):not(.is-expanded) {
    max-height: 300px;
  }

  #asc-cat-archive-blocks .asc-cat-customer-gallery__grid {
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 8px;
  }

  #asc-cat-archive-blocks .asc-cat-customer-gallery__item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
  }

  #asc-cat-archive-blocks .button.asc-cat-intro__toggle,
  #asc-cat-archive-blocks .button.asc-cat-customer-gallery__more {
    min-height: 38px !important;
    padding: 7px 14px !important;
    font-size: 12.5px !important;
  }

  #asc-cat-archive-blocks .asc-cat-faq__list {
    gap: 7px;
  }

  #asc-cat-archive-blocks .asc-cat-faq__trigger {
    min-height: 44px;
    padding: 10px 12px;
    font-size: var(--type-lg, 15px);
    line-height: 1.65;
  }

  #asc-cat-archive-blocks .asc-cat-faq__panel {
    padding: 0 12px 12px;
    font-size: var(--type-lg, 15px);
  }
}

@media (max-width: 760px) {
  body.tax-product_cat .category-band .category-hero,
body.arsin-brand-archive .category-band .category-hero{
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    padding: 20px 0 18px;
  }

  body.tax-product_cat .category-hero__content,
body.arsin-brand-archive .category-hero__content{
    gap: 18px;
    min-width: 0;
  }

  body.tax-product_cat .category-hero__content .lead,
body.arsin-brand-archive .category-hero__content .lead{
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: initial;
    overflow: visible;
    max-width: none;
    margin: 0;
  }

  body.tax-product_cat .category-hero__meta,
body.arsin-brand-archive .category-hero__meta{
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: stretch;
    gap: 10px;
  }

  body.tax-product_cat .category-hero__meta .hero-actions,
body.arsin-brand-archive .category-hero__meta .hero-actions,
  body.tax-product_cat .category-hero__meta .hero-actions .category-toolbar__filter-button,
body.arsin-brand-archive .category-hero__meta .hero-actions .category-toolbar__filter-button{
    width: 100%;
    min-width: 0;
  }

  body.tax-product_cat .category-hero__meta .price-update-banner,
body.arsin-brand-archive .category-hero__meta .price-update-banner{
    width: max-content;
    max-width: 100%;
    min-height: 40px;
    white-space: nowrap;
  }

  body.tax-product_cat .category-hero__meta .hero-actions .category-toolbar__filter-button,
body.arsin-brand-archive .category-hero__meta .hero-actions .category-toolbar__filter-button{
    padding: 8px 10px;
  }

  body.tax-product_cat .category-hero__media,
body.arsin-brand-archive .category-hero__media{
    display: none;
  }

  .section--category {
    overflow-x: clip;
  }

  body.tax-product_cat .catalog-main > .term-description,
body.arsin-brand-archive .catalog-main > .term-description{
    display: none;
  }

  .section--category .catalog-main__head {
    margin-bottom: 12px;
  }

  .section--category .catalog-main__head .section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px 10px;
  }

  .section--category .catalog-main__head .section-head h2 {
    min-width: 0;
    font-size: var(--fs-h2);
    line-height: 1.5;
  }

  .section--category .catalog-main__head .section-head p {
    grid-column: 1 / -1;
    font-size: 13px;
    line-height: 1.8;
  }

  .section--category .category-toolbar {
    margin-bottom: 12px;
  }

  .section--category .products.grid--products {
    gap: 6px;
  }

  .section--category .category-toolbar .pills > .pill {
    min-height: 38px;
    padding: 7px 8px;
    font-size: 12px;
    white-space: nowrap;
  }

  .section--category .product-card__image {
    min-height: 0;
    aspect-ratio: 1 / 1;
  }

  .section--category .product-card__content {
    padding: 9px 8px 8px;
  }

  .section--category .product-card__title {
    min-height: 0;
    margin-bottom: 0;
  }

  .section--category .product-card__footer {
    margin-top: 12px;
    padding-top: 0;
  }

  .section--category nav.woocommerce-pagination {
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-top: 14px;
    overflow-x: hidden;
    overflow-y: visible;
  }

  .section--category nav.woocommerce-pagination ul.page-numbers {
    flex-wrap: wrap !important;
    justify-content: center;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
  }

  .section--category nav.woocommerce-pagination a.page-numbers,
  .section--category nav.woocommerce-pagination span.page-numbers {
    min-width: 36px;
    min-height: 40px;
    padding: 0 6px;
    font-size: 13px;
    font-weight: 900;
    touch-action: manipulation;
  }

  .section--category nav.woocommerce-pagination span.page-numbers.dots {
    min-width: 14px;
    min-height: 40px;
    padding: 0;
  }

  #asc-cat-archive-blocks.asc-cat-archive-blocks {
    margin: 22px 0 6px;
  }

  #asc-cat-archive-blocks .asc-cat-section {
    margin-bottom: 16px;
    padding: 13px;
    border-radius: var(--radius, 8px);
  }

  #asc-cat-archive-blocks .asc-cat-section__head {
    margin-bottom: 10px;
  }

  #asc-cat-archive-blocks .asc-cat-section__title {
    align-items: flex-start;
    gap: 8px;
    font-size: 16px;
    line-height: 1.45;
  }

  #asc-cat-archive-blocks .asc-cat-badge {
    padding: 0;
    font-size: var(--fs-ui);
  }

  #asc-cat-archive-blocks .asc-cat-intro .asc-cat-intro__excerpt:not(.is-short):not(.is-expanded) {
    max-height: 280px;
  }

  #asc-cat-archive-blocks .button.asc-cat-intro__toggle,
  #asc-cat-archive-blocks .button.asc-cat-customer-gallery__more {
    width: auto;
    min-height: 38px !important;
    margin-top: 10px;
    padding: 7px 13px !important;
    font-size: 12.5px !important;
  }

  #asc-cat-archive-blocks .asc-cat-customer-gallery__grid {
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 8px;
  }

  #asc-cat-archive-blocks .asc-cat-customer-gallery__item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
  }

  #asc-cat-archive-blocks .asc-cat-faq__list {
    gap: 7px;
  }

  #asc-cat-archive-blocks .asc-cat-faq__trigger {
    min-height: 44px;
    padding: 10px 11px;
    font-size: var(--type-lg, 15px);
    line-height: 1.7;
    text-align: start;
  }

  #asc-cat-archive-blocks .asc-cat-faq__panel {
    padding: 0 11px 11px;
    font-size: var(--type-lg, 15px);
    line-height: 1.8;
  }
}
