/* Shop and category listings: compact title band, two-column phone grid, quiet product cards. */

/* Title band */
body.ath .hero-section .entry-header {
  min-height: 0;
  padding-block: 0;
}
body.ath .hero-section {
  padding-block: clamp(22px, 4vw, 44px);
}

/* Blocksy's 60px section padding is too much around a product grid, especially on phones */
body.ath [data-vertical-spacing*="top"] {
  padding-top: clamp(20px, 4vw, 44px);
}
body.ath [data-vertical-spacing*="bottom"] {
  padding-bottom: clamp(32px, 6vw, 72px);
}

/* Toolbar (result count + sort) */
body.ath .woo-listing-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
body.ath .woocommerce-result-count {
  margin: 0;
  color: var(--ath-muted);
  font-size: var(--ath-text-xs);
  letter-spacing: 0.04em;
}
body.ath .woocommerce-ordering {
  margin: 0 0 0 auto;
}

/* Grid */
body.ath ul.products[data-products] {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 14px;
  margin: 0;
  padding: 0;
}
@media (min-width: 700px) {
  body.ath ul.products[data-products] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px 22px;
  }
}
@media (min-width: 1100px) {
  body.ath ul.products[data-products] {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 44px 28px;
  }
}
body.ath ul.products[data-products] > li.product {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
}

/* Card */
body.ath ul.products li.product figure {
  position: relative;
  margin: 0 0 12px;
  overflow: hidden;
  border: 1px solid var(--ath-stone);
  border-radius: 3px;
  background: #fff;
}
body.ath ul.products li.product .ct-media-container {
  display: block;
  aspect-ratio: 4 / 5;
  background: #fff;
}
body.ath ul.products li.product .ct-media-container img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto !important;
  object-fit: cover;
}
/* The artwork on the panel: whole picture, a little air around it, a soft shadow like a print leaning on a wall. */
body.ath ul.products li.product .ct-media-container img.wp-post-image {
  box-sizing: border-box;
  padding: 9% 10%;
  object-fit: contain;
  filter: drop-shadow(0 3px 9px rgba(36, 36, 36, 0.24));
}
/* The room scene that fades in on hover fills the panel. */
body.ath ul.products li.product .ct-media-container img.ct-swap {
  object-fit: cover;
}
body.ath ul.products li.product .woocommerce-loop-product__title {
  margin: 0 0 4px;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body.ath ul.products li.product .woocommerce-loop-product__title a {
  color: var(--ath-ink);
  text-decoration: none;
}
body.ath ul.products li.product .woocommerce-loop-product__title a:hover {
  color: var(--ath-olive-dark);
}
body.ath ul.products li.product .price {
  font-size: var(--ath-text-sm);
  font-weight: 500;
  color: var(--ath-charcoal);
}
body.ath ul.products li.product .price del {
  color: var(--ath-muted);
  font-weight: 400;
}
body.ath ul.products li.product .price ins {
  text-decoration: none;
}
body.ath ul.products li.product .entry-meta {
  display: none;
}

/* Toolbar: filters button, result count, sort. Replaces Blocksy's own count and sort select. */
body.ath .woo-listing-top {
  display: none;
}
.ath-shopbar {
  margin-bottom: 20px;
}
.ath-shopbar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ath-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--ath-ink);
  border-radius: 4px;
  background: transparent;
  color: var(--ath-ink);
  font-family: var(--ath-font-ui);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}
.ath-filter-toggle:hover {
  background: var(--ath-ink);
  color: #fff;
}
.ath-filter-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--ath-olive);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0;
}
.ath-result-count {
  flex: 1;
  min-width: 0;
  text-align: right;
}
.ath-result-count .woocommerce-result-count {
  margin: 0;
  color: var(--ath-muted);
  font-size: var(--ath-text-xs);
}
.ath-sort select {
  min-height: 46px;
  max-width: 190px;
  padding-right: 34px;
}
@media (max-width: 599px) {
  .ath-result-count {
    display: none;
  }
  .ath-shopbar-row {
    justify-content: space-between;
  }
}

/* Active filter chips */
.ath-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.ath-chips li {
  margin: 0;
}
body.ath .ath-chips a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--ath-line);
  border-radius: 20px;
  background: var(--ath-white);
  color: var(--ath-ink);
  font-size: var(--ath-text-sm);
  text-decoration: none;
}
body.ath .ath-chips a:hover {
  border-color: var(--ath-ink);
}
body.ath .ath-chips-clear a {
  border-color: transparent;
  background: transparent;
  text-decoration: underline;
}

/* Filter panel: right-hand sheet (full width on phones) */
.ath-filter-panel {
  position: fixed;
  inset: 0;
  z-index: 200;
}
.ath-filter-panel[hidden] {
  display: none;
}
.ath-filter-scrim {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.45);
  opacity: 0;
  transition: opacity var(--ath-dur) var(--ath-ease);
}
.ath-filter-sheet {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(100%, 420px);
  background: var(--ath-white);
  transform: translateX(100%);
  transition: transform var(--ath-dur) var(--ath-ease);
}
.ath-filter-panel.is-open .ath-filter-scrim {
  opacity: 1;
}
.ath-filter-panel.is-open .ath-filter-sheet {
  transform: none;
}
.ath-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 10px 20px;
  border-bottom: 1px solid var(--ath-stone);
}
body.ath .ath-filter-head h2 {
  margin: 0;
  font-size: 1.15rem;
}
.ath-filter-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 20px 20px;
}
.ath-filter-group {
  margin: 0;
  padding: 18px 0;
  border: 0;
  border-bottom: 1px solid var(--ath-stone);
}
.ath-filter-group legend,
.ath-filter-group > label {
  display: block;
  margin: 0 0 10px;
  padding: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ath-ink);
}
.ath-filter-collections {
  max-height: 340px;
  overflow-y: auto;
}
.ath-check {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin: 0;
  font-size: var(--ath-text-sm);
  cursor: pointer;
}
.ath-check input {
  flex: none;
  width: 20px;
  height: 20px;
  accent-color: var(--ath-olive);
}
.ath-check span {
  flex: 1;
}
.ath-check small {
  color: var(--ath-muted);
  font-size: var(--ath-text-xs);
}
.ath-price-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ath-price-inputs label {
  display: block;
  font-size: var(--ath-text-xs);
  color: var(--ath-muted);
}
.ath-price-inputs input {
  width: 100%;
  margin-top: 4px;
}
.ath-filter-hint {
  margin: 10px 0 0;
  font-size: var(--ath-text-xs);
  color: var(--ath-muted);
}
.ath-filter-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--ath-stone);
  background: var(--ath-white);
}
body.ath .ath-filter-clear {
  font-size: var(--ath-text-sm);
  color: var(--ath-ink);
  text-decoration: underline;
  padding: 12px 0;
}
.ath-filter-foot .ath-btn {
  flex: 1;
  max-width: 220px;
}
@media (prefers-reduced-motion: reduce) {
  .ath-filter-scrim,
  .ath-filter-sheet {
    transition: none;
  }
}

/* The pricing plugin appends "Standard shipping included · 10% off applied" to every price; on cards it is noise
   (the header strip and the product page already say it). */
body.ath ul.products li.product .ath-price-included {
  display: none;
}
.ath-filter-group legend {
  float: none;
  width: 100%;
  margin: 0 0 6px;
}

/* Filter panel: collections grouped (rooms, styles, subjects, pop culture) */
.ath-filter-subhead {
  margin: 16px 0 4px;
  font: 600 0.8125rem/1.3 var(--ath-font-ui);
  letter-spacing: 0;
  text-transform: none;
  color: var(--ath-muted);
}
.ath-filter-subhead:first-of-type {
  margin-top: 4px;
}
