/* Brand filter */
.haminart-brand-filter {
	--haminart-brand-cols: 3;
	--haminart-accent: #222;
	margin-block-end: 1.5em;
}

.haminart-brand-filter__title {
	margin: 0 0 0.75em;
	font-size: 1rem;
}

.haminart-brand-filter__list {
	display: grid;
	grid-template-columns: repeat(var(--haminart-brand-cols), minmax(0, 1fr));
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.haminart-brand-filter__item a {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	box-sizing: border-box;
	height: 100%;
	padding: 10px 6px;
	color: inherit;
	text-align: center;
	text-decoration: none;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.haminart-brand-filter__logo img {
	display: block;
	width: auto;
	max-width: 100%;
	height: 60px;
	object-fit: contain;
	filter: grayscale(1);
	opacity: 0.7;
	transition: filter 0.2s, opacity 0.2s;
}

.haminart-brand-filter__name {
	font-size: 0.85em;
	line-height: 1.3;
}

.haminart-brand-filter__item a:hover,
.haminart-brand-filter__item a:focus-visible,
.haminart-brand-filter__item.is-active a {
	border-color: var(--haminart-accent);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.haminart-brand-filter__item a:hover img,
.haminart-brand-filter__item.is-active img {
	filter: none;
	opacity: 1;
}

.haminart-brand-filter__item.is-active a::after {
	content: "✓";
	position: absolute;
	inset-block-start: 4px;
	inset-inline-end: 4px;
	width: 18px;
	height: 18px;
	font-size: 11px;
	line-height: 18px;
	color: #fff;
	text-align: center;
	background: var(--haminart-accent);
	border-radius: 50%;
}

.haminart-brand-filter__clear {
	display: inline-block;
	margin-block-start: 0.75em;
	font-size: 0.85em;
}

@media (max-width: 600px) {
	.haminart-brand-filter__list {
		grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
	}
}

/* Product specs */
.haminart-specs {
	margin: 0;
	padding: 0;
	list-style: none;
}

.haminart-specs li {
	position: relative;
	padding-block: 0.6em;
	padding-inline-start: 1.4em;
	border-block-end: 1px solid #eee;
}

.haminart-specs li:last-child {
	border-block-end: 0;
}

.haminart-specs li::before {
	content: "";
	position: absolute;
	inset-block-start: 1.05em;
	inset-inline-start: 0.3em;
	width: 7px;
	height: 7px;
	background: currentColor;
	border-radius: 50%;
	opacity: 0.5;
}

/* ==========================================================================
   Single product — default Elementor Pro / WooCommerce widgets restyled.
   ========================================================================== */

/* Product Images widget with vertical thumbnails: add CSS class "haminart-gallery-vertical". */
.haminart-gallery-vertical .woocommerce-product-gallery {
	display: flex;
	flex-direction: row;
	gap: 16px;
}

.haminart-gallery-vertical .woocommerce-product-gallery .flex-viewport {
	flex: 1;
}

.haminart-gallery-vertical .woocommerce-product-gallery .flex-control-thumbs {
	display: flex;
	flex: 0 0 82px;
	flex-direction: column;
	gap: 12px;
	margin: 0 !important;
	padding: 0;
	list-style: none;
}

.haminart-gallery-vertical .woocommerce-product-gallery .flex-control-thumbs li {
	width: 100% !important;
	margin: 0 !important;
}

.haminart-gallery-vertical .woocommerce-product-gallery .flex-control-thumbs img {
	padding: 12px;
	border: 1px solid rgba(222, 222, 222, 0.85);
	border-radius: 25px;
	opacity: 1;
	transition: border-color 0.2s;
}

.haminart-gallery-vertical .woocommerce-product-gallery .flex-control-thumbs img.flex-active {
	border-color: var(--haminart-pink);
}

@media (max-width: 767px) {
	.haminart-gallery-vertical .woocommerce-product-gallery {
		flex-direction: column;
	}

	.haminart-gallery-vertical .woocommerce-product-gallery .flex-control-thumbs {
		flex: none;
		flex-direction: row;
	}

	.haminart-gallery-vertical .woocommerce-product-gallery .flex-control-thumbs li {
		width: 64px !important;
	}
}

/* Product Data Tabs → pill tabs in a white card */
.woocommerce-tabs.wc-tabs-wrapper {
	padding: 24px 28px 28px;
	background: #fff;
	border-radius: 25px;
	box-shadow: 0 4.5px 45.9px rgba(0, 0, 0, 0.04);
}

.woocommerce div.product .woocommerce-tabs ul.tabs,
.woocommerce-tabs ul.tabs.wc-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 11px;
	margin: 0 0 30px;
	padding: 0;
	list-style: none;
	border-bottom: 0;
}

.woocommerce div.product .woocommerce-tabs ul.tabs::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::after {
	display: none;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li {
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
	border-radius: 0;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 43px;
	padding: 0 22px;
	font-size: 14px;
	font-weight: 700;
	color: #7e7e7e;
	background: #f6f6f6;
	border-radius: 63px;
	transition: background-color 0.2s, color 0.2s;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a,
.woocommerce div.product .woocommerce-tabs ul.tabs li a:hover {
	font-weight: 800;
	color: #fff;
	background: #f83d84;
}

.woocommerce-Tabs-panel {
	font-size: 14.55px;
	line-height: 3.005;
	color: #8e8e8e;
}

.woocommerce-Tabs-panel > h2 {
	margin: 0 0 18px;
	font-size: 14.55px;
	font-weight: 700;
	color: #6b6b6b;
}

/* Description read-more */
.haminart-collapsible {
	position: relative;
}

.haminart-collapsible.is-collapsed {
	max-height: 320px;
	overflow: hidden;
}

.haminart-collapsible.is-collapsed::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 140px;
	pointer-events: none;
	background: linear-gradient(to top, #fff 30%, rgba(255, 255, 255, 0));
}

.haminart-more {
	position: relative;
	z-index: 1;
	display: block;
	min-width: 156px;
	min-height: 47px;
	margin: 16px auto 0;
	padding: 0 28px;
	font-family: inherit;
	font-size: 14.55px;
	color: #595959;
	cursor: pointer;
	background: #fff;
	border: 1px solid #767676;
	border-radius: 60px;
}

.haminart-collapsible.is-collapsed .haminart-more {
	position: absolute;
	right: 50%;
	bottom: 6px;
	transform: translateX(50%);
}

/* Attributes table → «label ——— [value pill]» rows (Figma "خلاصه توضیحات محصول"). */
.woocommerce-Tabs-panel--additional_information > h2 {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 10px;
	margin: 0 0 22px;
	font-size: 14px;
	font-weight: 800;
	color: #404040;
}

.woocommerce-Tabs-panel--additional_information > h2::after {
	content: "Product Description";
	font-size: 11px;
	font-weight: 400;
	color: #b0b0b0;
	direction: ltr;
}

.woocommerce table.shop_attributes,
table.woocommerce-product-attributes {
	display: block;
	width: 100%;
	margin: 0;
	border: 0;
}

table.woocommerce-product-attributes tbody {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

table.woocommerce-product-attributes tr {
	display: grid;
	grid-template-columns: 175px minmax(0, 1fr);
	align-items: center;
	background: none !important;
}

table.woocommerce-product-attributes tr th,
table.woocommerce-product-attributes tr td {
	padding: 0;
	border: 0 !important;
}

table.woocommerce-product-attributes tr th {
	display: flex;
	align-items: center;
	gap: 14px;
	width: auto;
	padding-inline-end: 22px;
	font-size: 14px;
	font-weight: 800;
	line-height: 1.6;
	color: #404040;
	text-align: start;
	background: none !important;
}

table.woocommerce-product-attributes tr th::after {
	content: "";
	flex: 1;
	min-width: 20px;
	height: 1px;
	background: #e2e2e2;
}

table.woocommerce-product-attributes tr td {
	display: flex;
	align-items: center;
	min-height: 48px;
	padding: 8px 30px !important;
	font-size: 14px;
	font-style: normal !important;
	font-weight: 500;
	line-height: 1.7 !important;
	color: #7b7b7b;
	background: #f6f6f6 !important;
	border-radius: 30px;
}

table.woocommerce-product-attributes td p {
	margin: 0;
	padding: 0;
}

@media (max-width: 767px) {
	.woocommerce-tabs.wc-tabs-wrapper {
		padding: 18px 16px;
	}

	table.woocommerce-product-attributes tr {
		grid-template-columns: 110px minmax(0, 1fr);
	}

	table.woocommerce-product-attributes tr th {
		padding-inline-end: 10px;
		font-size: 12px;
	}

	table.woocommerce-product-attributes tr th::after {
		display: none;
	}

	table.woocommerce-product-attributes tr td {
		min-height: 42px;
		padding: 6px 18px !important;
		font-size: 12px;
	}
}

/* Reviews */
#reviews #comments ol.commentlist {
	margin: 0;
	padding: 0;
}

#reviews #comments ol.commentlist li {
	padding: 22px 0;
	border-top: 1px solid #eee;
}

#reviews #comments ol.commentlist li .comment_container {
	position: relative;
}

#reviews #comments ol.commentlist li img.avatar {
	position: static;
	float: right;
	width: 48px;
	height: 48px;
	margin-left: 14px;
	padding: 0;
	background: none;
	border: 0;
	border-radius: 50%;
}

#reviews #comments ol.commentlist li .comment-text {
	margin: 0;
	padding: 0;
	border: 0;
}

#reviews #comments ol.commentlist li .comment-text .meta {
	font-size: 12px;
	color: var(--haminart-gray-light);
}

#reviews #comments ol.commentlist li .comment-text .meta strong {
	display: block;
	font-size: 16px;
	font-weight: 800;
	color: var(--haminart-dark);
}

#reviews #comments ol.commentlist li .comment-text .description {
	clear: both;
	padding-top: 16px;
	font-size: 13px;
	line-height: 2.3;
}

#review_form #respond {
	padding-top: 20px;
	border-top: 1px solid #eee;
}

#review_form #respond label {
	display: block;
	margin-bottom: 10px;
	font-size: 14px;
	font-weight: 800;
	color: var(--haminart-dark);
}

#review_form #respond label .required {
	color: var(--haminart-pink);
}

#review_form #respond textarea,
#review_form #respond input[type="text"],
#review_form #respond input[type="email"] {
	width: 100%;
	padding: 14px 18px;
	font-family: inherit;
	font-size: 13px;
	background: #f7f7f7;
	border: 1px solid #efefef;
	border-radius: 16px;
	outline: 0;
}

#review_form #respond textarea {
	min-height: 120px;
}

#review_form #respond .form-submit input.haminart-review-submit,
#review_form #respond .form-submit input#submit {
	width: 100%;
	height: 50px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 800;
	color: #fff;
	cursor: pointer;
	background: var(--haminart-pink);
	border: 0;
	border-radius: 14px;
}

/* Tab icons (Figma: message-text / task-square / messages). */
.woocommerce div.product .woocommerce-tabs ul.tabs li a::before {
	content: "";
	flex: none;
	width: 17px;
	height: 17px;
	background: currentColor;
	-webkit-mask: var(--haminart-tab-icon, url("../icons/message-text.svg")) center / contain no-repeat;
	mask: var(--haminart-tab-icon, url("../icons/message-text.svg")) center / contain no-repeat;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.additional_information_tab,
.woocommerce div.product .woocommerce-tabs ul.tabs li.haminart_specs_tab {
	--haminart-tab-icon: url("../icons/task-square.svg");
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.reviews_tab {
	--haminart-tab-icon: url("../icons/messages.svg");
}

/* Data tabs: no divider line under the pills (Elementor's widget adds one). */
.woocommerce div.product .woocommerce-tabs ul.tabs,
.elementor-widget-woocommerce-product-data-tabs .woocommerce-tabs ul.wc-tabs,
.elementor-widget-woocommerce-product-data-tabs .woocommerce-tabs .wc-tabs {
	border: 0 !important;
	box-shadow: none !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs::after,
.elementor-widget-woocommerce-product-data-tabs .woocommerce-tabs ul.wc-tabs::after {
	display: none !important;
}

.elementor-widget-woocommerce-product-data-tabs .woocommerce-tabs ul.wc-tabs li {
	border: 0 !important;
	background: none !important;
}

.elementor-widget-woocommerce-product-data-tabs .woocommerce-tabs .panel {
	margin: 0;
	padding: 0 14px;
	border: 0 !important;
	box-shadow: none !important;
}

/* Read more / close: outline pill (shielded from the kit's button style). */
.woocommerce-tabs button.haminart-more,
.woocommerce-tabs .haminart-more {
	color: #595959 !important;
	background: #fff !important;
	border: 1px solid #767676 !important;
	box-shadow: none !important;
	outline: 0;
}

.woocommerce-tabs .haminart-more:hover {
	color: #e5097f !important;
	border-color: #e5097f !important;
}

.woocommerce-tabs .haminart-more:focus-visible {
	outline: 2px solid rgba(229, 9, 127, 0.35);
	outline-offset: 2px;
}

/* Mobile gallery (single-product-responsive.svg): ~210px image, three 82px thumbs, no zoom icon. */
@media (max-width: 767px) {
	.haminart-gallery-vertical .woocommerce-product-gallery .flex-viewport {
		max-height: 230px;
	}

	.haminart-gallery-vertical .woocommerce-product-gallery__image img {
		width: auto !important;
		max-width: 100%;
		max-height: 220px;
		margin: 0 auto;
		object-fit: contain;
	}

	.haminart-gallery-vertical .woocommerce-product-gallery__trigger {
		display: none;
	}

	.haminart-gallery-vertical .woocommerce-product-gallery .flex-control-thumbs li {
		width: 82px !important;
		height: 82px;
	}
}

/* Mobile data tabs (single-product-responsive.svg): one row of compact pills, smaller body text. */
@media (max-width: 767px) {
	.woocommerce-tabs.wc-tabs-wrapper {
		padding: 16px 16px 20px;
		border-radius: 20px;
	}

	.woocommerce div.product .woocommerce-tabs ul.tabs,
	.woocommerce-tabs ul.tabs.wc-tabs {
		flex-wrap: nowrap;
		gap: 6px;
		margin: 0 0 18px;
		overflow-x: auto;
		scrollbar-width: none;
	}

	.woocommerce div.product .woocommerce-tabs ul.tabs li {
		flex: none;
	}

	.woocommerce div.product .woocommerce-tabs ul.tabs li a {
		gap: 5px;
		min-height: 31px;
		padding: 0 12px;
		font-size: 10px;
		white-space: nowrap;
	}

	.woocommerce div.product .woocommerce-tabs ul.tabs li a::before {
		width: 12px;
		height: 12px;
	}

	.woocommerce-Tabs-panel {
		font-size: 11px;
		line-height: 2.6;
		text-align: justify;
	}

	.elementor-widget-woocommerce-product-data-tabs .woocommerce-tabs .panel {
		padding: 0 4px;
	}

	.woocommerce-tabs .haminart-more {
		min-height: 34px;
		padding: 0 22px;
		font-size: 11px;
		white-space: nowrap;
	}
}
