/* =====================================================================
   Hello Custom Boxes — Product Page Stylesheet (LAYOUT + SECTIONS)
   Path: /wp-content/themes/astra-child/assets/css/hcb-product-page.css
   Forms have their own stylesheet (hcb-forms.css) loaded after this one.
   ===================================================================== */

.hcb-product-page {
  --hcb-primary:    #005e9e;
  --hcb-secondary:  #0078c1;
  --hcb-dark:       #1a1a1a;
  --hcb-white:      #ffffff;
  --hcb-light:      #f5f9fc;
  --hcb-blue-soft:  #e5f5ff;
  --hcb-border:     #e7e7e7;
  --hcb-shadow:     0 18px 45px rgba(0, 94, 158, 0.12);

  font-family: "Jost", "Poppins", Arial, sans-serif;
  color: var(--hcb-dark);
  background: #fff;
  overflow-x: hidden;
}

.hcb-product-page *,
.hcb-product-page *::before,
.hcb-product-page *::after { box-sizing: border-box; }

.hcb-product-page img {
  display: block;
  max-width: 100%;
  height: auto;
}

.hcb-product-page a { color: inherit; text-decoration: none; }

.hcb-product-page h1,
.hcb-product-page h2,
.hcb-product-page h3,
.hcb-product-page h4,
.hcb-product-page p { margin: 0; }

.hcb-product-container {
  width: min(1240px, calc(100% - 32px));
  margin-inline: auto;
}

/* ---------- Breadcrumbs ---------- */
.hcb-product-breadcrumb-section {
  padding: 18px 0;
  background: var(--hcb-light);
}
.hcb-product-breadcrumb {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  color: #555; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em;
}
.hcb-product-breadcrumb a { color: var(--hcb-primary); font-weight: 700; }

/* =====================================================================
   HERO
   ===================================================================== */
.hcb-product-hero {
  padding: 16px 0 60px;
  background:
    radial-gradient(circle at 100% 0%, rgba(0,120,193,.10), transparent 38%),
    radial-gradient(circle at 0% 110%, rgba(0,94,158,.08), transparent 42%),
    linear-gradient(180deg, #ffffff 0%, #f5f9fc 100%);
}

/* ---- Hero header (above the image) ---- */
.hcb-product-hero-header {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(0,94,158,.10);
}

.hcb-product-hero-header-text { display: grid; gap: 14px; }

.hcb-product-kicker {
  display: inline-flex; width: fit-content;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(0,94,158,.10);
  color: var(--hcb-primary);
  font-size: 12px;
  letter-spacing: 0.06em;
  line-height: 1;
  font-weight: 800;
  text-transform: uppercase;
}

.hcb-product-hero-header h1 {
  color: var(--hcb-primary);
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.hcb-product-short,
.hcb-product-short p,
.hcb-product-short-fallback {
  color: #444;
  font-size: 16px;
  line-height: 1.7;
  margin: 0;
}
.hcb-product-short p + p { margin-top: 8px; }

.hcb-product-hero-header-meta {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.hcb-product-rating-row {
  display: inline-flex; flex-wrap: wrap; gap: 9px; align-items: center;
  padding: 10px 16px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0,94,158,.10);
  color: #444; font-size: 14px;
}
.hcb-stars { color: #eab308; letter-spacing: 2px; font-weight: 900; }
.hcb-product-rating-row a {
  color: var(--hcb-primary); font-weight: 700; text-decoration: underline;
}

.hcb-product-sku { color: #666; font-size: 13px; }

/* ---- Image + Form side-by-side ---- */
.hcb-product-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.hcb-product-gallery-card {
  border: 1px solid var(--hcb-border);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--hcb-shadow);
  padding: 18px;
  position: sticky;
  top: 24px;
}

/* ---- Product gallery (Swiper) — locks min-height so portrait images don't collapse ---- */
.hcb-product-main-swiper {
  width: 100%;
  overflow: hidden;
  border-radius: 20px;
  background: var(--hcb-blue-soft);
}
.hcb-product-main-image {
  display: grid;
  width: 100%;
  min-height: 460px;
  place-items: center;
  padding: 18px;
  background: var(--hcb-blue-soft);
}
.hcb-product-main-image img {
  width: 100%;
  max-height: 440px;
  object-fit: contain;
}
.hcb-product-main-swiper .swiper-button-next,
.hcb-product-main-swiper .swiper-button-prev {
  width: 42px; height: 42px;
  border-radius: 999px;
  background: #fff;
  color: var(--hcb-primary);
  box-shadow: 0 8px 20px rgba(0,94,158,.18);
}
.hcb-product-main-swiper .swiper-button-next::after,
.hcb-product-main-swiper .swiper-button-prev::after {
  font-size: 16px; font-weight: 900;
}

.hcb-product-thumb-swiper { margin-top: 14px; padding-bottom: 4px; }
.hcb-product-thumb-image {
  display: grid;
  height: 86px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--hcb-border);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
}
.hcb-product-thumb-image img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 6px;
}

/* Form column sits next to gallery */
.hcb-product-form-area {
  min-width: 0;
}

/* ---- Trust grid (full width below) ---- */
.hcb-product-trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 36px;
}
.hcb-product-trust-grid > div {
  padding: 16px 18px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--hcb-border);
  box-shadow: 0 8px 22px rgba(0,94,158,.06);
}
.hcb-product-trust-grid strong,
.hcb-product-trust-grid span { display: block; }
.hcb-product-trust-grid strong { color: var(--hcb-primary); font-size: 15px; }
.hcb-product-trust-grid span { margin-top: 4px; color: #555; font-size: 13px; }

/* =====================================================================
   SECTIONS
   ===================================================================== */
.hcb-product-details-section,
.hcb-product-options-section,
.hcb-product-process-section,
.hcb-product-related-section,
.hcb-product-bottom-cta { padding: 56px 0; }

.hcb-product-details-section { background: var(--hcb-light); }
.hcb-product-options-section { background: #fff; }
.hcb-product-process-section { background: var(--hcb-light); }
.hcb-product-related-section { background: #fff; }
.hcb-product-bottom-cta      { background: #fff; }

.hcb-product-section-head {
  max-width: 820px; margin: 0 auto 30px; text-align: center;
}
.hcb-product-section-head h2,
.hcb-product-bottom-cta h2 {
  color: var(--hcb-primary);
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.18; font-weight: 700;
}
.hcb-product-section-head p,
.hcb-product-bottom-cta p {
  color: #555; font-size: 16px; line-height: 1.7;
}

.hcb-product-tabs {
  border-radius: 24px; background: #fff;
  box-shadow: var(--hcb-shadow);
}
.hcb-product-content-card {
  padding: 28px; color: #333;
  font-size: 16px; line-height: 1.8;
  padding-top: 0px;
}
.hcb-product-content-card h2,
.hcb-product-content-card h3,
.hcb-product-content-card h4 {
  margin-top: 22px; margin-bottom: 12px; color: var(--hcb-primary);
}
.hcb-product-content-card p { margin-top: 12px; }
.hcb-product-content-card ul,
.hcb-product-content-card ol { margin: 16px 0 0 24px; }

.hcb-product-tab-buttons,
.hcb-option-buttons {
  display: flex; flex-wrap: wrap; gap: 10px;
  border-bottom: 1px solid var(--hcb-border);
  margin: 0 0 22px;
  padding: 18px 22px 0;
}
.hcb-option-buttons { padding: 0; margin-bottom: 22px; }

.hcb-product-tab-buttons button,
.hcb-option-buttons button {
  position: relative; padding: 13px 16px;
  border: 0; background: transparent;
  color: #555; font-weight: 800; cursor: pointer;
  font-size: 15px;
}
.hcb-product-tab-buttons button.is-active,
.hcb-option-buttons button.is-active { color: var(--hcb-primary); }
.hcb-product-tab-buttons button.is-active::after,
.hcb-option-buttons button.is-active::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: -1px;
  height: 3px; background: var(--hcb-primary); border-radius: 999px;
}

.hcb-product-tab-panel,
.hcb-option-panel { display: none; }
.hcb-product-tab-panel.is-active,
.hcb-option-panel.is-active { display: block; }

/* ---- Specs default grid ---- */
.hcb-product-spec-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
}
.hcb-product-spec-grid div {
  padding: 16px; border: 1px solid var(--hcb-border);
  border-radius: 16px; background: var(--hcb-light);
}
.hcb-product-spec-grid strong,
.hcb-product-spec-grid span { display: block; }
.hcb-product-spec-grid strong { color: var(--hcb-primary); }
.hcb-product-spec-grid span { margin-top: 5px; color: #555; }

/* ---- FAQs ---- */
.hcb-product-faqs { display: grid; gap: 14px; }
.hcb-product-faq-item {
  overflow: hidden;
  border: 1px solid var(--hcb-border);
  border-radius: 18px;
  background: #fff;
}
.hcb-product-faq-question {
  width: 100%;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
  padding: 17px 20px; border: 0;
  background: var(--hcb-light);
  color: #222; font-size: 16px; font-weight: 850;
  text-align: left; cursor: pointer;
}
.hcb-product-faq-item.active .hcb-product-faq-question {
  background: var(--hcb-primary); color: #fff;
}
.hcb-product-faq-icon {
  color: var(--hcb-primary); font-size: 22px; font-weight: 900;
}
.hcb-product-faq-item.active .hcb-product-faq-icon { color: #fff; }
.hcb-product-faq-answer {
  display: none;
  padding: 18px 20px;
  color: #555; font-size: 15px; line-height: 1.7;
}
.hcb-product-faq-item.active .hcb-product-faq-answer { display: block; }

/* ---- Option grid ---- */
.hcb-option-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.hcb-option-grid article {
  overflow: hidden;
  border: 1px solid var(--hcb-border);
  border-radius: 20px;
  background: var(--hcb-blue-soft);
  box-shadow: 0 10px 24px rgba(0,94,158,.08);
  text-align: center;
}
.hcb-option-grid img {
  width: 100%; height: 210px;
  object-fit: cover;
  background: #fff;
}
.hcb-option-grid h3 { padding: 16px; color: #111; font-size: 18px; }

/* ---- Process ---- */
.hcb-process-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.hcb-process-grid article {
  padding: 24px;
  border: 1px solid var(--hcb-border);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(0,94,158,.07);
}
.hcb-process-grid span {
  display: inline-flex; margin-bottom: 14px;
  color: var(--hcb-primary); font-size: 34px; font-weight: 900; opacity: .35;
}
.hcb-process-grid h3 { color: #111; font-size: 20px; }
.hcb-process-grid p { margin-top: 9px; color: #555; font-size: 15px; line-height: 1.65; }

/* ---- Related ---- */
.hcb-related-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.hcb-related-card a {
  display: block; height: 100%;
  padding: 16px;
  border: 1px solid var(--hcb-border);
  border-radius: 20px;
  background: var(--hcb-blue-soft);
  transition: .22s ease;
}
.hcb-related-card a:hover {
  transform: translateY(-4px); box-shadow: var(--hcb-shadow);
}
.hcb-related-image {
  display: grid; height: 210px; place-items: center;
  overflow: hidden; border-radius: 14px; background: #fff;
}
.hcb-related-image img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.hcb-related-card h3 {
  margin-top: 15px; color: #111; font-size: 19px; line-height: 1.25;
}
.hcb-related-card span {
  display: inline-flex; margin-top: 10px;
  color: var(--hcb-primary); font-weight: 850;
}

/* ---- Bottom CTA ---- */
.hcb-product-cta-card {
  display: grid; justify-items: center; gap: 16px;
  padding: 46px 28px;
  border-radius: 26px;
  background: linear-gradient(135deg, var(--hcb-primary), var(--hcb-secondary));
  color: #fff; text-align: center;
}
.hcb-product-cta-card h2,
.hcb-product-cta-card p { color: #fff; }
.hcb-product-cta-card p { max-width: 720px; }

.hcb-product-btn {
  display: inline-flex; min-height: 50px;
  align-items: center; justify-content: center;
  padding: 13px 22px; border-radius: 999px;
  border: 1px solid transparent;
  font-size: 15px; font-weight: 850;
  transition: .22s ease;
}
.hcb-product-btn-white { background: #fff; color: var(--hcb-primary); }
.hcb-product-btn-white:hover { background: var(--hcb-light); }

/* ---- Astra-safety overrides ---- */
.ast-container .hcb-product-page,
.site-content  .hcb-product-page,
.entry-content .hcb-product-page {
  width: 100%;
  max-width: none;
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1180px) {
  .hcb-product-hero-header {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .hcb-product-hero-header-meta {
    justify-items: start;
  }
  .hcb-product-hero-grid {
    grid-template-columns: 1fr;
  }
  .hcb-product-gallery-card {
    position: static;
  }
  .hcb-product-trust-grid,
  .hcb-process-grid,
  .hcb-related-grid,
  .hcb-option-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  html, body { overflow-x: hidden; }
  .hcb-product-container { width: min(100% - 22px, 1180px); }

  .hcb-product-hero,
  .hcb-product-details-section,
  .hcb-product-options-section,
  .hcb-product-process-section,
  .hcb-product-related-section,
  .hcb-product-bottom-cta { padding: 38px 0; }

  .hcb-product-content-card { padding: 20px; border-radius: 20px; }

  .hcb-product-hero-header h1 { font-size: 20px; }

  .hcb-product-main-image    { min-height: 300px; }
  .hcb-product-main-image img{ max-height: 285px; }

  .hcb-product-trust-grid,
  .hcb-product-spec-grid,
  .hcb-process-grid,
  .hcb-related-grid,
  .hcb-option-grid { grid-template-columns: 1fr; }

  .hcb-option-grid img,
  .hcb-related-image { height: 190px; }

  .hcb-product-tab-buttons,
  .hcb-option-buttons {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-left: 12px;
    padding-right: 12px;
  }
  .hcb-product-tab-buttons button,
  .hcb-option-buttons button { white-space: nowrap; }
}

@media (max-width: 390px) {
  .hcb-product-hero-header h1 { font-size: 26px; }
  .hcb-product-main-image     { min-height: 260px; }
  .hcb-product-main-image img { max-height: 245px; }
}
