/* ═══════════════════════════════════════════════════════════════════
   حار بارد — توحيد المتجر مع عالم الصفحة العامّة
   الرموز نفسها الموجودة في /brand/site.css. الهدف ألّا ينكسر المسار في
   منتصفه: الزائر يضغط «تصفّح الأسعار» فيصل إلى المكان نفسه بصريّاً.
   والمحدِّدات مأخوذةٌ من **ترميز المتجر الحيّ** لا من التخمين.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --blue: #0D5CCB;
  --ink: #12459A;
  --yellow: #F3C300;
  --bg: #F5F8FD;
  --surface: #FFFFFF;
  --sunk: #EDF2FB;
  --line: #DCE6F6;
  --line-strong: #C3D3EE;
  --text: #0E1B2E;
  --muted: #4E6180;
  --r: 12px;
  --r-lg: 18px;
  --shadow-1: 0 1px 2px rgba(14,27,46,.05), 0 2px 8px rgba(14,27,46,.04);
  --shadow-2: 0 2px 4px rgba(14,27,46,.06), 0 12px 28px rgba(13,92,203,.10);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

/* ── الأساس ──────────────────────────────────────────────────────── */
body {
  background: var(--bg) !important;
  color: var(--text);
  font-size: 16px;
  line-height: 1.75;
}

/* أسطح المتصفّح — العلامة نفسها التي تحملها الصفحة العامّة */
::selection { background: #CFE0FF; color: var(--ink); }
body { caret-color: var(--blue); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
* { scrollbar-color: var(--line-strong) transparent; scrollbar-width: thin; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; }
*::-webkit-scrollbar-track { background: transparent; }

.wp-block-post-title, .wp-block-heading, h1, h2, h3 {
  letter-spacing: -.01em; text-wrap: balance;
}

/* ── الأزرار: نغمة واحدة عبر المتجر كلّه ─────────────────────────── */
.wp-block-button__link,
.wc-block-components-button,
.wc-block-components-product-button__button,
button.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button {
  background-color: var(--blue) !important;
  color: #fff !important;
  border: 1px solid transparent !important;
  border-radius: var(--r) !important;
  min-height: 48px;
  padding-inline: 22px !important;
  font-weight: 700 !important;
  box-shadow: none !important;
  transition: background-color .18s var(--ease), box-shadow .18s var(--ease);
}
.wp-block-button__link:hover,
.wc-block-components-button:hover,
.wc-block-components-product-button__button:hover,
button.wc-block-cart__submit-button:hover,
.wc-block-components-checkout-place-order-button:hover {
  background-color: var(--ink) !important;
  box-shadow: var(--shadow-2) !important;
}
/* زرّ إتمام الطلب هو الفعل الأوّل في السلّة — يأخذ الأصفر وحده */
button.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button {
  background-color: var(--yellow) !important;
  color: #221B00 !important;
  min-height: 54px;
  font-size: 17px !important;
}
button.wc-block-cart__submit-button:hover,
.wc-block-components-checkout-place-order-button:hover {
  background-color: #FFD427 !important; color: #221B00 !important;
}

/* ── بطاقة المنتج: نفس بطاقة الأسعار في الصفحة العامّة ───────────── */
.wc-block-product {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px 16px 16px !important;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.wc-block-product:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-2);
  transform: translateY(-3px);
}
.wc-block-product .wp-block-post-title,
.wc-block-grid__product-title {
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.55 !important;
  color: var(--text) !important;
}
.wc-block-product .wp-block-post-title a { color: inherit; text-decoration: none; }

.wc-block-components-product-image img,
.wc-block-grid__product-image img { border-radius: var(--r); }

/* السعر: أرقامٌ جدولية وحجمٌ يقود البطاقة */
.wc-block-components-product-price,
.wc-block-grid__product-price,
.woocommerce-Price-amount {
  color: var(--ink) !important;
  font-weight: 800 !important;
  font-size: 22px !important;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ── الترويسة والتذييل ───────────────────────────────────────────── */
header.wp-block-template-part {
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.wp-block-navigation-item__content { font-weight: 700; color: var(--muted); }
.wp-block-navigation-item__content:hover { color: var(--blue); }
footer.wp-block-template-part {
  background: var(--ink);
  color: #C9DAF6;
}
footer.wp-block-template-part a { color: #fff; }
footer.wp-block-template-part a:hover { color: var(--yellow); }
footer.wp-block-template-part .wp-block-heading { color: #fff; }

/* ── فتات الخبز وعنوان الأرشيف ───────────────────────────────────── */
.wc-block-breadcrumbs, .woocommerce-breadcrumb { color: var(--muted); font-size: 14px; }
.wc-block-breadcrumbs a, .woocommerce-breadcrumb a { color: var(--blue); }

/* ── السلّة والدفع: أسطح القرار ──────────────────────────────────── */
.wc-block-components-sidebar-layout .wc-block-components-sidebar,
.wc-block-cart__sidebar, .wc-block-checkout__sidebar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
}
.wc-block-components-totals-item__value,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
  color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums;
}
.wc-block-components-text-input input,
.wc-block-components-textarea,
.wc-block-components-select__select {
  border-radius: var(--r) !important;
  border: 1px solid var(--line-strong) !important;
  min-height: 50px;
}
.wc-block-components-text-input input:focus,
.wc-block-components-select__select:focus {
  border-color: var(--blue) !important;
  box-shadow: 0 0 0 4px rgba(13,92,203,.14) !important;
}
.wc-block-components-radio-control-accordion-option,
.wc-block-components-radio-control__option {
  border-radius: var(--r);
}
.wc-block-components-notice-banner {
  border-radius: var(--r) !important;
}

/* ── أهداف اللمس في المتجر ───────────────────────────────────────── */
/* روابط القائمة والتذييل كانت أسطراً نصّية دون 44px — تُوسَّع بالحشو لا بالخطّ. */
.wp-block-navigation-item__content,
footer.wp-block-template-part a,
.wc-block-breadcrumbs a {
  display: inline-flex; align-items: center; min-height: 44px;
}
.wc-block-components-quantity-selector__button { min-width: 44px; min-height: 44px; }
.woocommerce-ordering select.orderby { min-height: 44px; padding: 0 10px; }

/* ── الجوّال ─────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .wc-block-product { padding: 14px 12px 12px !important; }
  .wc-block-components-product-price, .wc-block-grid__product-price,
  .woocommerce-Price-amount { font-size: 20px !important; }
}

/* ── طرق الدفع بطاقاتٌ لا أسطرٌ رمادية ───────────────────────────── */
/* الخيار الذي يبدو زرّاً يُنقر؛ والسطر الرماديّ يُقرأ ثمّ يُتردَّد فيه. */
.wc-block-components-radio-control-accordion-option {
  border: 1px solid var(--line);
  border-radius: var(--r);
  margin-bottom: 10px;
  background: var(--surface);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.wc-block-components-radio-control-accordion-option:hover { border-color: var(--line-strong); }
.wc-block-components-radio-control-accordion-option:has(input:checked) {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(13,92,203,.12);
}
.wc-block-components-radio-control__option { padding: 14px 16px; min-height: 56px; }
.wc-block-components-radio-control__label { font-weight: 700; }
.wc-block-components-radio-control__description { color: var(--muted); line-height: 1.8; }

/* حقول «الشراء لشركة» تُقرأ ككتلةٍ واحدة لا كحقولٍ متناثرة */
.wc-block-components-address-form .wc-block-components-text-input + .wc-block-components-text-input { margin-top: 10px; }
