/* ==========================================================================
   Product category and brand archives
   Replaces the page-builder template that used to build these pages.
   Class names start with pa- ; the shortcodes inside (category tiles, catalog buttons,
   suggested categories) bring their own styles.
   ========================================================================== */

/* ---- page frame: sidebar and main column ------------------------------- */
.pa-arch {
	max-width: 1160px;
	margin: 10px auto 0;
	padding: 10px;
	box-sizing: border-box;
	direction: rtl;
}
.pa-arch *,
.pa-arch *::before,
.pa-arch *::after {
	box-sizing: border-box;
}
.pa-arch__row {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: flex-start;
	gap: 0 11px;
}
.pa-arch__side {
	display: flex;
	flex-direction: column;
	flex: 0 1 auto;
	width: 410px;
	border: 1px solid #d3d3d3;
	border-radius: 15px;
	margin: 0 22px 0 0;
	padding: 20px;
}
.pa-arch__main {
	display: flex;
	flex-direction: column;
	flex: 0 1 auto;
	width: 100%;
	min-width: 0;
	gap: 20px;
}

/* ---- sidebar: category tree and filters -------------------------------- */
.pa-arch__side-inner {
	border: 1px solid #fcfcfc;
	padding: 20px;
	border-radius: 15px;
}
.pa-arch__side .widget-title { margin-top: 0; }
.pa-arch__side .widget-content {
	border-bottom: solid 1px rgba(187, 187, 187, 0.5);
	padding-bottom: 34px;
	margin-bottom: 34px;
}
.pa-arch__side .widget-content:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
	border: unset;
}
.pa-arch__side li.woocommerce-widget-layered-nav-list__item.wc-layered-nav-term {
	margin-bottom: 10px;
	list-style: none;
}
.pa-arch__side li.woocommerce-widget-layered-nav-list__item.wc-layered-nav-term a {
	color: #000;
	margin-bottom: 10px;
}
.pa-arch__side ul.woocommerce-widget-layered-nav-list { padding-top: 10px; }
.pa-arch__side ul.woocommerce-widget-layered-nav-list li.woocommerce-widget-layered-nav-list__item.wc-layered-nav-term a::before {
	content: "";
	width: 17px;
	height: 17px;
	border: 2px solid #8f8f9d;
	position: relative;
	display: inline-block;
	margin-left: 1ex;
	border-radius: 2px;
	top: 5px;
}
.pa-arch__side ul.woocommerce-widget-layered-nav-list .woocommerce-widget-layered-nav-list__item.wc-layered-nav-term.woocommerce-widget-layered-nav-list__item--chosen.chosen a::before {
	background: var(--main-color);
	border-color: var(--main-color);
}
.pa-arch__side ul.product-categories {
	padding-right: 0;
}
.pa-arch__side ul.product-categories li {
	list-style: none;
	margin-bottom: 14px;
}
.pa-arch__side ul.product-categories li a { color: #000; }
.pa-arch__side ul.product-categories li.current-cat > a,
.pa-arch__side ul.product-categories li.current-cat > span {
	color: #c12c03;
}
.pa-arch__side ul.children {
	margin-top: 14px;
	display: none;
}
/* arrow that opens and closes a branch; drawn as an inline icon so no icon font is needed */
.pa-arch__side li.cat-item.cat-parent > .toggle-icon {
	float: left;
	cursor: pointer;
	width: 12px;
	height: 18px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 512'%3E%3Cpath d='M143 352.3 7 216.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.2 9.4-24.4 9.4-33.8 0z'/%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 320 512'%3E%3Cpath d='M143 352.3 7 216.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.2 9.4-24.4 9.4-33.8 0z'/%3E%3C/svg%3E") center / contain no-repeat;
	transition: transform 0.4s;
}
.pa-arch__side li.cat-item.cat-parent > .toggle-icon.active { transform: rotate(180deg); }

.pa-arch__side .wpc-filters-widget-select { border: 0 !important; padding: 10px; border-radius: 10px; }
.pa-arch__side .wpc-filter-taxonomy .widget-title.wpc-filter-title { display: none; }
.pa-arch__side input.wpc-filters-range-max,
.pa-arch__side input.wpc-filters-range-min { border: solid 1px #edebeb; padding: 10px; border-radius: 10px; }
.pa-arch__side .ui-slider-range.ui-corner-all.ui-widget-header,
.pa-arch__side .ui-slider-handle { background: #bce5ff !important; box-shadow: none !important; }
.pa-arch__side input#woocommerce-product-search-field-0 {
	border: solid 2px #bce5ff;
	padding: 5px 10px;
	border-radius: 10px;
	width: 100%;
	color: #bbb;
}
.pa-arch__side input#woocommerce-product-search-field-0::placeholder { color: #bbb; }
.pa-arch__side form.woocommerce-product-search { position: relative; }
.pa-arch__side form.woocommerce-product-search button {
	position: absolute;
	left: 6px;
	top: 50%;
	transform: translateY(-50%);
	background: transparent;
	border: 0;
	z-index: 0;
	color: #bbb;
	cursor: pointer;
}
.pa-arch__side .price_slider_amount { display: flex; flex-direction: column; }
.pa-arch__side .price_slider_amount button {
	display: block;
	width: 100%;
	margin: 23px 0 !important;
	padding: 15px !important;
	background: #bce5ff !important;
}
.pa-arch__side .price_slider_amount button.button { order: 2; }
.pa-arch__side .price_label { margin-top: 20px; }

/* ---- short description above the tiles --------------------------------- */
.pa-arch__intro { text-align: justify; font-weight: 400; }
.pa-arch__intro * { color: #000; }
.pa-arch__intro a { color: #c12d03; }

/* ---- category tiles (shortcode) ---------------------------------------- */
.pa-arch__tiles h3 {
	color: #000;
	text-align: center;
	margin-bottom: 0;
	font-size: 14px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	height: 48px;
}
.pa-arch__tiles .owl-carousel .owl-item img {
	width: 128px !important;
	height: 128px;
}

/* ---- sort buttons ------------------------------------------------------ */
.pa-sort {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 20px;
	align-items: center;
}
.pa-sort__label { font-weight: bold; }
.pa-sort button {
	padding: 8px 16px;
	background: #f5f5f5;
	color: #333;
	border: 0;
	font: inherit;
	text-decoration: none;
	border-radius: 5px;
	transition: 0.3s;
	cursor: pointer;
}
.pa-sort button:hover,
.pa-sort button.active {
	background: #0474cc;
	color: #fff;
}

/* ---- product grid and card -------------------------------------------- */
.pa-results { margin: 7px; }
ul.pa-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	grid-auto-rows: 1fr;
	gap: 30px 12px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.pa-card {
	display: flex;
	flex-direction: column;
	justify-content: space-around;
	gap: 20px;
	height: 100%;
	padding: 10px;
	background: #fff;
	border: solid 1px #e5e5e5;
	border-radius: 5px;
	transition: 0.4s;
}
.pa-card:hover { box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05); }
.pa-card img { width: 100%; height: auto; display: block; border-bottom: 1px dotted #3cacf4; }
.pa-card__img--mobile { display: none; }
/* the line height of a title line comes from the 14px box around it, the link itself is 15px */
.pa-card__title { margin: 0; padding: 0; font-size: 14px; font-weight: 400; line-height: normal; text-align: start; }
.pa-card__title a { font-size: 15px; font-weight: 600; line-height: 15px; color: #222; text-decoration: none; }
.pa-card__price { text-align: center; color: #000; font-weight: 700; font-size: 14px; line-height: 30px; margin-bottom: 20px; }
.pa-card__price .price { color: #000; font-weight: 700; }

/* ---- pagination -------------------------------------------------------- */
.pa-arch .woocommerce-pagination ul { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; list-style: none; padding: 0; margin: 0; }
.pa-arch a.page-numbers {
	width: 40px;
	height: 40px;
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 4px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #000;
	margin-top: 20px;
	text-decoration: none;
}
.pa-arch span.page-numbers.current {
	width: 40px;
	height: 40px;
	background: #bce5ff;
	border: 1px solid #e5e5e5;
	border-radius: 4px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	margin-top: 20px;
}

/* ---- catalog buttons (shortcode) --------------------------------------- */
.pa-arch__catalog li { list-style: none; text-align: center; margin-bottom: 15px; }
.pa-arch__catalog ul { padding-right: 0; }
.pa-arch__catalog .contact-for-price {
	background: #0474cc;
	width: 50%;
	display: block;
	padding: 10px 42px;
	border-radius: 10px;
	color: #fff;
	font-weight: bold;
	font-size: 14px;
	margin: 0 auto;
}

/* ---- heading and long description -------------------------------------- */
.pa-arch__title { font-size: 32px; font-weight: 900; line-height: 1; padding: 0; margin: 0 0 29px; color: #0085ff; }
.pa-arch__title.is-hidden {
	position: absolute !important;
	width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.pa-arch__desc { text-align: justify; }
.pa-arch__desc * { color: #000; }
.pa-arch__desc a { color: #c12d03; }
.pa-arch__desc h2 { display: flex; align-items: center; }
.pa-arch__desc h2::before {
	content: "";
	background: url(https://payagostaresh.co/wp-content/uploads/2024/09/minify-logo-1.svg);
	width: 20px;
	display: inline-block;
	height: 20px;
	margin-left: 6px;
	background-size: cover;
}
.pa-arch__desc .term-description { color: #000; }

/* long description is shown collapsed, with a button to open it */
.pa-arch #tab-description {
	height: 305px;
	overflow: hidden;
	position: relative;
	padding-bottom: 65px;
}
.pa-arch #tab-description::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 50px;
	background: linear-gradient(transparent, white);
}
.pa-arch #tab-description.expanded { height: auto; }
.pa-arch #tab-description.expanded::after { display: none; }
/* with a table of contents, the collapsed box ends right below the list so all of it stays visible */
.pa-arch #tab-description:has(#ez-toc-container):not(.expanded) {
	height: auto;
	padding-bottom: 0;
}
.pa-arch #tab-description:has(#ez-toc-container):not(.expanded)::after { display: none; }
.pa-arch #tab-description:not(.expanded) #ez-toc-container ~ * { display: none !important; }
/* blocks beside the text, such as the FAQ, stay hidden until the box is opened */
.pa-arch #tab-description:has(#ez-toc-container):not(.expanded) > :not(:has(#ez-toc-container)) { display: none !important; }
.pa-arch__desc:has(#ez-toc-container) .show-more-btn { margin-top: 16px; }
/* the page-wide button style places it absolutely; here it sits under the text */
.pa-arch .show-more-btn {
	position: static !important;
	transform: none !important;
	bottom: auto !important;
	left: auto !important;
	display: block !important;
	margin: -20px auto 0;
	padding: 10px 15px;
	background: #0474cc;
	color: #fff;
	border: 2px solid #0474cc;
	cursor: pointer;
	text-align: center;
	border-radius: 5px;
}
.pa-arch .show-more-btn:hover { background: #161a26; color: #fff; }

/* table of contents box inside the description */
.pa-arch div#ez-toc-container {
	width: 50%;
	background: #0474cc14;
	border-color: #0474cc;
	margin: 0 auto !important;
	display: block !important;
}
.pa-arch span.eztoc-hide { display: none; }
.pa-arch .ez-toc-title-container { display: flex; align-items: center; }
.pa-arch ul.ez-toc-list-level-3,
.pa-arch ul.ez-toc-list-level-2 { margin-right: 20px !important; margin-top: 20px !important; }

/* ---- share button ------------------------------------------------------ */
.pa-sort .pa-share { margin-inline-start: auto; }
.pa-share { padding: 8px 16px; border: 1px solid #3cacf4; border-radius: 6px; background: #fff; color: #0474cc; cursor: pointer; font-size: 14px; }
.pa-share:hover { background: #3cacf4; color: #fff; }
.pa-toast { position: fixed; bottom: 24px; right: 50%; transform: translateX(50%); z-index: 99999; background: #222; color: #fff; padding: 10px 18px; border-radius: 6px; font-size: 14px; }

/* ---- tablet and phone -------------------------------------------------- */
@media (max-width: 1024px) {
	ul.pa-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 992px) {
	.pa-arch__side { position: relative; }
}
@media (max-width: 767px) {
	.pa-arch__row { flex-direction: column-reverse; }
	.pa-arch__side { display: none; }
	.pa-arch__intro { margin-top: -6px; }
	.pa-arch__tiles { margin-bottom: 85px; }
	.pa-card__img--mobile { display: block; }
	.pa-card__img--mobile img { width: auto; max-width: 100%; margin: 0 auto; }
	.pa-card__img--desk { display: none; }
	.pa-card__price { display: none; }
	.pa-arch div#ez-toc-container { width: 90% !important; }
}

/* ---- order on screen ---------------------------------------------------
   The title comes first in the HTML (it is the page's main heading) and is placed here by order. */
.pa-arch__main > .pa-arch__brands { order: 1; }
.pa-arch__main > .pa-arch__intro  { order: 2; }
.pa-arch__main > .pa-arch__tiles  { order: 3; }
.pa-arch__main > .pa-sort         { order: 4; }
.pa-arch__main > .pa-results      { order: 5; }
.pa-arch__main > .pa-arch__catalog { order: 6; }
.pa-arch__main > .pa-arch__title  { order: 7; }
.pa-arch__main > .pa-arch__desc   { order: 8; }
.pa-arch__main > .pa-arch__rec    { order: 9; }

/* brand carousel (only drawn when it has brands) */
.pa-arch__brands img { width: 150px; margin: 0 auto; display: block; }
.pa-arch__brands .item { height: 120px; align-items: center; justify-content: center; display: flex; }