@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800;900&display=swap');

:root{
  --yv-font:Tajawal, Cairo, Arial, sans-serif;
  --yv-black:#050505;
  --yv-ink:#09090a;
  --yv-dark:#0d0d0f;
  --yv-surface:#111114;
  --yv-surface-2:#17171a;
  --yv-light:#ffffff;
  --yv-text:#111214;
  --yv-text-soft:#5f6670;
  --yv-muted:#8b929d;
  --yv-border:#e6e8ec;
  --yv-border-dark:rgba(255,255,255,.13);
  --yv-red:#c62828;
  --yv-red-bright:#e50914;
  --yv-red-dark:#8b0000;
  --yv-success:#168a46;
  --yv-warning:#b86b00;
  --yv-error:#c62828;
  --yv-radius-sm:10px;
  --yv-radius-md:16px;
  --yv-radius-lg:24px;
  --yv-radius-pill:999px;
  --yv-shadow-sm:0 8px 24px rgba(0,0,0,.08);
  --yv-shadow-md:0 18px 44px rgba(0,0,0,.13);
  --yv-shadow-lg:0 28px 70px rgba(0,0,0,.22);
  --yv-glow-red:0 0 34px rgba(198,40,40,.32);
  --yv-ease:cubic-bezier(.16,1,.3,1);
  --yv-transition:260ms var(--yv-ease);
  --yv-container:min(1320px, calc(100% - 32px));
  --yv-h1:clamp(34px,4.2vw,64px);
  --yv-h2:clamp(28px,3vw,44px);
  --yv-h3:clamp(22px,2vw,30px);
  --yv-body:16px;
}

/*
 * v2.2: Global identity stabilization.
 * الهدف: فرض Tajawal وهوية عامة بدون كسر Layout/Header/Home Experience.
 */
html body.yv-design-system-active,
body.yv-design-system-active,
body.yv-design-system-active :where(
  div,section,article,main,aside,header,footer,nav,
  p,span,strong,em,small,label,legend,
  h1,h2,h3,h4,h5,h6,
  a,li,td,th,blockquote,
  button,input,select,textarea,
  .entry-title,.page-title,.product_title,
  .woocommerce,.woocommerce-page,.elementor-widget-container
){
  font-family:var(--yv-font) !important;
}

/* لا نكسر مكتبات الأيقونات أو svg */
body.yv-design-system-active :where(
  svg,svg *,
  .dashicons,.dashicons *,
  .ab-icon,.ab-icon *,
  .eicon,.eicon *,
  .elementor-icon,.elementor-icon *,
  [class^="fa"],[class*=" fa"],
  [class^="icon-"],[class*=" icon-"]
){
  font-family:inherit;
}

body.yv-design-system-active{
  color:var(--yv-text);
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
  font-size:var(--yv-body);
  line-height:1.75;
}

/* لا نعيد تشكيل الصفحة الرئيسية، فقط نضمن الخط */
body.yv-design-system-active .yv-home-experience,
body.yv-design-system-active .yv-home-experience :where(div,section,article,p,span,strong,a,button,h1,h2,h3,h4,h5,h6,input,select,textarea){
  font-family:var(--yv-font) !important;
}

body.yv-design-system-active :where(h1,h2,h3,h4,h5,h6,.entry-title,.page-title,.product_title){
  font-weight:900;
  line-height:1.18;
  letter-spacing:-.015em;
  color:var(--yv-text);
}
body.yv-design-system-active :where(h1,.entry-title,.page-title){font-size:var(--yv-h1)}
body.yv-design-system-active h2{font-size:var(--yv-h2)}
body.yv-design-system-active h3{font-size:var(--yv-h3)}

body.yv-design-system-active :where(p,.entry-content,.woocommerce-product-details__short-description){line-height:1.9}
body.yv-design-system-active a{transition:color var(--yv-transition), background var(--yv-transition), border-color var(--yv-transition), transform var(--yv-transition), box-shadow var(--yv-transition)}
body.yv-design-system-active a:hover{color:var(--yv-red)}

/* أزرار عامة آمنة — نستثني الهيدر/الفوتر/الموبايل لأن Layout له نظام مستقل */
body.yv-design-system-active :where(.entry-content,.site-main,.woocommerce,.woocommerce-page) :where(
  button,
  input[type="button"],
  input[type="submit"],
  .button,
  .wp-block-button__link,
  a.button,
  button.button,
  input.button,
  #respond input#submit
):not(.yv-mobile-toggle):not(.yv-mobile-close):not(.yv-action-icon):not(.yv-header-cta){
  border-radius:var(--yv-radius-pill) !important;
  font-family:var(--yv-font) !important;
  font-weight:900 !important;
  min-height:42px;
  padding:.72em 1.55em !important;
  background:linear-gradient(135deg,var(--yv-red-bright),var(--yv-red-dark)) !important;
  color:#fff !important;
  border:1px solid rgba(255,255,255,.18) !important;
  box-shadow:0 12px 30px rgba(198,40,40,.22), inset 0 1px 0 rgba(255,255,255,.18);
  line-height:1.1 !important;
  text-decoration:none !important;
}
body.yv-design-system-active :where(.entry-content,.site-main,.woocommerce,.woocommerce-page) :where(
  button,
  input[type="button"],
  input[type="submit"],
  .button,
  .wp-block-button__link,
  a.button,
  button.button,
  input.button,
  #respond input#submit
):not(.yv-mobile-toggle):not(.yv-mobile-close):not(.yv-action-icon):not(.yv-header-cta):hover{
  transform:translateY(-2px);
  background:#fff !important;
  color:var(--yv-red) !important;
  border-color:rgba(198,40,40,.3) !important;
  box-shadow:0 16px 38px rgba(0,0,0,.14), var(--yv-glow-red);
}

/* النماذج */
body.yv-design-system-active :where(.entry-content,.site-main,.woocommerce,.woocommerce-page) :where(
  input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]),
  textarea,
  select,
  .select2-container--default .select2-selection--single,
  .select2-container--default .select2-selection--multiple
){
  border-radius:var(--yv-radius-md) !important;
  border:1px solid var(--yv-border) !important;
  min-height:46px;
  padding:10px 14px;
  background:#fff;
  color:var(--yv-text);
  box-shadow:0 4px 16px rgba(0,0,0,.035);
  transition:border-color var(--yv-transition), box-shadow var(--yv-transition), background var(--yv-transition);
}
body.yv-design-system-active :where(.entry-content,.site-main,.woocommerce,.woocommerce-page) :where(input,textarea,select):focus,
body.yv-design-system-active .select2-container--default.select2-container--open .select2-selection--single{
  outline:none !important;
  border-color:rgba(198,40,40,.55) !important;
  box-shadow:0 0 0 4px rgba(198,40,40,.10), 0 8px 24px rgba(0,0,0,.06) !important;
}
body.yv-design-system-active :where(label,.woocommerce form .form-row label){font-weight:800;color:var(--yv-text);margin-bottom:7px}

/* WooCommerce basics بدون إعادة تصميم كاملة */
body.yv-design-system-active :where(.woocommerce-notices-wrapper .woocommerce-message,.woocommerce-notices-wrapper .woocommerce-info,.woocommerce-notices-wrapper .woocommerce-error,.woocommerce-message,.woocommerce-info,.woocommerce-error){
  border-radius:var(--yv-radius-lg);
  border:1px solid var(--yv-border);
  box-shadow:var(--yv-shadow-sm);
  font-weight:700;
  line-height:1.7;
  background:#fff;
  color:var(--yv-text);
}
body.yv-design-system-active .woocommerce-message{border-top-color:var(--yv-success)}
body.yv-design-system-active .woocommerce-info{border-top-color:var(--yv-red)}
body.yv-design-system-active .woocommerce-error{border-top-color:var(--yv-error)}

body.yv-design-system-active :where(.price,.woocommerce-Price-amount,.product .price){font-weight:900;color:var(--yv-red)}
body.yv-design-system-active :where(del .woocommerce-Price-amount,.price del){color:var(--yv-muted);opacity:.72;font-weight:700}
body.yv-design-system-active :where(.onsale,.wc-block-grid__product-onsale,.stock.out-of-stock,.stock.in-stock){border-radius:var(--yv-radius-pill) !important;font-weight:900 !important;letter-spacing:0}
body.yv-design-system-active :where(.onsale,.wc-block-grid__product-onsale){background:var(--yv-red) !important;color:#fff !important;border:0 !important;box-shadow:0 10px 26px rgba(198,40,40,.22)}

/* Product cards: لمسة هوية فقط بدون تغيير بنية المتجر */
body.yv-design-system-active .woocommerce ul.products li.product,
body.yv-design-system-active .woocommerce-page ul.products li.product{
  transition:transform var(--yv-transition), box-shadow var(--yv-transition), border-color var(--yv-transition);
}
body.yv-design-system-active .woocommerce ul.products li.product:hover,
body.yv-design-system-active .woocommerce-page ul.products li.product:hover{
  transform:translateY(-4px);
}
