/* ==========================================================================
   Typography - IBM Plex, self-hosted (no external requests, CSP-safe)

   IBM Plex is IBM's corporate typeface: a neutral, engineered grotesque built
   for technical communication. IBM Plex Sans Arabic is the matching Persian /
   Arabic cut by the same foundry, so both languages share one type system -
   identical weights, metrics and tone.

   Latin ranges deliberately exclude U+200C-200D (ZWNJ / ZWJ): those belong to
   the Arabic face, because Persian word joining depends on them.
   ========================================================================== */

/* --- IBM Plex Sans (Latin) ------------------------------------------------ */
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/plex-sans-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-200B, U+200E-206F, U+2070-209F, U+20A0-20BF, U+2122, U+2212, U+2190-21BB;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/plex-sans-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-200B, U+200E-206F, U+2070-209F, U+20A0-20BF, U+2122, U+2212, U+2190-21BB;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/plex-sans-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-200B, U+200E-206F, U+2070-209F, U+20A0-20BF, U+2122, U+2212, U+2190-21BB;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/plex-sans-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-200B, U+200E-206F, U+2070-209F, U+20A0-20BF, U+2122, U+2212, U+2190-21BB;
}

/* --- IBM Plex Sans Arabic: Latin glyphs, metric-matched ------------------- */
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/plex-arabic-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-200B, U+200E-206F, U+2070-209F, U+20A0-20BF, U+2122, U+2212, U+2190-21BB;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/plex-arabic-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-200B, U+200E-206F, U+2070-209F, U+20A0-20BF, U+2122, U+2212, U+2190-21BB;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/plex-arabic-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-200B, U+200E-206F, U+2070-209F, U+20A0-20BF, U+2122, U+2212, U+2190-21BB;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/plex-arabic-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-200B, U+200E-206F, U+2070-209F, U+20A0-20BF, U+2122, U+2212, U+2190-21BB;
}

/* --- IBM Plex Sans Arabic: Persian / Arabic glyphs ------------------------ */
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/plex-arabic-400.woff2") format("woff2");
  unicode-range: U+060C-06FF, U+200C-200D, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/plex-arabic-500.woff2") format("woff2");
  unicode-range: U+060C-06FF, U+200C-200D, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/plex-arabic-600.woff2") format("woff2");
  unicode-range: U+060C-06FF, U+200C-200D, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/plex-arabic-700.woff2") format("woff2");
  unicode-range: U+060C-06FF, U+200C-200D, U+FB50-FDFF, U+FE70-FEFF;
}

/* --- IBM Plex Mono: part numbers, tracking codes, slugs ------------------- */
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/plex-mono-latin-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/plex-mono-latin-600.woff2") format("woff2");
}

/* ==========================================================================
   Sunverter - design tokens
   ========================================================================== */
:root {
  --brand-900: #0b2545;
  --brand-800: #13315c;
  --brand-700: #1b4079;
  --brand-600: #2a5da8;
  --accent-600: #e07b00;
  --accent-500: #f59e0b;
  --accent-400: #fbbf24;
  --accent-soft: #fff7e6;

  --teal-500: #0f9b8e;
  --green-500: #12a150;
  --red-500: #d93025;
  --red-600: #b3261e;

  --ink-900: #0f172a;
  --ink-700: #334155;
  --ink-500: #64748b;
  --ink-300: #cbd5e1;
  --ink-200: #e2e8f0;
  --ink-100: #f1f5f9;
  --surface: #ffffff;
  --surface-alt: #f7f9fc;
  --page-bg: #ffffff;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --shadow: 0 4px 6px -1px rgba(15, 23, 42, .08), 0 10px 24px -6px rgba(15, 23, 42, .12);
  --shadow-lg: 0 20px 45px -15px rgba(11, 37, 69, .28);

  --container: 1180px;
  --header-h: 72px;

  --font-fa: "IBM Plex Sans Arabic", "IBM Plex Sans", "Segoe UI", Tahoma, system-ui, sans-serif;
  --font-en: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

html[lang="fa"] { --font-body: var(--font-fa); }
html[lang="en"] { --font-body: var(--font-en); }

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body, var(--font-en));
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-700);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Real weights are shipped for 400-700, so never let the browser fake one. */
  font-synthesis: none;
}

/* The Arabic cut has taller ascenders and needs a little more room to breathe. */
html[lang="fa"] body { line-height: 2; }

h1, h2, h3, h4 { color: var(--ink-900); line-height: 1.28; margin: 0 0 .6em; font-weight: 600; }
h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); letter-spacing: -.022em; font-weight: 600; }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.4vw, 2.1rem); letter-spacing: -.018em; }
h3 { font-size: 1.2rem; letter-spacing: -.012em; }
h4 { letter-spacing: -.008em; }

/* Plex Arabic carries its own optical weight; tight Latin tracking hurts it. */
html[lang="fa"] h1,
html[lang="fa"] h2,
html[lang="fa"] h3,
html[lang="fa"] h4 { letter-spacing: 0; line-height: 1.55; }
p { margin: 0 0 1rem; }

a { color: var(--brand-600); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--accent-600); }

img { max-width: 100%; height: auto; display: block; }

code, .mono { font-family: var(--font-mono); font-size: .88em; font-feature-settings: "zero" 1; }

.muted { color: var(--ink-500); }
.small { font-size: .85rem; }
.small code { font-size: .8rem; }
.center { text-align: center; }
.mt { margin-block-start: 2rem; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.container.narrow { max-width: 820px; }

/* Same reasoning as .honeypot: an inset-inline-start of -9999px lands at
   +9999px in RTL and drags a horizontal scrollbar onto every Persian page. */
.skip-link {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; white-space: nowrap; clip-path: inset(50%);
}
.skip-link:focus {
  position: fixed; inset-block-start: .5rem; inset-inline-start: .5rem;
  width: auto; height: auto; margin: 0; padding: .7rem 1.2rem;
  clip-path: none; z-index: 999;
  background: var(--brand-900); color: #fff; border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

:focus-visible { outline: 3px solid var(--accent-500); outline-offset: 2px; border-radius: 4px; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .72rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit; font-weight: 600; font-size: .95rem;
  cursor: pointer; white-space: nowrap;
  transition: transform .15s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: .48rem 1rem; font-size: .875rem; }
.btn-xs { padding: .3rem .7rem; font-size: .8rem; border-radius: var(--radius-sm); }
.btn-lg { padding: .9rem 2rem; font-size: 1.05rem; }
.btn-block { width: 100%; }

.btn-primary { background: linear-gradient(135deg, var(--accent-500), var(--accent-600)); color: #fff; box-shadow: 0 6px 18px -6px rgba(224, 123, 0, .6); }
.btn-primary:hover { color: #fff; box-shadow: 0 10px 24px -8px rgba(224, 123, 0, .7); }

.btn-outline { border-color: var(--ink-300); color: var(--ink-900); background: transparent; }
.btn-outline:hover { border-color: var(--brand-600); color: var(--brand-600); background: rgba(42, 93, 168, .05); }

.btn-ghost { background: var(--ink-100); color: var(--ink-700); }
.btn-ghost:hover { background: var(--ink-200); color: var(--ink-900); }

.btn-light { background: #fff; color: var(--brand-900); }
.btn-light:hover { color: var(--accent-600); }

.btn-success { background: var(--green-500); color: #fff; }
.btn-success:hover { color: #fff; filter: brightness(1.06); }

.btn-danger { background: transparent; color: var(--red-500); border-color: rgba(217, 48, 37, .4); }
.btn-danger:hover { background: var(--red-500); color: #fff; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(12px);
  border-block-end: 1px solid var(--ink-200);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--header-h); }

.brand { display: flex; align-items: center; gap: .6rem; color: var(--brand-900); }
.brand:hover { color: var(--brand-900); }
.brand-mark { width: 34px; height: 34px; color: var(--accent-500); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 1.1rem; font-weight: 600; letter-spacing: -.02em; }
.brand-text small { font-size: .78rem; color: var(--ink-500); font-weight: 400; letter-spacing: .01em; }

.primary-nav { display: flex; align-items: center; gap: 1.6rem; }
.primary-nav ul { display: flex; align-items: center; gap: 1.35rem; list-style: none; margin: 0; padding: 0; }
.primary-nav a { color: var(--ink-700); font-weight: 500; font-size: .95rem; position: relative; padding-block: .4rem; }
.primary-nav a:hover, .primary-nav a.active { color: var(--brand-900); }
.primary-nav a.active::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 2px;
  background: var(--accent-500); border-radius: 2px;
}

.nav-actions { display: flex; align-items: center; gap: .7rem; }
.lang-switch {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .4rem .8rem; border: 1px solid var(--ink-200); border-radius: 999px;
  font-size: .85rem; font-weight: 600; color: var(--ink-700);
}
.lang-switch:hover { border-color: var(--accent-500); color: var(--accent-600); }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; padding: 0 10px;
  background: transparent; border: 1px solid var(--ink-200); border-radius: var(--radius-sm); cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--ink-900); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { position: relative; overflow: hidden; background: linear-gradient(160deg, #f8fbff 0%, #eef4fc 55%, #fef6e7 100%); }
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(245, 158, 11, .22), transparent 60%),
    radial-gradient(700px 400px at 5% 110%, rgba(42, 93, 168, .16), transparent 60%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 3rem;
  padding-block: clamp(3rem, 7vw, 5.5rem);
}
.hero-content { max-width: 600px; }
.badge {
  display: inline-block; padding: .35rem .9rem; margin-block-end: 1.2rem; letter-spacing: .02em;
  background: var(--accent-soft); color: var(--accent-600);
  border: 1px solid rgba(245, 158, 11, .3); border-radius: 999px;
  font-size: .82rem; font-weight: 700;
}
.lead { font-size: 1.08rem; color: var(--ink-700); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-block-start: 1.8rem; }
.hero-visual img { width: 100%; max-width: 520px; margin-inline: auto; filter: drop-shadow(0 24px 40px rgba(11, 37, 69, .18)); }

/* ==========================================================================
   Stats
   ========================================================================== */
.stats-strip { background: var(--brand-900); color: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding-block: 2rem; }
.stat { text-align: center; }
.stat-value { display: block; font-family: var(--font-mono); font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.2rem); font-weight: 600; letter-spacing: -.02em; color: var(--accent-400); }
.stat-label { display: block; font-size: .88rem; color: rgba(255, 255, 255, .75); }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding-block: clamp(3rem, 6vw, 5rem); }
.section-alt { background: var(--surface-alt); }
.section-head { max-width: 700px; margin-block-end: 2.5rem; }
.section-title { position: relative; display: flex; align-items: center; gap: .6rem; }
.section-sub { color: var(--ink-500); margin: 0; }

.page-head {
  padding-block: clamp(2.5rem, 5vw, 4rem);
  background: linear-gradient(150deg, #f8fbff, #eef4fc);
  border-block-end: 1px solid var(--ink-200);
}
.page-head h1 { margin-block-end: .5rem; }
.page-head .lead { margin: 0; max-width: 760px; }

.breadcrumb { padding-block: 1.2rem .2rem; font-size: .9rem; }
.breadcrumb a { display: inline-flex; align-items: center; min-height: 40px; }

/* Products ---------------------------------------------------------------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 1.6rem; }

.product-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--ink-200); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(245, 158, 11, .5); }
.product-card-media { background: linear-gradient(140deg, #eef4fc, #fff7e6); padding: 1.4rem; }
.product-card-media img { width: 100%; max-height: 220px; object-fit: contain; }
.product-card-body { display: flex; flex-direction: column; flex: 1; padding: 1.4rem 1.5rem 1.5rem; }
.product-card-body h3 { margin-block-end: .3rem; }
.product-tagline { color: var(--ink-500); font-size: .93rem; }
.product-mini-specs { list-style: none; margin: .8rem 0 1.2rem; padding: 0; border-block-start: 1px dashed var(--ink-200); }
.product-mini-specs li { display: flex; justify-content: space-between; gap: 1rem; padding-block: .45rem; border-block-end: 1px dashed var(--ink-200); font-size: .88rem; }
.spec-label { color: var(--ink-500); }
.spec-value { font-weight: 600; color: var(--ink-900); font-variant-numeric: tabular-nums; }
.product-card-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-block-start: auto; }

.product-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.product-detail-media { background: linear-gradient(140deg, #eef4fc, #fff7e6); border-radius: var(--radius-lg); padding: 2rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }

.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { position: relative; padding-inline-start: 1.9rem; margin-block-end: .8rem; }
.check-list li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .62em;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent-500); box-shadow: 0 0 0 4px rgba(245, 158, 11, .2);
}

.spec-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.spec-table th, .spec-table td { padding: .75rem 1rem; text-align: start; border-block-end: 1px solid var(--ink-200); font-size: .92rem; }
.spec-table th { font-weight: 600; color: var(--ink-500); width: 52%; }
.spec-table td { font-weight: 600; color: var(--ink-900); font-variant-numeric: tabular-nums; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-block-end: 0; }

/* About ------------------------------------------------------------------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.value-list { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; list-style: none; margin: 0; padding: 0; }
.value-list-4 { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.value-list li { background: var(--surface); border: 1px solid var(--ink-200); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow-sm); }
.value-list h3 { font-size: 1.02rem; margin-block-end: .4rem; }
.value-list p { margin: 0; font-size: .92rem; color: var(--ink-500); }

/* Blog cards -------------------------------------------------------------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 1.6rem; }
.post-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--ink-200); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.post-card-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ink-100); }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.post-card:hover .post-card-media img { transform: scale(1.04); }
.post-card-placeholder { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #eef4fc, #fff7e6); }
.post-card-body { display: flex; flex-direction: column; flex: 1; padding: 1.2rem 1.4rem 1.4rem; }
.post-card-body h2, .post-card-body h3 { font-size: 1.12rem; margin-block: .4rem .5rem; }
.post-card-body h2 a, .post-card-body h3 a { color: var(--ink-900); }
.post-card-body h2 a:hover, .post-card-body h3 a:hover { color: var(--accent-600); }
.post-card-body p { font-size: .92rem; color: var(--ink-500); flex: 1; }
.post-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-block-start: .6rem; }
.read-more { display: inline-flex; align-items: center; min-height: 32px; font-weight: 600; font-size: .9rem; }
.comment-count { display: inline-flex; align-items: center; gap: .3rem; font-size: .85rem; color: var(--ink-500); }

.pagination { display: flex; justify-content: center; gap: .4rem; margin-block-start: 2.5rem; }
.pagination a {
  min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--ink-200); border-radius: var(--radius-sm); color: var(--ink-700); font-weight: 600;
}
.pagination a.active, .pagination a:hover { background: var(--brand-900); color: #fff; border-color: var(--brand-900); }

/* Article ----------------------------------------------------------------- */
.article-head { margin-block-end: 1.5rem; }
.article-cover { margin: 0 0 2rem; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.article-body { font-size: 1.04rem; }
.article-body h3 { margin-block-start: 2rem; }
.article-body h4 { margin-block-start: 1.6rem; }
.article-body ul { padding-inline-start: 1.4rem; }
.article-body li { margin-block-end: .4rem; }
.article-body code { background: var(--ink-100); padding: .1rem .35rem; border-radius: 4px; }

.gallery { margin-block-start: 3rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 1rem; }
.gallery-item { margin: 0; background: var(--surface); border: 1px solid var(--ink-200); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.gallery-item img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; transition: transform .3s ease; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item figcaption { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .6rem .8rem; font-size: .85rem; color: var(--ink-500); }

.image-view { margin: 0 0 2rem; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); background: var(--surface); }
.image-view figcaption { padding: .9rem 1.2rem; color: var(--ink-500); font-size: .92rem; }

/* Comments ---------------------------------------------------------------- */
.comments { margin-block-start: 3rem; padding-block-start: 2rem; border-block-start: 1px solid var(--ink-200); }
.badge-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 26px; padding-inline: .5rem;
  background: var(--ink-100); color: var(--ink-500);
  border-radius: 999px; font-size: .82rem; font-weight: 700;
}
.comment-list { list-style: none; margin: 0 0 2.5rem; padding: 0; }
.comment-item { display: flex; gap: 1rem; padding-block: 1.1rem; border-block-end: 1px solid var(--ink-200); }
.comment-avatar {
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand-700), var(--brand-600));
  color: #fff; font-weight: 700;
}
.comment-body { flex: 1; min-width: 0; }
.comment-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: .7rem; margin-block-end: .3rem; }
.comment-meta time { font-size: .82rem; color: var(--ink-500); }
.comment-body p { margin: 0; white-space: pre-wrap; word-break: break-word; }

.comment-form-wrap { background: var(--surface-alt); border: 1px solid var(--ink-200); border-radius: var(--radius-lg); padding: 1.6rem; }
.comment-form-wrap h3 { margin-block-end: .3rem; }
.form-hint { font-size: .88rem; margin-block-end: 1.2rem; }
.empty-state { padding-block: 1.5rem; }

/* Forms ------------------------------------------------------------------- */
.form { display: grid; gap: 1.1rem; }
.form.grid-2 { grid-template-columns: 1fr 1fr; }
.form.grid-3 { grid-template-columns: repeat(3, 1fr); }
.field { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: .9rem; font-weight: 600; color: var(--ink-900); }

input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
input[type="file"], select, textarea {
  width: 100%; padding: .7rem .9rem;
  font: inherit; font-size: .95rem; color: var(--ink-900);
  background: var(--surface);
  border: 1px solid var(--ink-300); border-radius: var(--radius-sm);
  transition: border-color .18s ease, box-shadow .18s ease;
}
textarea { resize: vertical; min-height: 110px; line-height: 1.7; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent-500);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .18);
}
input::placeholder, textarea::placeholder { color: var(--ink-300); }

.field-error { color: var(--red-500); font-size: .82rem; }
.form-actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.card-form { background: var(--surface); border: 1px solid var(--ink-200); border-radius: var(--radius-lg); padding: 1.8rem; box-shadow: var(--shadow-sm); }

.checkbox { display: inline-flex; align-items: center; gap: .5rem; font-weight: 500; cursor: pointer; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--accent-600); }

/* Hidden from people, still reachable by bots. Clipped rather than pushed
   off-screen, because a -9999px offset becomes +9999px under RTL and can
   create a horizontal scrollbar on narrow screens. */
.honeypot {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; white-space: nowrap; clip-path: inset(50%);
}

/* Alerts ------------------------------------------------------------------ */
.alert {
  display: flex; align-items: flex-start; gap: .7rem;
  padding: .9rem 1.1rem; margin-block-end: 1.5rem;
  border-radius: var(--radius); border: 1px solid transparent; font-size: .95rem;
}
.alert-success { background: #eaf7ef; border-color: #b7e2c6; color: #14663a; }
.alert-error { background: #fdecea; border-color: #f5c2bd; color: #a32218; }
.success-panel { align-items: center; }
.success-panel p { margin: 0; }
.tracking-code {
  display: inline-block; padding: .2rem .6rem; margin-inline-start: .3rem;
  background: #fff; border: 1px dashed #14663a; border-radius: 6px; font-weight: 700;
}

/* CTA band ---------------------------------------------------------------- */
.cta-band { background: linear-gradient(120deg, var(--brand-900), var(--brand-700)); color: #fff; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; padding-block: 3rem; }
.cta-band h2 { color: #fff; margin-block-end: .3rem; }
.cta-band p { margin: 0; color: rgba(255, 255, 255, .8); }

/* Contact ----------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { display: flex; flex-direction: column; gap: .15rem; padding-block: .9rem; border-block-end: 1px solid var(--ink-200); }
.contact-list span { font-size: .85rem; }
.contact-cta { background: var(--surface-alt); border: 1px solid var(--ink-200); border-radius: var(--radius-lg); padding: 1.8rem; }

/* Error page -------------------------------------------------------------- */
.error-page { padding-block: clamp(3rem, 8vw, 6rem); }
.error-code { font-family: var(--font-mono); font-size: clamp(3.5rem, 10vw, 6rem); font-weight: 600; color: var(--accent-500); line-height: 1; margin: 0; }

/* Footer ------------------------------------------------------------------ */
.site-footer { background: var(--brand-900); color: rgba(255, 255, 255, .78); margin-block-start: auto; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 2.5rem; padding-block: 3rem 2rem; }
.footer-brand { color: #fff; margin-block-end: 1rem; }
.footer-brand:hover { color: #fff; }
.footer-brand .brand-text strong { font-size: 1.05rem; }
.footer-about { font-size: .92rem; max-width: 340px; }
.site-footer h3 { color: #fff; font-size: 1rem; margin-block-end: .9rem; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { font-size: .92rem; }
/* Footer lists are a common mobile tap target - keep them finger-sized. */
.footer-links a {
  display: inline-flex; align-items: center;
  min-height: 38px; min-width: 44px;
  color: rgba(255, 255, 255, .78);
}
.footer-links li:not(:has(a)) { min-height: 38px; display: flex; align-items: center; }
.footer-links a:hover { color: var(--accent-400); }
.site-footer .muted { color: rgba(255, 255, 255, .5); }
.admin-link {
  display: inline-block; margin-block-start: 1rem; padding: .35rem .9rem;
  border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px;
  font-size: .82rem; color: rgba(255, 255, 255, .78);
}
.admin-link:hover { border-color: var(--accent-400); color: var(--accent-400); }
.footer-bottom { border-block-start: 1px solid rgba(255, 255, 255, .12); padding-block: 1.1rem; font-size: .85rem; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .hero-inner, .about-grid, .two-col, .product-detail-grid, .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-visual { order: -1; }
  .hero-visual img { max-width: 340px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .form.grid-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 780px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: fixed; inset-block-start: var(--header-h); inset-inline: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-block-end: 1px solid var(--ink-200);
    box-shadow: var(--shadow);
    padding: 1rem 20px 1.4rem;
    transform: translateY(-140%); opacity: 0; pointer-events: none;
    transition: transform .25s ease, opacity .2s ease;
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .primary-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .primary-nav li { border-block-end: 1px solid var(--ink-100); }
  .primary-nav a { display: block; padding-block: .8rem; }
  .primary-nav a.active::after { display: none; }
  .nav-actions { margin-block-start: 1rem; justify-content: space-between; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 1.4rem; }
  .form.grid-2, .form.grid-3 { grid-template-columns: 1fr; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 540px) {
  body { font-size: 15.5px; }
  .container { padding-inline: 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .card-form, .comment-form-wrap { padding: 1.2rem; }
  .brand-text small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header, .site-footer, .comment-form-wrap, .btn { display: none !important; }
}

/* ==========================================================================
   Draft preview banner - only an administrator ever sees this
   ========================================================================== */
.draft-banner {
  display: flex; align-items: center; gap: .6rem;
  margin-block: 1.2rem;
  padding: .85rem 1.1rem;
  background: var(--accent-soft);
  border: 1px solid rgba(245, 158, 11, .45);
  border-inline-start: 4px solid var(--accent-500);
  border-radius: var(--radius);
  color: #8a5300; font-size: .92rem; font-weight: 500;
}
.draft-banner svg { flex: none; }

/* ==========================================================================
   Uploaded brand logo - sized so any aspect ratio behaves in the header
   ========================================================================== */
.brand-logo {
  height: 40px; width: auto;
  max-width: 190px; object-fit: contain;
  flex: none;
}
.site-footer .brand-logo { height: 34px; max-width: 170px; }

@media (max-width: 540px) {
  .brand-logo { height: 34px; max-width: 150px; }
}
