/* ==========================================================================
   عیناکتو — لایه‌ی ریسپانسیو (mobile / tablet)
   این فایل بعد از همه‌ی استایل‌های دیگر لود می‌شود و فقط چیدمان را
   اصلاح می‌کند؛ رنگ و تایپوگرافی از base.css می‌آید.
   ========================================================================== */

/* ---------- پایه ---------- */

html,
body {
	max-width: 100%;
	overflow-x: hidden;
}

body.eyewear-ux img {
	max-width: 100%;
	height: auto;
}

.ey-wrap {
	width: 100%;
	max-width: var(--ey-container);
	margin-inline: auto;
	padding-inline: clamp(16px, 4vw, 28px);
}

/* ---------- هیرو / اسلایدر ---------- */

.elementor-main-swiper,
.elementor-slides-wrapper {
	height: 520px !important;
	max-height: 78vh;
}

.elementor-main-swiper .swiper-slide,
.elementor-slides-wrapper .swiper-slide {
	height: 100% !important;
	background-size: cover !important;
	background-position: center !important;
	background-repeat: no-repeat !important;
}

/* ---------- سکشن‌ها ---------- */

.ey-section,
.ey-section--cream {
	padding-block: clamp(30px, 5vw, 54px);
}

.ey-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 14px;
	flex-wrap: wrap;
	margin-bottom: clamp(16px, 3vw, 26px);
}

.ey-title {
	font-size: clamp(1.15rem, 3.4vw, 1.85rem);
	line-height: 1.5;
}

.ey-sub {
	font-size: clamp(.8rem, 2.2vw, .95rem);
}

/* ---------- دسته‌بندی‌ها ---------- */

.ey-cats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
}

.ey-cat {
	border-radius: 16px;
	overflow: hidden;
}

.ey-cat__media,
.ey-cat img {
	aspect-ratio: 4 / 3;
	width: 100%;
	object-fit: cover;
	display: block;
}

/* ---------- شکل فریم ---------- */

.ey-shapes {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 12px;
}

.ey-shape {
	min-height: 118px;
}

.ey-shape img {
	width: 100%;
	height: auto;
	max-width: 120px;
	max-height: 64px;
	object-fit: contain;
	margin-inline: auto;
}

/* ---------- برندها ---------- */

.ey-brands {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 14px;
	padding: 0;
	max-width: none;
}

.ey-brand {
	display: flex;
	flex-direction: column;
	padding: 0;
	min-width: 0;
	min-height: 0;
	overflow: hidden;
	border-radius: 16px;
	background: #fff;
	border: 1px solid var(--ey-line);
	box-shadow: var(--ey-shadow-sm);
}

.ey-brand__media {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	padding: 12px;
	background:
		radial-gradient(circle at 50% 40%, #fff 0%, #f7f3ec 100%);
	overflow: hidden;
}

.ey-brand__media img {
	position: absolute;
	inset: 12px;
	width: calc(100% - 24px);
	height: calc(100% - 24px);
	max-height: none;
	object-fit: contain;
	transition: transform .35s var(--ey-ease);
}

.ey-brand:hover .ey-brand__media img {
	transform: scale(1.06);
}

.ey-brand__name {
	display: block;
	padding: 9px 10px 11px;
	font-size: .76rem;
	font-weight: 700;
	line-height: 1.5;
	color: var(--ey-ink) !important;
	text-align: center;
	border-top: 1px solid var(--ey-line);
}

/* ---------- شبکه محصولات ---------- */

.ey-shop {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ey-shop__card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--ey-line);
	border-radius: 18px;
	overflow: hidden;
	box-shadow: var(--ey-shadow-sm);
	transition: transform .22s var(--ey-ease), box-shadow .22s var(--ey-ease), border-color .22s var(--ey-ease);
}

.ey-shop__card:hover {
	transform: translateY(-3px);
	border-color: rgba(120, 0, 0, .28);
	box-shadow: 0 16px 34px rgba(20, 12, 8, .12);
}

.ey-shop__media {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	background: #f7f4ef;
	overflow: hidden;
}

.ey-shop__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s var(--ey-ease);
}

.ey-shop__card:hover .ey-shop__media img {
	transform: scale(1.05);
}

.ey-shop__badge {
	position: absolute;
	inset-block-start: 10px;
	inset-inline-start: 10px;
	padding: 4px 9px;
	border-radius: 999px;
	background: var(--ey-brand, #780000);
	color: #fff;
	font-size: .68rem;
	font-weight: 700;
	line-height: 1.7;
}

.ey-shop__badge--out {
	background: #6b7280;
}

.ey-shop__body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 12px 13px 14px;
	flex: 1 1 auto;
}

.ey-shop__brand {
	font-size: .68rem;
	font-weight: 700;
	letter-spacing: .02em;
	color: var(--ey-muted);
	text-transform: uppercase;
}

.ey-shop__title {
	margin: 0;
	font-size: .86rem;
	font-weight: 700;
	line-height: 1.75;
	color: var(--ey-ink);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 3.5em;
}

.ey-shop__title a {
	color: inherit !important;
	text-decoration: none;
}

.ey-shop__price {
	margin-top: auto;
	display: flex;
	align-items: baseline;
	gap: 6px;
	flex-wrap: wrap;
	font-size: .95rem;
	font-weight: 800;
	color: var(--ey-ink);
}

.ey-shop__price del {
	font-size: .74rem;
	font-weight: 500;
	color: var(--ey-muted);
}

.ey-shop__price ins {
	text-decoration: none;
	color: var(--ey-brand, #780000);
}

.ey-shop__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin-top: 8px;
	min-height: 40px;
	padding: 8px 12px;
	border-radius: 11px;
	background: var(--ey-ink);
	color: #fff !important;
	font-size: .78rem;
	font-weight: 700;
	text-decoration: none;
	border: 0;
	cursor: pointer;
	transition: background .2s var(--ey-ease);
}

.ey-shop__cta:hover {
	background: var(--ey-brand, #780000);
}

.ey-shop__cta.is-added {
	background: #157347;
}

.ey-shop__cta--out {
	background: #e5e7eb;
	color: #6b7280 !important;
	cursor: not-allowed;
}

/* ---------- نظرات ---------- */

.ey-quotes {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}

/* ---------- خبرنامه ---------- */

.ey-news__form {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.ey-news__form input[type="email"] {
	flex: 1 1 240px;
	min-width: 0;
}

/* ---------- آرشیو: کشوی فیلتر از راست ---------- */

.ey-filter-overlay {
	position: fixed;
	inset: 0;
	z-index: 1100;
	background: rgba(11, 18, 32, .48);
	backdrop-filter: blur(2px);
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s ease, visibility .25s ease;
}

body.ey-filter-open .ey-filter-overlay {
	opacity: 1;
	visibility: visible;
}

@media (max-width: 1024px) {
	.ey-archive__body {
		grid-template-columns: 1fr !important;
	}

	.ey-filters {
		position: fixed !important;
		top: 0;
		bottom: 0;
		right: 0 !important;
		left: auto !important;
		inset-inline-start: auto !important;
		inset-inline-end: auto !important;
		width: min(360px, 88vw) !important;
		height: 100dvh;
		max-height: 100dvh;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		margin: 0;
		padding: 18px 16px calc(26px + env(safe-area-inset-bottom));
		border: 0;
		border-radius: 0;
		box-shadow: -24px 0 60px rgba(11, 18, 32, .22);
		transform: translateX(105%) !important;
		transition: transform .3s cubic-bezier(.4, 0, .2, 1);
		z-index: 1200;
		will-change: transform;
	}

	.ey-filters.is-open {
		transform: translateX(0) !important;
	}

	.ey-filters__head {
		position: sticky;
		top: -18px;
		z-index: 2;
		margin: -18px -16px 12px;
		padding: 16px;
		background: #fff;
		border-bottom: 1px solid var(--ey-line);
	}

	.ey-filters__close {
		display: grid !important;
		margin-inline-start: auto;
	}

	.ey-filter-toggle {
		position: sticky;
		top: calc(var(--ey-hh, 64px) + 6px);
		z-index: 60;
		display: inline-flex !important;
		width: 100%;
		justify-content: center;
		gap: 8px;
		min-height: 46px;
		margin-bottom: 14px;
		font-weight: 700;
	}

	.ey-archive__main ul.products {
		--ey-cols: 2 !important;
	}
}

@media (min-width: 769px) and (max-width: 1024px) {
	.ey-archive__main ul.products {
		--ey-cols: 3 !important;
	}
}

/* ---------- هدر موبایل ---------- */

@media (max-width: 900px) {
	.ey-topbar {
		display: none !important;
	}

	.ey-mainbar .ey-wrap {
		gap: 8px;
		padding-block: 8px;
		align-items: center;
	}

	.ey-search {
		order: 9;
		flex: 1 1 100%;
		height: 42px;
	}

	.ey-search input[type="search"],
	.ey-search input[type="text"] {
		height: 42px;
		font-size: .84rem;
	}

	.ey-header {
		position: sticky;
		top: 0;
		z-index: 200;
	}
}

/* ---------- لایه‌بندی کشوها ---------- */

.ey-drawer {
	z-index: 1300;
}

body.ey-drawer-open .ey-filter-toggle,
body.ey-drawer-open .ey-filter-overlay {
	visibility: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

body.ey-filter-open .ey-drawer {
	visibility: hidden !important;
}

/* ---------- فوتر المنتور ---------- */

@media (max-width: 1024px) {
	.elementor-location-footer .e-con,
	.elementor-location-footer .e-con-inner {
		flex-direction: column !important;
		align-items: stretch !important;
		gap: 18px !important;
	}

	.elementor-location-footer .e-con > .elementor-element,
	.elementor-location-footer .e-con-inner > .elementor-element {
		width: 100% !important;
		max-width: 100% !important;
		flex: 1 1 auto !important;
	}

	.elementor-location-footer .elementor-widget-image,
	.elementor-location-footer .elementor-widget-image img {
		margin-inline: auto;
	}

	.elementor-location-footer .elementor-widget-text-editor,
	.elementor-location-footer .elementor-widget-heading {
		text-align: center;
	}
}

/* ---------- سبد خرید / تسویه ---------- */

@media (max-width: 768px) {
	.woocommerce-cart table.shop_table,
	.woocommerce-checkout table.shop_table {
		width: 100% !important;
		display: block;
		border: 0;
	}

	.woocommerce-cart .woocommerce,
	.woocommerce-checkout .woocommerce,
	.woocommerce-cart form.woocommerce-cart-form,
	.woocommerce-checkout form.checkout {
		width: 100% !important;
		max-width: 100% !important;
	}

	.woocommerce-checkout #order_review,
	.woocommerce-checkout #order_review_heading,
	.woocommerce-cart .cart-collaterals,
	.woocommerce-cart .cart_totals {
		width: 100% !important;
		max-width: 100% !important;
		float: none !important;
		clear: both;
	}

	.woocommerce-cart table.shop_table thead,
	.woocommerce-checkout table.shop_table thead {
		display: none;
	}

	.woocommerce-cart table.shop_table tr,
	.woocommerce-checkout table.shop_table tr {
		display: block;
		padding: 12px;
		margin-bottom: 12px;
		border: 1px solid var(--ey-line);
		border-radius: 14px;
		background: #fff;
	}

	.woocommerce-cart table.shop_table td,
	.woocommerce-checkout table.shop_table td {
		display: block;
		border: 0 !important;
		padding: 6px 0 !important;
		text-align: start;
	}

	.woocommerce-cart table.shop_table td.product-thumbnail img {
		width: 72px;
		border-radius: 10px;
	}

	.woocommerce-cart .cart-collaterals,
	.woocommerce-checkout .col2-set,
	.woocommerce-checkout #order_review {
		width: 100% !important;
		float: none !important;
	}

	.woocommerce-checkout .col2-set .col-1,
	.woocommerce-checkout .col2-set .col-2 {
		width: 100% !important;
		float: none !important;
	}

	.woocommerce form .form-row-first,
	.woocommerce form .form-row-last,
	.woocommerce-page form .form-row-first,
	.woocommerce-page form .form-row-last {
		width: 100% !important;
		float: none !important;
	}
}

/* ---------- حساب کاربری ---------- */

@media (max-width: 900px) {
	.woocommerce-account .woocommerce-MyAccount-navigation,
	.woocommerce-account .woocommerce-MyAccount-content {
		float: none !important;
		width: 100% !important;
	}

	.woocommerce-account .woocommerce-MyAccount-navigation {
		margin-bottom: 18px;
	}

	.woocommerce-account .woocommerce-MyAccount-navigation ul {
		display: flex;
		flex-wrap: wrap;
		gap: 8px;
	}

	.woocommerce-account .woocommerce-MyAccount-navigation ul li {
		margin: 0;
	}

	.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
		display: inline-flex;
		padding: 9px 14px;
		border: 1px solid var(--ey-line);
		border-radius: 999px;
		background: #fff;
		font-size: .8rem;
	}
}

/* ---------- تبلت ---------- */

@media (max-width: 1024px) {
	.ey-cats {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.ey-brands {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.ey-shop {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.ey-shapes {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.ey-quotes {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.elementor-main-swiper,
	.elementor-slides-wrapper {
		height: 420px !important;
	}
}

/* ---------- موبایل ---------- */

@media (max-width: 768px) {
	.ey-cats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}

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

	.ey-shop {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}

	.ey-shapes {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.ey-quotes {
		grid-template-columns: 1fr;
	}

	.elementor-main-swiper,
	.elementor-slides-wrapper {
		height: auto !important;
		aspect-ratio: 2048 / 520;
		max-height: none;
		background: var(--ey-cream);
		margin-inline: 14px;
		border-radius: 14px;
		overflow: hidden;
		box-shadow: 0 10px 26px rgba(20, 12, 8, .1);
	}

	.elementor-main-swiper .swiper-slide,
	.elementor-slides-wrapper .swiper-slide {
		background-size: contain !important;
		background-repeat: no-repeat !important;
		background-position: center center !important;
		background-color: var(--ey-cream) !important;
	}

	.ey-brand__name {
		font-size: .72rem;
		padding: 7px 6px 9px;
	}

	.ey-shop__body {
		padding: 10px 10px 12px;
	}

	.ey-shop__title {
		font-size: .78rem;
		min-height: 3.4em;
	}

	.ey-shop__cta {
		min-height: 36px;
		font-size: .72rem;
	}

	.ey-head {
		gap: 10px;
	}

	.ey-more {
		font-size: .78rem;
	}
}

@media (max-width: 400px) {
	.ey-shop {
		gap: 10px;
	}
}

/* ==========================================================================
   اصلاح سربرگ سکشن‌ها (راست‌چین + بدون هم‌پوشانی) — موبایل
   ========================================================================== */

.ey-section .ey-head {
	direction: rtl;
	text-align: right;
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 10px 16px;
	width: 100%;
	margin-bottom: 18px;
	height: auto !important;
}

.ey-section .ey-head > div {
	flex: 1 1 240px;
	min-width: 0;
	text-align: right;
}

.ey-section .ey-title,
.ey-section .ey-sub,
.ey-section .ey-kicker {
	text-align: right !important;
	direction: rtl !important;
}

.ey-section .ey-more {
	position: static !important;
	flex: 0 0 auto;
	white-space: nowrap;
}

@media (max-width: 768px) {
	.ey-section .ey-head {
		flex-direction: column;
		align-items: flex-start;
		gap: 6px;
		margin-bottom: 14px;
	}

	.ey-section .ey-head > div {
		flex: 1 1 auto;
		width: 100%;
	}

	.ey-section .ey-more {
		margin-top: 2px;
	}

	.ey-shop {
		margin-top: 0 !important;
	}

	.ey-shop__card,
	.ey-shop__body,
	.ey-shop__brand,
	.ey-shop__title,
	.ey-shop__price {
		text-align: right;
		direction: rtl;
	}

	.ey-shop__cta {
		text-align: center;
	}
}

/* ==========================================================================
   برچسب تخفیف صفحه محصول — مینیمال (بدون لوزی/سایه/چرخش)
   ========================================================================== */

body.eyewear-ux div.product span.onsale,
body.eyewear-ux .ey-pdp__media span.onsale,
body.eyewear-ux .woocommerce span.onsale {
	position: absolute !important;
	top: 14px !important;
	inset-inline-start: 14px !important;
	inset-inline-end: auto !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: auto !important;
	height: auto !important;
	min-width: 0 !important;
	min-height: 0 !important;
	padding: 3px 10px !important;
	border-radius: 999px !important;
	background: var(--ey-brand, #780000) !important;
	color: #fff !important;
	font-size: .68rem !important;
	font-weight: 600 !important;
	line-height: 1.9 !important;
	letter-spacing: 0 !important;
	box-shadow: none !important;
	text-shadow: none !important;
	transform: none !important;
	clip-path: none !important;
}

@media (max-width: 768px) {
	body.eyewear-ux div.product span.onsale,
	body.eyewear-ux .ey-pdp__media span.onsale,
	body.eyewear-ux .woocommerce span.onsale {
		top: 10px !important;
		inset-inline-start: 10px !important;
		font-size: .64rem !important;
		padding: 2px 8px !important;
	}
}

/* ==========================================================================
   سکشن‌های ویجت‌های عیناکتو نباید داخل کانتینر المنتور فشرده شوند
   (علت روی‌هم‌افتادن «برندها» و «جدیدترین فریم‌ها»)
   ========================================================================== */

.elementor-widget-eyewear-benefits,
.elementor-widget-eyewear-categories,
.elementor-widget-eyewear-shapes,
.elementor-widget-eyewear-brands,
.elementor-widget-eyewear-quotes,
.elementor-widget-eyewear-faq,
.elementor-widget-eyewear-newsletter,
.elementor-widget-eyewear-products {
	flex: 0 0 auto !important;
	height: auto !important;
	min-height: 0 !important;
	overflow: visible;
}

.elementor-element-5f0b6eb,
.elementor-element:has(> .elementor-element > .elementor-widget-container > .ey-section) {
	height: auto !important;
	min-height: 0 !important;
	justify-content: flex-start !important;
	flex-wrap: nowrap !important;
}

.elementor-element-5f0b6eb > .elementor-element {
	flex: 0 0 auto !important;
	height: auto !important;
}
