/* All Products archive chrome — peptidemaxxing /products/all */

.ap {
  --ink2: #2d3134;
  --muted: #6a7173;
  --line: #e5e7eb;
  --line2: #d1d5db;
  --bg: #f9fafb;
  --sans: "DM Sans", system-ui, sans-serif;
  background: #fff;
  color: var(--ink2);
  font-family: var(--sans);
}

.ap__wrap {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 18px;
  box-sizing: border-box;
}

.ap__hero {
  padding: 16px 0 8px;
  text-align: center;
}
@media (min-width: 768px) {
  .ap__hero { padding: 24px 0 12px; }
}

.ap__hero-inner {
  max-width: 42rem;
  margin: 0 auto;
}

.ap__title {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #111827;
}

.ap__sub {
  margin: 6px 0 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #4b5563;
}
@media (min-width: 640px) {
  .ap__sub { font-size: 1rem; }
}

.ap__filters {
  padding: 8px 0 0;
}

.ap__toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

@media (min-width: 640px) {
  .ap__toolbar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
  }
}

.ap__count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  white-space: nowrap;
  color: #4b5563;
}
.ap__count svg { color: #4b5563; flex: 0 0 auto; }
.ap__count strong {
  color: #111827;
  font-size: 0.875rem;
  font-weight: 700;
}
.ap__count span {
  font-size: 0.75rem;
  color: #4b5563;
}

.ap__search {
  position: relative;
  flex: 1 1 220px;
  max-width: 28rem;
  width: 100%;
}
.ap__search-ico {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  pointer-events: none;
}
.ap__search input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--line2);
  border-radius: 8px;
  background: #fff;
  font-size: 0.875rem;
  color: #111827;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.ap__search input:focus {
  border-color: #9ca3af;
  box-shadow: 0 0 0 2px rgba(156, 163, 175, 0.35);
}

.ap__dd {
  position: relative;
  width: 100%;
  flex: 0 1 auto;
}
@media (min-width: 640px) {
  .ap__dd { width: auto; min-width: 200px; }
}

.ap__dd-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid var(--line2);
  border-radius: 8px;
  font-size: 0.875rem;
  color: #111827;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, box-shadow .15s;
}
.ap__dd-btn:hover { border-color: #9ca3af; }
.ap__dd.is-open .ap__dd-btn {
  border-color: #9ca3af;
  box-shadow: 0 0 0 2px rgba(156, 163, 175, 0.35);
}
.ap__dd-btn svg {
  flex: 0 0 auto;
  color: #6b7280;
  transition: transform .2s;
}
.ap__dd.is-open .ap__dd-btn svg { transform: rotate(180deg); }
.ap__dd-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ap__dd-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 40;
  background: #fff;
  border: 1px solid var(--line2);
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,.12), 0 8px 10px -6px rgba(0,0,0,.08);
  max-height: 400px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
@media (min-width: 640px) {
  .ap__dd-panel {
    right: auto;
    min-width: 280px;
  }
}
.ap__dd-panel[hidden] { display: none !important; }

.ap__dd-search {
  padding: 12px;
  border-bottom: 1px solid var(--line);
}
.ap__dd-search input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  border: 1px solid var(--line2);
  border-radius: 8px;
  background: var(--bg);
  font-size: 0.875rem;
  color: #111827;
  outline: none;
}
.ap__dd-search input:focus {
  border-color: #9ca3af;
  box-shadow: 0 0 0 2px rgba(156, 163, 175, 0.35);
}

.ap__dd-list {
  overflow-y: auto;
  max-height: 320px;
}
.ap__dd-opt {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  padding: 10px 16px;
  border: 0;
  background: transparent;
  font-size: 0.875rem;
  color: #374151;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s;
}
.ap__dd-opt:hover { background: var(--bg); }
.ap__dd-opt.is-active {
  background: #f3f4f6;
  color: #111827;
  font-weight: 600;
}
.ap__dd-opt.is-filtered-out { display: none; }

.ap__sold {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid var(--line2);
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  font-size: 0.875rem;
  color: #111827;
  user-select: none;
}
.ap__sold:hover { border-color: #9ca3af; }

.ap__switch {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.ap__switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.ap__switch-ui {
  width: 40px;
  height: 20px;
  background: #d1d5db;
  border-radius: 999px;
  position: relative;
  transition: background .2s;
}
.ap__switch-ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 50%;
  transition: transform .2s;
}
.ap__switch input:checked + .ap__switch-ui {
  background: #4b5563;
}
.ap__switch input:checked + .ap__switch-ui::after {
  transform: translateX(20px);
  border-color: #fff;
}
.ap__switch input:focus-visible + .ap__switch-ui {
  box-shadow: 0 0 0 2px rgba(156, 163, 175, 0.45);
}

.ap__list {
  padding: 16px 0 48px;
}
.ap__list.products-section {
  padding-top: 16px;
  padding-bottom: 48px;
  background: #fff;
}
.ap__empty[hidden] { display: none !important; }

/* Archive no longer uses dark page-hero */
body.post-type-archive-peptide_product .site-main > .page-hero,
body.tax-product_category .site-main > .page-hero,
body.tax-product_type .site-main > .page-hero {
  display: none;
}
