/*
 * Shop, category and product search (inc/shop.php, template-parts/shop/archive.php), after the
 * Perfume Valley shop layout: header, chips, sticky bar, filters beside the grid.
 */
.ans-hero { padding: 22px 0 0; background: var(--an-surface); border-bottom: 1px solid var(--an-line); }
.ans-hero__grid { display: grid; gap: 10px 48px; padding: 14px 0 18px; }
.ans-hero__title { margin: 0; font-size: clamp(28px, 4vw, 44px); }
.ans-hero__count { display: inline-block; margin-left: 6px; font: 600 15px/1 var(--an-sans); letter-spacing: 0; color: var(--an-muted); vertical-align: middle; }
.ans-hero__intro { max-width: 62ch; color: var(--an-ink-2); font-size: 15.5px; line-height: 1.6; }
.ans-hero__intro p { margin: 0; }
@media (min-width: 1100px) { .ans-hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; } .ans-hero__intro { justify-self: end; } }
.ans-chips__track { display: flex; gap: 8px; padding: 0 0 18px; overflow-x: auto; scrollbar-width: none; }
.ans-chips__track::-webkit-scrollbar { display: none; }

/* Sticky bar */
.ans-bar { position: sticky; top: var(--an-header-h); z-index: 40; background: rgba(255, 248, 231, .94); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--an-line); }
.admin-bar .ans-bar { top: calc(var(--an-header-h) + 32px); }
.ans-bar__in { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; min-height: 60px; padding-block: 8px; }
.ans-bar__filters { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border: 1.5px solid var(--an-brand); border-radius: var(--an-r-btn); background: var(--an-surface); font: 700 14px/1 var(--an-sans); color: var(--an-ink); }
.ans-bar__n { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--an-accent); color: var(--an-brand-deep); font-size: 12px; }
.ans-bar__count { margin: 0; font-size: 14px; font-weight: 600; color: var(--an-muted); }
.ans-active { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ans-active a { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--an-r-btn); background: var(--an-brand); color: #fff; font-size: 13px; font-weight: 600; text-decoration: none; }
.ans-active a.ans-active__clear { background: none; color: var(--an-ink); text-decoration: underline; }
.ans-bar__sort { margin-left: auto; }
.ans-bar__sort .woocommerce-ordering { margin: 0; }
.ans-bar__sort select { height: 42px; min-height: 42px; padding: 0 40px 0 16px; border: 1.5px solid var(--an-line-2); border-radius: var(--an-r-btn); background-color: var(--an-surface); font: 600 14px/1 var(--an-sans); cursor: pointer; }
@media (max-width: 767px) { .ans-bar__count { display: none; } }

/* Body: filters + grid */
.ans-body { display: grid; gap: 24px; padding-block: 22px 56px; }
.ans-main { min-width: 0; }
@media (min-width: 1100px) {
	.ans-body { grid-template-columns: 240px minmax(0, 1fr); align-items: start; gap: 32px; }
	.ans-bar__filters { display: none; }
	.ans-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1280px) { .ans-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Filters: a bottom sheet on phones/tablets, a sticky column on desktop */
.ans-filters .ans-sheet { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; max-height: 82vh; border-radius: 22px 22px 0 0; background: var(--an-surface); transform: translateY(100%); transition: transform .3s var(--an-ease); }
.ans-filters.is-open .ans-sheet { transform: none; }
.ans-sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--an-line); }
.ans-sheet__title { margin: 0; font: 700 20px/1 var(--an-display); }
.ans-sheet__body { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 20px; }
.ans-sheet__foot { display: flex; gap: 10px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--an-line); }
.ans-sheet__foot .an-btn { flex: 1; }
@media (min-width: 1100px) {
	.ans-filters { position: sticky; top: calc(var(--an-header-h) + 80px); inset: auto; z-index: 1; visibility: visible; pointer-events: auto; }
	.admin-bar .ans-filters { top: calc(var(--an-header-h) + 112px); }
	.ans-filters .an-drawer__scrim { display: none; }
	.ans-filters .ans-sheet { position: static; max-height: none; border: 1px solid var(--an-line); border-radius: var(--an-r-lg); transform: none; }
	.ans-sheet__head { padding: 16px 20px; }
	.ans-sheet__close, .ans-sheet__foot { display: none; }
	.ans-sheet__body { padding: 6px 20px 14px; }
}
.an-f { padding: 12px 0; border-bottom: 1px solid var(--an-line); }
.an-f:last-child { border-bottom: 0; }
.an-f__head { display: flex; align-items: center; justify-content: space-between; padding: 4px 0 8px; font: 800 14px/1.2 var(--an-sans); letter-spacing: .04em; text-transform: uppercase; cursor: pointer; list-style: none; }
.an-f__head::-webkit-details-marker { display: none; }
.an-f__head::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--an-muted); border-bottom: 2px solid var(--an-muted); transform: rotate(45deg); transition: transform .2s; }
.an-f[open] .an-f__head::after { transform: rotate(-135deg); }
.an-f__list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.an-f__opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--an-ink-2); font-size: 14.5px; font-weight: 500; text-decoration: none; }
.an-f__opt:hover { background: var(--an-bg); color: var(--an-ink); }
.an-f__opt small { color: var(--an-faint); font-size: 12.5px; font-weight: 600; }
.an-f__opt.is-on { background: var(--an-brand-soft); color: var(--an-brand-deep); font-weight: 700; }
.an-f__opt--radio { justify-content: flex-start; }
.an-f__opt--radio::before { content: ""; flex: none; width: 16px; height: 16px; border: 1.5px solid var(--an-line-2); border-radius: 50%; background: #fff; }
.an-f__opt--radio.is-on::before { border: 5px solid var(--an-brand); }

/* Empty */
.ans-empty { text-align: center; padding: 40px 24px; }
.ans-empty__title { margin: 0 0 6px; font: 700 24px/1.2 var(--an-display); }
.ans-empty__body { margin: 0 auto 18px; max-width: 46ch; color: var(--an-muted); }
.ans-empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.ans .woocommerce-pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; border: 0; }
.ans .woocommerce-pagination li { border: 0; }
.ans .woocommerce-pagination a, .ans .woocommerce-pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 12px; border: 1.5px solid var(--an-line); border-radius: var(--an-r-btn); background: var(--an-surface); color: var(--an-ink); font-weight: 700; text-decoration: none; }
.ans .woocommerce-pagination .current { background: var(--an-brand); border-color: var(--an-brand); color: #fff; }

/* Category title row (count sits beside the H1) and the buying guide under the grid */
.ans-hero__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.ans-hero__head .ans-hero__count { margin: 0; }
.ans-guide { padding-block: 8px 56px; }
.ans-guide__body { max-width: 900px; padding: 28px 22px; border: 1px solid var(--an-line); border-radius: var(--an-r-lg); background: var(--an-surface); font-size: 15.5px; }
.ans-guide__body > * { max-width: none; }
.ans-guide__body h2 { margin-top: 1.2em; font-size: clamp(20px, 2.2vw, 26px); }
.ans-guide__body h2:first-child { margin-top: 0; }
.ans-guide__body h3 { font-size: 17px; }
@media (min-width: 768px) { .ans-guide__body { padding: 36px 40px; } }
