/*
Theme Name: Alhafez Store
Author: Alhafez Store
Description: قالب ووردبريس عربي مطابق لتصميم الحافظ ستور الأصلي، مع إدارة المنتجات والصور والأسعار والطلب عبر واتساب.
Version: 1.4.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: alhafez-store
Tags: rtl-language-support, custom-logo, featured-images, custom-colors, one-column
*/

:root {
	--primary: #0f6b3e;
	--light-green: #156d3e;
	--gold: #c9a227;
	--surface: #e6ece8;
	--white: #ffffff;
	--dark-text: #2b2b2b;
	--discount-red: #dc2626;
	--whatsapp: #10b981;
	--body-bg: #f4f6f5;
	--header-bg: #ffffff;
	--header-links: #0f6b3e;
	--topbar-bg: #073d25;
	--topbar-text: #ffffff;
	--hero-start: #0a4d2c;
	--hero-end: #156d3e;
	--hero-title: #c9a227;
	--hero-text: #ffffff;
	--promo-bg: #e2ede5;
	--promo-text: #0f6b3e;
	--about-bg: #e6ece8;
	--products-bg: #f4f6f5;
	--cards-bg: #ffffff;
	--offers-start: #0f6b3e;
	--offers-end: #073d25;
	--trust-bg: #f4f6f5;
	--faq-bg: #ffffff;
	--footer-bg: #0f6b3e;
	--footer-text: #ffffff;
	--font-base: 16px;
	--font-nav: 15px;
	--font-hero-title: 42px;
	--font-hero-mobile: 30px;
	--font-hero-subtitle: 25px;
	--font-hero-subtitle-mobile: 20px;
	--font-hero-text: 16px;
	--font-hero-text-mobile: 14px;
	--font-section-title: 28px;
	--font-product-title: 18px;
	--font-product-text: 13.5px;
	--font-product-price: 24px;
	--font-button: 16px;
	--font-footer: 13px;
	--logo-height: 55px;
	--logo-max-width: 240px;
	--logo-mobile-height: 48px;
	--logo-mobile-width: 180px;
	--container: 1200px;
}

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

html {
	scroll-behavior: smooth;
	scroll-padding-top: 90px;
}

body {
	margin: 0;
	background-color: var(--body-bg);
	color: var(--dark-text);
	font-family: "Cairo", sans-serif;
	font-size: var(--font-base);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

body.menu-open {
	overflow: hidden;
}

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

button,
input,
textarea,
select {
	font: inherit;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.screen-reader-text:focus {
	top: 10px;
	right: 10px;
	z-index: 99999;
	display: block;
	width: auto;
	height: auto;
	padding: 12px 18px;
	clip: auto;
	background: #fff;
	color: var(--primary);
}

.top-offer-bar {
	padding: 7px 20px;
	background: var(--topbar-bg);
	color: var(--topbar-text);
	font-size: calc(var(--font-base) - 3px);
	font-weight: 700;
	text-align: center;
}

.store-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 75px;
	padding: 10px 5%;
	background-color: var(--header-bg);
	box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
}

body.admin-bar .store-header {
	top: 32px;
}

.logo-area {
	display: flex;
	align-items: center;
	text-decoration: none;
}

.logo-img {
	width: auto;
	height: auto;
	max-height: var(--logo-height);
	max-width: var(--logo-max-width);
	object-fit: contain;
}

.text-logo {
	display: flex;
	align-items: center;
	gap: 9px;
}

.text-logo__icon {
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	border-radius: 12px;
	background: var(--primary);
	font-size: 23px;
}

.text-logo > span:last-child {
	display: flex;
	flex-direction: column;
	line-height: 1.4;
}

.text-logo strong {
	color: var(--header-links);
	font-size: 18px;
}

.text-logo small {
	color: var(--gold);
	font-size: 9px;
	font-weight: 700;
}

.nav-menu {
	display: flex;
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nav-menu a {
	display: block;
	padding: 8px 15px;
	border-radius: 8px;
	color: var(--header-links);
	font-size: var(--font-nav);
	font-weight: 700;
	text-decoration: none;
	transition: .3s;
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
	background-color: rgba(10, 77, 44, .08);
	color: var(--light-green);
}

.menu-toggle {
	display: none;
	width: 44px;
	height: 42px;
	padding: 9px;
	border: 0;
	border-radius: 8px;
	background: rgba(15, 107, 62, .08);
	cursor: pointer;
}

.menu-toggle > span:not(.screen-reader-text) {
	display: block;
	width: 23px;
	height: 2px;
	margin: 5px auto;
	border-radius: 2px;
	background: var(--primary);
	transition: transform .25s, opacity .2s;
}

.hero-section {
	position: relative;
	padding: 80px 20px;
	background:
		linear-gradient(135deg, rgba(10, 77, 44, .92), rgba(21, 109, 62, .85)),
		var(--hero-image) no-repeat center center / cover;
	background:
		linear-gradient(135deg, color-mix(in srgb, var(--hero-start) 92%, transparent), color-mix(in srgb, var(--hero-end) 85%, transparent)),
		var(--hero-image) no-repeat center center / cover;
	color: var(--hero-text);
	text-align: center;
}

.hero-content {
	position: relative;
	z-index: 1;
	max-width: 950px;
	margin: 0 auto;
}

.hero-store-name {
	display: block;
	margin-bottom: 7px;
	color: var(--hero-text);
	font-size: calc(var(--font-base) + 1px);
	font-weight: 700;
}

.hero-section h1 {
	margin: 0 0 8px;
	color: var(--hero-title);
	font-size: var(--font-hero-title);
	font-weight: 800;
	line-height: 1.35;
}

.hero-section h2 {
	margin: 0 0 12px;
	color: var(--hero-text);
	font-size: var(--font-hero-subtitle);
	font-weight: 700;
}

.hero-section p {
	max-width: 790px;
	margin: 0 auto 20px;
	color: var(--hero-text);
	opacity: .95;
	font-size: var(--font-hero-text);
	font-weight: 300;
	line-height: 1.9;
}

.hero-points {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 10px 20px;
	margin: 0 auto 27px;
}

.hero-points span {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	color: var(--hero-text);
	font-size: calc(var(--font-hero-text) - 3px);
	font-weight: 600;
}

.hero-points i {
	color: var(--hero-title);
	font-size: 11px;
}

.hero-btn {
	display: inline-block;
	padding: 12px 40px;
	border: none;
	border-radius: 25px;
	background-color: var(--gold);
	box-shadow: 0 4px 15px rgba(201, 162, 39, .4);
	color: var(--primary);
	font-size: var(--font-button);
	font-weight: 700;
	text-decoration: none;
	transition: .3s;
}

.hero-btn:hover {
	transform: translateY(-3px);
	box-shadow: 0 6px 20px rgba(201, 162, 39, .6);
}

.promo-bar {
	display: flex;
	justify-content: space-around;
	flex-wrap: wrap;
	gap: 15px;
	padding: 12px 5%;
	border-bottom: 2px solid #cedcd1;
	background-color: var(--promo-bg);
}

.promo-item {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--promo-text);
	font-size: calc(var(--font-base) - 2px);
	font-weight: 600;
}

.promo-item i {
	color: var(--gold);
	font-size: 16px;
}

.features-section,
.trust-section {
	padding: 60px 5%;
	background-color: var(--about-bg);
	text-align: center;
}

.section-title {
	margin: 0 0 10px;
	color: var(--primary);
	font-size: var(--font-section-title);
	font-weight: 700;
}

.section-title--light {
	color: #fff;
}

.section-divider {
	width: 40px;
	height: 4px;
	margin: 0 auto 30px;
	border-radius: 2px;
	background-color: var(--gold);
}

.section-intro,
.products-intro {
	max-width: 820px;
	margin: 0 auto 35px;
}

.section-intro strong {
	display: block;
	margin-bottom: 8px;
	color: var(--gold);
	font-size: 18px;
}

.section-intro p,
.products-intro {
	color: #555;
	font-size: calc(var(--font-base) - 2px);
	line-height: 1.9;
}

.features-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 20px;
	max-width: var(--container);
	margin: 0 auto;
}

.feature-card {
	display: flex;
	align-items: flex-start;
	gap: 15px;
	padding: 25px 20px;
	border-radius: 12px;
	background: var(--cards-bg);
	box-shadow: 0 4px 10px rgba(0, 0, 0, .05);
	text-align: right;
	transition: .3s;
}

.feature-card:hover {
	transform: translateY(-3px);
}

.feature-icon-wrapper {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 45px;
	height: 45px;
	flex-shrink: 0;
	border-radius: 50%;
	background-color: rgba(10, 77, 44, .1);
	color: var(--primary);
	font-size: 20px;
}

.feature-content h3 {
	margin: 0 0 5px;
	color: var(--primary);
	font-size: var(--font-base);
	font-weight: 700;
}

.feature-content p {
	margin: 0;
	color: #555;
	font-size: calc(var(--font-base) - 3px);
	line-height: 1.5;
}

.products-section {
	max-width: var(--container);
	margin: 0 auto;
	padding: 60px 5%;
	background-color: var(--products-bg);
	box-shadow: 0 0 0 100vmax var(--products-bg);
	clip-path: inset(0 -100vmax);
	text-align: center;
}

.products-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
	align-items: stretch;
	gap: 30px;
	margin-top: 36px;
}

.product-card {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid #eef2f0;
	border-radius: 15px;
	background: var(--cards-bg);
	box-shadow: 0 5px 15px rgba(0, 0, 0, .06);
	transition: .3s;
}

.product-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 25px rgba(0, 0, 0, .1);
}

.badge-discount {
	position: absolute;
	top: 15px;
	right: 15px;
	z-index: 5;
	padding: 4px 12px;
	border-radius: 20px;
	background-color: var(--discount-red);
	color: var(--white);
	font-size: 12px;
	font-weight: 700;
}

.product-gallery {
	background: #f9f9f9;
}

.product-img-wrapper {
	position: relative;
	display: block;
	width: 100%;
	height: 250px;
	padding: 0;
	overflow: hidden;
	border: 0;
	background-color: #f9f9f9;
	cursor: zoom-in;
}

.product-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: .5s;
}

.product-card:hover .product-img {
	transform: scale(1.05);
}

.image-zoom {
	position: absolute;
	left: 12px;
	bottom: 12px;
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .92);
	box-shadow: 0 3px 10px rgba(0, 0, 0, .14);
	color: var(--primary);
	font-size: 14px;
}

.product-thumbs {
	display: flex;
	gap: 7px;
	padding: 9px 12px;
	overflow-x: auto;
}

.product-thumb {
	width: 45px;
	height: 45px;
	padding: 2px;
	flex: 0 0 45px;
	overflow: hidden;
	border: 2px solid transparent;
	border-radius: 7px;
	background: #fff;
	cursor: pointer;
}

.product-thumb.is-active {
	border-color: var(--gold);
}

.product-thumb img {
	width: 100%;
	height: 100%;
	border-radius: 4px;
	object-fit: cover;
}

.product-info {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	padding: 25px;
	text-align: right;
}

.product-title {
	margin: 0 0 2px;
	color: var(--primary);
	font-size: var(--font-product-title);
	font-weight: 700;
}

.product-subtitle {
	margin-bottom: 12px;
	color: var(--gold);
	font-size: var(--font-product-text);
	font-weight: 600;
}

.product-description {
	margin-bottom: 15px;
	color: #666;
	font-size: var(--font-product-text);
	line-height: 1.7;
	flex-grow: 1;
}

.product-description p {
	margin: 0;
}

.product-specs {
	margin-bottom: 18px;
	padding: 12px;
	border-radius: 8px;
	background-color: #f4f7f5;
}

.spec-item {
	display: block;
	margin-bottom: 6px;
	color: #444;
	font-size: calc(var(--font-product-text) - 2px);
}

.spec-item:last-child {
	margin-bottom: 0;
}

.spec-item i {
	margin-left: 6px;
	color: var(--whatsapp);
}

.price-labels {
	display: flex;
	gap: 12px;
	margin-bottom: 2px;
	color: #888;
	font-size: 9px;
}

.price-labels span:last-child {
	color: var(--primary);
}

.price-box {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 20px;
}

.old-price {
	color: #888;
	font-size: calc(var(--font-product-price) - 9px);
	font-weight: 500;
	text-decoration: line-through;
}

.new-price {
	color: var(--primary);
	font-size: var(--font-product-price);
	font-weight: 800;
}

.order-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px;
	border-radius: 25px;
	background-color: var(--whatsapp);
	box-shadow: 0 4px 12px rgba(16, 185, 129, .2);
	color: var(--white);
	font-size: var(--font-button);
	font-weight: 700;
	text-decoration: none;
	transition: .3s;
}

.order-btn:hover {
	transform: translateY(-2px);
	background-color: var(--whatsapp);
	filter: brightness(.88);
	box-shadow: 0 6px 15px rgba(16, 185, 129, .3);
}

.offers-section {
	padding: 60px 5%;
	background: linear-gradient(135deg, var(--offers-start), var(--offers-end));
	text-align: center;
}

.offers-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
	max-width: var(--container);
	margin: 0 auto;
}

.offer-card {
	padding: 28px 20px;
	border: 1px solid rgba(255, 255, 255, .16);
	border-radius: 12px;
	background: rgba(255, 255, 255, .09);
	color: #fff;
}

.offer-card > i {
	margin-bottom: 13px;
	color: var(--gold);
	font-size: 26px;
}

.offer-card h3 {
	margin: 0 0 7px;
	font-size: 18px;
}

.offer-card p {
	margin: 0;
	color: rgba(255, 255, 255, .78);
	font-size: 13px;
}

.trust-section {
	background: var(--trust-bg);
}

.trust-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 16px;
	max-width: var(--container);
	margin: 0 auto;
}

.trust-card {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 18px;
	border: 1px solid #e2ede5;
	border-radius: 10px;
	background: var(--cards-bg);
	box-shadow: 0 4px 10px rgba(0, 0, 0, .04);
	color: var(--primary);
	font-size: calc(var(--font-base) - 3px);
	font-weight: 700;
	text-align: right;
}

.trust-card i {
	color: var(--gold);
	font-size: 19px;
}

.faq-section {
	padding: 60px 5%;
	background-color: var(--faq-bg);
	text-align: center;
}

.faq-container {
	max-width: 800px;
	margin: 35px auto 0;
	text-align: right;
}

.faq-item {
	margin-bottom: 15px;
	padding: 20px;
	border: 1px solid #e2ede5;
	border-radius: 8px;
	background-color: var(--cards-bg);
}

.faq-question {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
	color: var(--primary);
	font-size: var(--font-base);
	font-weight: 700;
}

.faq-question i {
	color: var(--gold);
}

.faq-answer {
	padding-right: 25px;
	color: #555;
	font-size: calc(var(--font-base) - 2px);
	line-height: 1.7;
}

.store-footer {
	padding: 50px 5% 20px;
	background-color: var(--footer-bg);
	color: var(--footer-text);
}

.footer-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 40px;
	max-width: var(--container);
	margin: 0 auto;
}

.footer-col h3 {
	display: inline-block;
	margin: 0 0 15px;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--gold);
	color: var(--footer-text);
	font-size: calc(var(--font-footer) + 5px);
}

.footer-tagline {
	display: block;
	margin-bottom: 7px;
	color: #f1d575;
	font-size: var(--font-footer);
}

.footer-col p {
	margin: 0;
	opacity: .9;
	font-size: var(--font-footer);
	line-height: 1.8;
}

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

.footer-col li {
	margin-bottom: 10px;
}

.footer-col li a {
	color: var(--footer-text);
	font-size: var(--font-footer);
	text-decoration: none;
	opacity: .8;
	transition: .3s;
}

.footer-col li a:hover {
	color: var(--gold);
	opacity: 1;
}

.contact-item {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
	font-size: var(--font-footer);
	opacity: .9;
}

.contact-item i {
	color: var(--gold);
}

.footer-order-link {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin-top: 3px;
	padding: 8px 15px;
	border: 1px solid rgba(255, 255, 255, .3);
	border-radius: 20px;
	color: var(--footer-text);
	font-size: 12px;
	font-weight: 700;
	text-decoration: none;
}

.copyright {
	margin-top: 40px;
	padding-top: 30px;
	border-top: 1px solid rgba(255, 255, 255, .1);
	font-size: calc(var(--font-footer) - 1px);
	text-align: center;
	opacity: .7;
}

.floating-whatsapp {
	position: fixed;
	left: 22px;
	bottom: 22px;
	z-index: 900;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 11px 17px;
	border: 3px solid #fff;
	border-radius: 30px;
	background: var(--whatsapp);
	box-shadow: 0 8px 25px rgba(0, 0, 0, .18);
	color: #fff;
	font-size: var(--font-button);
	font-weight: 700;
	text-decoration: none;
	transition: .3s;
}

.floating-whatsapp:hover {
	transform: translateY(-3px);
	background: var(--whatsapp);
	filter: brightness(.88);
}

.floating-whatsapp i {
	font-size: 21px;
}

.image-lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: grid;
	place-items: center;
	padding: 55px 25px 25px;
	background: rgba(0, 0, 0, .88);
}

.image-lightbox[hidden] {
	display: none;
}

.image-lightbox img {
	max-width: min(100%, 1050px);
	max-height: calc(100vh - 90px);
	border-radius: 10px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
	object-fit: contain;
}

.image-lightbox__close {
	position: absolute;
	top: 15px;
	left: 20px;
	width: 42px;
	height: 42px;
	border: 1px solid rgba(255, 255, 255, .35);
	border-radius: 50%;
	background: rgba(255, 255, 255, .12);
	color: #fff;
	font-size: 28px;
	cursor: pointer;
}

.empty-products,
.content-page {
	max-width: 900px;
	margin: 0 auto;
	padding: 40px;
	border-radius: 12px;
	background: #fff;
	text-align: center;
}

@media (max-width: 900px) {
	.menu-toggle {
		display: block;
	}

	.menu-toggle[aria-expanded="true"] > span:nth-child(1) {
		transform: translateY(7px) rotate(45deg);
	}

	.menu-toggle[aria-expanded="true"] > span:nth-child(2) {
		opacity: 0;
	}

	.menu-toggle[aria-expanded="true"] > span:nth-child(3) {
		transform: translateY(-7px) rotate(-45deg);
	}

	.main-navigation {
		position: absolute;
		top: calc(100% + 8px);
		right: 5%;
		left: 5%;
		padding: 12px;
		border: 1px solid #e2ede5;
		border-radius: 10px;
		background: var(--header-bg);
		box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
		opacity: 0;
		visibility: hidden;
		transform: translateY(-7px);
		transition: .25s;
	}

	.main-navigation.is-open {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
	}

	.nav-menu {
		display: grid;
		gap: 3px;
	}

	.nav-menu a {
		padding: 10px 12px;
	}

	.offers-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 782px) {
	body.admin-bar .store-header {
		top: 46px;
	}
}

@media (max-width: 768px) {
	.store-header {
		min-height: 68px;
		padding-inline: 20px;
	}

	.logo-img {
		height: auto;
		max-height: var(--logo-mobile-height);
		max-width: var(--logo-mobile-width);
	}

	.hero-section {
		padding: 65px 18px;
	}

	.hero-section h1 {
		font-size: var(--font-hero-mobile);
	}

	.hero-section h2 {
		font-size: var(--font-hero-subtitle-mobile);
	}

	.hero-section p {
		font-size: var(--font-hero-text-mobile);
	}

	.hero-points {
		gap: 8px 13px;
	}

	.promo-bar {
		align-items: flex-start;
		flex-direction: column;
		padding-right: 15%;
	}

	.products-grid {
		grid-template-columns: 1fr;
	}

	.footer-grid {
		text-align: center;
	}

	.footer-col h3 {
		display: block;
		width: max-content;
		margin: 15px auto;
	}

	.contact-item {
		justify-content: center;
	}

	.footer-order-link {
		justify-content: center;
	}
}

@media (max-width: 520px) {
	.hero-points {
		align-items: center;
		flex-direction: column;
	}

	.product-img-wrapper {
		height: 270px;
	}

	.floating-whatsapp {
		left: 14px;
		bottom: 14px;
		width: 54px;
		height: 54px;
		padding: 0;
		justify-content: center;
	}

	.floating-whatsapp span {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: .01ms !important;
	}
}
