/* =========================================================================
 * BLENDCOOK — Stylesheet
 * Professional B2B foreign-trade theme. RTL-aware via logical properties.
 * ========================================================================= */

:root {
  --primary: #1666c9;
  --primary-dark: #0f4f9e;
  --primary-soft: #e8f1fc;
  --accent: #ff7a18;
  --accent-dark: #e9620a;
  --ink: #15233b;
  --muted: #5d6b80;
  --bg: #ffffff;
  --bg-soft: #f3f7fc;
  --line: #e4ebf4;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 12px 34px rgba(18, 43, 78, .10);
  --shadow-sm: 0 4px 14px rgba(18, 43, 78, .08);
  --maxw: 1200px;
  --header-h: 70px;
  --font: "Inter", "Noto Sans SC", "Noto Sans Arabic", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
body.rtl { direction: rtl; }
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }
h1, h2, h3, h4 { line-height: 1.25; color: var(--ink); margin: 0 0 .5em; }
h1 { font-size: clamp(28px, 4vw, 46px); font-weight: 800; letter-spacing: -.5px; }
h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 800; }
h3 { font-size: 19px; font-weight: 700; }
p { margin: 0 0 1em; }
.section { padding: 72px 0; }
.section.soft { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 44px; }
.section-head p { color: var(--muted); font-size: 17px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; font-weight: 700; font-size: 15px;
  border: 2px solid transparent; cursor: pointer; transition: .2s; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-accent:hover { background: var(--accent-dark); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-ghost:hover { background: var(--primary-soft); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: #eef3fa; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--line);
}
.header .container { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--ink); }
.logo .mark {
  width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, var(--primary), var(--accent));
  display: grid; place-items: center; color: #fff; font-size: 18px; font-weight: 900;
}
.logo small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .4px; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  padding: 9px 14px; border-radius: 9px; color: var(--ink); font-weight: 600; font-size: 15px;
}
.nav a:hover, .nav a.active { background: var(--primary-soft); color: var(--primary-dark); }
.header-actions { display: flex; align-items: center; gap: 12px; }

/* Language switcher */
.lang { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 14px; cursor: pointer; color: var(--ink);
}
.lang-btn:hover { border-color: var(--primary); }
.lang-menu {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; min-width: 160px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  padding: 6px; display: none; z-index: 50;
}
.lang-menu.open { display: block; }
.lang-menu button {
  display: flex; justify-content: space-between; width: 100%; padding: 10px 12px; border: 0; background: none;
  border-radius: 8px; cursor: pointer; font-size: 15px; color: var(--ink); text-align: start;
}
.lang-menu button:hover { background: var(--primary-soft); }
.lang-menu button.active { color: var(--primary); font-weight: 700; }
.lang-menu button .code { color: var(--muted); font-size: 12px; }

.hamburger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.hamburger span { display: block; width: 24px; height: 2.5px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: .2s; }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, rgba(8,28,56,.92) 0%, rgba(8,28,56,.62) 55%, rgba(8,28,56,.30) 100%); }
.hero .container { position: relative; padding-block: 96px; }
.hero h1 { color: #fff; max-width: 760px; }
.hero p { color: rgba(255,255,255,.9); font-size: 18px; max-width: 660px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.hero-badges span {
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); padding: 6px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600; backdrop-filter: blur(4px);
}

/* ---------- Stats ---------- */
.stats { background: var(--primary-dark); color: #fff; }
.stats .grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 38px 0; }
.stat { text-align: center; }
.stat .n { font-size: 38px; font-weight: 800; line-height: 1; }
.stat .l { font-size: 14px; opacity: .85; margin-top: 8px; }

/* ---------- Category cards ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.cat-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px;
  display: flex; align-items: center; gap: 18px; box-shadow: var(--shadow-sm); transition: .2s; cursor: pointer;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--primary); }
.cat-card .ico { font-size: 38px; width: 64px; height: 64px; display: grid; place-items: center; background: var(--primary-soft); border-radius: 14px; flex: none; }
.cat-card h3 { margin: 0 0 2px; }
.cat-card .cnt { color: var(--muted); font-size: 14px; }

/* ---------- Product grid ---------- */
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(265px, 1fr)); gap: 24px; }
.prod-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: .2s; display: flex; flex-direction: column;
}
.prod-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.prod-thumb { aspect-ratio: 1 / 1; background: var(--bg-soft); overflow: hidden; position: relative; }
.prod-thumb img { width: 100%; height: 100%; object-fit: cover; transition: .3s; }
.prod-card:hover .prod-thumb img { transform: scale(1.05); }
.prod-badge {
  position: absolute; top: 12px; inset-inline-start: 12px; background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; letter-spacing: .4px;
}
.prod-body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.prod-body h3 { font-size: 16px; margin-bottom: 6px; }
.prod-model { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.prod-spec { font-size: 13px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; margin-bottom: 14px; }
.prod-actions { display: flex; gap: 8px; margin-top: auto; }
.prod-actions .btn { flex: 1; padding: 10px 12px; font-size: 13px; justify-content: center; }

/* ---------- Why ---------- */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.why-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
.why-card .ico { font-size: 30px; margin-bottom: 14px; }
.why-card h3 { color: var(--primary-dark); }
.why-card p { color: var(--muted); font-size: 15px; margin: 0; }

/* ---------- Certs ---------- */
.cert-row { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.cert-badge {
  border: 1.5px solid var(--primary); color: var(--primary-dark); font-weight: 800; letter-spacing: 1px;
  padding: 14px 22px; border-radius: 12px; background: #fff; font-size: 15px;
}

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--primary), var(--primary-dark)); color: #fff; border-radius: var(--radius); padding: 54px 40px; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.9); max-width: 620px; margin-inline: auto; }
.cta-band .btn-accent { margin-top: 18px; }

/* ---------- Footer ---------- */
.footer { background: #0d1f37; color: #c6d2e4; padding: 56px 0 24px; }
.footer .grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 32px; }
.footer h4 { color: #fff; font-size: 16px; margin-bottom: 16px; }
.footer a { color: #c6d2e4; }
.footer a:hover { color: #fff; }
.footer p { font-size: 14px; color: #9fb0c8; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { margin-bottom: 9px; font-size: 14px; }
.footer .logo { color: #fff; margin-bottom: 12px; }
.footer .contact-line { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin-bottom: 10px; }
.footer .contact-line .ic { flex: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 36px; padding-top: 20px; text-align: center; font-size: 13px; color: #8295b0; }

/* ---------- Products page toolbar ---------- */
.toolbar { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-bottom: 30px; }
.search-box { flex: 1; min-width: 240px; position: relative; }
.search-box input {
  width: 100%; padding: 13px 16px 13px 42px; border: 1px solid var(--line); border-radius: 999px; font-size: 15px; font-family: inherit;
}
.rtl .search-box input { padding: 13px 42px 13px 16px; }
.search-box .ic { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-start: 16px; color: var(--muted); }
.filter-select {
  padding: 13px 16px; border: 1px solid var(--line); border-radius: 999px; font-size: 15px; font-family: inherit; background: #fff; cursor: pointer;
}
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
.chip { padding: 9px 18px; border: 1px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink); }
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.count-line { color: var(--muted); font-size: 14px; margin-bottom: 18px; }

/* ---------- Product modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(8,20,40,.6); backdrop-filter: blur(3px);
  display: none; align-items: flex-start; justify-content: center; z-index: 200; padding: 30px 16px; overflow-y: auto;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff; border-radius: var(--radius); max-width: 920px; width: 100%; box-shadow: var(--shadow);
  display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; animation: pop .2s ease;
}
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-gallery { background: var(--bg-soft); padding: 22px; }
.modal-main-img { aspect-ratio: 1/1; border-radius: 12px; overflow: hidden; background: #fff; border: 1px solid var(--line); }
.modal-main-img img { width: 100%; height: 100%; object-fit: cover; }
.modal-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.modal-thumbs img { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; border: 2px solid transparent; cursor: pointer; background: #fff; }
.modal-thumbs img.active { border-color: var(--primary); }
.modal-info { padding: 28px; }
.modal-info h2 { font-size: 24px; }
.modal-info .model { color: var(--muted); margin-bottom: 14px; }
.spec-table { width: 100%; border-collapse: collapse; margin: 14px 0 20px; }
.spec-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
.spec-table td:first-child { color: var(--muted); width: 42%; }
.modal-info .desc { color: var(--muted); font-size: 15px; }
.modal-close {
  position: absolute; top: 14px; inset-inline-end: 14px; width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: #fff; box-shadow: var(--shadow-sm); cursor: pointer; font-size: 20px; color: var(--ink);
}

/* ---------- About page ---------- */
.about-hero { background: var(--bg-soft); }
.about-hero .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.about-hero img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.about-hero h1 { margin-bottom: 16px; }
.fact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; }
.fact-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.fact-card .k { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .5px; }
.fact-card .v { font-weight: 800; font-size: 17px; margin-top: 6px; color: var(--primary-dark); }
.cap-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.cap-card { display: flex; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.cap-card .ico { font-size: 26px; flex: none; }
.cap-card h4 { margin: 0 0 4px; }
.cap-card p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- Contact page ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: start; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-sm); }
.form-card h3 { margin-bottom: 20px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; font-family: inherit; background: #fff;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-note { font-size: 13px; color: var(--muted); margin-top: 8px; }
.form-success {
  display: none; background: #e7f7ee; border: 1px solid #b7e6c9; color: #1d7a45; padding: 14px 16px;
  border-radius: 10px; margin-bottom: 16px; font-size: 14px; font-weight: 600;
}
.form-success.show { display: block; }
.direct-card { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.direct-card h3 { margin-bottom: 18px; }
.direct-row { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; font-size: 15px; }
.direct-row .ic { flex: none; font-size: 18px; }
.direct-row a { color: var(--ink); }
.direct-row .v { color: var(--muted); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { background: linear-gradient(120deg, var(--primary), var(--primary-dark)); color: #fff; padding: 56px 0; }
.page-hero h1 { color: #fff; }
.page-hero p { color: rgba(255,255,255,.88); max-width: 700px; margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .cat-grid, .why-grid { grid-template-columns: repeat(2, 1fr); }
  .footer .grid { grid-template-columns: 1fr 1fr; }
  .about-hero .grid, .contact-grid, .modal { grid-template-columns: 1fr; }
  .modal-gallery { order: -1; }
  .cap-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav, .header-actions .btn { display: none; }
  .hamburger { display: block; }
  .nav.open {
    display: flex; flex-direction: column; position: absolute; top: var(--header-h); inset-inline: 0; background: #fff;
    border-bottom: 1px solid var(--line); padding: 14px; gap: 4px; box-shadow: var(--shadow);
  }
  .nav.open a { padding: 12px 14px; }
  .stats .grid { grid-template-columns: repeat(2, 1fr); gap: 26px; }
  .cat-grid, .why-grid, .footer .grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .section { padding: 54px 0; }
  .hero .container { padding-block: 70px; }
}
