/* Soler — catalogue: the shop, categories and product search (woocommerce/archive-product.php) and the
   product page (single-product.php). Product cards: card.css. Page shell, chapter marks, forms and
   notices: base.css. Buy button, stock line and quantity: shop.css. */

/* ---------------------------------------------------------------------------
   Breadcrumbs
   ------------------------------------------------------------------------- */

.crumbs {
	position: relative;
	z-index: 2;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 8px;
	margin: 0 0 18px;
	color: var(--muted);
	font-size: 13px;
	font-style: italic;
}

.crumbs a {
	color: var(--green);
	background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
	transition: background-size 0.45s var(--ease-out);
}

.crumbs a:hover,
.crumbs a:focus-visible {
	background-size: 100% 1px;
}

.crumbs__sep {
	opacity: 0.45;
}

.crumbs__item:last-child {
	max-width: 42ch;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ---------------------------------------------------------------------------
   Hero + category chips
   ------------------------------------------------------------------------- */

.catalog-hero {
	margin-bottom: clamp(24px, 3vw, 48px);
}

/* Long category names wrap before the flower's column. */
.catalog-hero .page-hero__title,
.catalog-hero .page-hero__lead {
	max-width: min(15em, calc(100% - 20vw));
}

.catalog-hero .page-hero__lead {
	max-width: min(40em, calc(100% - 20vw));
}

/* Flowers here are sized by height, so a slender lavender and a wide aster take the same room. */
.flower--catalog,
.flower--related {
	width: auto;
}

.flower--catalog img,
.flower--related img {
	width: auto;
	height: 100%;
}

.flower--catalog {
	top: clamp(-70px, -3.4vw, -30px);
	height: clamp(190px, 20vw, 330px);
}

/* A row of paper tabs; drag it sideways with the mouse or swipe it. */
.catalog-chips {
	position: relative;
	margin: 0 -8vw clamp(28px, 3.4vw, 56px);
	padding: 0 8vw;
	overflow-x: auto;
	scrollbar-width: none;
	cursor: grab;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 6vw, #000 calc(100% - 6vw), transparent);
	mask-image: linear-gradient(90deg, transparent, #000 6vw, #000 calc(100% - 6vw), transparent);
}

.catalog-chips::-webkit-scrollbar {
	display: none;
}

.catalog-chips.is-dragging {
	cursor: grabbing;
}

.catalog-chips__track {
	display: flex;
	align-items: center;
	gap: 10px;
	width: max-content;
	margin: 0;
	padding: 4px 0 10px;
	list-style: none;
}

.catalog-chip {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 6px 18px 6px 6px;
	background: #fffefb;
	border: 1px solid rgba(27, 29, 26, 0.14);
	color: var(--text);
	font-size: 15px;
	white-space: nowrap;
	transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease, transform 0.45s var(--ease-out);
}

.catalog-chip:not(:has(.catalog-chip__img)) {
	padding-left: 18px;
}

.catalog-chip__img {
	flex: none;
	width: 36px;
	height: 36px;
	overflow: hidden;
	border-radius: 50%;
	background: var(--sand);
}

.catalog-chip__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.catalog-chip__count {
	color: var(--muted);
	font-size: 12px;
	font-style: italic;
}

.catalog-chip:hover,
.catalog-chip:focus-visible {
	border-color: var(--green);
	color: var(--green);
	transform: translateY(-2px);
}

.catalog-chip.is-current {
	background: var(--green);
	border-color: var(--green);
	color: var(--cream);
}

.catalog-chip.is-current .catalog-chip__count {
	color: rgba(255, 253, 248, 0.7);
}

/* ---------------------------------------------------------------------------
   Filters beside the results
   ------------------------------------------------------------------------- */

.catalog {
	display: grid;
	grid-template-columns: clamp(220px, 17vw, 300px) minmax(0, 1fr);
	gap: clamp(28px, 4vw, 72px);
	align-items: start;
}

.filters {
	position: relative;
}

.filters__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	padding-bottom: 14px;
	border-bottom: 1px solid rgba(27, 29, 26, 0.22);
}

.filters__title {
	color: var(--green);
	font-size: clamp(20px, 1.6vw, 26px);
}

.filters__close {
	display: none;
}

/* Clear everything from the top of the panel — the full list is long. Muted while nothing is set. */
.filters__clear {
	flex: none;
	margin-left: auto;
	white-space: nowrap;
	color: var(--green);
	font-size: 12.5px;
	letter-spacing: 0.06em;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-transform: uppercase;
	text-underline-offset: 4px;
	animation: notice-in 0.4s var(--ease-out);
}

.filters__clear.is-inactive {
	color: var(--muted);
	opacity: 0.5;
	pointer-events: none;
	text-decoration-color: transparent;
}

/* Categories in the filter panel: the menu's five groups unfold to their subcategories. */
.cats__groups,
.cats__list,
.cats__sub {
	margin: 0;
	padding: 0;
	list-style: none;
}

.cats__group summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 9px 0;
	color: var(--ink);
	font-size: 15.5px;
	cursor: pointer;
	list-style: none;
	transition: color 0.25s ease;
}

.cats__group summary::-webkit-details-marker {
	display: none;
}

.cats__group summary span {
	display: inline-grid;
	place-items: center;
	width: 20px;
	height: 20px;
	border: 1px solid rgba(41, 102, 64, 0.45);
	border-radius: 50%;
	color: var(--green);
	font-size: 14px;
	line-height: 1;
	transition: transform 0.4s var(--ease-out);
}

.cats__group[open] summary {
	color: var(--green);
}

.cats__group[open] summary span {
	transform: rotate(45deg);
}

.cats__list {
	padding: 2px 0 10px 12px;
	border-left: 1px solid var(--line);
	animation: notice-in 0.4s var(--ease-out);
}

.cats__link {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	padding: 4px 0;
	color: var(--text);
	font-size: 14.5px;
	line-height: 1.35;
	transition: color 0.25s ease, transform 0.35s var(--ease-out);
}

.cats__link:hover {
	color: var(--green);
	transform: translateX(3px);
}

.cats__link[aria-current="page"] {
	color: var(--green);
	font-style: italic;
}

.cats__link[aria-current="page"]::before {
	content: "·";
	margin-right: -4px;
}

.cats__link--all {
	color: var(--green);
	font-style: italic;
}

.cats__link--sub {
	padding-left: 12px;
	color: var(--muted);
	font-size: 13.5px;
}

.cats__count {
	color: var(--muted);
	font-size: 12px;
	font-style: italic;
	font-variant-numeric: tabular-nums;
}

.filters__group {
	min-width: 0;
	margin: 0;
	padding: 20px 0 22px;
	border: 0;
	border-bottom: 1px solid var(--line);
}

.filters__legend {
	margin-bottom: 14px;
	padding: 0;
	color: var(--muted);
	font-size: 13px;
	font-style: italic;
	letter-spacing: 0.02em;
}

.filters .filters__check {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 0;
	color: var(--text);
	font-size: 15px;
	line-height: 1.4;
	cursor: pointer;
}

.filters__note {
	margin-top: 10px;
	color: var(--muted);
	font-size: 12.5px;
	font-style: italic;
	line-height: 1.45;
}

/* Price: two handles on one hand-drawn line, mirrored by the "от / до" fields. Range inputs are
   reset with !important because base.css styles every field in main.page strongly. */
.filters__range {
	position: relative;
	height: 28px;
	margin: 4px 9px 14px;
}

.filters__range input[type="range"] {
	position: absolute;
	inset: 0;
	z-index: 2;
	width: 100% !important;
	height: 28px;
	min-height: 0 !important;
	margin: 0;
	padding: 0 !important;
	background: none !important;
	border: 0 !important;
	box-shadow: none !important;
	pointer-events: none;
	-webkit-appearance: none;
	appearance: none;
}

.filters__range input[type="range"]::-webkit-slider-thumb {
	width: 18px;
	height: 18px;
	background: var(--cream);
	border: 1.5px solid var(--green);
	border-radius: 50%;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
	cursor: grab;
	pointer-events: auto;
	-webkit-appearance: none;
	appearance: none;
	transition: transform 0.25s var(--ease-out);
}

.filters__range input[type="range"]::-moz-range-thumb {
	width: 16px;
	height: 16px;
	background: var(--cream);
	border: 1.5px solid var(--green);
	border-radius: 50%;
	cursor: grab;
	pointer-events: auto;
}

.filters__range input[type="range"]:active::-webkit-slider-thumb {
	cursor: grabbing;
	transform: scale(1.15);
}

.filters__range input[type="range"]::-webkit-slider-runnable-track {
	background: none;
}

/* No focus box or tap flash around the slider when a knob is grabbed; the keyboard still gets a
   soft ring on the knob itself. */
.filters__range input[type="range"],
.filters__range input[type="range"]:focus {
	outline: none !important;
	-webkit-tap-highlight-color: transparent;
	-webkit-user-select: none;
	user-select: none;
}

.filters__range input[type="range"]::-moz-focus-outer {
	border: 0;
}

.filters__range input[type="range"]:focus-visible::-webkit-slider-thumb {
	box-shadow: 0 0 0 4px rgba(41, 102, 64, 0.16), 0 2px 6px rgba(0, 0, 0, 0.18);
}

.filters__range input[type="range"]:focus-visible::-moz-range-thumb {
	box-shadow: 0 0 0 4px rgba(41, 102, 64, 0.16);
}

.filters__range ::selection {
	background: transparent;
}

.filters__track {
	position: absolute;
	top: 50%;
	right: 0;
	left: 0;
	height: 1px;
	background: rgba(27, 29, 26, 0.25);
}

.filters__fill {
	position: absolute;
	top: -0.5px;
	left: var(--from, 0%);
	right: var(--to, 0%);
	height: 2px;
	background: var(--green);
}

.filters__prices {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 10px;
}

.filters .filters__prices label {
	display: flex;
	min-width: 0;
	align-items: center;
	gap: 6px;
	margin: 0;
	color: var(--muted);
	font-size: 13px;
	font-style: italic;
}

.filters__prices input[type="number"] {
	flex: 1;
	width: auto !important;
	min-width: 0;
	min-height: 42px !important;
	padding: 8px 10px !important;
	font-size: 15px !important;
	font-style: normal;
	-moz-appearance: textfield;
	appearance: textfield;
}

.filters__prices input::-webkit-outer-spin-button,
.filters__prices input::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

.filters__actions {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 14px;
	padding-top: 22px;
}

/* With JS the filters apply as they change; the button only closes the sheet on phones. */
html.js .filters__apply {
	display: none;
}

.filters__reset {
	color: var(--green);
	font-size: 14px;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
}

.filters__overlay {
	display: none;
}

/* ---------------------------------------------------------------------------
   Results
   ------------------------------------------------------------------------- */

.catalog__results {
	min-width: 0;
	transition: opacity 0.35s ease;
}

.catalog__results.is-loading {
	opacity: 0.4;
	pointer-events: none;
}

.catalog__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 18px;
	margin-bottom: clamp(22px, 2.6vw, 40px);
	padding-bottom: 14px;
	border-bottom: 1px solid rgba(27, 29, 26, 0.22);
}

.catalog__count {
	color: var(--muted);
	font-size: 15px;
	font-style: italic;
}

.catalog__active {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.catalog__active a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 5px 12px;
	background: var(--sand);
	color: var(--green);
	font-size: 13.5px;
	transition: background-color 0.3s ease, color 0.3s ease;
}

.catalog__active a:hover {
	background: var(--green);
	color: var(--cream);
}

.catalog__bar .catalog__sort {
	margin: 0 0 0 auto;
}

/* Search between the count and the sorting: a ledger line with a drawn lens. */
.catalog__search {
	position: relative;
	flex: 1 1 260px;
	max-width: 440px;
	margin: 0 0 0 clamp(8px, 2vw, 36px);
}

.catalog__search svg {
	position: absolute;
	top: 50%;
	left: 2px;
	width: 19px;
	height: 19px;
	fill: none;
	stroke: var(--green);
	stroke-width: 1.4;
	stroke-linecap: round;
	transform: translateY(-50%);
	pointer-events: none;
}

/* !important: the page shell's general field style (a white box) is more specific. */
.catalog__search input[type="search"] {
	width: 100%;
	min-height: 42px !important;
	padding: 8px 8px 8px 30px !important;
	background: transparent !important;
	border: 0 !important;
	border-bottom: 1px solid rgba(27, 29, 26, 0.3) !important;
	border-radius: 0;
	box-shadow: none !important;
	color: var(--ink);
	font: inherit;
	font-size: 15px;
	transition: border-color 0.3s ease;
	-webkit-appearance: none;
	appearance: none;
}

.catalog__search input[type="search"]::placeholder {
	color: #9a9d95;
	font-style: italic;
}

/* The browser's grey × becomes a drawn brand-green one. */
.catalog__search input[type="search"]::-webkit-search-cancel-button {
	width: 16px;
	height: 16px;
	margin-left: 10px;
	background: var(--green);
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6l12 12M18 6 6 18' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6l12 12M18 6 6 18' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
	transition: transform 0.4s var(--ease-out);
}

.catalog__search input[type="search"]::-webkit-search-cancel-button:hover {
	transform: rotate(90deg);
}

.catalog__search input[type="search"]:focus {
	border-bottom-color: var(--green) !important;
	outline: none;
}

.catalog__sort select {
	width: auto !important;
	min-height: 42px !important;
	padding: 8px 40px 8px 14px !important;
	background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23296640' stroke-width='1.3'/%3E%3C/svg%3E") no-repeat right 14px center / 12px !important;
	color: var(--text) !important;
	font-size: 14.5px !important;
	cursor: pointer;
}

.catalog__filters-btn {
	display: none;
}

.catalog__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(28px, 3vw, 52px) clamp(16px, 1.6vw, 28px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.catalog__item {
	min-width: 0;
}

/* Pages: "Зареди още" with the page links under it. */
.catalog__pages {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	margin-top: clamp(44px, 4.4vw, 80px);
}

.catalog__pageinfo {
	color: var(--muted);
	font-size: 13px;
	font-style: italic;
}

.catalog__pages ul.page-numbers {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.catalog__pages .page-numbers a,
.catalog__pages .page-numbers span {
	display: grid;
	place-items: center;
	min-width: 40px;
	height: 40px;
	padding: 0 10px;
	border: 1px solid transparent;
	color: var(--text);
	font-size: 15px;
	transition: border-color 0.3s ease, color 0.3s ease;
}

.catalog__pages .page-numbers a:hover {
	border-color: var(--green);
	color: var(--green);
}

.catalog__pages .page-numbers .current {
	background: var(--green);
	color: var(--cream);
}

.catalog-empty {
	max-width: 36em;
	padding: clamp(32px, 4vw, 72px) 0;
}

.catalog-empty__text {
	margin-bottom: 28px;
	color: var(--text);
	font-size: clamp(18px, 1.5vw, 24px);
	line-height: 1.55;
}

.catalog-empty__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 24px;
}

.catalog-empty__call {
	color: var(--green);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
}

/* ---------------------------------------------------------------------------
   Product page: the packshot on a white card over a sand block, the details beside it
   ------------------------------------------------------------------------- */

.pp {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	gap: clamp(32px, 6vw, 110px);
	align-items: start;
}

.pp__media {
	position: sticky;
	top: 96px;
}

.pp-gallery {
	position: relative;
	padding: 2.4vw 0 0 2.6vw;
}

.pp-gallery::before {
	content: "";
	position: absolute;
	top: -2vw;
	left: -8vw;
	width: 62%;
	height: 72%;
	background: var(--sand);
}

.pp-gallery__card {
	position: relative;
	aspect-ratio: 1;
	background: #fff;
	box-shadow: 0 1.6vw 4vw -1.4vw rgba(0, 0, 0, 0.22);
}

.pp-gallery__stage {
	position: absolute;
	inset: 0;
	overflow: hidden;
	cursor: zoom-in;
	touch-action: pan-y;
}

.pp-gallery__slide {
	position: absolute;
	inset: 0;
	margin: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.8s var(--ease), visibility 0s linear 0.8s;
}

.pp-gallery__slide.is-active {
	opacity: 1;
	visibility: visible;
	transition-delay: 0s;
}

.pp-gallery__slide img {
	position: absolute;
	inset: 7%;
	width: 86%;
	height: 86%;
	object-fit: contain;
	transform-origin: var(--zx, 50%) var(--zy, 50%);
	transition: transform 0.55s var(--ease-out);
}

.pp-gallery__stage.is-zoom img {
	transform: scale(1.9);
}

.pp-gallery__slide--empty {
	cursor: default;
}

.pp-gallery__slide .pp-gallery__placeholder {
	inset: 26% 31%;
	width: 38%;
	height: 48%;
	opacity: 0.7;
}

.pp-gallery__thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 18px 0 0;
	padding: 0;
	list-style: none;
}

.pp-gallery__thumb {
	display: block;
	width: 68px;
	height: 68px;
	padding: 4px;
	background: #fff;
	border: 1px solid rgba(27, 29, 26, 0.12);
	cursor: pointer;
	opacity: 0.6;
	transition: opacity 0.3s ease, border-color 0.3s ease;
}

.pp-gallery__thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.pp-gallery__thumb:hover,
.pp-gallery__thumb.is-active {
	border-color: var(--green);
	opacity: 1;
}

.pp__info {
	padding-top: 1.2vw;
}

.pp__title {
	margin-bottom: clamp(18px, 1.8vw, 28px);
	color: var(--green);
	font-size: clamp(26px, 2.4vw, 40px);
	font-weight: 400;
	line-height: 1.16;
}

.pp__stamp {
	display: inline-block;
	margin: 0 0 20px;
	padding: 4px 12px 5px;
	border: 1px solid currentColor;
	color: var(--green);
	font-size: 14px;
	font-style: italic;
	transform: rotate(-1.5deg);
}

.pp__summary .price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 14px;
	margin: 0 0 22px;
	color: var(--ink);
	font-size: clamp(26px, 2.2vw, 36px);
	line-height: 1.1;
}

.pp__summary .price del {
	color: var(--muted);
	font-size: 0.6em;
}

.pp__summary .price ins {
	color: var(--green);
	text-decoration: none;
}

/* The stamp under the title already says it. */
.pp__summary .price .soler-rx-badge {
	display: none;
}

.pp__summary .woocommerce-product-details__short-description {
	margin-bottom: 24px;
	color: var(--text);
	font-size: var(--text-size);
	line-height: 1.7;
}

/* The sand block behind the packshot rises above the product area; notices (the same beige) keep clear
   of it so they don't merge into one shape. */
.product-page .woocommerce-notices-wrapper,
.product-page .woocommerce-NoticeGroup {
	margin-bottom: clamp(56px, 7vw, 110px);
}

.product-page .woocommerce-notices-wrapper:empty {
	margin: 0;
}

.product-page .woocommerce-message,
.product-page .woocommerce-error,
.product-page .woocommerce-info {
	margin-bottom: 0;
	box-shadow: 0 14px 30px -20px rgba(0, 0, 0, 0.35);
}

.pp__summary form.cart {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 14px;
	margin: 6px 0 30px;
	isolation: isolate;
}

.pp__summary form.cart .single_add_to_cart_button {
	flex: 1 1 220px;
}

.pp__summary .soler-rx-notice {
	margin: 0 0 30px;
	padding: 20px 24px;
	background: var(--sand);
	border-left: 2px solid var(--green);
	color: var(--text);
	font-size: 15px;
	line-height: 1.6;
}

.pp__summary .soler-rx-notice__title {
	margin-bottom: 6px;
	color: var(--green);
	font-size: 17px;
	font-weight: 400;
}

.pp__service {
	display: grid;
	gap: 12px;
	margin: 0 0 30px;
	padding: 18px 0;
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
	list-style: none;
}

.pp__service li {
	display: flex;
	align-items: center;
	gap: 14px;
	color: var(--text);
	font-size: 15px;
}

.pp__service svg {
	flex: none;
	width: 24px;
	height: 24px;
	fill: none;
	stroke: var(--green);
	stroke-width: 1.3;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.pp__service a {
	color: var(--green);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

/* Unfolding sections, one open at a time (as in "Защо Soler" on the homepage). */
.pp-acc {
	border-bottom: 1px solid var(--line);
}

.pp-acc__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 0;
	color: var(--ink);
	font-size: clamp(17px, 1.3vw, 21px);
	list-style: none;
	cursor: pointer;
	transition: color 0.3s ease;
}

.pp-acc__head::-webkit-details-marker {
	display: none;
}

.pp-acc__head:hover {
	color: var(--green);
}

.pp-acc__icon {
	position: relative;
	flex: none;
	width: 14px;
	height: 14px;
}

.pp-acc__icon::before,
.pp-acc__icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 0;
	width: 100%;
	height: 1.3px;
	background: var(--green);
	transition: transform 0.45s var(--ease-out);
}

.pp-acc__icon::after {
	transform: rotate(90deg);
}

.pp-acc[open] .pp-acc__icon::after {
	transform: rotate(90deg) scaleX(0);
}

.pp-acc__body {
	overflow: hidden;
}

.pp-acc__text,
.pp-acc__info,
.pp-acc__cats {
	padding-bottom: 26px;
}

.pp-acc__text {
	color: var(--text);
	font-size: var(--text-size);
	line-height: 1.75;
}

.pp-acc__text > * + * {
	margin-top: 1em;
}

.pp-acc__text ul,
.pp-acc__text ol {
	padding-left: 1.3em;
}

.pp-acc__text ul {
	list-style: disc;
}

.pp-acc__text--soon {
	color: var(--muted);
	font-style: italic;
}

.pp-acc__info div {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 9px 0;
	border-bottom: 1px dashed var(--line);
	font-size: 15px;
}

.pp-acc__info dt {
	color: var(--muted);
}

.pp-acc__cats {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.pp-acc__cats a {
	padding: 5px 12px;
	background: var(--sand);
	color: var(--green);
	font-size: 14px;
	transition: background-color 0.3s ease, color 0.3s ease;
}

.pp-acc__cats a:hover {
	background: var(--green);
	color: var(--cream);
}

/* Related: the homepage's "Най-продавани" composition — sand label, cards overlapping it, a flower. */
.pp-related {
	position: relative;
	margin: clamp(120px, 12vw, 210px) -8vw 0;
}

.pp-related__label {
	width: max(20vw, 220px);
	height: 25vw;
	margin-left: 8vw;
	padding: 2.8vw;
	background: var(--sand);
}

.pp-related__title {
	color: var(--green);
	font-size: clamp(18px, 1.67vw, 28px);
	font-weight: 400;
}

.flower--related {
	top: -9vw;
	right: 9vw;
	height: clamp(150px, 13vw, 230px);
}

.pp-related__grid {
	position: relative;
	z-index: 2;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.6vw;
	width: 79.2vw;
	margin: max(-16.8vw, calc(56px - 18.8vw)) 0 0 17.4vw;
	padding: 0;
	list-style: none;
}

/* ---------------------------------------------------------------------------
   Tablets and phones
   ------------------------------------------------------------------------- */

@media (max-width: 1024px) {
	.catalog {
		grid-template-columns: 1fr;
	}

	.catalog__filters-btn {
		display: inline-flex;
		align-items: center;
		gap: 8px;
		min-height: 42px;
		padding: 0 16px;
		background: none;
		border: 1px solid var(--green);
		color: var(--green);
		font: inherit;
		font-size: 14.5px;
		cursor: pointer;
	}

	.catalog__filters-btn svg {
		width: 18px;
		height: 18px;
		fill: none;
		stroke: currentColor;
		stroke-width: 1.4;
		stroke-linecap: round;
	}

	.catalog__filters-n {
		display: inline-grid;
		place-items: center;
		min-width: 20px;
		height: 20px;
		background: var(--green);
		color: var(--cream);
		font-size: 12px;
	}

	/* The panel becomes a sheet that slides up from the bottom. */
	.filters {
		position: fixed;
		top: auto;
		right: 0;
		bottom: 0;
		left: 0;
		z-index: 1200;
		max-height: 86vh;
		overflow-y: auto;
		overscroll-behavior: contain;
		padding: 22px 20px calc(24px + env(safe-area-inset-bottom));
		background: var(--cream);
		box-shadow: 0 -24px 60px -30px rgba(0, 0, 0, 0.45);
		transform: translateY(105%);
		visibility: hidden;
		transition: transform 0.6s var(--ease-out), visibility 0s linear 0.6s;
	}

	html.catalog-filters-open .filters {
		transform: none;
		visibility: visible;
		transition-delay: 0s;
	}

	.filters__close {
		display: grid;
		place-items: center;
		width: 40px;
		height: 40px;
		margin: -8px -8px 0 0;
		padding: 0;
		background: none;
		border: 0;
		color: var(--green);
		cursor: pointer;
	}

	.filters__close svg {
		width: 22px;
		height: 22px;
		fill: none;
		stroke: currentColor;
		stroke-width: 1.4;
		stroke-linecap: round;
	}

	/* The sheet's way back to the products: a full-width brand button pinned to the bottom. */
	html.js .filters__apply {
		display: flex;
		width: 100%;
		box-shadow: none;
		border: 0;
		font: inherit;
		font-size: 14px;
		letter-spacing: 0.04em;
		cursor: pointer;
	}

	.filters__actions {
		position: sticky;
		bottom: 0;
		z-index: 2;
		align-items: stretch;
		margin: 0 -20px calc(-24px - env(safe-area-inset-bottom));
		padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
		background: var(--cream);
		border-top: 1px solid var(--line);
	}

	.filters__reset {
		align-self: center;
	}

	.filters__clear {
		margin-right: 14px;
	}

	.filters__overlay {
		position: fixed;
		inset: 0;
		z-index: 1150;
		display: block;
		background: rgba(27, 29, 26, 0.35);
		opacity: 0;
		transition: opacity 0.4s ease;
	}

	.filters__overlay[hidden] {
		display: none;
	}

	html.catalog-filters-open .filters__overlay {
		opacity: 1;
	}

	.pp {
		grid-template-columns: 1fr;
	}

	.pp__media {
		position: relative;
		top: auto;
	}
}

@media (max-width: 767px) {
	/* A soft fade on the right edge says "there is more — swipe". */
	.catalog-chips {
		margin: 0 -16px 28px;
		padding: 0 16px;
		-webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 64px), transparent);
		mask-image: linear-gradient(90deg, #000 calc(100% - 64px), transparent);
	}

	.catalog__count {
		width: 100%;
	}

	.catalog__search {
		flex-basis: 100%;
		max-width: none;
		margin: 0;
	}

	.catalog__sort {
		flex: 1;
	}

	.catalog__sort select {
		width: 100% !important;
	}

	.catalog__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px 10px;
	}

	.pp-gallery {
		padding: 20px 0 0 16px;
	}

	.pp-gallery::before {
		top: -16px;
		left: -16px;
		width: 70%;
		height: 62%;
	}

	.pp-gallery__card {
		box-shadow: 0 16px 36px -18px rgba(0, 0, 0, 0.3);
	}

	.pp-gallery__thumb {
		width: 56px;
		height: 56px;
	}

	.pp-related {
		margin: 80px -16px 0;
	}

	.pp-related__label {
		width: 52vw;
		height: 44vw;
		margin: 0 0 0 16px;
		padding: 20px;
	}

	.flower--related {
		top: -10px;
		right: 16px;
		height: 120px;
	}

	.flower--catalog {
		top: -56px;
		right: 80px;
		height: 104px;
	}

	.catalog-hero .page-hero__title,
	.catalog-hero .page-hero__lead {
		max-width: none;
	}

	/* A swipeable row on phones. */
	.pp-related__grid {
		display: flex;
		gap: 12px;
		width: auto;
		margin: calc(104px - 44vw) 0 0;
		padding: 0 16px 24px calc(6vw + 16px);
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
	}

	.pp-related__grid::-webkit-scrollbar {
		display: none;
	}

	.pp-related__item {
		flex: 0 0 74%;
		scroll-snap-align: start;
	}
}

@media (prefers-reduced-motion: reduce) {
	.filters,
	.pp-gallery__slide,
	.pp-gallery__slide img {
		transition: none;
	}
}

/* ---------------------------------------------------------------------------
   Category text + FAQ under the grid (template-parts/catalog/category-text.php)
   Reading column ~68ch, chapter-numbered subheadings, drawn dash bullets, FAQ accordions drawn like
   the filter panel's category groups (square, hairline, +/× that turns).
   ------------------------------------------------------------------------- */

.cat-text {
	margin-top: clamp(56px, 6.5vw, 120px);
	padding-top: clamp(32px, 3.6vw, 64px);
	border-top: 1px solid var(--line);
	color: var(--text);
}

.cat-text__title,
.cat-faq__title {
	position: relative;
	padding-bottom: 0.55em;
	color: var(--green);
	font-size: clamp(25px, 2.4vw, 40px);
	line-height: 1.15;
	text-wrap: balance;
}

/* A short drawn rule under each section title. */
.cat-text__title::after,
.cat-faq__title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 56px;
	height: 1px;
	background: var(--green);
	transform-origin: left center;
}

.cat-text__body {
	max-width: 68ch;
	margin-top: clamp(14px, 1.6vw, 26px);
	font-size: clamp(16px, 1.1vw, 18px);
	line-height: 1.75;
	counter-reset: cat-chapter;
}

.cat-text__body > * + * {
	margin-top: 1em;
}

.cat-text__body p {
	text-wrap: pretty;
}

.cat-text__body strong {
	color: var(--ink);
	font-weight: 600;
}

.cat-text__body h2 {
	display: flex;
	align-items: baseline;
	gap: 12px;
	margin-top: 2.1em;
	color: var(--green);
	font-size: clamp(20px, 1.6vw, 26px);
	line-height: 1.25;
	counter-increment: cat-chapter;
}

.cat-text__body h2:first-child {
	margin-top: 0;
}

.cat-text__body h2::before {
	content: counter(cat-chapter, upper-roman);
	flex: none;
	min-width: 1.9em;
	color: var(--muted);
	font-size: 0.6em;
	font-style: italic;
	letter-spacing: 0.06em;
}

.cat-text__body h3 {
	margin-top: 1.6em;
	color: var(--ink);
	font-size: clamp(17px, 1.25vw, 20px);
	font-style: italic;
}

.cat-text__body ul {
	margin-bottom: 0;
	padding: 0;
	list-style: none;
}

.cat-text__body li {
	position: relative;
	padding-left: 1.6em;
}

.cat-text__body li + li {
	margin-top: 0.55em;
}

/* Bullets: a short drawn dash in brand green. */
.cat-text__body li::before {
	content: "";
	position: absolute;
	top: 0.9em;
	left: 0.1em;
	width: 0.8em;
	height: 1px;
	background: var(--green);
}

.cat-text__body a {
	color: var(--green);
	text-decoration: underline;
	text-decoration-color: rgba(41, 102, 64, 0.4);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.24em;
	transition: text-decoration-color 0.3s ease, color 0.3s ease;
}

.cat-text__body a:hover,
.cat-text__body a:focus-visible {
	color: var(--green-deep);
	text-decoration-color: currentColor;
}

/* FAQ */
.cat-faq {
	max-width: 68ch;
	margin-top: clamp(44px, 5vw, 88px);
}

.cat-faq__list {
	margin-top: clamp(14px, 1.6vw, 26px);
	border-bottom: 1px solid var(--line);
}

.cat-faq__item {
	border-top: 1px solid var(--line);
	transition: background-color 0.35s ease;
}

.cat-faq__item[open] {
	background: var(--sand);
}

.cat-faq__q {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	padding: 17px 16px;
	color: var(--ink);
	font-size: clamp(16px, 1.2vw, 19px);
	line-height: 1.4;
	cursor: pointer;
	list-style: none;
	transition: color 0.25s ease;
}

.cat-faq__q::-webkit-details-marker {
	display: none;
}

.cat-faq__q:hover,
.cat-faq__item[open] .cat-faq__q {
	color: var(--green);
}

.cat-faq__q:focus-visible {
	outline-offset: -3px;
}

/* The marker: a square with a drawn plus that turns into a cross when the answer opens. */
.cat-faq__mark {
	position: relative;
	flex: none;
	width: 22px;
	height: 22px;
	border: 1px solid rgba(41, 102, 64, 0.45);
	transition: background-color 0.3s ease, border-color 0.3s ease;
}

.cat-faq__mark::before,
.cat-faq__mark::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	background: var(--green);
	transform: translate(-50%, -50%);
	transition: transform 0.4s var(--ease-out), background-color 0.3s ease;
}

.cat-faq__mark::before {
	width: 10px;
	height: 1px;
}

.cat-faq__mark::after {
	width: 1px;
	height: 10px;
}

.cat-faq__q:hover .cat-faq__mark {
	border-color: var(--green);
}

.cat-faq__item[open] .cat-faq__mark {
	background: var(--green);
	border-color: var(--green);
}

.cat-faq__item[open] .cat-faq__mark::before,
.cat-faq__item[open] .cat-faq__mark::after {
	background: var(--cream);
	transform: translate(-50%, -50%) rotate(45deg);
}

.cat-faq__a {
	padding: 0 calc(22px + 18px + 16px) 22px 16px;
	font-size: clamp(15.5px, 1.05vw, 17px);
	line-height: 1.7;
}

.cat-faq__item[open] .cat-faq__a {
	animation: cat-faq-in 0.45s var(--ease-out);
}

@keyframes cat-faq-in {
	from { opacity: 0; transform: translateY(-6px); }
	to { opacity: 1; transform: none; }
}

/* Scroll-linked rise (progressive: browsers without view timelines simply show everything). */
@keyframes cat-rise {
	from { opacity: 0; transform: translateY(28px); }
	to { opacity: 1; transform: none; }
}

@keyframes cat-rule {
	from { transform: scaleX(0); }
	to { transform: scaleX(1); }
}

@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		.cat-text__body > *,
		.cat-faq__item {
			animation: cat-rise linear both;
			animation-timeline: view();
			animation-range: entry 0% entry 70%;
		}

		.cat-text__title,
		.cat-faq__title {
			animation: cat-rise linear both;
			animation-timeline: view();
			animation-range: entry 0% entry 80%;
		}

		.cat-text__title::after,
		.cat-faq__title::after {
			animation: cat-rule linear both;
			animation-timeline: view();
			animation-range: entry 10% cover 40%;
		}
	}
}

@media (max-width: 767px) {
	.cat-text {
		margin-top: 48px;
		padding-top: 28px;
	}

	.cat-text__body h2 {
		gap: 8px;
	}

	.cat-faq__q {
		padding: 15px 12px;
		gap: 14px;
	}

	.cat-faq__a {
		padding: 0 12px 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cat-faq__item[open] .cat-faq__a {
		animation: none;
	}

	.cat-faq__mark {
		transition: none;
	}
}
