/* =========================================================
   RozAli Affiliate — main.css
   نظام الألوان:
   --ink    #191C22  حبر
   --paper  #FFFFFF  خلفية
   --mist   #F2F4F7  أسطح
   --deal   #E8442E  أحمر الصفقات (شراء/سعر)
   --gold   #FFC53D  شارة الخصم
   --mint   #0F9D6E  التوفير/النجاح
   الخطوط: Alexandria للعناوين، IBM Plex Sans Arabic للنصوص
   التوقيع البصري: بطاقة سعر بثقب وحافة مثقوبة + ختم خصم مائل
   ========================================================= */

:root {
	--ink: #191c22;
	--ink-soft: #5a6072;
	--paper: #ffffff;
	--mist: #f2f4f7;
	--line: #e4e7ee;
	--deal: #e8442e;
	--deal-dark: #c33520;
	--gold: #ffc53d;
	--mint: #0f9d6e;
	--radius: 14px;
	--shadow: 0 2px 6px rgba(25, 28, 34, 0.06), 0 12px 32px rgba(25, 28, 34, 0.07);
	--font-display: 'Alexandria', system-ui, sans-serif;
	--font-body: 'IBM Plex Sans Arabic', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
	margin: 0;
	font-family: var(--font-body);
	color: var(--ink);
	background: var(--paper);
	line-height: 1.7;
}

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

.wrap {
	max-width: 1160px;
	margin-inline: auto;
	padding-inline: 20px;
}

/* ---------- الترويسة ---------- */
.site-head {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--paper);
	border-block-end: 1px solid var(--line);
}
.site-head__inner {
	display: flex;
	align-items: center;
	gap: 24px;
	padding-block: 14px;
}
.site-brand__text {
	font-family: var(--font-display);
	font-weight: 800;
	font-size: 1.5rem;
	text-decoration: none;
	letter-spacing: -0.5px;
}
.site-brand__text .dot { color: var(--deal); }
.site-nav__list {
	display: flex;
	gap: 18px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.site-nav__list a {
	text-decoration: none;
	font-weight: 500;
	color: var(--ink-soft);
	transition: color 0.15s;
}
.site-nav__list a:hover { color: var(--deal); }

.head-search {
	margin-inline-start: auto;
	display: flex;
	background: var(--mist);
	border-radius: 99px;
	overflow: hidden;
	border: 1px solid transparent;
	transition: border-color 0.15s;
}
.head-search:focus-within { border-color: var(--deal); background: var(--paper); }
.head-search input {
	border: 0;
	background: transparent;
	padding: 9px 16px;
	min-width: 180px;
	font-family: inherit;
	outline: none;
}
.head-search button {
	border: 0;
	background: transparent;
	padding-inline: 14px;
	font-size: 1.1rem;
	cursor: pointer;
	color: var(--ink-soft);
}

/* ---------- الهيرو: صفقة اليوم ---------- */
.hero {
	background: var(--ink);
	color: var(--paper);
	overflow: hidden;
}
.hero__inner {
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: 40px;
	align-items: center;
	padding-block: 56px;
}
.eyebrow {
	display: inline-block;
	background: var(--gold);
	color: var(--ink);
	font-weight: 700;
	font-size: 0.8rem;
	padding: 4px 14px;
	border-radius: 4px;
	margin: 0 0 14px;
}
.hero__title {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: clamp(1.4rem, 3vw, 2.1rem);
	line-height: 1.4;
	margin: 0 0 20px;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.hero__media img {
	border-radius: var(--radius);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
	transition: transform 0.3s;
}
.hero__media:hover img { transform: scale(1.02) rotate(-0.5deg); }
.hero__actions { display: flex; gap: 12px; margin-block-start: 22px; }

/* ---------- التوقيع البصري: بطاقة السعر المثقوبة ---------- */
.tag {
	position: relative;
	display: inline-flex;
	align-items: baseline;
	gap: 10px;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 6px 14px 6px;
	padding-inline-start: 26px;
}
.tag::before {
	/* ثقب البطاقة */
	content: '';
	position: absolute;
	inset-inline-start: 9px;
	top: 50%;
	transform: translateY(-50%);
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--mist);
	box-shadow: inset 0 0 0 2px var(--line);
}
.tag::after {
	/* خط التثقيب */
	content: '';
	position: absolute;
	inset-inline-start: 21px;
	top: 6px;
	bottom: 6px;
	border-inline-start: 1.5px dashed var(--line);
}
.tag .now {
	font-family: var(--font-display);
	font-weight: 800;
	font-size: 1.25rem;
	color: var(--deal);
}
.tag .now .cur { font-size: 0.75em; font-weight: 700; }
.tag .was { color: var(--ink-soft); font-size: 0.9rem; }
.tag--big { padding-block: 10px; }
.tag--big .now { font-size: 1.9rem; }
.hero .tag { border: 0; }

/* ختم الخصم */
.stamp {
	display: inline-block;
	font-family: var(--font-display);
	font-weight: 800;
	color: var(--deal);
	border: 2.5px dashed var(--deal);
	border-radius: 8px;
	padding: 2px 12px;
	transform: rotate(-6deg);
	background: rgba(232, 68, 46, 0.06);
}
.stamp--corner {
	position: absolute;
	top: 14px;
	inset-inline-start: 14px;
	background: var(--paper);
	z-index: 2;
}

/* ---------- الأزرار ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-family: var(--font-body);
	font-weight: 700;
	font-size: 0.95rem;
	text-decoration: none;
	border-radius: 10px;
	padding: 11px 22px;
	cursor: pointer;
	border: 0;
	transition: transform 0.12s, box-shadow 0.12s, background 0.15s;
}
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn--buy {
	background: var(--deal);
	color: #fff;
	box-shadow: 0 4px 14px rgba(232, 68, 46, 0.35);
}
.btn--buy:hover { background: var(--deal-dark); transform: translateY(-1px); }
.btn--ghost {
	background: transparent;
	color: var(--paper);
	border: 1.5px solid rgba(255, 255, 255, 0.4);
}
.btn--ghost:hover { border-color: var(--paper); }
.btn--xl { width: 100%; padding-block: 15px; font-size: 1.1rem; }

/* ---------- شبكة المنتجات ---------- */
.section-title {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 1.4rem;
	margin-block: 40px 22px;
	display: flex;
	align-items: center;
	gap: 12px;
}
.section-title::after {
	content: '';
	flex: 1;
	border-block-start: 1.5px dashed var(--line);
}
.p-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 22px;
	margin-block-end: 48px;
}
.p-card {
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 0.15s, box-shadow 0.15s;
}
.p-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--shadow);
}
.p-card__media {
	position: relative;
	display: block;
	aspect-ratio: 1;
	background: var(--mist);
}
.p-card__media img { width: 100%; height: 100%; object-fit: cover; }
.p-card__badge {
	position: absolute;
	top: 10px;
	inset-inline-start: 10px;
	background: var(--gold);
	color: var(--ink);
	font-family: var(--font-display);
	font-weight: 800;
	font-size: 0.85rem;
	padding: 3px 10px;
	border-radius: 6px;
}
.p-card__body {
	padding: 14px 16px 18px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex: 1;
}
.p-card__title {
	font-family: var(--font-body);
	font-weight: 500;
	font-size: 0.95rem;
	line-height: 1.55;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 3em;
}
.p-card__title a { text-decoration: none; }
.p-card__title a:hover { color: var(--deal); }
.p-card__meta {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 0.8rem;
	color: var(--ink-soft);
}
.p-card__price { align-self: start; }
.p-card .btn--buy { margin-block-start: auto; }

.stars .star { color: var(--line); font-size: 0.9rem; }
.stars .star.on { color: var(--gold); }
.stars b { color: var(--ink); font-weight: 700; }
.orders::before { content: '•'; margin-inline-end: 8px; color: var(--line); }

/* ---------- صفحة المنتج ---------- */
.single-product { padding-block: 40px; }
.single-product__layout {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 44px;
	align-items: start;
}
.gallery__main {
	position: relative;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--mist);
	aspect-ratio: 1;
}
.gallery__main img { width: 100%; height: 100%; object-fit: contain; }
.gallery__thumbs {
	display: flex;
	gap: 10px;
	margin-block-start: 12px;
	flex-wrap: wrap;
}
.thumb {
	width: 68px;
	height: 68px;
	border-radius: 10px;
	border: 2px solid var(--line);
	padding: 0;
	overflow: hidden;
	cursor: pointer;
	background: var(--mist);
	transition: border-color 0.15s;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.is-active, .thumb:hover { border-color: var(--deal); }

.details__title {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: clamp(1.2rem, 2.2vw, 1.6rem);
	line-height: 1.5;
	margin: 0 0 14px;
}
.details__meta {
	display: flex;
	align-items: center;
	gap: 12px;
	color: var(--ink-soft);
	margin-block-end: 18px;
}
.details__price { margin-block-end: 22px; }
.buy-note {
	font-size: 0.82rem;
	color: var(--ink-soft);
	text-align: center;
	margin-block-start: 10px;
}
.details__desc {
	border-block-start: 1.5px dashed var(--line);
	margin-block-start: 26px;
	padding-block-start: 20px;
	color: var(--ink-soft);
}
.details__cats { margin-block-start: 20px; display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
	background: var(--mist);
	border-radius: 99px;
	padding: 4px 14px;
	font-size: 0.82rem;
	text-decoration: none;
	color: var(--ink-soft);
	transition: background 0.15s, color 0.15s;
}
.chip:hover { background: var(--deal); color: #fff; }

.related { margin-block-start: 56px; }

/* ---------- التذييل ---------- */
.site-foot {
	background: var(--ink);
	color: rgba(255, 255, 255, 0.75);
	margin-block-start: 64px;
}
.site-foot__inner {
	padding-block: 36px;
	display: grid;
	gap: 14px;
	text-align: center;
}
.disclosure { font-size: 0.85rem; max-width: 620px; margin-inline: auto; }
.foot-nav {
	display: flex;
	gap: 18px;
	justify-content: center;
	list-style: none;
	margin: 0;
	padding: 0;
}
.foot-nav a { color: rgba(255, 255, 255, 0.85); text-decoration: none; }
.foot-nav a:hover { color: var(--gold); }
.copyright { font-size: 0.8rem; margin: 0; }

/* ---------- أخرى ---------- */
.pager { display: flex; justify-content: center; gap: 6px; margin-block-end: 48px; }
.pager .page-numbers {
	min-width: 38px;
	height: 38px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--line);
	border-radius: 10px;
	text-decoration: none;
	font-weight: 600;
}
.pager .page-numbers.current { background: var(--deal); color: #fff; border-color: var(--deal); }

.empty-state {
	text-align: center;
	padding-block: 72px;
	color: var(--ink-soft);
}

/* ---------- استجابة الشاشات ---------- */
@media (max-width: 900px) {
	.hero__inner { grid-template-columns: 1fr; padding-block: 36px; }
	.hero__media { max-width: 380px; margin-inline: auto; }
	.single-product__layout { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 640px) {
	.site-head__inner { flex-wrap: wrap; gap: 12px; }
	.head-search { order: 3; width: 100%; }
	.head-search input { flex: 1; }
	.site-nav { display: none; }
	.p-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
	.p-card__body { padding: 10px 12px 14px; }
}
