/*
Theme Name: homeplus-theme
Theme URI: https://homeplus.ir
Author: زیومدیا
Author URI: https://soleimanidev.ir
Description: قالب اختصاصی هوم پلاس
Version: 1.3.55
Text Domain: homeplus-theme
*/

:root {
	--hp-blue-light: #88A4CC;
	--hp-blue-mid: #203E7A;
	--hp-blue-dark: #031749;
	--hp-red: #EB0928;
	--hp-white: #ffffff;
	--hp-font: "Vazirmatn", Tahoma, sans-serif;
	--hp-header-height: calc(1.7rem + 78px);
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: var(--hp-font);
	background: var(--hp-white);
	color: var(--hp-blue-dark);
	line-height: 1.7;
	overflow-x: hidden;
}

body.nav-open {
	overflow: hidden;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: inherit;
	text-decoration: none;
}

ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

button,
input {
	font-family: inherit;
}

/* —— Header —— */
.site-header {
	position: relative;
	inset-inline: 0;
	top: 0;
	z-index: 50;
	padding: 0.85rem 0;
	background: var(--hp-blue-dark);
}

/* Hero pages: header floats over banner — no solid bar */
.page-products .site-header,
.page-template-default.page-products .site-header,
.page-dishwashing-liquid .site-header,
.page-template-default.page-dishwashing-liquid .site-header,
.page-dishwashing-liquid-apple .site-header,
.page-template-default.page-dishwashing-liquid-apple .site-header,
.page-dishwashing-liquid-blood-orange .site-header,
.page-template-default.page-dishwashing-liquid-blood-orange .site-header,
.page-washing-powder .site-header,
.page-template-default.page-washing-powder .site-header {
	position: absolute;
	width: 100%;
	background: transparent !important;
	box-shadow: none;
}

.site-header__inner {
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 1.5rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	direction: ltr;
}

.site-header__logo {
	flex-shrink: 0;
	display: block;
}

.site-header__logo img {
	width: 78px;
	height: auto;
	filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}

.site-header__nav {
	flex: 1;
	display: flex;
	justify-content: center;
}

.site-header__menu {
	display: flex;
	align-items: center;
	gap: 1.35rem;
	direction: rtl;
}

.site-header__menu a {
	color: var(--hp-white);
	font-size: 0.92rem;
	font-weight: 500;
	white-space: nowrap;
	transition: opacity 0.2s ease;
}

.site-header__menu a:hover,
.site-header__menu a.is-active {
	opacity: 0.85;
}

.site-header__menu .has-dropdown {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
}

.site-header__chevron {
	width: 0;
	height: 0;
	border-inline: 4px solid transparent;
	border-top: 5px solid #fff;
	margin-top: 2px;
}

.site-header__dropdown {
	position: absolute;
	top: calc(100% + 0.65rem);
	right: 0;
	min-width: 200px;
	padding: 0.55rem 0;
	background: rgba(3, 23, 73, 0.97);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 10px;
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
	z-index: 60;
}

.site-header__dropdown a {
	display: block;
	padding: 0.55rem 1rem;
	font-size: 0.88rem;
	white-space: nowrap;
}

.site-header__dropdown a:hover,
.site-header__dropdown a.is-active {
	background: rgba(255, 255, 255, 0.08);
	opacity: 1;
}

.site-header__dropdown .has-dropdown--nested {
	position: static;
}

.site-header__dropdown .has-dropdown--nested > a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
}

.site-header__dropdown .has-dropdown--nested > a::after {
	content: "";
	flex-shrink: 0;
	width: 0;
	height: 0;
	border-block: 4px solid transparent;
	border-right: 5px solid #fff;
}

.site-header__dropdown--nested {
	top: -1px;
	bottom: auto;
	right: auto;
	left: auto;
	inset-inline-start: calc(100% - 1px);
	min-width: 220px;
	height: auto;
	min-height: calc(100% + 2px);
	margin: 0;
	padding: 0.55rem 0;
	background: rgba(3, 23, 73, 0.97);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-inline-start: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 0;
	border-start-end-radius: 10px;
	border-end-end-radius: 10px;
	border-end-start-radius: 10px;
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
	opacity: 0;
	visibility: hidden;
	transform: none;
}

.site-header__dropdown:has(.has-dropdown--nested:hover),
.site-header__dropdown:has(.has-dropdown--nested:focus-within) {
	border-start-end-radius: 0;
	border-end-end-radius: 0;
}

.site-header__dropdown .has-dropdown--nested:hover > .site-header__dropdown--nested,
.site-header__dropdown .has-dropdown--nested:focus-within > .site-header__dropdown--nested {
	opacity: 1;
	visibility: visible;
}

.site-header__menu > .has-dropdown:hover > .site-header__dropdown,
.site-header__menu > .has-dropdown:focus-within > .site-header__dropdown {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.site-header__actions {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	flex-shrink: 0;
}

.site-header__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 0;
	background: transparent;
	color: var(--hp-white);
	cursor: pointer;
	padding: 0;
}

.site-header__burger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 40px;
	height: 40px;
	border: 0;
	background: transparent;
	cursor: pointer;
	padding: 0;
}

.site-header__burger span {
	display: block;
	width: 22px;
	height: 2px;
	background: #fff;
	margin-inline: auto;
	border-radius: 2px;
}

/* —— Newsletter —— */
.newsletter {
	background: var(--hp-blue-mid);
	color: var(--hp-white);
	padding: 1.35rem 1.5rem;
}

.newsletter__inner {
	max-width: 1240px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	flex-wrap: wrap;
}

.newsletter__copy {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	flex: 1;
	min-width: 240px;
}

.newsletter__icon {
	display: inline-flex;
	color: var(--hp-white);
	flex-shrink: 0;
}

.newsletter__text strong {
	display: block;
	font-size: 1.05rem;
	font-weight: 700;
	margin-bottom: 0.15rem;
}

.newsletter__text p {
	margin: 0;
	font-size: 0.88rem;
	font-weight: 400;
	opacity: 0.95;
}

.newsletter__form {
	display: flex;
	align-items: stretch;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.newsletter__form input {
	border: 0;
	border-radius: 8px;
	padding: 0.7rem 1rem;
	min-width: 240px;
	font-size: 0.9rem;
	outline: none;
}

.newsletter__form button {
	border: 0;
	border-radius: 8px;
	background: var(--hp-red);
	color: #fff;
	padding: 0.7rem 1.4rem;
	font-weight: 700;
	font-size: 0.95rem;
	cursor: pointer;
	transition: filter 0.2s ease;
}

.newsletter__form button:hover {
	filter: brightness(1.08);
}

/* —— Footer —— */
.site-footer {
	background: var(--hp-blue-dark);
	color: var(--hp-white);
	padding: 2.75rem 1.5rem 2.75rem;
}

.site-footer__inner {
	max-width: 1240px;
	margin: 0 auto;
	display: grid;
	/* RTL: cols (1fr) on the right, brand on the left — matches screenshot */
	grid-template-columns: 1fr minmax(180px, 220px);
	gap: 2.75rem;
	align-items: start;
}

.site-footer__brand {
	display: flex;
	flex-direction: column;
	align-items: flex-end; /* RTL: physical left — same edge as header logo */
	text-align: right;
}

.site-footer__brand img {
	width: 78px;
	height: auto;
	margin-bottom: 0.85rem;
	display: block;
}

.site-footer__tagline {
	margin: 0 0 1.15rem;
	font-size: 0.9rem;
	font-weight: 500;
	line-height: 1.7;
	color: var(--hp-white);
}

.site-footer__social {
	direction: ltr;
	display: flex;
	justify-content: flex-start;
	gap: 2.15rem;
	width: 100%;
}

.site-footer__social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--hp-white);
	opacity: 1;
	transition: opacity 0.2s ease;
}

.site-footer__social a:hover {
	opacity: 0.75;
}

.site-footer__cols {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 1.5rem 1.75rem;
}

.site-footer__col h3 {
	margin: 0 0 1.35rem;
	font-size: 0.98rem;
	font-weight: 700;
	color: var(--hp-white);
}

.site-footer__col li + li {
	margin-top: 1.15rem;
}

.site-footer__col a {
	font-size: 0.88rem;
	font-weight: 400;
	color: var(--hp-white);
	opacity: 1;
	transition: opacity 0.2s ease;
}

.site-footer__col a:hover {
	opacity: 0.75;
}

@media (max-width: 1024px) {
	.site-header__menu {
		gap: 0.85rem;
	}

	.site-header__menu a {
		font-size: 0.82rem;
	}

	.site-footer__inner {
		grid-template-columns: 1fr;
		gap: 2rem;
	}

	.site-footer__brand {
		order: -1;
		align-items: center;
		text-align: center;
	}

	.site-footer__social {
		justify-content: center;
	}

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

@media (max-width: 860px) {
	.site-header__nav {
		position: fixed;
		inset: 0;
		background: rgba(3, 23, 73, 0.98);
		align-items: stretch;
		justify-content: flex-start;
		overflow-x: hidden;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		padding: calc(var(--hp-header-height) + 0.75rem) 1.25rem 2.5rem;
		opacity: 0;
		pointer-events: none;
		transition: opacity 0.25s ease;
		z-index: 42;
	}

	.site-header__nav.is-open {
		opacity: 1;
		pointer-events: auto;
	}

	.site-header__menu {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		width: 100%;
		max-width: 28rem;
		margin-inline: auto;
	}

	.site-header__menu > li {
		width: 100%;
		border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	}

	.site-header__menu > li > a {
		display: block;
		font-size: 1.05rem;
		font-weight: 600;
		line-height: 1.45;
		padding: 0.9rem 0.35rem;
		white-space: normal;
		text-align: right;
	}

	.site-header__menu .has-dropdown {
		flex-direction: column;
		align-items: stretch;
		width: 100%;
		gap: 0;
	}

	.site-header__menu .has-dropdown > .site-header__chevron {
		display: none;
	}

	.site-header__dropdown {
		position: static;
		display: none;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		background: transparent;
		border: 0;
		border-radius: 0;
		padding: 0 0 0.65rem;
		min-width: 0;
		width: 100%;
		height: auto;
		min-height: 0;
		text-align: right;
	}

	.has-dropdown.is-expanded > .site-header__dropdown,
	.has-dropdown--nested.is-expanded > .site-header__dropdown {
		display: block;
	}

	.site-header__menu .has-dropdown > a,
	.site-header__dropdown .has-dropdown--nested > a {
		position: relative;
	}

	.site-header__menu .has-dropdown > a::after,
	.site-header__dropdown .has-dropdown--nested > a::after {
		content: "";
		display: inline-block;
		width: 0;
		height: 0;
		margin-inline-start: 0.45rem;
		vertical-align: middle;
		border-inline: 5px solid transparent;
		border-top: 6px solid rgba(255, 255, 255, 0.85);
		transition: transform 0.2s ease;
	}

	.has-dropdown.is-expanded > a::after,
	.has-dropdown--nested.is-expanded > a::after {
		transform: rotate(180deg);
	}

	.site-header__dropdown--nested {
		position: static;
		inset-inline-start: auto;
		right: auto;
		left: auto;
		top: auto;
		padding: 0.15rem 0 0.4rem;
		min-width: 0;
		height: auto;
		min-height: 0;
		opacity: 1;
		visibility: visible;
		transform: none;
		background: transparent;
		border: 0;
		border-radius: 0;
		box-shadow: none;
	}

	.site-header__dropdown .has-dropdown--nested {
		width: 100%;
	}

	.site-header__dropdown .has-dropdown--nested > a {
		justify-content: flex-start;
		font-size: 0.95rem;
		font-weight: 600;
		line-height: 1.45;
		padding: 0.55rem 0.75rem;
		white-space: normal;
		overflow-wrap: anywhere;
	}

	.site-header__dropdown a {
		display: block;
		font-size: 0.9rem;
		font-weight: 400;
		line-height: 1.45;
		opacity: 0.88;
		padding: 0.45rem 0.75rem;
		white-space: normal;
		overflow-wrap: anywhere;
	}

	.site-header__dropdown a:hover,
	.site-header__dropdown a.is-active {
		background: transparent;
		opacity: 1;
	}

	.site-header__dropdown a.is-active {
		font-weight: 600;
		text-decoration: underline;
		text-underline-offset: 0.3em;
	}

	.site-header__dropdown--nested a {
		font-size: 0.84rem;
		font-weight: 400;
		opacity: 0.78;
		padding: 0.4rem 1.1rem;
	}

	.site-header__actions {
		position: relative;
		z-index: 45;
	}

	.site-header__burger {
		display: inline-flex;
		position: relative;
		z-index: 45;
	}

	body.nav-open .site-header__icon {
		visibility: hidden;
		pointer-events: none;
	}

	body.nav-open .site-header__burger {
		visibility: visible;
		pointer-events: auto;
	}

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

@media (max-width: 560px) {
	.newsletter__form {
		width: 100%;
	}

	.newsletter__form input {
		flex: 1;
		min-width: 0;
		width: 100%;
	}

	.site-footer__cols {
		grid-template-columns: 1fr 1fr;
	}

	.site-header__logo img,
	.site-footer__brand img {
		width: 64px;
	}

	:root {
		--hp-header-height: calc(1.7rem + 64px);
	}
}
