/*
 * Product Collection Template
 * Only layout and component styles unique to this template.
 * Buttons, forms, cards base styles are in site.css.
 */

/* ==========================================================================
   Hero Banner (used by tpl-product-collection-hero.php)
   Full-width wrapper, 1140px inner content, left-aligned
   ========================================================================== */

/* Hide GeneratePress featured page-header image so it doesn't appear above the hero */
body.page-template-tpl-product-collection-hero .featured-image,
body.page-template-tpl-product-collection-hero .page-header-image,
body.page-template-tpl-product-collection .featured-image,
body.page-template-tpl-product-collection .page-header-image {
  display: none !important;
}

/* Break the hero out of GP's centered container.
   GP sets .site-content { display: flex } by default, which makes .pc-hero
   and .pc-page siblings render side-by-side. Force block layout + full width. */
body.page-template-tpl-product-collection-hero .site-content,
body.page-template-tpl-product-collection .site-content,
body.page-template-tpl-product-collection-hero #page,
body.page-template-tpl-product-collection #page {
  display: block !important;
  max-width: none !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.pc-hero {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  min-height: 480px;
  display: flex;
  align-items: center;
  background-color: var(--hs-title);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #ffffff !important;
  overflow: hidden;
}

.pc-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 0;
}

.pc-hero__inner {
  position: relative;
  z-index: 1;
  width: min(100% - 40px, 1140px);
  margin: 0 auto;
  padding: 80px 0;
  text-align: left;
}

/* All text inside hero is WHITE. Override any inherited .pc-richtext dark styles. */
.pc-hero,
.pc-hero *,
.pc-hero .pc-richtext,
.pc-hero .pc-richtext p,
.pc-hero .pc-richtext strong,
.pc-hero .pc-richtext em,
.pc-hero .pc-richtext a,
.pc-hero .pc-richtext li,
.pc-hero .pc-richtext h1,
.pc-hero .pc-richtext h2,
.pc-hero .pc-richtext h3,
.pc-hero .pc-richtext h4 {
  color: #ffffff !important;
}

.pc-hero__heading {
  margin: 0 0 20px;
  font-size: 52px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 900px;
}

.pc-hero__text {
  margin: 0 0 28px;
  font-size: 18px;
  line-height: 1.65;
  max-width: 720px;
  text-align: left;
}

.pc-hero__text p { margin: 0 0 0.8em; }
.pc-hero__text p:last-child { margin-bottom: 0; }
.pc-hero__text a { text-decoration: underline; }

/* Ghost button: transparent + white border + white text, hover fills white */
.pc-hero .pc-btn,
.pc-hero .pc-btn-inquiry {
  background: transparent !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
}

.pc-hero .pc-btn:hover,
.pc-hero .pc-btn:focus-visible,
.pc-hero .pc-btn-inquiry:hover,
.pc-hero .pc-btn-inquiry:focus-visible {
  background: #ffffff !important;
  color: var(--hs-accent) !important;
  border-color: #ffffff !important;
}

@media (max-width: 992px) {
  .pc-hero { min-height: 400px; }
  .pc-hero__inner { padding: 60px 0; }
  .pc-hero__heading { font-size: 40px; }
  .pc-hero__text { font-size: 17px; }
}

@media (max-width: 576px) {
  .pc-hero { min-height: 340px; }
  .pc-hero__inner { padding: 48px 0; width: min(100% - 24px, 1140px); }
  .pc-hero__heading { font-size: 30px; }
  .pc-hero__text { font-size: 16px; }
}

/* Base */
.pc-page {
  width: 100%;
  font-family: var(--hs-font-base);
  color: var(--hs-text);
}

.pc-page ~ .page-header,
body.page-template-tpl-product-collection .page-header,
body.page-template-tpl-product-collection .entry-header,
body.page-template-tpl-product-collection .peflon-hero {
  display: none !important;
}

/* Alternating section backgrounds */
.pc-bg-white { background: #fff; }
.pc-bg-alt   { background: var(--hs-bg-alt); }

.pc-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Sections */
.pc-banner,
.pc-definition,
.pc-types,
.pc-categories,
.pc-why,
.pc-faq,
.pc-related,
.pc-support,
.pc-contact {
  padding: 50px 0;
}

.pc-types { padding-bottom: 20px; }
.pc-types + .pc-categories { padding-top: 20px; }
.pc-why { padding-bottom: 36px; }
.pc-why-block { padding: 36px 0; }
.pc-why + .pc-why-block { padding-top: 0; }


/* Headings */
.pc-container h2 {
  font-size: 34px;
  font-weight: 700;
  color: var(--hs-title);
  line-height: 1.22;
  margin: 0 0 16px;
  text-align: center;
  letter-spacing: -0.015em;
}

.pc-container h2 + .pc-richtext,
.pc-container h2 + p {
  margin-bottom: 32px;
}

.pc-cat-dimension h3 {
  font-size: 26px;
  font-weight: 700;
  color: var(--hs-title);
  margin: 0 0 12px;
  text-align: center;
  letter-spacing: -0.01em;
}

.pc-cat-dimension h3 + p { margin-bottom: 24px; }

/* Richtext */
.pc-richtext {
  font-size: 16px;
  line-height: 1.7;
  color: var(--hs-text);
  text-align: left;
}

.pc-richtext p { margin: 0 0 1em; }
.pc-richtext ul, .pc-richtext ol { padding-left: 1.5em; margin: 0 0 1em; }
.pc-richtext strong { font-weight: 700; color: var(--hs-title); }
.pc-richtext a { color: var(--hs-accent); text-decoration: none; }
.pc-richtext a:hover { color: var(--hs-accent-dark); text-decoration: underline; }
.pc-richtext li { margin-bottom: 0.3em; }
.pc-richtext table { width: 100%; border-collapse: collapse; margin: 1em 0; }
.pc-richtext th, .pc-richtext td { padding: 10px 14px; border: 1px solid var(--hs-border); text-align: left; }
.pc-richtext th { background: var(--hs-bg-alt); color: var(--hs-title); font-weight: 700; }

/* Banner */
.pc-banner__inner { display: flex; align-items: center; gap: 48px; }
.pc-banner__text { flex: 1 1 60%; }
.pc-banner__image { flex: 0 0 40%; max-width: 40%; }
.pc-banner__image img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  aspect-ratio: 3/2;
  object-fit: cover;
  display: block;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.1);
}

.pc-banner__text h1 {
  font-size: 46px;
  font-weight: 700;
  color: var(--hs-title);
  line-height: 1.18;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

.pc-banner__text .pc-richtext { margin-bottom: 24px; }

/* Grid — CSS Grid, equal columns, cards auto-fill row, left-aligned */
.pc-grid {
  display: grid;
  gap: 24px;
}

.pc-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pc-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pc-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Cards (extends .hs-card from site.css) */
.pc-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--hs-shadow-card);
  border: 1px solid var(--hs-border);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.pc-card:hover { transform: translateY(-2px); box-shadow: var(--hs-shadow-card-hover); }
.pc-card__image img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }

.pc-card__body { padding: 20px; }
.pc-card__body h4 {
  font-size: 18px;
  font-weight: 700;
  color: var(--hs-title);
  margin: 0 0 8px;
  text-align: center;
  letter-spacing: -0.01em;
}

.pc-card__body .pc-richtext { font-size: 14px; color: #697469; margin-bottom: 16px; line-height: 1.6; }
.pc-card__body .pc-btn { display: table; margin: 0 auto; }

/* Why Blocks */
.pc-why-block__inner { display: flex; align-items: center; gap: 40px; }
.pc-why-block__image { flex: 0 0 600px; max-width: 600px; display: flex; }
.pc-why-block__image img {
  width: 600px;
  max-width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  box-shadow: var(--hs-shadow-card);
}

.pc-why-block__text { flex: 1; }
.pc-why-block__text h4 {
  font-size: 22px;
  font-weight: 700;
  color: var(--hs-title);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.pc-why-block__text .pc-richtext { margin-bottom: 20px; }

/* FAQ */
.pc-faq__list { max-width: 1140px; margin: 0 auto; }

.pc-faq__item {
  border: 1px solid var(--hs-border);
  border-radius: 10px;
  margin-bottom: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.pc-faq__item[open] { border-color: var(--hs-accent); }
.pc-faq__item:hover { box-shadow: 0 10px 24px rgba(0, 0, 0, 0.07); }

.pc-faq__item summary {
  padding: 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.22s ease, color 0.22s ease;
}

.pc-faq__item summary::-webkit-details-marker { display: none; }
.pc-faq__item summary h4 { font-weight: 700; font-size: 17px; color: inherit; margin: 0; padding: 18px 24px; flex: 1; }
.pc-faq__item summary:hover,
.pc-faq__item[open] summary { background: var(--hs-accent-soft); }

.pc-faq__item summary::after {
  content: "+";
  font-size: 24px;
  color: var(--hs-accent);
  font-weight: 300;
  flex-shrink: 0;
  margin-right: 24px;
  transition: color 0.22s ease;
}

.pc-faq__item[open] summary::after { content: "\2212"; }

.pc-faq__answer {
  padding: 20px 24px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--hs-text);
  border-top: 1px solid var(--hs-border);
}

/* Contact */
.pc-contact__inner { display: flex; gap: 48px; align-items: start; }
.pc-contact__text { flex: 1 1 55%; }
.pc-contact__text h2 { text-align: left; }
.pc-contact__form { flex: 0 0 40%; }

/* Responsive: Tablet */
@media (max-width: 992px) {
  .pc-grid--3, .pc-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pc-faq__list { max-width: 100%; }
  .pc-banner__text h1 { font-size: 38px; }
  .pc-container h2 { font-size: 30px; }
}

@media (max-width: 768px) {
  .pc-banner__inner { flex-direction: column-reverse; }
  .pc-banner__text, .pc-banner__image { flex: 1 1 100%; max-width: 100%; }
  .pc-banner__text h1 { font-size: 32px; }
  .pc-container h2 { font-size: 26px; }
  .pc-why-block__inner { flex-direction: column; }
  .pc-why-block__image { flex: 1 1 100%; max-width: 100%; }
  .pc-why-block__image img { width: 100%; }
  .pc-contact__inner { flex-direction: column; }
  .pc-contact__text, .pc-contact__form { flex: 1 1 100%; width: 100%; max-width: 100%; min-width: 0; }
  .pc-faq__item summary h4 { font-size: 15px; padding: 14px 18px; }
  .pc-faq__item summary::after { margin-right: 18px; }
}

@media (max-width: 576px) {
  .pc-banner, .pc-definition, .pc-types, .pc-categories,
  .pc-why, .pc-faq, .pc-related, .pc-support, .pc-contact { padding: 40px 0; }
  .pc-grid--2, .pc-grid--3, .pc-grid--4 { grid-template-columns: 1fr; }
  .pc-grid { gap: 16px; }
  .pc-container { padding: 0 16px; }
}

@media print {
  .pc-btn-inquiry, form { display: none !important; }
  .pc-card { box-shadow: none !important; break-inside: avoid; }
}
