/* ------------------------------------------------------------
   أساس مشترك لكل الثيمات: البنية والتخطيط
   الألوان والخطوط والشخصية في ملف الثيم
   ------------------------------------------------------------ */
* { box-sizing: border-box; }
body { margin: 0; font-size: 15px; line-height: 1.6; }
img { max-width: 100%; display: block; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }

/* الترويسة */
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.brand .logo { width: 36px; height: 36px; border-radius: 9px; object-fit: cover; }
.brand h1 { margin: 0; font-size: 17px; line-height: 1.3; font-weight: 700; letter-spacing: 0.1px; }
.brand p { margin: 1px 0 0; font-size: 11.5px; font-weight: 500; }
.langs { display: flex; gap: 3px; }
.langs a { text-decoration: none; font-size: 14px; padding: 6px 14px; border-radius: 8px; line-height: 1.4; }
.langs a.on { background: transparent; border: 1.5px solid; font-weight: 800; }

/* زر اللغة الواحد (علم يتبدّل بالضغط) */
.lang-flag-btn { text-decoration: none; font-size: 19px; line-height: 1; padding: 4px; border-radius: 50%; flex-shrink: 0; }
.search-icon-btn { background: none; border: none; font-size: 16px; padding: 4px 6px; cursor: pointer; flex-shrink: 0; line-height: 1; }
.menu-search-bar { display: flex; align-items: center; gap: 8px; padding: 8px 16px; position: sticky; top: 0; z-index: 15; }
.menu-search-bar[hidden] { display: none; }
.menu-search-bar input { flex: 1; border: none; border-radius: 10px; padding: 9px 14px; font-family: inherit; font-size: 14px; }
.menu-search-bar button { background: none; border: none; font-size: 15px; cursor: pointer; padding: 4px 8px; }
.item.search-hidden { display: none; }
.cat-section.search-hidden { display: none; }

/* حالة آخر طلب — مدمجة بصف الترويسة نفسه، بإطار غامق واضح وخلفية شفافة بدل التظليل الباهت */
.header-order-status {
	flex: 0 1 auto; min-width: 0; text-decoration: none; text-align: center;
	font-size: 10.5px; padding: 5px 12px; display: flex; flex-direction: column; line-height: 1.3;
	overflow: hidden; border-radius: 10px; border: 2px solid; margin: 0 8px;
	background: transparent; font-weight: 700;
}
.header-order-status span { font-size: 14px; font-weight: 800; opacity: 0.9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-order-status strong { font-weight: 900; letter-spacing: 0.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* شريط "جرّب شي جديد" */
.suggest-strip { padding: 12px 0 4px; }
.suggest-title { font-size: 16.5px; font-weight: 700; margin: 0 0 12px; text-align: center; }
.suggest-scroll { display: flex; gap: 10px; overflow-x: auto; padding: 0 2px 4px; scrollbar-width: none; }
.suggest-scroll::-webkit-scrollbar { display: none; }
.suggest-card { flex-shrink: 0; width: 100px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 3px; border: none; background: transparent; padding: 0; font-family: inherit; cursor: pointer; text-align: start; }
.suggest-img { width: 100px; height: 100px; border-radius: 12px; overflow: hidden; position: relative; display: flex; align-items: center; justify-content: center; }
.suggest-img img { width: 100%; height: 100%; object-fit: cover; }
.suggest-img.no-photo .placeholder-logo { width: 42%; height: 42%; }
.suggest-add {
	position: absolute; bottom: 5px; inset-inline-end: 5px; width: 22px; height: 22px; border-radius: 50%;
	background: rgba(255,255,255,0.92); color: #201f1c; font-size: 14px; font-weight: 700;
	display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(0,0,0,0.25);
	transition: transform 0.15s;
}
.suggest-card.added .suggest-add { transform: scale(1.25); color: #2f6b45; }
.suggest-card.added .suggest-img { opacity: 0.55; }
.suggest-name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest-price { font-size: 12px; font-weight: 800; opacity: 0.85; }

.suggest-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; }

.order-review-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; }
.order-review-backdrop[hidden] { display: none; }
.order-review-modal { background: #fff; border-radius: 18px; padding: 22px 20px; max-width: 360px; width: 100%; }
.order-review-modal h3 { margin: 0 0 14px; font-size: 16px; text-align: center; }
.order-review-row { display: flex; justify-content: space-between; font-size: 13.5px; padding: 8px 0; border-bottom: 1px solid rgba(0,0,0,0.06); gap: 10px; }
.order-review-row span { opacity: 0.65; }
.order-review-row strong { text-align: end; }
.order-review-row[hidden] { display: none; }
.order-review-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.order-review-actions #review-back-btn { background: none; border: none; padding: 8px; font-size: 13px; opacity: 0.6; cursor: pointer; font-family: inherit; }
.suggest-modal-backdrop[hidden] { display: none; }
.suggest-modal { background: #fff; border-radius: 18px; padding: 26px 20px 20px; max-width: 400px; width: 100%; position: relative; }

/* شريط المجموعات */
.cats { position: sticky; top: 0; z-index: 10; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.cats-scroll {
	display: flex; flex-wrap: wrap; justify-content: center; gap: 7px;
	padding-top: 9px; padding-bottom: 9px;
}

.cat { flex-shrink: 0; border: none; border-radius: 999px; padding: 6px 14px; font-family: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }

/* الأصناف */
.items { padding: 4px 0 70px; }
.cat-section { scroll-margin-top: 130px; margin-bottom: 22px; }
.cat-heading {
	font-size: 18px; font-weight: 800; margin: 0 0 14px; padding-top: 6px;
	text-align: center; position: relative; letter-spacing: 0.2px;
	transition: color 0.3s;
}
.cat-heading::after {
	content: ""; display: block; width: 34px; height: 3px; border-radius: 3px;
	margin: 8px auto 0; background: currentColor; opacity: 0.5;
}
.cat-heading.flash { animation: heading-flash 1s ease-out; }
@keyframes heading-flash {
	0% { opacity: 0.35; letter-spacing: 1.5px; }
	100% { opacity: 1; letter-spacing: 0.2px; }
}
.cat-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.item { border-radius: 14px; overflow: hidden; transition: box-shadow 0.2s; }
.item.in-cart { animation: cart-flash 0.9s ease-out forwards; }
@keyframes cart-flash {
	0% { box-shadow: 0 0 0 7px var(--cart-ring-glow, rgba(216,90,48,0.35)); }
	100% { box-shadow: 0 0 0 2px var(--cart-ring, rgba(216,90,48,0.7)); }
}
.item-img { position: relative; cursor: pointer; aspect-ratio: 1 / 1; overflow: hidden; }
.item-img.no-photo { cursor: default; display: flex; align-items: center; justify-content: center; }
.item-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s, opacity 0.25s; opacity: 0; }
.item-img.loaded img { opacity: 1; }
.item-img:hover img { transform: scale(1.04); }

.img-skel {
	position: absolute; inset: 0;
	background: linear-gradient(100deg, rgba(0,0,0,0.05) 30%, rgba(0,0,0,0.10) 50%, rgba(0,0,0,0.05) 70%);
	background-size: 200% 100%;
	animation: skel-pulse 1.3s ease-in-out infinite;
}
.item-img.loaded .img-skel { display: none; }
@keyframes skel-pulse {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

.placeholder-icon { font-size: 34px; opacity: 0.35; }
.placeholder-logo { width: 42%; height: 42%; object-fit: contain; filter: grayscale(1); opacity: 0.4; }
#reveal-sentinel { height: 1px; }
.img-count { position: absolute; bottom: 8px; inset-inline-end: 8px; font-size: 11px; padding: 2px 8px; border-radius: 8px; }
.item-body { padding: 10px 12px 13px; }
.item-body h3 {
	margin: 0 0 4px; font-size: 14.5px; font-weight: 700; line-height: 1.3;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
	overflow: hidden; text-overflow: ellipsis;
	min-height: 2.6em;
}
.desc { margin: 0 0 7px; font-size: 12px; line-height: 1.45; }
.item-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price { font-size: 16.5px; font-weight: 900; }
.price small { font-size: 11px; font-weight: 400; }
.price del { opacity: 0.5; font-weight: 400; font-size: 12px; margin-inline-end: 4px; }

/* عداد الكمية على بطاقة الصنف — بلا خلفية، شكل نظيف وأنيق */
.stepper { display: flex; align-items: center; }
.step-add {
	width: 30px; height: 30px; border-radius: 50%; border: 1.4px solid;
	background: transparent; font-size: 16px; line-height: 1; cursor: pointer;
	transition: transform 0.12s, opacity 0.15s;
}
.step-add:active { transform: scale(0.9); }
.step-mid { display: flex; align-items: center; gap: 10px; }
.step-mid[hidden] { display: none; }
.step-mid button {
	width: 26px; height: 26px; border: none; background: transparent;
	font-size: 15px; line-height: 1; cursor: pointer; padding: 0;
	display: flex; align-items: center; justify-content: center;
	transition: opacity 0.15s, transform 0.12s;
	opacity: 0.75;
}
.step-mid button:hover { opacity: 1; }
.step-mid button:active { transform: scale(0.88); }
.step-qty { min-width: 16px; text-align: center; font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* السعرات الحرارية والملاحظة */
.cal-badge {
	position: absolute; top: 6px; inset-inline-start: 6px;
	font-size: 9px; font-weight: 700; padding: 2px 7px; border-radius: 999px;
	backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
	background: rgba(255,255,255,0.14); border: 1px solid rgba(255,59,59,0.75); color: #ff3b3b;
	line-height: 1.5;
}
.note-tag {
	display: inline-block; font-size: 11px; font-weight: 600;
	padding: 2px 9px; border-radius: 999px; margin: 0 0 8px;
}
.cal-text { font-size: 11px; opacity: 0.65; margin: -4px 0 8px; }

/* شريط السلة العائم */
.cart-bar { position: fixed; bottom: 16px; inset-inline-start: 50%; transform: translateX(50%); display: flex; align-items: center; gap: 10px; padding: 12px 26px; border-radius: 999px; text-decoration: none; font-size: 15px; z-index: 20; animation: cart-glow 2.2s ease-in-out infinite; }
@keyframes cart-glow {
	0%, 100% { box-shadow: var(--cart-bar-shadow, 0 6px 20px rgba(0,0,0,0.25)), 0 0 0 0 var(--cart-glow-color, rgba(0,0,0,0.25)); }
	50% { box-shadow: var(--cart-bar-shadow, 0 6px 20px rgba(0,0,0,0.25)), 0 0 0 7px var(--cart-glow-color, rgba(0,0,0,0.25)); }
}
.cart-bar[hidden] { display: none; }
[dir="ltr"] .cart-bar { transform: translateX(-50%); }
.cart-n { border-radius: 999px; min-width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; padding: 0 6px; }
.random-pick-btn {
	position: fixed; bottom: 18px; inset-inline-end: 16px; z-index: 20;
	width: 52px; height: 52px; border-radius: 50%; border: none; font-size: 24px;
	background: #fff; box-shadow: 0 6px 18px rgba(0,0,0,0.22); cursor: pointer;
	display: flex; align-items: center; justify-content: center;
}
.random-pick-btn.idle-glow { animation: idle-glow-pulse 1.6s ease-in-out infinite; }
@keyframes idle-glow-pulse {
	0%, 100% { box-shadow: 0 6px 18px rgba(0,0,0,0.22), 0 0 0 0 var(--cart-ring-glow, rgba(216,90,48,0.5)); }
	50% { box-shadow: 0 6px 18px rgba(0,0,0,0.22), 0 0 0 10px transparent; }
}

/* معرض الصور */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.72); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.lightbox[hidden] { display: none; }
.lb-sheet { background: #fff; border-radius: 18px; max-width: 420px; width: 100%; max-height: 88vh; overflow-y: auto; position: relative; }
.lb-img-wrap { position: relative; aspect-ratio: 1 / 1; background: #f4f3ef; }
.lb-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb-img-wrap img[hidden] { display: none; }
.lb-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.lb-placeholder[hidden] { display: none; }
.lb-placeholder .placeholder-logo { width: 40%; height: 40%; }
.lightbox .lb-close { position: absolute; top: 12px; inset-inline-end: 12px; background: rgba(0,0,0,0.45); color: #fff; border: none; border-radius: 999px; width: 34px; height: 34px; font-size: 15px; cursor: pointer; z-index: 2; }
.lightbox .lb-prev, .lightbox .lb-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.35); color: #fff; border: none; border-radius: 999px; width: 36px; height: 36px; font-size: 20px; cursor: pointer; }
.lightbox .lb-prev { inset-inline-start: 10px; }
.lightbox .lb-next { inset-inline-end: 10px; }
.lb-info { padding: 20px 22px 22px; color: #201f1c; }
.lb-info h3 { margin: 0 0 10px; font-size: 23px; font-weight: 800; line-height: 1.3; }
.lb-desc { font-size: 15px; line-height: 1.7; opacity: 0.75; margin: 0 0 12px; }
.lb-info .note-tag, .lb-info .cal-text { margin: 0 0 10px; display: block; font-size: 13px; padding: 5px 12px; }
.lb-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; }
.lb-foot .price { font-size: 24px; font-weight: 900; }
.lb-foot #lb-add { font-size: 15px; padding: 11px 26px; animation: add-btn-pulse 1.8s ease-in-out infinite; }
@keyframes add-btn-pulse {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.055); }
}

.info-dot {
	position: absolute; top: 8px; inset-inline-start: 8px; width: 18px; height: 18px; border-radius: 50%;
	background: rgba(0,0,0,0.4); color: #fff; font-size: 11px; font-style: italic; font-weight: 700;
	display: flex; align-items: center; justify-content: center;
}

/* صفحة السلة */
.cart-wrap { padding-top: 20px; padding-bottom: 60px; }
.cart-list { border-radius: 14px; overflow: hidden; margin-bottom: 20px; }
.cart-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px 4px; }
.cart-item img { width: 54px; height: 54px; border-radius: 10px; object-fit: cover; }
.ci-note { width: 100%; border: none; background: transparent; font-size: 11.5px; padding: 0 14px 10px; font-family: inherit; opacity: 0.75; }
.ci-note:focus { outline: none; opacity: 1; }
.ci-body { flex: 1; display: flex; flex-direction: column; }
.ci-price { font-size: 13px; opacity: 0.75; }
.ci-qty { display: flex; align-items: center; gap: 8px; }
.ci-qty button { width: 28px; height: 28px; border: none; border-radius: 8px; font-size: 15px; cursor: pointer; }
.ci-del { border: none; background: transparent; cursor: pointer; font-size: 14px; opacity: 0.5; }
.ci-del:hover { opacity: 1; }
.cart-total { display: flex; justify-content: space-between; padding: 14px; font-size: 16px; }

/* الدفع */
.checkout { border-radius: 14px; padding: 18px; }
.checkout h2 { margin: 0 0 14px; font-size: 17px; }
.f { margin-bottom: 12px; }
.f-row { display: flex; gap: 10px; }
.f-row .f { flex: 1; }
#address-required-mark { opacity: 0.6; }
.f label { display: inline-block; font-size: 13px; margin-bottom: 4px; margin-inline-end: 14px; }
.f input[type=text], .f input[type=tel], .f textarea { width: 100%; border-radius: 10px; padding: 10px 12px; font-family: inherit; font-size: 14px; border: 1px solid transparent; }
.f textarea::placeholder, .f input::placeholder { opacity: 0.45; }
.order-note-field textarea { background: #2a2a28; color: #f2f0ea; border: 1px solid #444341; font-weight: 500; }
.order-note-field textarea::placeholder { color: #a8a6a0; opacity: 1; }
.order-note-field label { font-weight: 700; }
.phone-row { display: flex; gap: 8px; }
.phone-row select { border-radius: 10px; padding: 10px 8px; font-family: inherit; font-size: 13px; border: 1px solid transparent; flex: 0 0 108px; max-width: 108px; }
.phone-row input[type=tel] { flex: 1 1 0%; width: auto; min-width: 0; }
.addr-row { display: flex; flex-wrap: nowrap; gap: 8px; align-items: stretch; }
.addr-row input[type=text] { flex: 1 1 0%; width: auto; min-width: 0; }
.tr-address-row { display: flex; gap: 8px; flex-wrap: wrap; }
.tr-address-row select { flex: 1 1 30%; min-width: 90px; }
.tr-address-status { font-size: 11.5px; opacity: 0.65; margin: 4px 0 0; }
.tr-address-status.tr-status-error { color: #a53a3a; opacity: 1; font-weight: 600; }
.addr-map { width: 100%; height: 180px; border-radius: 12px; margin: 10px 0; overflow: hidden; }
.geo-btn { flex: 0 0 44px; width: 44px; max-width: 44px; border-radius: 10px; border: none; font-size: 17px; cursor: pointer; }
.geo-status { font-size: 11.5px; opacity: 0.75; margin: 5px 2px 0; min-height: 14px; }
.pay-hint { font-size: 12.5px; opacity: 0.7; }
.btn-main { display: inline-block; border: none; border-radius: 12px; padding: 12px 30px; font-family: inherit; font-size: 15px; cursor: pointer; text-decoration: none; text-align: center; }
.form-error { border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: 13.5px; }

/* نجاح الطلب */
.order-ok, .cart-empty { text-align: center; padding: 50px 20px; border-radius: 14px; }
.ok-mark { width: 64px; height: 64px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: 30px; margin-bottom: 10px; }
.ok-num { font-size: 14px; }
.order-ok .btn-main, .cart-empty .btn-main { margin-top: 14px; }

.site-foot { padding: 20px 0 30px; text-align: center; font-size: 12.5px; opacity: 0.6; }

/* خطوات تتبع الطلب */
.track-hero { text-align: center; border-radius: 16px; padding: 28px 16px 24px; margin-bottom: 18px; }
.track-order-num { font-size: 12.5px; font-weight: 600; margin: 0 0 6px; }

/* شارة رقم الطلب — كبيرة وواضحة ومميزة */
.order-num-label { font-size: 11.5px; font-weight: 600; margin: 0 0 4px; opacity: 0.75; }
.order-num-badge {
	display: inline-block; font-size: 30px; font-weight: 800; letter-spacing: 3px;
	font-variant-numeric: tabular-nums; padding: 6px 22px; border-radius: 14px;
	margin: 0 0 6px;
}
.order-num-pending { font-size: 11.5px; opacity: 0.65; margin: 0 0 14px; }
.track-status { font-size: 19px; font-weight: 700; margin: 0 0 18px; }
.track-status.track-cancelled { color: #a53a3a; }
.track-steps { display: flex; align-items: center; margin: 10px 0 4px; }
.track-steps-big { max-width: 380px; margin: 0 auto 20px; }
.track-dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(0,0,0,0.15); flex-shrink: 0; }
.track-steps-big .track-dot { width: 18px; height: 18px; box-shadow: 0 0 0 4px transparent; }
.track-steps-big .track-dot.on { box-shadow: 0 0 0 4px rgba(0,0,0,0.06); }
.track-dot.on { background: currentColor; }
.track-line { flex: 1; height: 2px; background: rgba(0,0,0,0.12); margin: 0 2px; }
.track-steps-big .track-line { height: 3px; }
.track-line.on { background: currentColor; }
.track-wa { display: inline-flex; align-items: center; gap: 6px; background: #25d366; color: #fff !important; border: none;
			border-radius: 999px; padding: 10px 22px; font-size: 13.5px; font-weight: 600; text-decoration: none; margin-top: 6px; }
.track-pdf { display: inline-flex; align-items: center; gap: 6px; color: #fff !important;
			 border-radius: 999px; padding: 10px 22px; font-size: 13.5px; font-weight: 600; text-decoration: none; margin: 6px 0 0 8px; }
.track-note-banner { font-size: 12.5px; border-radius: 10px; padding: 10px 14px; margin: 0 0 10px; background: rgba(0,0,0,0.05); }

.track-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; }
.track-modal-backdrop[hidden] { display: none; }
.track-modal { background: #fff; border-radius: 16px; padding: 26px 22px; max-width: 340px; width: 100%; text-align: center; position: relative; }
.track-modal-close { position: absolute; top: 10px; inset-inline-end: 10px; background: none; border: none; font-size: 16px; cursor: pointer; opacity: 0.5; }
.track-modal-icon { font-size: 26px; margin: 0 0 8px; }
.track-modal-text { font-size: 14px; line-height: 1.7; margin: 0; color: #201f1c; }

/* قائمة أصناف الطلب — خط صغير وناعم، التركيز على المخطط أعلاه */
.track-items { border-radius: 14px; padding: 4px 4px; }
.track-item-row { display: flex; justify-content: space-between; padding: 7px 12px; font-size: 12px; font-weight: 300; opacity: 0.7; }
.track-item-row.track-total { font-weight: 600; opacity: 0.9; font-size: 13px; border-top: 1px solid rgba(0,0,0,0.08); margin-top: 4px; padding-top: 10px; }

@media (max-width: 520px) {
	.cat-items { grid-template-columns: repeat(3, 1fr); gap: 8px; }
	.item-body { padding: 6px 7px 8px; }
	.item-body h3 { font-size: 11.5px; line-height: 1.3; min-height: 2.6em; }
	.desc { font-size: 10px; }
	.note-tag { font-size: 9.5px; padding: 1px 6px; }
	.cal-text { font-size: 9.5px; }
	.price { font-size: 11.5px; }
	.price small { font-size: 9px; }
	.item-foot { flex-wrap: wrap; gap: 4px 6px; }
	.step-add { width: 27px; height: 27px; font-size: 15px; }
	.step-mid { gap: 8px; }
	.step-mid button { width: 24px; height: 24px; font-size: 14px; }
	.step-qty { font-size: 12.5px; }
}
