/* ============================================================
   CMS components — product detail, content blocks, blog.
   Extends the existing design tokens from main.css.
   ============================================================ */

/* ---------- Logo images ---------- */
.nav-logo-img { height: 60px; width: auto; display: block; }
.footer-logo-img { height: 65px; width: auto; display: block; margin-bottom: .5rem; }

.wrap-narrow { max-width: 780px; margin-left: auto; margin-right: auto; }

.page-header-count {
  display: inline-block; margin-top: 1rem; padding: .4rem .9rem;
  background: rgba(255,255,255,.12); color: #fff; border-radius: 40px;
  font-size: .82rem; font-weight: 600;
}

/* ---------- Product detail ---------- */
.pd-hero {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start;
  margin-bottom: 2.5rem;
}
.pd-media {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 1.25rem; box-shadow: var(--sh-sm);
}
.pd-media img { width: 100%; aspect-ratio: 4/3; object-fit: contain; border-radius: var(--r-sm); }
.pd-meta { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; flex-wrap: wrap; }
.pd-brand { font-size: .85rem; font-weight: 600; color: var(--ink-3); }
.pd-lead { font-size: 1.08rem; color: var(--ink-2); line-height: 1.7; margin: 0 0 1.25rem; }
.pd-reg {
  display: inline-flex; align-items: center; gap: .5rem; margin-bottom: 1.25rem;
  padding: .5rem .9rem; background: var(--green-bg); border-radius: var(--r-sm);
  font-size: .85rem; color: #065F46;
}
.pd-reg strong { font-weight: 700; }
.pd-quickspec { margin: 0 0 1.5rem; }
.pd-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

.pd-body { max-width: 760px; }
.pd-related-title { margin-bottom: 1.5rem; }

/* ---------- Content blocks ---------- */
.blk { margin: 1.5rem 0; }
.blk-rich { color: var(--ink-2); line-height: 1.75; }
.blk-rich p { margin: 0 0 1rem; }
.blk-rich h3, .blk-rich h4 { color: var(--ink); margin: 1.5rem 0 .5rem; }
.blk-rich ul, .blk-rich ol { padding-left: 1.25rem; margin: 0 0 1rem; color: var(--ink-2); }
.blk-rich li { margin: .3rem 0; }
.blk-rich a { color: var(--blue); }
.blk-heading { font-size: 1.4rem; color: var(--ink); margin: 2rem 0 .75rem; }
.blk-title { font-size: 1.1rem; color: var(--ink); margin: 0 0 .75rem; }

.spec-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.spec-table th, .spec-table td {
  text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--border-lt);
  vertical-align: top;
}
.spec-table th { width: 40%; color: var(--ink-3); font-weight: 600; background: var(--surface); }
.spec-table td { color: var(--ink); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: none; }
.blk-spec, .blk-compare {
  border: 1px solid var(--border); border-radius: var(--r); overflow: hidden;
  background: var(--white);
}
.blk-spec .blk-title, .blk-compare .blk-title { padding: .9rem 1rem 0; }

.table-scroll { overflow-x: auto; }
.compare-table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 480px; }
.compare-table th, .compare-table td {
  padding: .7rem .9rem; border-bottom: 1px solid var(--border-lt); text-align: left;
}
.compare-table thead th { background: var(--surface); color: var(--ink); font-weight: 700; }

.blk-image { margin: 1.5rem 0; }
.blk-image img { width: 100%; border-radius: var(--r); border: 1px solid var(--border); }
.blk-image figcaption { margin-top: .5rem; font-size: .85rem; color: var(--ink-3); text-align: center; }

.blk-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .75rem; }
.blk-gallery img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--r-sm);
  border: 1px solid var(--border);
}

.blk-features { list-style: none; padding: 0; display: grid; gap: .6rem; }
.blk-features li { display: flex; align-items: flex-start; gap: .6rem; color: var(--ink-2); }
.blk-features i { color: var(--green); margin-top: .25rem; }

.blk-callout {
  display: flex; gap: .9rem; padding: 1rem 1.15rem; border-radius: var(--r);
  border: 1px solid var(--border);
}
.blk-callout i { flex: none; margin-top: .15rem; }
.blk-callout p { margin: .15rem 0 0; color: var(--ink-2); }
.blk-callout-info { background: var(--blue-bg); border-color: var(--blue-bg2); }
.blk-callout-info i { color: var(--blue); }
.blk-callout-warning { background: var(--gold-bg); border-color: #FDE68A; }
.blk-callout-warning i { color: var(--gold); }

.blk-downloads ul { list-style: none; padding: 0; display: grid; gap: .5rem; }
.blk-downloads a {
  display: inline-flex; align-items: center; gap: .5rem; color: var(--blue);
  font-weight: 600; text-decoration: none;
}
.blk-downloads i { color: var(--red); }

.blk-video .video-frame { position: relative; padding-top: 56.25%; border-radius: var(--r); overflow: hidden; }
.blk-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Blog ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.post-card {
  display: flex; flex-direction: column; background: var(--white);
  border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden;
  text-decoration: none; box-shadow: var(--sh-xs); transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); }
.post-card-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.post-card-body { padding: 1.25rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.post-card-tags { display: flex; gap: .4rem; flex-wrap: wrap; }
.post-card-tags span {
  font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  color: var(--blue); background: var(--blue-bg); padding: .2rem .55rem; border-radius: 30px;
}
.post-card-title { font-size: 1.1rem; font-weight: 700; color: var(--ink); line-height: 1.3; }
.post-card-excerpt { font-size: .9rem; color: var(--ink-3); line-height: 1.6; flex: 1; }
.post-card-date { font-size: .8rem; color: var(--ink-4); font-weight: 600; }

.blog-empty { text-align: center; padding: 4rem 1rem; color: var(--ink-4); }
.blog-empty i { font-size: 2.5rem; margin-bottom: 1rem; color: var(--border); display: block; }

.post-byline { margin-top: .75rem; color: rgba(255,255,255,.75); font-size: .9rem; font-weight: 500; }
.post-cover { width: 100%; border-radius: var(--r-lg); margin-bottom: 2rem; border: 1px solid var(--border); }
.post-body { color: var(--ink-2); line-height: 1.8; font-size: 1.05rem; }
.post-body .blk-rich p { margin: 0 0 1.25rem; }

/* ---------- Certifications / team / contact (generated pages) ---------- */
.cert-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem;
}
.cert-item {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--r);
  padding: 1.25rem; text-align: center; box-shadow: var(--sh-xs);
}
.cert-name { font-size: 1.3rem; font-weight: 800; color: var(--blue); }
.cert-label { font-size: .8rem; color: var(--ink-3); margin-top: .25rem; }

.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.5rem; }
.team-card { text-align: center; }
.team-card img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin-bottom: .75rem; }
.team-name { font-weight: 700; color: var(--ink); }
.team-role { font-size: .85rem; color: var(--ink-3); }

.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 2.5rem; align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: 1.25rem; }
.contact-item { display: flex; gap: .9rem; align-items: flex-start; }
.contact-item i { flex: none; width: 38px; height: 38px; display: grid; place-items: center;
  background: var(--blue-bg); color: var(--blue); border-radius: var(--r-sm); }
.contact-item strong { display: block; color: var(--ink); font-size: .9rem; }
.contact-item span, .contact-item a { color: var(--ink-3); font-size: .92rem; text-decoration: none; }
.contact-form {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 1.75rem; box-shadow: var(--sh-sm); display: flex; flex-direction: column; gap: 1rem;
}
.form-row label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.form-row input, .form-row textarea {
  width: 100%; margin-top: .35rem; padding: .7rem .8rem; border: 1px solid var(--border);
  border-radius: var(--r-sm); font: inherit; font-size: .95rem; background: var(--surface);
}
.form-row input:focus, .form-row textarea:focus { outline: 2px solid var(--blue); border-color: var(--blue); }
.form-msg { display: none; align-items: center; gap: .5rem; padding: .75rem 1rem; border-radius: var(--r-sm); font-size: .9rem; }
.form-msg.success { background: var(--green-bg); color: #065F46; }
.form-msg.error { background: var(--red-bg); color: #991B1B; }

/* ---------- Product tabs "view all" ---------- */
.prod-panel-more { text-align: center; margin-top: 1.75rem; }

/* pending badge (if not in main.css) */
.pg-badge-pending { background: var(--surface-2); color: var(--ink-3); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .pd-hero { grid-template-columns: 1fr; gap: 1.5rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 1.75rem; }
}
