/**
 * sinopak/fg-hero block styles
 *
 * Prototype: 5-gallon-water-filling-machine-static/index.html —
 * .breadcrumb-band / .breadcrumb / .hero / .product-hero / .gallery /
 * .main-media / .thumbs / .thumb / .product-copy / .subtitle / .intro /
 * .product-summary / .summary-item / .hero-actions. All colours, gradients,
 * radii and shadows are literal copies from that stylesheet.
 *
 * The section is the first block of the product single and the site header is
 * position:fixed, so the root reserves exactly one header height
 * (--spk-x-header-h, declared in blocks/style-index.css :root; it becomes
 * 76px below 1180px).
 *
 * Shared primitives (.spk-x-fg-shell / .spk-x-fg-label / .spk-x-fg-cta) are
 * owned by the spk-base段 in style-index.css — only scoped tweaks here.
 *
 * Breakpoints: 1180px / 760px (prototype values).
 */
@layer spk-block {
  .spk-x-fg-hero {
    background: #fff;
    padding-top: var(--spk-x-header-h, 72px);
    color: #142231;
    font-family: var(--wp--preset--font-family--primary, "Helvetica Neue", Arial, sans-serif);
  }

  /* ── .breadcrumb-band / .breadcrumb ─────────────────────────────────── */
  .spk-x-fg-hero__crumb-band {
    border-bottom: 1px solid #dce7ee;
    background: #fff;
  }
  .spk-x-fg-hero__breadcrumb {
    min-height: 54px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    color: #6f7e8b;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }
  .spk-x-fg-hero__breadcrumb a {
    color: #062b5c;
  }

  /* ── .hero band ─────────────────────────────────────────────────────── */
  .spk-x-fg-hero__band {
    padding: clamp(30px, 3.6vw, 46px) 0 clamp(48px, 4.6vw, 64px);
    background:
      radial-gradient(circle at 100% 5%, rgba(8, 168, 210, 0.14), transparent 36%),
      linear-gradient(180deg, #f9fcfe 0%, #eef6fb 100%);
  }
  .spk-x-fg-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.76fr);
    gap: clamp(26px, 4vw, 52px);
    align-items: stretch;
  }

  /* ── .gallery ───────────────────────────────────────────────────────── */
  .spk-x-fg-hero__gallery {
    display: grid;
    grid-template-rows: auto auto;
    gap: 14px;
    align-content: space-between;
    padding-bottom: clamp(18px, 2.2vw, 30px);
  }
  .spk-x-fg-hero__main {
    position: relative;
    overflow: hidden;
    height: clamp(380px, 28vw, 405px);
    min-height: 380px;
    border: 1px solid #dce7ee;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.1);
  }
  /* contain,不用 cover:这是产品单页的主图(render.php 的 [data-spk-fg-main]),
     盒高被 clamp(380px,28vw,405px) 固定,而机型源图是 4:3(如 qgf-main.webp
     2560×1920)—— 在 ~660×405 的盒子里 cover 会上下各裁掉约 45px(机器顶/底座
     被切)。留白沿用 __main 已有的白底,不新增底色。 */
  .spk-x-fg-hero__main img {
    width: 100%;
    height: 100%;
    min-height: 380px;
    object-fit: contain;
    object-position: center center;
  }
  .spk-x-fg-hero__thumbs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }
  .spk-x-fg-hero__thumb {
    overflow: hidden;
    height: 76px;
    border: 1px solid #dce7ee;
    border-radius: 12px;
    background: #fff;
    padding: 0;
    opacity: 0.74;
    cursor: pointer;
    transition: border-color 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
  }
  /* 缩略图与主图同口径:156×76 的盒子对 4:3 源图,cover 会裁掉约 35% 的高度,
     和 contain 的主图对不上 —— 点缩略图换主图时画面会"跳"。留白沿用 __thumb
     已有的白底。 */
  .spk-x-fg-hero__thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
  }
  .spk-x-fg-hero__thumb.spk-x-active {
    border-color: #f28a2e;
    opacity: 1;
    transform: none;
  }

  /* ── .product-copy ──────────────────────────────────────────────────── */
  .spk-x-fg-hero__copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(10px, 1.2vw, 16px) 0 clamp(18px, 2.2vw, 30px);
  }
  .spk-x-fg-hero__title {
    margin: 0;
    color: #062b5c;
    font-size: clamp(40px, 4.4vw, 58px);
    line-height: 0.98;
    letter-spacing: -0.06em;
    font-weight: 900;
  }
  .spk-x-fg-hero__subtitle {
    margin: 17px 0 0;
    color: #142231;
    font-size: clamp(19px, 1.8vw, 24px);
    line-height: 1.2;
    letter-spacing: -0.035em;
    font-weight: 850;
  }
  .spk-x-fg-hero__intro {
    margin: 14px 0 0;
    color: #657482;
    font-size: 15.5px;
    line-height: 1.52;
  }

  /* ── .product-summary ───────────────────────────────────────────────── */
  .spk-x-fg-hero__summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 24px;
    margin: 16px 0 18px;
    padding: 10px 0;
    border-top: 1px solid #dce7ee;
    border-bottom: 1px solid #dce7ee;
  }
  .spk-x-fg-hero__summary-item {
    min-height: 0;
    padding: 0;
    border-right: 0;
    background: transparent;
  }
  .spk-x-fg-hero__summary-item span {
    display: block;
    margin-bottom: 5px;
    color: #f28a2e;
    font-size: 9.5px;
    font-weight: 950;
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }
  .spk-x-fg-hero__summary-item strong {
    display: block;
    color: #062b5c;
    font-size: 17px;
    line-height: 1.08;
  }

  /* ── .hero-actions ──────────────────────────────────────────────────── */
  .spk-x-fg-hero__actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    align-items: center;
  }
  .spk-x-fg-hero__actions .spk-x-fg-cta {
    flex: 1 1 0;
    min-width: 0;
    padding-inline: 18px;
    white-space: nowrap;
  }
}

@layer spk-responsive {
  @media (max-width: 1180px) {
    .spk-x-fg-hero__grid {
      grid-template-columns: 1fr;
    }
  }

  @media (max-width: 760px) {
    .spk-x-fg-hero__band {
      padding-top: 32px;
    }
    .spk-x-fg-hero__gallery {
      align-content: start;
      padding-bottom: 0;
    }
    .spk-x-fg-hero__main,
    .spk-x-fg-hero__main img {
      min-height: 310px;
    }
    .spk-x-fg-hero__thumbs {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .spk-x-fg-hero__actions {
      flex-wrap: wrap;
    }
    .spk-x-fg-hero__actions .spk-x-fg-cta {
      flex-basis: 100%;
    }
    .spk-x-fg-hero__summary {
      display: grid;
      grid-template-columns: 1fr;
      padding: 0;
      border: 1px solid #dce7ee;
      border-radius: 14px;
    }
    .spk-x-fg-hero__summary-item {
      padding: 16px;
      border-right: 0;
      border-bottom: 1px solid #dce7ee;
    }
    .spk-x-fg-hero__summary-item:first-child {
      padding-left: 16px;
    }
    .spk-x-fg-hero__summary-item:last-child {
      border-bottom: 0;
      padding-right: 16px;
    }
  }
}
