/*
 * QINFENG FIBC Theme — product templates
 * (archive-fibc_product.php and single-fibc_product.php).
 *
 * Every selector below is prefixed .fp- and belongs to those two templates only.
 * Shared classes (.container, .button, .eyebrow, .arrow, .trust-pill) come from
 * style.css; they are only adjusted inside an .fp- scope, never redefined.
 * Tokens come from assets/css/tokens.css. No JavaScript, no external assets.
 */

/* Layout ------------------------------------------------------------------ */
.fp-archive,
.fp-single { display: block; }

.fp-section { padding: 72px 0; }
.fp-section-white { background: var(--white); }
.fp-section-soft {
  background: #fbfcfb;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.fp-section-cta { background: var(--bg); padding: 64px 0 88px; }

/* Archive page head and single hero --------------------------------------- */
.fp-hero {
  background: linear-gradient(180deg, var(--white) 0%, #f4f6f3 100%);
  border-bottom: 1px solid var(--border);
  padding: 60px 0 54px;
}
.fp-hero-single { padding: 52px 0 64px; }
.fp-hero-inner { max-width: 880px; }
.fp-hero-text { min-width: 0; }
.fp-hero-grid {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 48px;
  align-items: center;
}
.fp-hero-title {
  margin: 0 0 18px;
  font-size: clamp(34px, 4.2vw, 52px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.035em;
  color: var(--ink);
}
.fp-hero-lead {
  margin: 0;
  max-width: 68ch;
  font-size: 17px;
  line-height: 1.65;
  color: var(--slate);
}
.fp-hero-terms { margin: 22px 0 0; }
.fp-hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

/* Image slots ------------------------------------------------------------- */
.fp-media {
  position: relative;
  overflow: hidden;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.fp-media-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fp-size-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(18, 21, 28, .82);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  pointer-events: none;
}
.fp-card-media {
  aspect-ratio: 10 / 7;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
}
.fp-hero-media .fp-media {
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.fp-gallery .fp-media { aspect-ratio: 4 / 3; }

/* Application terms ------------------------------------------------------- */
.fp-term-list,
.fp-filter-terms,
.fp-card-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.fp-term-list li,
.fp-filter-terms li,
.fp-card-terms li { margin: 0; list-style: none; }
.fp-term { display: inline-flex; }
.fp-term-link {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border: 1px solid rgba(104, 190, 70, .35);
  border-radius: var(--radius-full);
  background: var(--tint);
  color: var(--action);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.6;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.fp-term-link:hover { background: var(--brand); border-color: var(--brand); color: var(--ink); }

/* Application filter strip (archive) -------------------------------------- */
.fp-filter { background: var(--white); border-bottom: 1px solid var(--border); padding: 20px 0; }
.fp-filter-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.fp-filter-title {
  margin: 0;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--slate);
}

/* Product card grid (archive) --------------------------------------------- */
.fp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.fp-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.fp-card:hover {
  transform: translateY(-4px);
  border-color: rgba(104, 190, 70, .8);
  box-shadow: var(--shadow-md);
}
.fp-card-body { display: flex; flex-direction: column; gap: 12px; flex: 1; padding: 22px 22px 24px; }
.fp-card-title { margin: 0; font-size: 19px; font-weight: 800; line-height: 1.25; letter-spacing: -.02em; }
.fp-card-title a { color: var(--ink); transition: color .2s ease; }
.fp-card-title a:hover { color: var(--action); }
.fp-card-text { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--slate); }
.fp-card-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 0;
  padding: 12px 0 0;
  border-top: 1px dashed var(--border);
  list-style: none;
}
.fp-card-spec {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  margin: 0;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ink);
}
.fp-card-specs li + li::before { content: "·"; margin-right: 4px; color: var(--border); font-weight: 700; }
.fp-spec-key { color: var(--slate); font-weight: 600; }
.fp-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
  font-size: 13px;
  font-weight: 750;
  color: var(--action);
}
.fp-card-cta:hover { color: var(--action-hover); }

/* Honest empty state (archive) -------------------------------------------- */
.fp-empty {
  max-width: 720px;
  margin: 0 auto;
  padding: 54px 32px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--white);
  text-align: center;
}
.fp-empty-title {
  margin: 0 0 12px;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.03em;
  color: var(--ink);
}
.fp-empty-text {
  max-width: 54ch;
  margin: 0 auto 26px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--slate);
}

/* Breadcrumb (single) ----------------------------------------------------- */
.fp-breadcrumb { background: var(--white); border-bottom: 1px solid var(--border); padding: 13px 0; }
.fp-breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12.5px;
  color: var(--slate);
}
.fp-breadcrumb-list li { display: inline-flex; align-items: center; gap: 8px; margin: 0; list-style: none; }
.fp-breadcrumb-item + .fp-breadcrumb-item::before { content: "→"; color: var(--brand); font-weight: 700; }
.fp-breadcrumb-link { color: var(--slate); font-weight: 600; }
.fp-breadcrumb-link:hover { color: var(--action); }
.fp-breadcrumb-current { color: var(--ink); font-weight: 700; }

/* Password gate on a protected product ------------------------------------ */
.fp-password { max-width: 560px; padding: 72px 0 96px; }
.fp-password-title {
  margin: 0 0 18px;
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.03em;
  color: var(--ink);
}
.fp-password p { font-size: 15px; line-height: 1.65; color: var(--slate); }
.fp-password label { display: block; margin-bottom: 8px; font-size: 13.5px; font-weight: 650; color: var(--ink); }
.fp-password input[type="password"] {
  width: 100%;
  max-width: 320px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}
.fp-password input[type="submit"] {
  min-height: 46px;
  padding: 0 24px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--action);
  color: var(--white);
  font: inherit;
  font-size: 14.5px;
  font-weight: 650;
  cursor: pointer;
  transition: background-color .2s ease;
}
.fp-password input[type="submit"]:hover { background: var(--action-hover); }

/* Content blocks, prose and lists (single) -------------------------------- */
.fp-block-title {
  margin: 0 0 22px;
  font-size: clamp(23px, 2.6vw, 32px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -.03em;
  color: var(--ink);
}
.fp-panel {
  padding: 28px 30px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.fp-panel > p { margin: 0; font-size: 15px; line-height: 1.7; color: var(--slate); }
.fp-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.fp-split .fp-block-title { margin-bottom: 16px; font-size: clamp(20px, 2.2vw, 26px); }

.fp-prose { max-width: 78ch; font-size: 16px; line-height: 1.75; color: var(--slate); }
.fp-prose p { margin: 0 0 18px; }
.fp-prose p:last-child { margin-bottom: 0; }
.fp-prose h2,
.fp-prose h3,
.fp-prose h4 { margin: 26px 0 12px; color: var(--ink); font-weight: 800; line-height: 1.3; letter-spacing: -.02em; }
.fp-prose h2 { font-size: 24px; }
.fp-prose h3 { font-size: 19px; }
.fp-prose h4 { font-size: 16px; }
.fp-prose ul,
.fp-prose ol { margin: 0 0 18px; padding-left: 22px; }
.fp-prose li { margin-bottom: 8px; }
.fp-prose strong { color: var(--ink); }
.fp-prose a { color: var(--action); text-decoration: underline; }
.fp-prose img { height: auto; border-radius: var(--radius-md); }

.fp-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.fp-list li {
  position: relative;
  margin: 0;
  padding-left: 24px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink);
}
.fp-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
}

/* Specification table (single) -------------------------------------------- */
.fp-table-panel { padding: 6px 0; overflow: hidden; }
.fp-spec-table { width: 100%; border-collapse: collapse; }
.fp-spec-table th,
.fp-spec-table td {
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.fp-spec-table tr:last-child th,
.fp-spec-table tr:last-child td { border-bottom: 0; }
.fp-spec-table .fp-spec-key {
  width: 38%;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--slate);
}
.fp-spec-table td.fp-spec-value { font-size: 14.5px; line-height: 1.65; color: var(--ink); }

/* Gallery (single) -------------------------------------------------------- */
.fp-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.fp-gallery-item { margin: 0; }

/* Related case studies (single) ------------------------------------------- */
.fp-case-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.fp-case-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px 26px 24px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.fp-case-card:hover {
  transform: translateY(-3px);
  border-color: rgba(104, 190, 70, .8);
  box-shadow: var(--shadow-sm);
}
.fp-case-title { margin: 0; font-size: 18px; font-weight: 800; line-height: 1.3; letter-spacing: -.02em; }
.fp-case-title a { color: var(--ink); transition: color .2s ease; }
.fp-case-title a:hover { color: var(--action); }
.fp-case-text { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--slate); }

/* Closing call to action (single) ----------------------------------------- */
.fp-cta {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px;
  align-items: center;
  overflow: hidden;
  padding: 52px 56px;
  border-radius: var(--radius-lg);
  background: var(--brand);
}
.fp-cta::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -140px;
  width: 340px;
  height: 340px;
  border: 1px solid rgba(18, 21, 28, .16);
  border-radius: 50%;
  box-shadow: 0 0 0 46px rgba(18, 21, 28, .04), 0 0 0 92px rgba(18, 21, 28, .025);
  pointer-events: none;
}
.fp-cta > * { position: relative; z-index: 1; }
.fp-cta-title {
  margin: 0 0 12px;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.03em;
  color: var(--ink);
}
.fp-cta-text p { max-width: 62ch; margin: 0; font-size: 16px; line-height: 1.6; color: rgba(18, 21, 28, .78); }
.fp-cta-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.fp-cta .button { min-height: 54px; padding: 0 32px; background: var(--ink); color: var(--white); font-size: 15px; }
.fp-cta .button:hover { background: #000000; color: var(--white); }

/* Responsive -------------------------------------------------------------- */
@media (max-width: 1024px) {
  .fp-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .fp-hero-inner { max-width: none; }
  .fp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fp-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fp-case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fp-split { grid-template-columns: minmax(0, 1fr); }
  .fp-filter-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .fp-cta { grid-template-columns: minmax(0, 1fr); padding: 44px 36px; }
}

@media (max-width: 640px) {
  .fp-section { padding: 52px 0; }
  .fp-section-cta { padding: 44px 0 60px; }
  .fp-hero,
  .fp-hero-single { padding: 42px 0 38px; }
  .fp-hero-title { font-size: 30px; }
  .fp-hero-lead { font-size: 16px; }
  .fp-hero-actions .button { width: 100%; }
  .fp-grid,
  .fp-gallery,
  .fp-case-grid { grid-template-columns: minmax(0, 1fr); }
  .fp-card-body { padding: 20px 20px 22px; }
  .fp-panel { padding: 22px 20px; }
  .fp-spec-table th,
  .fp-spec-table td { padding: 13px 18px; }
  .fp-spec-table .fp-spec-key { width: 44%; }
  .fp-empty { padding: 38px 22px; }
  .fp-cta { padding: 32px 22px; }
  .fp-cta .button { width: 100%; }
  .fp-password { padding: 48px 0 64px; }
}