/* =========================================================================
 * AEROS product-category page
 * Loaded only on the categories listed in inc/aeros-category-template.php.
 * Everything is scoped under .aeros-archive so no other page is affected.
 * RTL (Hebrew). Desktop matches the mockup; mobile is a custom responsive
 * layout (no mobile design was supplied).
 * ====================================================================== */

.aeros-archive {
	--aeros-bg: #f4efe6;
	--aeros-surface: #ffffff;
	--aeros-ink: #1d1d1b;
	--aeros-muted: #6f6a61;
	--aeros-green: #1c5a3f;       /* add-to-cart / primary buttons */
	--aeros-green-dark: #143a2a;
	--aeros-accent: #a37e49;      /* eyebrow / small labels */
	--aeros-orange: #e0892b;      /* "best seller" badge */
	--aeros-line: #e4ddd0;

	background: var(--aeros-bg);
	color: var(--aeros-ink);
	direction: rtl;
	text-align: right;
	overflow-x: hidden;
}

.aeros-archive * {
	box-sizing: border-box;
}

.aeros-container {
	max-width: 1280px;
	margin-inline: auto;
	padding-inline: 24px;
}

/* Labelled placeholder shown until an image file is uploaded */
.aeros-archive .aeros-img-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	min-height: 220px;
	padding: 16px;
	background: repeating-linear-gradient( 45deg, #ece4d6, #ece4d6 12px, #e4dac8 12px, #e4dac8 24px );
	color: #8a7f6c;
	font-size: 13px;
	text-align: center;
	word-break: break-all;
}

/* -------------------------------------------------------------------------
 * 1. HERO + MID BANNER  (full-width banner images; text baked into the image)
 * ---------------------------------------------------------------------- */
.aeros-hero,
.aeros-midbanner {
	width: 100%;
	background: var(--aeros-bg);
	line-height: 0; /* remove inline-image whitespace gap */
}

.aeros-hero img,
.aeros-hero picture,
.aeros-hero .aeros-img-placeholder,
.aeros-midbanner img,
.aeros-midbanner picture,
.aeros-midbanner .aeros-img-placeholder {
	display: block;
	width: 100%;
	height: auto;
}

.aeros-hero .aeros-img-placeholder,
.aeros-midbanner .aeros-img-placeholder {
	min-height: 320px;
	line-height: 1.4;
}

/* -------------------------------------------------------------------------
 * 2. PRODUCTS
 * ---------------------------------------------------------------------- */
.aeros-products {
	padding: clamp(48px, 6vw, 88px) 0;
}

.aeros-products__title {
	margin: 0 0 28px;
	text-align: center;
	font-size: clamp(26px, 3vw, 40px);
	font-weight: 600;
}

/* Wrapper satisfies the theme's JS selector (.site-content .site-main …) AND
 * lets the theme render its own full-width filter/sort bar exactly like the
 * default categories. Strip any inherited .site-main box-model so it doesn't
 * constrain the bar. */
.aeros-archive .aeros-toolbar-shell {
	display: block;
	width: 100%;
	max-width: none;
	margin: 0 0 24px;
	padding: 0;
	background: none;
	border: 0;
}

/* Product grid — match the AEROS design: airy, borderless cards, centered
 * content, soft white image panel, rounded full-width green button.
 * Theme markup: li.product > .item_wrap > .wrap-for-top-part (image) +
 * .bottom-part (title / price / qty / add-to-cart). */
.aeros-archive ul.products {
	display: grid !important;
	grid-template-columns: repeat(4, 1fr);
	gap: 44px 28px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.aeros-archive ul.products::before,
.aeros-archive ul.products::after {
	content: none !important;
}

.aeros-archive ul.products li.product {
	position: relative; /* anchor for the plugin's corner labels */
	width: auto !important;
	margin: 0 !important;
	padding: 0;
	float: none !important;
	background: transparent;
	border: 0;
	display: flex;
}

.aeros-archive ul.products li.product .item_wrap {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
}

.aeros-archive ul.products li.product .wrap-for-top-part,
.aeros-archive ul.products li.product .product-images-loop-on-hover--container,
.aeros-archive ul.products li.product .main-image {
	width: 100%;
}

/* Soft image panel (no hard border, just like the design) */
.aeros-archive ul.products li.product .wrap-for-top-part {
	position: relative;
	background: #fff;
	border-radius: 14px;
	margin-bottom: 18px;
}

.aeros-archive ul.products li.product img {
	width: 100%;
	height: auto;
	margin: 0;
	display: block;
	border-radius: 14px;
}

.aeros-archive ul.products li.product .bottom-part {
	display: flex;
	flex-direction: column;
	flex: 1;
	text-align: center;
	padding: 0 6px;
}

.aeros-archive ul.products li.product .woocommerce-loop-product__title {
	font-size: 16px;
	line-height: 1.5;
	font-weight: 500;
	padding: 0;
	margin: 0 0 10px;
	min-height: 3em;
}

.aeros-archive ul.products li.product .woocommerce-loop-product__title a {
	color: var(--aeros-ink);
}

.aeros-archive ul.products li.product .price_wrap {
	margin-bottom: 16px;
}

.aeros-archive ul.products li.product .price {
	display: block;
	color: var(--aeros-ink);
	font-size: 16px;
	font-weight: 600;
}

.aeros-archive ul.products li.product .price ins {
	text-decoration: none;
}

.aeros-archive ul.products li.product .price del {
	color: var(--aeros-muted);
	font-weight: 400;
	margin-inline-start: 6px;
}

/* Hide the quantity stepper to match the design (add-to-cart only).
 * The hidden qty input stays in the DOM, so it still adds 1 to the cart. */
.aeros-archive ul.products li.product .quantity--wrapper .quantity {
	display: none;
}

/* Add-to-cart button — full width, dark green, rounded like the design.
 * The theme forces height:36px / line-height:36px / max-width:135px on
 * .quantity--wrapper button.add-to-cart, which clipped the text — override
 * all of those here (selector matches the theme's specificity context). */
.aeros-archive ul.products li.product .quantity--wrapper button.add-to-cart,
.aeros-archive ul.products li.product .add-to-cart {
	margin-top: auto;
	display: block;
	width: 100%;
	max-width: none;
	height: auto;
	line-height: 1.3;
	padding: 14px 16px;
	background: var(--aeros-green);
	color: #fff;
	border: 0;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 500;
	letter-spacing: normal;
	text-align: center;
	cursor: pointer;
	transition: background 0.2s ease;
}

.aeros-archive ul.products li.product .quantity--wrapper button.add-to-cart:hover,
.aeros-archive ul.products li.product .add-to-cart:hover {
	background: var(--aeros-green-dark);
}

/* Corner badges come from the "Product Labels for WooCommerce" (BeRocket)
 * plugin — assign labels to products in WP Admin and they render here.
 * Keep them above the image and un-clipped. */
.aeros-archive ul.products li.product [class*="berocket"] {
	z-index: 3;
}

.aeros-archive ul.products li.product .onsale {
	background: var(--aeros-orange);
	color: #fff;
	border: 0;
	border-radius: 999px;
}

/* Pagination */
.aeros-archive .woocommerce-pagination {
	margin-top: 40px;
	text-align: center;
}

/* -------------------------------------------------------------------------
 * 3 & 4. FEATURE SECTIONS (why choose / how to choose)
 * ---------------------------------------------------------------------- */
.aeros-feature {
	padding: clamp(40px, 5vw, 72px) 0;
}

.aeros-why {
	background: var(--aeros-bg);
}

.aeros-how {
	background: var(--aeros-surface);
}

.aeros-feature__inner {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: center;
	gap: clamp(32px, 5vw, 80px);
}

/* Default: image on the right of text in source order. Reverse swaps them. */
.aeros-feature--reverse .aeros-feature__media {
	order: 2;
}

.aeros-feature__media img,
.aeros-feature__media .aeros-img-placeholder {
	width: 100%;
	height: 100%;
	max-height: 460px;
	object-fit: cover;
	border-radius: 12px;
}

.aeros-feature__title {
	margin: 0 0 28px;
	font-size: clamp(24px, 2.6vw, 36px);
	font-weight: 600;
}

.aeros-feature__items {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.aeros-feature__item-title {
	margin: 0 0 6px;
	font-size: 19px;
	font-weight: 600;
}

.aeros-feature__item-text {
	margin: 0;
	color: var(--aeros-muted);
	font-size: 16px;
	line-height: 1.7;
}

/* -------------------------------------------------------------------------
 * 5. FAQ ACCORDION
 * ---------------------------------------------------------------------- */
.aeros-faq {
	padding: clamp(48px, 6vw, 88px) 0 clamp(56px, 7vw, 96px);
	background: var(--aeros-bg);
}

.aeros-faq__inner {
	max-width: 900px;
}

.aeros-faq__title {
	margin: 0 0 8px;
	text-align: center;
	font-size: clamp(26px, 3vw, 40px);
	font-weight: 600;
}

.aeros-faq__subtitle {
	margin: 0 0 36px;
	text-align: center;
	color: var(--aeros-muted);
	font-size: 16px;
}

.aeros-faq__item {
	border-bottom: 1px solid var(--aeros-line);
}

.aeros-faq__question {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 22px 4px;
	cursor: pointer;
	font-size: 17px;
	font-weight: 500;
	list-style: none;
}

.aeros-faq__question::-webkit-details-marker {
	display: none;
}

.aeros-faq__icon {
	position: relative;
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
}

.aeros-faq__icon::before,
.aeros-faq__icon::after {
	content: "";
	position: absolute;
	inset-block-start: 50%;
	inset-inline-start: 50%;
	width: 16px;
	height: 2px;
	background: var(--aeros-ink);
	transform: translate(50%, -50%);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.aeros-faq__icon::after {
	transform: translate(50%, -50%) rotate(90deg);
}

.aeros-faq__item[open] .aeros-faq__icon::after {
	opacity: 0;
}

.aeros-faq__answer {
	padding: 0 4px 24px;
	color: var(--aeros-muted);
	font-size: 16px;
	line-height: 1.8;
}

/* -------------------------------------------------------------------------
 * RESPONSIVE  (custom — no mobile mockup was provided)
 * ---------------------------------------------------------------------- */
@media (max-width: 1024px) {
	.aeros-archive ul.products {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 900px) {
	.aeros-feature__inner {
		grid-template-columns: 1fr;
		gap: 28px;
	}

	/* Image always on top when stacked */
	.aeros-feature__media,
	.aeros-feature--reverse .aeros-feature__media {
		order: 0;
	}

	.aeros-feature__media img,
	.aeros-feature__media .aeros-img-placeholder {
		max-height: 320px;
	}
}

@media (max-width: 680px) {
	.aeros-archive ul.products {
		grid-template-columns: repeat(2, 1fr);
		gap: 14px;
	}

	.aeros-archive ul.products li.product {
		padding: 12px;
	}

	/* Mobile: show the FULL banner — no cropping, no distortion. A wide image
	 * is naturally short on a narrow screen; the only way to keep it fully
	 * visible AND make it taller is a portrait mobile export
	 * (hero-mobile.jpg / hero-middle-mobile.jpg), which the template
	 * auto-swaps in on phones. */
	.aeros-hero img,
	.aeros-hero picture img,
	.aeros-midbanner img,
	.aeros-midbanner picture img {
		width: 100%;
		height: auto;
		min-height: 0;
		max-height: none;
		object-fit: contain;
	}
}

@media (max-width: 420px) {
	.aeros-archive ul.products li.product .woocommerce-loop-product__title {
		min-height: 0;
		font-size: 14px;
	}
}
