/* =========================================================
   FBCO Next — متجر قطع الغيار
   هوية فبكو: ترويسة داكنة، محتوى فاتح، أحمر #e2262e
   ========================================================= */
:root {
  --red: #e2262e;
  --red-dark: #bd1820;
  --ink: #182027;
  --muted: #61686e;
  --paper: #f7f7f4;
  --card: #ffffff;
  --line: #dedfdd;
  --dark: #101010;
  --dark-2: #181818;
  --dark-line: #2c2c2c;
  --on-dark: #f3f3f3;
  --on-dark-muted: #a8a8a8;
  --wa: #128c4a;
  --wa-dark: #0d6e3a;
  --oe: #1f4e8c;
  --amber: #8a5a00;
  --radius: 6px;
  --wrap: 1240px;
  --font: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, Arial, sans-serif;
  --shadow: 0 1px 2px rgba(16, 16, 16, .06), 0 8px 24px rgba(16, 16, 16, .06);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 .6em; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--red); color: #fff; padding: 8px 14px; border-radius: var(--radius); }
.skip:focus { top: 12px; }
.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.ico { flex: none; vertical-align: middle; }
bdi { unicode-bidi: isolate; }

/* ---------- الأزرار ---------- */
.btn, .button, button[type="submit"], input[type="submit"],
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px;
  border: 1px solid transparent; border-radius: var(--radius);
  background: var(--red); color: #fff;
  font: 600 15px/1.3 var(--font); text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover, .button:hover, button[type="submit"]:hover, input[type="submit"]:hover,
.woocommerce a.button:hover, .woocommerce button.button:hover { background: var(--red-dark); color: #fff; }
.btn-dark { background: var(--dark); }
.btn-dark:hover { background: #000; }
.btn-wa, .btn-wa-loop { background: var(--wa); color: #fff; }
.btn-wa:hover, .btn-wa-loop:hover { background: var(--wa-dark); color: #fff; }
.btn-wa-ghost { background: transparent; color: var(--wa); border-color: var(--wa); }
.btn-wa-ghost:hover { background: var(--wa); color: #fff; }
.button.disabled, .button:disabled, button:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- الشريط العلوي ---------- */
.topbar { background: #000; color: var(--on-dark-muted); font-size: 13px; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 38px; }
.topbar p { margin: 0; display: flex; align-items: center; gap: 8px; }
.topbar-links { gap: 18px !important; }
.topbar a { color: var(--on-dark); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.topbar a:hover { color: #fff; }
.topbar .ico { width: 16px; height: 16px; color: var(--red); }
.topbar .to-main { color: #fff; font-weight: 600; }
@media (max-width: 820px) { .topbar-msg { display: none !important; } .topbar-in { justify-content: center; } }
@media (max-width: 420px) { .topbar .to-main { display: none; } }

/* ---------- الترويسة ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--dark); color: var(--on-dark); border-bottom: 1px solid var(--dark-line); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }
.header-in { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; flex: none; }
.brand-logo { display: block; height: 50px !important; width: auto !important; max-width: none; }
@media (max-width: 480px) { .brand-logo { height: 42px !important; } }
.brand-txt { display: flex; flex-direction: column; line-height: 1.2; }
.brand-txt b { font-size: 19px; letter-spacing: .5px; }
.brand-txt small { font-size: 12px; color: var(--on-dark-muted); }

.nav { flex: 1; min-width: 0; }
.nav .menu, .nav ul { list-style: none; margin: 0; padding: 0; }
.nav > .menu, .nav > ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; }
.nav li { position: relative; }
.nav a { display: block; padding: 8px 11px; border-radius: var(--radius); color: var(--on-dark); text-decoration: none; font-size: 14.5px; font-weight: 500; white-space: nowrap; }
.nav a:hover, .nav .current-menu-item > a, .nav .current-menu-ancestor > a { background: var(--dark-2); color: #fff; }
.nav .current-menu-item > a { box-shadow: inset 0 -2px 0 var(--red); }
.nav .sub-menu { position: absolute; inset-inline-start: 0; top: 100%; min-width: 220px; padding: 6px; background: var(--dark-2); border: 1px solid var(--dark-line); border-radius: var(--radius); display: none; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.nav li:hover > .sub-menu, .nav li:focus-within > .sub-menu { display: block; }

.header-tools { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid var(--dark-line); border-radius: var(--radius); background: transparent; color: var(--on-dark); cursor: pointer; text-decoration: none; min-height: 0; }
.icon-btn:hover { background: var(--dark-2); border-color: #444; color: #fff; }
.cart-count { position: absolute; top: -6px; inset-inline-end: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; line-height: 19px; text-align: center; }
.cart-count.is-empty { display: none; }
.menu-btn { display: none; gap: 4px; align-content: center; }
.menu-btn span { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }

@media (max-width: 1100px) {
  .nav { display: none; }
  .menu-btn { display: inline-grid; }
}

/* قائمة الجوال + البحث (Popover) */
.mnav, .hsearch { border: 0; padding: 0; margin: 0; color: var(--ink); }
.mnav { position: fixed; inset: 0 0 0 auto; width: min(88vw, 360px); height: 100dvh; max-height: none; background: var(--dark); color: var(--on-dark); padding: 24px 18px; overflow-y: auto; }
[dir="rtl"] .mnav { inset: 0 auto 0 0; }
.mnav::backdrop, .hsearch::backdrop { background: rgba(0,0,0,.55); }
.mnav ul { list-style: none; margin: 0 0 18px; padding: 0; }
.mnav a { display: block; padding: 12px 10px; border-bottom: 1px solid var(--dark-line); color: var(--on-dark); text-decoration: none; font-weight: 500; }
.mnav .sub-menu a { padding-inline-start: 24px; font-size: 14px; color: var(--on-dark-muted); }
.mnav .btn { width: 100%; border-bottom: 0; color: #fff; }
.mnav:not(:popover-open):not(.is-open) { display: none; }
.hsearch { position: fixed; inset: 0 0 auto 0; width: 100%; max-width: none; background: var(--dark); padding: 22px 0 16px; }
.hsearch:not(:popover-open):not(.is-open) { display: none; }
.hsearch .hint { color: var(--on-dark-muted); font-size: 13px; margin: 8px 0 0; }

/* ---------- البحث ---------- */
.fbco-search { display: flex; gap: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.fbco-search .search-field { flex: 1; min-width: 0; border: 0; padding: 0 16px; min-height: 52px; font: 500 16px var(--font); color: var(--ink); background: transparent; }
.fbco-search .search-field:focus { outline: none; }
.fbco-search:focus-within { box-shadow: 0 0 0 3px rgba(226, 38, 46, .25); border-color: var(--red); }
.fbco-search button { border-radius: 0; min-height: 52px; padding-inline: 22px; }
@media (max-width: 480px) { .fbco-search button span { display: none; } }

/* ---------- عناوين الصفحات ---------- */
.page-head { background: var(--dark); color: var(--on-dark); padding: 34px 0 30px; border-bottom: 3px solid var(--red); }
.page-head h1 { font-size: clamp(24px, 3.2vw, 36px); margin: 0; color: #fff; }
.page-head .sub { margin: 8px 0 0; color: var(--on-dark-muted); }
.kicker { margin: 0 0 8px; color: var(--red); font-size: 12.5px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; }
.sec { padding: 40px 0 10px; }
.sec-title { font-size: clamp(20px, 2.4vw, 26px); margin: 30px 0 18px; display: flex; align-items: center; gap: 12px; }
.sec-title::before { content: ""; width: 4px; height: 1.1em; background: var(--red); border-radius: 2px; }

/* ---------- واجهة المتجر ---------- */
.shop-hero {
  position: relative; color: #fff; overflow: hidden;
  background: linear-gradient(90deg, rgba(10,10,10,.25) 0%, rgba(10,10,10,.9) 55%, #0a0a0a 100%), var(--hero) center/cover no-repeat, #0a0a0a;
}
[dir="ltr"] .shop-hero { background: linear-gradient(270deg, rgba(10,10,10,.25) 0%, rgba(10,10,10,.9) 55%, #0a0a0a 100%), var(--hero) center/cover no-repeat, #0a0a0a; }
.hero-in { padding: clamp(44px, 7vw, 88px) 0 clamp(40px, 6vw, 72px); max-width: var(--wrap); }
.hero-in > * { max-width: 640px; }
.shop-hero h1 { font-size: clamp(28px, 4.4vw, 48px); margin-bottom: 14px; color: #fff; }
.shop-hero .lead { color: #d6d6d6; font-size: clamp(15px, 1.6vw, 18px); }
.hero-search { margin: 22px 0 12px; }
.hero-alt { color: #cfcfcf; font-size: 14.5px; margin: 0; }
.hero-alt a { color: #fff; font-weight: 600; }
@media (max-width: 720px) {
  .shop-hero, [dir="ltr"] .shop-hero { background: linear-gradient(180deg, rgba(10,10,10,.55), #0a0a0a 75%), var(--hero) top center/cover no-repeat, #0a0a0a; }
}

.trust { background: var(--card); border-bottom: 1px solid var(--line); }
.trust-in { display: grid; grid-template-columns: repeat(4, 1fr); }
.trust p { display: flex; gap: 12px; align-items: flex-start; margin: 0; padding: 18px 16px; border-inline-start: 1px solid var(--line); }
.trust p:first-child { border-inline-start: 0; }
.trust .ico { width: 26px; height: 26px; color: var(--red); margin-top: 2px; }
.trust b { display: block; font-size: 15px; }
.trust span { font-size: 13.5px; color: var(--muted); line-height: 1.5; }
@media (max-width: 900px) { .trust-in { grid-template-columns: 1fr 1fr; } .trust p:nth-child(3) { border-inline-start: 0; } .trust p:nth-child(n+3) { border-top: 1px solid var(--line); } }
@media (max-width: 480px) { .trust-in { grid-template-columns: 1fr; } .trust p { border-inline-start: 0 !important; border-top: 1px solid var(--line); } .trust p:first-child { border-top: 0; } }

.brand-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.brand-card { display: grid; grid-template-columns: 64px 1fr; grid-template-rows: auto auto; column-gap: 16px; align-items: center; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.brand-card img { grid-row: span 2; width: 64px; height: 64px; object-fit: contain; }
.brand-card .bc-name { font-weight: 700; font-size: 17px; line-height: 1.4; }
.brand-card .bc-count { color: var(--muted); font-size: 13.5px; }
.brand-card:hover { border-color: var(--red); box-shadow: var(--shadow); transform: translateY(-2px); }
@media (max-width: 820px) { .brand-grid { grid-template-columns: 1fr; } }

.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.type-card { display: grid; gap: 2px; padding: 18px 20px; border-radius: var(--radius); text-decoration: none; color: #fff; background: var(--dark); border: 1px solid var(--dark); position: relative; overflow: hidden; }
.type-card b { font-size: 18px; }
.type-card span { color: #cfcfcf; font-size: 14px; }
.type-card em { font-style: normal; font-size: 13px; color: var(--on-dark-muted); }
.type-card::after { content: ""; position: absolute; inset-inline-end: 0; top: 0; bottom: 0; width: 6px; background: var(--oe); }
.type-card.is-am::after { background: var(--red); }
.type-card:hover { background: #000; }
@media (max-width: 560px) { .type-grid { grid-template-columns: 1fr; } }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); text-decoration: none; font-size: 14.5px; font-weight: 500; }
.chips small { color: var(--muted); font-size: 12px; }
.chips a:hover, .chips a[aria-current="page"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.chips a:hover small, .chips a[aria-current="page"] small { color: #cfcfcf; }
.quick-filters { padding-top: 18px; }
.chips.is-compact a { padding: 6px 12px; font-size: 14px; }

/* ---------- طلب التسعيرة ---------- */
.quote { background: var(--dark); color: var(--on-dark); padding: 48px 0; margin-top: 48px; }
.quote-in { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: start; }
.quote h2 { color: #fff; font-size: clamp(22px, 2.8vw, 30px); }
.quote-copy > p { color: var(--on-dark-muted); }
.ticks { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.ticks li { display: flex; gap: 8px; align-items: center; color: #ddd; font-size: 14.5px; }
.ticks .ico { color: var(--red); }
.quote-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 22px; background: var(--dark-2); border: 1px solid var(--dark-line); border-radius: var(--radius); }
.quote-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: #e6e6e6; }
.quote-form .full { grid-column: 1 / -1; }
.quote-form input, .quote-form select, .quote-form textarea { width: 100%; padding: 10px 12px; min-height: 44px; border: 1px solid #3a3a3a; border-radius: var(--radius); background: #0d0d0d; color: #fff; font: 500 15px var(--font); }
.quote-form input::placeholder, .quote-form textarea::placeholder { color: #7c7c7c; }
.quote-form input:focus, .quote-form select:focus, .quote-form textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(226, 38, 46, .25); }
.quote-form input:user-invalid, .quote-form textarea:user-invalid { border-color: #ff6b6b; }
.quote-form .req { color: var(--red); }
.form-note { margin: 0; font-size: 12.5px; color: var(--on-dark-muted); text-align: center; }
@media (max-width: 860px) { .quote-in { grid-template-columns: 1fr; gap: 24px; } }
@media (max-width: 520px) { .quote-form { grid-template-columns: 1fr; padding: 16px; } }

/* ---------- ووكومرس: عام ---------- */
.woo-wrap { padding: 8px 0 40px; }
.woo-wrap.is-product { padding-top: 22px; }
.woocommerce-breadcrumb, .crumbs { font-size: 13.5px; color: var(--muted); margin: 0 0 18px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--red); }
.crumbs .sep { margin: 0 8px; opacity: .6; }

.woocommerce-notices-wrapper:empty { display: none; }
.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-noreviews, p.no-comments {
  list-style: none; margin: 0 0 20px; padding: 14px 18px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line); border-inline-start: 4px solid var(--ink);
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
}
.woocommerce-message { border-inline-start-color: var(--wa); }
.woocommerce-error { border-inline-start-color: var(--red); }
.woocommerce-message .button, .woocommerce-info .button { margin-inline-start: auto; order: 2; min-height: 38px; padding: 6px 14px; }

.woocommerce-result-count { color: var(--muted); font-size: 14px; margin: 6px 0 18px; }
.woocommerce-ordering { margin: 0 0 18px; }
.woocommerce-ordering select, select.orderby { min-height: 40px; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); font: 500 14px var(--font); color: var(--ink); }

/* شبكة المنتجات */
.woocommerce ul.products, ul.products { list-style: none; margin: 0 0 30px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; clear: both; }
.woocommerce ul.products::before, .woocommerce ul.products::after, ul.products::before, ul.products::after { display: none !important; }
.woocommerce ul.products li.product, ul.products li.product {
  float: none !important; width: auto !important; margin: 0 !important; padding: 0;
  display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
ul.products li.product:hover { border-color: #c4c5c2; box-shadow: var(--shadow); }
ul.products li.product > a.woocommerce-LoopProduct-link { display: flex; flex-direction: column; flex: 1; text-decoration: none; color: inherit; padding-bottom: 6px; }
ul.products li.product img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: contain; background: #fff; padding: 12px; margin: 0 !important; border-bottom: 1px solid var(--line); }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 14px 0; min-height: 0; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; line-height: 1.6; background: #eeeeec; color: var(--ink); }
.tag-oe { background: #e6eef8; color: var(--oe); }
.tag-am { background: #fdeceb; color: var(--red-dark); }
.tag-out { background: #fff4dd; color: var(--amber); }
ul.products li.product .woocommerce-loop-product__title { font-size: 15.5px !important; font-weight: 600; line-height: 1.5; margin: 8px 14px 2px; padding: 0 !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-pn { display: block; margin: 0 14px; font-size: 13px; color: var(--muted); font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; text-align: start; }
ul.products li.product .price { display: block; margin: auto 14px 0; padding-top: 8px; font-size: 17px; font-weight: 700; color: var(--ink); }
ul.products li.product .price del { color: var(--muted); font-weight: 400; font-size: 14px; margin-inline-end: 6px; }
ul.products li.product .price ins { text-decoration: none; color: var(--red); }
.price-ask { font-size: 14.5px; font-weight: 600; color: var(--muted); }
ul.products li.product .button { margin: 8px 14px 14px; min-height: 42px; font-size: 14px; padding: 8px 12px; }
ul.products li.product .button .ico { width: 18px; height: 18px; }
ul.products li.product .added_to_cart { display: block; margin: -6px 14px 12px; font-size: 13.5px; text-align: center; color: var(--wa); font-weight: 600; }
ul.products li.product .star-rating { margin: 4px 14px 0; }
.onsale { position: absolute; top: 10px; inset-inline-start: 10px; z-index: 2; padding: 2px 10px; border-radius: 4px; background: var(--red); color: #fff; font-size: 12.5px; font-weight: 700; min-height: 0; min-width: 0; line-height: 1.8; }
ul.products li.product { position: relative; }
@media (max-width: 1100px) { .woocommerce ul.products, ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 780px) { .woocommerce ul.products, ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } ul.products li.product .woocommerce-loop-product__title { font-size: 14.5px !important; margin-inline: 10px; } .card-tags { padding-inline: 10px; } .card-pn, ul.products li.product .price { margin-inline: 10px; } ul.products li.product .button { margin: 8px 10px 10px; font-size: 13px; padding-inline: 8px; } }

/* ترقيم الصفحات */
.woocommerce-pagination, .navigation.pagination { margin: 10px 0 30px; text-align: center; }
.woocommerce-pagination ul, .nav-links { list-style: none; margin: 0; padding: 0; display: inline-flex; flex-wrap: wrap; gap: 6px; border: 0 !important; justify-content: center; }
.woocommerce-pagination ul li { border: 0 !important; float: none !important; }
.woocommerce-pagination a, .woocommerce-pagination span, .nav-links a, .nav-links span {
  display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); text-decoration: none; font-weight: 600; color: var(--ink);
}
.woocommerce-pagination a:hover, .nav-links a:hover { border-color: var(--ink); }
.woocommerce-pagination span.current, .nav-links span.current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- صفحة المنتج ---------- */
.woocommerce div.product { position: relative; }
.woocommerce div.product .woocommerce-product-gallery { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.woocommerce div.product .woocommerce-product-gallery img { border-radius: 4px; }
.woocommerce div.product .flex-control-thumbs { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.woocommerce div.product .flex-control-thumbs li { width: auto !important; float: none !important; }
.woocommerce div.product .flex-control-thumbs img { border: 1px solid var(--line); cursor: pointer; opacity: .7; }
.woocommerce div.product .flex-control-thumbs img.flex-active, .woocommerce div.product .flex-control-thumbs img:hover { opacity: 1; border-color: var(--ink); }
.woocommerce-product-gallery__trigger { position: absolute; top: 18px; inset-inline-end: 18px; z-index: 5; width: 36px; height: 36px; border-radius: 50%; background: #fff; border: 1px solid var(--line); text-indent: -9999px; overflow: hidden; }
.woocommerce-product-gallery__trigger::before { content: ""; position: absolute; inset: 9px; border: 2px solid var(--ink); border-radius: 50%; width: 12px; height: 12px; }
.woocommerce-product-gallery__trigger::after { content: ""; position: absolute; width: 2px; height: 7px; background: var(--ink); transform: rotate(-45deg); top: 20px; left: 22px; }

.woocommerce div.product .product_title { font-size: clamp(22px, 2.6vw, 30px); margin-bottom: 10px; }
.woocommerce div.product p.price, .woocommerce div.product span.price { font-size: 26px; font-weight: 700; color: var(--ink); margin: 0 0 14px; }
.woocommerce div.product p.price .price-ask { font-size: 18px; color: var(--muted); display: inline-block; padding: 6px 12px; border: 1px dashed #c8c9c6; border-radius: var(--radius); }
.woocommerce div.product .woocommerce-product-details__short-description { color: #3b444b; font-size: 15px; }
.woocommerce div.product .stock { font-weight: 600; font-size: 14.5px; }
.woocommerce div.product .stock.in-stock { color: var(--wa); }
.woocommerce div.product .stock.out-of-stock { color: var(--amber); }

.specs { margin: 16px 0 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.specs > div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); }
.specs > div:first-child { border-top: 0; }
.specs dt { color: var(--muted); font-size: 14px; }
.specs dd { margin: 0; font-weight: 600; font-size: 14.5px; }
.specs dd a { color: var(--ink); }

.woocommerce div.product form.cart { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; margin: 0 0 12px; }
.woocommerce div.product form.cart::before, .woocommerce div.product form.cart::after { display: none; }
.woocommerce .quantity { display: inline-flex; float: none !important; margin: 0 !important; }
.woocommerce .quantity .qty { width: 80px; min-height: 48px; text-align: center; border: 1px solid var(--line); border-radius: var(--radius); font: 600 16px var(--font); background: #fff; }
.woocommerce div.product form.cart .button { flex: 1; min-height: 48px; font-size: 16px; float: none !important; }
.buy-help { display: grid; gap: 10px; margin: 0 0 18px; }
.buy-help .btn { width: 100%; min-height: 48px; font-size: 16px; }
.vin-note { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 12px 14px; background: #f0f1ee; border-radius: var(--radius); font-size: 14px; color: #3b444b; }
.vin-note .ico { color: var(--red); margin-top: 3px; }

.woocommerce-tabs { clear: both; padding-top: 30px; }
.woocommerce-tabs ul.tabs { list-style: none; margin: 0 0 -1px; padding: 0 !important; display: flex; flex-wrap: wrap; gap: 4px; overflow: visible !important; }
.woocommerce-tabs ul.tabs::before, .woocommerce-tabs ul.tabs::after { display: none !important; }
.woocommerce-tabs ul.tabs li { margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; }
.woocommerce-tabs ul.tabs li::before, .woocommerce-tabs ul.tabs li::after { display: none !important; }
.woocommerce-tabs ul.tabs li a { display: block; padding: 10px 18px; border: 1px solid var(--line); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; background: #eeeeec; text-decoration: none; font-weight: 600; color: var(--muted); }
.woocommerce-tabs ul.tabs li.active a { background: var(--card); color: var(--ink); box-shadow: inset 0 3px 0 var(--red); }
.woocommerce-tabs .panel { margin: 0 0 30px !important; padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: 0 var(--radius) var(--radius) var(--radius); }
.woocommerce-tabs .panel > h2:first-child { font-size: 19px; }
.woocommerce-tabs table.shop_attributes { width: 100%; border-collapse: collapse; }
.woocommerce-tabs table.shop_attributes th, .woocommerce-tabs table.shop_attributes td { padding: 10px 12px; border-top: 1px solid var(--line); text-align: start; }
.woocommerce-tabs table.shop_attributes th { width: 160px; color: var(--muted); font-weight: 500; }
.woocommerce-tabs table.shop_attributes p { margin: 0; }
.related.products > h2, .upsells.products > h2 { font-size: 22px; margin: 10px 0 16px; }

/* التقييمات (بدون خط أيقونات ووكومرس) */
.star-rating { position: relative; display: inline-block; width: 5.4em; height: 1.1em; font-size: 14px; line-height: 1; overflow: hidden; }
.star-rating::before { content: "★★★★★"; position: absolute; inset: 0; color: #d6d6d3; letter-spacing: .08em; }
.star-rating > span { position: absolute; top: 0; inset-inline-start: 0; height: 100%; overflow: hidden; padding-top: 1.5em; }
.star-rating > span::before { content: "★★★★★"; position: absolute; top: 0; inset-inline-start: 0; color: #e0a100; letter-spacing: .08em; }
#reviews .comment-form input, #reviews .comment-form textarea { width: 100%; }
#reviews ol.commentlist { list-style: none; padding: 0; }

/* ---------- النماذج العامة (حسابي، التقييمات) ---------- */
.woocommerce form .form-row { margin: 0 0 14px; padding: 0; }
.woocommerce form .form-row label, .entry-content label { display: block; font-weight: 600; font-size: 14.5px; margin-bottom: 6px; }
.woocommerce form .form-row .required { color: var(--red); text-decoration: none; }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select,
.entry-content input[type="text"], .entry-content input[type="email"], .entry-content input[type="tel"], .entry-content input[type="password"], .entry-content input[type="search"], .entry-content textarea, .entry-content select,
#reviews .comment-form input, #reviews .comment-form textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #cfd0cd; border-radius: var(--radius); background: #fff; font: 500 15px var(--font); color: var(--ink);
}
.woocommerce form .form-row input.input-text:focus, .entry-content input:focus, .entry-content textarea:focus, .entry-content select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(24, 32, 39, .12); }
.woocommerce form.login, .woocommerce form.register, .woocommerce form.checkout_coupon, .woocommerce form.lost_reset_password {
  margin: 0 0 24px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
}
.woocommerce .col2-set { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.woocommerce .col2-set .col-1, .woocommerce .col2-set .col-2 { width: auto !important; float: none !important; }
.woocommerce .col2-set::before, .woocommerce .col2-set::after { display: none; }
@media (max-width: 780px) { .woocommerce .col2-set { grid-template-columns: 1fr; } }
.woocommerce-form__label-for-checkbox { display: inline-flex !important; gap: 8px; align-items: center; font-weight: 500 !important; }
.woocommerce-LostPassword { font-size: 14px; }

/* حسابي */
.woocommerce-account .woocommerce { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: start; }
.woocommerce-account .woocommerce > .woocommerce-notices-wrapper, .woocommerce-account:not(.logged-in) .woocommerce { grid-column: 1 / -1; }
.woocommerce-account:not(.logged-in) .woocommerce { display: block; }
.woocommerce-MyAccount-navigation, .woocommerce-MyAccount-content { width: auto !important; float: none !important; }
.woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.woocommerce-MyAccount-navigation a { display: block; padding: 10px 12px; border-radius: 4px; text-decoration: none; font-weight: 500; }
.woocommerce-MyAccount-navigation .is-active a, .woocommerce-MyAccount-navigation a:hover { background: var(--ink); color: #fff; }
@media (max-width: 780px) { .woocommerce-account .woocommerce { grid-template-columns: 1fr; } }

/* جداول (السلة/الطلبات الكلاسيكية) */
.woocommerce table.shop_table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 0 0 24px; }
.woocommerce table.shop_table th, .woocommerce table.shop_table td { padding: 12px 14px; border-top: 1px solid var(--line); text-align: start; vertical-align: middle; }
.woocommerce table.shop_table thead th { background: #f0f1ee; border-top: 0; font-size: 14px; }
.woocommerce table.shop_table img { width: 64px; border-radius: 4px; }
.woocommerce a.remove { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: var(--red) !important; text-decoration: none; font-size: 20px; }
.woocommerce a.remove:hover { background: var(--red); color: #fff !important; }

/* بلوكات السلة والدفع */
.wc-block-components-button:not(.is-link), .wc-block-cart__submit-button, .wc-block-components-checkout-place-order-button {
  background: var(--red) !important; color: #fff !important; border-radius: var(--radius) !important; font-family: var(--font) !important; font-weight: 700 !important; min-height: 50px;
}
.wc-block-components-button:not(.is-link):hover { background: var(--red-dark) !important; }
.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout { font-family: var(--font); }
.is-wc-page .entry-content { max-width: none; }

/* ---------- المحتوى العام ---------- */
.content-wrap { padding: 30px 0 50px; }
.content-wrap.is-prose .entry-content { max-width: 860px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 4vw, 40px); }
.entry-content > *:last-child { margin-bottom: 0; }
.entry-content h2 { font-size: 22px; margin-top: 1.6em; }
.entry-content h3 { font-size: 18px; margin-top: 1.4em; }
.entry-content a { color: var(--red-dark); }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 8px 10px; }
.entry-thumb { border-radius: var(--radius); margin-bottom: 20px; }
.post-list { display: grid; gap: 14px; }
.post-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.post-card h2 { font-size: 20px; margin: 0 0 4px; }
.post-card h2 a { text-decoration: none; }
.post-card .meta { color: var(--muted); font-size: 13.5px; }
.is-404 { max-width: 640px; }
.is-404 .fbco-search { margin-bottom: 20px; }

/* ---------- الفوتر ---------- */
.site-footer { background: var(--dark); color: var(--on-dark-muted); border-top: 3px solid var(--red); margin-top: 0; font-size: 14.5px; }
.quote + .site-footer, main + .site-footer { margin-top: 0; }
main { min-height: 50vh; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 30px; padding: 44px 0 28px; }
.site-footer h2 { color: #fff; font-size: 16px; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--on-dark); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.f-logo { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.f-logo img { flex: none; width: 57px; height: 72px; }
.f-logo p { margin: 0; display: grid; gap: 2px; padding-inline-start: 14px; border-inline-start: 1px solid var(--dark-line); line-height: 1.4; }
.f-logo b { color: #fff; font-size: 18px; }
.f-logo span { color: var(--on-dark-muted); font-size: 14px; letter-spacing: .3px; text-align: end; }
.f-contact li, .f-contact a { display: flex; gap: 8px; align-items: center; }
.f-contact .ico { color: var(--red); width: 18px; height: 18px; }
.f-contact li, .f-contact a { flex-wrap: wrap; column-gap: 6px; }
.f-contact bdi, .topbar bdi { white-space: nowrap; }
.footer-legal { border-top: 1px solid var(--dark-line); padding: 16px 0 22px; font-size: 13px; }
.footer-legal p { margin: 0 0 4px; }
.footer-legal span { margin-inline-start: 4px; }
.footer-legal .note { color: #777; font-size: 12px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .f-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* إضافات أخرى قد تضيف عناصر خاصة بالقالب القديم: نخفي النص التقني المطبوع خطأً */
.fbco-next .wp-block-woocommerce-product-price:empty { display: none; }
/* شارة «تصنيف القطعة» من إضافة خارجية تكرر وسم أصلي/بديل وجدول المواصفات */
.fbco-next .fbco-part-classification-badge { display: none !important; }
