/**
 * رأس صفحة المنتج «الليل القرمزي» الهجين — CSS.
 * الألوان بوظائفها (قاعدة 14): القرمزي #ED0954 للزر والاختيار · الذهبي #E8B04B للضمان وحده ·
 * الأخضر #1E9E5A لوسم التوفير · الليل #0F1114 أرضية اللوحة. الخط IBM Plex Sans Arabic حصراً.
 */

/* ── إخفاء مكوّنات الرأس الافتراضية (المعرض + مكرّرات الملخص) لمنتجات السجل ── */
body.esh-hero-on .woocommerce-product-gallery,
body.esh-hero-on .product-image-summary .woodmart-product-gallery { display: none !important; }
body.esh-hero-on .entry-summary > * { display: none !important; }
/* احتياط اللاجافاسكربت: يبقى نموذج الشراء ظاهراً تحت اللوحة فلا يتعطّل الشراء أبداً */
body.esh-hero-on .entry-summary > form.cart { display: block !important; }

/* ── اللوحة ── */
.esh-hero { direction: rtl; background: #0F1114; border-radius: 20px; padding: 46px 44px;
  margin: 10px 0 36px; color: #fff; font-family: 'IBM Plex Sans Arabic', system-ui, sans-serif; }
.esh-hero-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 40px; align-items: center; }
/* أمر المالك 2026-08-21: الصورة يمين والبيانات يسار (العمود 1 = يمين في RTL) */
.esh-hero-info { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; gap: 16px; }
.esh-hero-tile { grid-column: 1; grid-row: 1; }

/* ── البلاطة الزجاجية ── */
.esh-hero-tile { position: relative; background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10); border-radius: 18px; min-height: 420px;
  display: flex; align-items: center; justify-content: center; overflow: hidden; }
.esh-hero-tile::before { content: ''; position: absolute; width: 340px; height: 340px;
  border-radius: 50%; background: radial-gradient(circle, rgba(237,9,84,.22), transparent 65%); }
.esh-hero-tile img { width: 168px; height: 168px; position: relative;
  filter: drop-shadow(0 18px 30px rgba(0,0,0,.5)); }
.esh-hero-gold { position: absolute; top: 16px; right: 16px; z-index: 2;
  display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600;
  color: #E8B04B; background: rgba(232,176,75,.12); border: 1px solid rgba(232,176,75,.35);
  border-radius: 10px; padding: 6px 11px; }
.esh-hero-plats { position: absolute; top: 62px; right: 16px; z-index: 2;
  display: flex; flex-direction: column; gap: 8px; }
/* المنصة باسمها الظاهر — لا title يختفي على اللمس (ملاحظة المالك) */
.esh-hero-plat { border-radius: 999px; padding: 6px 11px 6px 12px; gap: 6px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  color: #C9CDD6; display: inline-flex; align-items: center; width: fit-content; }
.esh-hero-plat svg { width: 13px; height: 13px; flex: 0 0 13px; }
.esh-hero-plat .t { font-size: 10.5px; font-weight: 600; white-space: nowrap; }

/* ── الرقاقات والعنوان والتقييم ── */
.esh-hero-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.esh-hero-chip { display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; border-radius: 999px; padding: 5px 12px; }
.esh-hero-chip svg { width: 12px; height: 12px; }
.esh-hero-chip-type { background: rgba(237,9,84,.16); color: #ED0954; }
.esh-hero-chip-dlv { background: rgba(255,255,255,.09); color: #E7E9EE; }
.esh-hero-title { font-size: 34px; font-weight: 700; line-height: 1.25; color: #fff; }
.esh-hero-tag { font-size: 15px; color: #B9BDC7; margin: -8px 0 0; }
.esh-hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  font-size: 13.5px; color: #B9BDC7; }
.esh-hero-meta b { color: #fff; font-weight: 600; }
.esh-hero-stars { display: inline-flex; gap: 1px; vertical-align: -2px; }
.esh-hero-dot { color: #4b5158; }

/* ── بطاقات الخيارات (المنتجات المتغيّرة) ── */
/* بلاطات طولية متجاورة — توجيه المالك: «مربعات طولية لا مستطيلات عرضية» */
.esh-hero-cards { display: flex; gap: 12px; flex-wrap: wrap; }
.esh-hero-card { flex: 0 1 176px; min-width: 150px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  font-family: inherit; background: rgba(255,255,255,.04);
  border: 1.5px solid rgba(255,255,255,.14); border-radius: 14px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 5px; color: #fff; transition: border-color .15s, background .15s; }
.esh-hero-card:hover { border-color: rgba(255,255,255,.3); }
.esh-hero-card[disabled] { opacity: .45; cursor: not-allowed; }
.esh-hero-card .d { font-size: 12.5px; font-weight: 700; color: #E7E9EE; }
.esh-hero-card .p { display: flex; align-items: baseline; justify-content: center; gap: 5px; font-size: 26px;
  font-size: 22px; font-weight: 700; color: #fff; }
.esh-hero-card .eqv { font-size: 11.5px; color: #B9BDC7; }
.esh-hero-card.sel { border-color: #ED0954; background: rgba(237,9,84,.10); }
.esh-hero-card.sel .p { color: #ED0954; }
.esh-hero-obadge { font-size: 10.5px; font-weight: 700; color: #7BE0A8;
  background: rgba(30,158,90,.18); border-radius: 6px; padding: 2px 7px; margin-right: 4px; }

/* ── كتلة السعر (المنتجات البسيطة) ── */
.esh-hero-price { display: flex; align-items: baseline; gap: 9px; }
.esh-hero-price .n { font-size: 46px; font-weight: 700; line-height: 1; color: #fff; }
.esh-hero-price .u { font-size: 14px; color: #B9BDC7; font-weight: 500; }

/* ── منطقة الشراء: النموذج الأصلي يُنقل هنا ويُعاد صبغه ── */
.esh-hero-buy form.cart { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 0; }
.esh-hero[data-variable="1"] .esh-hero-buy .variations,
.esh-hero-buy .woocommerce-variation-price,
.esh-hero-buy .reset_variations { display: none !important; }
.esh-hero-buy .woocommerce-variation-availability { flex-basis: 100%; color: #B9BDC7; font-size: 12.5px; }
.esh-hero-buy .quantity,
.esh-hero-buy .wd-quantity { background: transparent; }
.esh-hero-buy .quantity input.qty { background: transparent; color: #fff;
  border: 1px solid rgba(255,255,255,.18); border-radius: 12px; min-height: 50px; }
.esh-hero-buy .quantity .plus, .esh-hero-buy .quantity .minus { color: #B9BDC7; background: transparent;
  border: 1px solid rgba(255,255,255,.18); }
.esh-hero-buy .single_add_to_cart_button { background: #ED0954 !important; color: #fff !important;
  border: 0 !important; border-radius: 12px !important; padding: 15px 34px !important;
  font-weight: 700 !important; font-size: 15.5px !important; box-shadow: none !important;
  transition: transform .15s, box-shadow .15s !important; }
.esh-hero-buy .single_add_to_cart_button:hover { transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(237,9,84,.28) !important; }
.esh-hero-micro { font-size: 12.5px; color: #8f96a3; margin: 0; }

/* ── استجابة ── */
@media (max-width: 860px) {
  .esh-hero { padding: 30px 20px; border-radius: 16px; }
  .esh-hero-grid { grid-template-columns: 1fr; gap: 26px; }
  .esh-hero-info, .esh-hero-tile { grid-column: 1; }
  .esh-hero-tile { grid-row: 1; min-height: 300px; }
  .esh-hero-info { grid-row: 2; }
  .esh-hero-title { font-size: 27px; }
  .esh-hero-card { flex: 1 1 calc(50% - 6px); min-width: 0; max-width: none; }
}

/* ═══ تصويبات القياس الأول (2026-08-21) — مقيسة من DOM الستيجينق ═══ */

/* ١· اللوحة كانت محشورة في عمود الصور: نفكّ شبكة Woodmart فتأخذ العرض كاملاً */
body.esh-hero-on .product-image-summary-inner { display: block !important; }
body.esh-hero-on .product-image-summary-inner > .product-images {
  width: 100% !important; max-width: 100% !important; margin: 0 !important; float: none !important; }
body.esh-hero-on .product-image-summary-inner > .summary { width: 100% !important; max-width: 100% !important; }

/* ٢· أزرار الثيم كانت تغلب البطاقة (f3f3f3 وتوسيط): تخصيص أعلى + حسم */
.esh-hero .esh-hero-cards button.esh-hero-card {
  background: rgba(255,255,255,.04) !important; color: #fff !important;
  border: 1.5px solid rgba(255,255,255,.14) !important; border-radius: 14px !important;
  text-align: right !important; align-items: flex-start !important;
  padding: 14px 16px !important; line-height: 1.5 !important; text-transform: none !important;
  box-shadow: none !important; min-height: 0 !important; height: auto !important; }
.esh-hero .esh-hero-cards button.esh-hero-card:hover { border-color: rgba(255,255,255,.3) !important; }
.esh-hero .esh-hero-cards button.esh-hero-card.sel {
  border-color: #ED0954 !important; background: rgba(237,9,84,.10) !important; }

/* ٣· بقايا نموذج المتغيّرات داخل اللوحة: القائمة والسعر الشارد (البطاقات تقودها) */
.esh-hero[data-variable="1"] .esh-hero-buy select,
.esh-hero[data-variable="1"] .esh-hero-buy .wd-attr-select-wrap,
.esh-hero[data-variable="1"] .esh-hero-buy table.variations,
.esh-hero-buy form.cart .price { display: none !important; }
.esh-hero-buy .woocommerce-variation-availability { display: block; }

/* ٤· زرّا الشراء لا يتنافسان: «أضف إلى السلة» هو الأول، و«اشتر الآن» شبح أنيق */
.esh-hero-buy .wd-buy-now-btn {
  background: transparent !important; color: #fff !important;
  border: 1.5px solid rgba(255,255,255,.25) !important; border-radius: 12px !important;
  padding: 14px 30px !important; font-weight: 700 !important; box-shadow: none !important; }
.esh-hero-buy .wd-buy-now-btn:hover { border-color: #ED0954 !important; color: #ED0954 !important; }

/* ═══ تصويبات القياس الثاني — أسماء من DOM حرفياً ═══ */
/* السعر الشارد: قصاصة custom-product-price القديمة تكرّر السعر جنب الكمية */
.esh-hero-buy .custom-product-price { display: none !important; }
/* الكمية: ستايل الثيم الأبيض يُقلب ليلياً */
.esh-hero-buy .quantity { background: transparent !important; border: 1px solid rgba(255,255,255,.18) !important;
  border-radius: 12px !important; overflow: hidden; }
.esh-hero-buy .quantity input.qty { background: transparent !important; color: #fff !important;
  border: 0 !important; min-height: 48px !important; }
.esh-hero-buy .quantity .minus, .esh-hero-buy .quantity .plus {
  background: transparent !important; color: #B9BDC7 !important; border: 0 !important; box-shadow: none !important; }
/* «اشترِ الآن» شبح لا ينافس الأساسي */
.esh-hero-buy .single_buy_now_button { background: transparent !important; color: #fff !important;
  border: 1.5px solid rgba(255,255,255,.25) !important; border-radius: 12px !important;
  padding: 14px 30px !important; font-weight: 700 !important; box-shadow: none !important; }
.esh-hero-buy .single_buy_now_button:hover { border-color: #ED0954 !important; color: #ED0954 !important; }

/* ═══ أمر المالك (2026-08-21): لا عدّاد كمية في رأس المنتج ═══
   «إذا أراد العميل عدداً أكثر من 1 يكرر الضغط على إضافة إلى السلة» — والسلة تجمع.
   حقل quantity يبقى في النموذج مخفياً بقيمة 1 فلا يتغيّر سلوك الإضافة. */
.esh-hero-buy .price-quantity-wrapper,
.esh-hero-buy .quantity { display: none !important; }


/* ═══ إصلاحات جرد آيفون 16 — 2026-08-21 (أمر المالك: افحص وأصلح) ═══ */

/* ⑧ التبويب النشط: القرمزي محجوز للأزرار والأسعار (قاعدة 14) — النشط حبريّ */
.custom-tabs-nav li.active {
	background: #1A1A1A !important;
	color: #fff !important;
	border-color: #1A1A1A !important;
}

/* ⑤ قصّ بطاقة الترويسة مقصود: يحبس هالة ::before الزخرفية (340px) لا محتوى */

@media (max-width: 480px) {
	/* ③ الحشوة كانت 37px/جهة فتخنق المحتوى إلى 319px — الدستور 20px إجمالاً */
	.container.product-tabs-inner { padding-left: 10px !important; padding-right: 10px !important; }
	#tab-details, #tab-reviews, #tab-faq { padding-left: 10px !important; padding-right: 10px !important; }

	/* ④ «إضافة إلى السلة» كان ينكسر سطرين داخل زرّه */
	form.cart .single_add_to_cart_button,
	.esh-hero-buy .single_add_to_cart_button,
	.esh-hero-buy .single_buy_now_button {
		white-space: nowrap;
		font-size: 13.5px;
		padding-left: 12px;
		padding-right: 12px;
	}

	/* ⑥ صفّ السعر كان يفيض رأسياً (win11) — والحبر 46px بسطر 1 يفيض داخلياً 11px */
	.esh-hero-price { flex-wrap: wrap; row-gap: 4px; align-items: center; }
	.esh-hero-price .n { line-height: 1.18; }
}


/* شارة «ضمان ذهبي» المصغّرة في السطر الدقيق — الذهبي في وظيفته الحصرية (§08) */
.esh-hero-minigold { display: inline-flex; align-items: center; gap: 4px;
	background: #E8B04B; color: #1A1A1A; font-size: 10.5px; font-weight: 700;
	padding: 2px 9px; border-radius: 100px; vertical-align: -2px; }
.esh-hero-minigold svg { width: 9px; height: 9px; }
.esh-hero-minigold svg path { stroke: #1A1A1A; }
