/* Layout for generated page markup (hero / section / card-grid / faq / inquiry).
   Loaded after per-page CSS so these rules win over template-original page styles. */

/* --- Hero --- */
.hero { position: relative; min-height: 0; display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,.95fr); align-items: center; gap: clamp(28px,5vw,72px); width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: clamp(48px,7vw,96px) 0; color: var(--color-text); background: none; overflow: visible; }
.hero__content h1 { font-size: clamp(2.4rem,4.6vw,4.2rem); margin-bottom: 18px; }
.hero__content p { color: var(--color-muted); font-size: 1.08rem; max-width: 560px; }
.hero__content .eyebrow { color: var(--color-primary); }
.hero__content .button { margin-top: 14px; }
.hero__media img { width: 100%; height: 100%; max-height: 520px; object-fit: cover; border-radius: var(--radius-large); box-shadow: var(--shadow); }
.product-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.product-gallery img { width: 100%; height: 180px; object-fit: cover; border-radius: var(--radius-medium); }
.product-gallery img:first-child { grid-column: 1 / -1; height: 300px; border-radius: var(--radius-large); }

/* --- Generic sections --- */
.section { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: clamp(44px,6vw,84px) 0; }
.section > h2 { margin-bottom: 14px; }
.section > p { color: var(--color-muted); max-width: 760px; }
.section table { width: 100%; border-collapse: collapse; margin: 18px 0; background: #fff; }
.section th, .section td { padding: 12px 16px; border: 1px solid var(--color-line); text-align: left; vertical-align: top; }
.section th { background: var(--color-soft); color: var(--color-text); font-weight: 800; }
.section ul, .section ol { max-width: 820px; padding-left: 22px; }
.section li { margin-bottom: 8px; }
.section img { border-radius: var(--radius-medium); }

/* --- Cards --- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; margin-top: 28px; }
.card { display: block; overflow: hidden; border-radius: var(--radius-medium); background: #fff; box-shadow: 0 8px 24px rgba(39,73,97,.08); transition: transform .25s ease, box-shadow .25s ease; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.card img { width: 100%; height: 200px; object-fit: cover; border-radius: 0; }
.card h3 { padding: 18px 20px 0; margin-bottom: 8px; }
.card p { padding: 0 20px 20px; margin: 0; color: var(--color-muted); font-size: .92rem; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; margin-top: 28px; }
.feature-grid article { overflow: hidden; border-radius: var(--radius-medium); background: #fff; box-shadow: 0 8px 24px rgba(39,73,97,.08); }
.feature-grid article img { width: 100%; height: 180px; object-fit: cover; border-radius: 0; }
.feature-grid article h3 { padding: 18px 20px 0; margin-bottom: 8px; }
.feature-grid article p { padding: 0 20px 20px; margin: 0; color: var(--color-muted); font-size: .92rem; }

/* --- FAQ --- */
.faq-item { border-top: 1px solid var(--color-line); padding: 20px 0 6px; max-width: 860px; }
.faq-item h3 { margin-bottom: 8px; }
.faq-item p { color: var(--color-muted); }

/* --- Inquiry band --- */
.inquiry { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); gap: clamp(24px,4vw,56px); align-items: center; background: var(--color-soft); border-radius: var(--radius-large); padding: clamp(24px,4vw,48px); }
.inquiry__media img { width: 100%; height: 100%; max-height: 340px; object-fit: cover; }
.inquiry__body p { color: var(--color-muted); }

/* --- Breadcrumbs --- */
.breadcrumbs { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 22px 0 0; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; font-size: .88rem; color: var(--color-muted); }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 8px; color: var(--color-line); }
.breadcrumbs a { color: var(--color-primary); font-weight: 700; }

/* --- Forms (contact page inline form etc.) --- */
.section form { display: grid; gap: 14px; max-width: 640px; margin-top: 20px; }
.section form label { display: grid; gap: 6px; font-weight: 700; }
.section form input, .section form textarea { padding: 12px 14px; border: 1px solid var(--color-line); border-radius: 10px; font: inherit; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .inquiry { grid-template-columns: 1fr; }
  .product-gallery img:first-child { height: 240px; }
}

/* --- v1.3 normalized imagery: uniform frames, full product always visible ---
   All product-context images are pre-normalized onto 4:3 canvases (heroes 3:2)
   with the --color-soft background baked in; containers match that system so
   nothing is ever cropped mid-product. */
.hero__media img { aspect-ratio: 3 / 2; height: auto; max-height: none; object-fit: contain; background: var(--color-soft); }
.hero__media.product-gallery img { aspect-ratio: 4 / 3; }
.product-gallery img, .product-gallery img:first-child { aspect-ratio: 4 / 3; height: auto; object-fit: contain; background: var(--color-soft); border-radius: var(--radius-medium); }
.product-gallery img:first-child { border-radius: var(--radius-large); }
.card img { aspect-ratio: 4 / 3; height: auto; object-fit: contain; background: var(--color-soft); }
.feature-grid article img { aspect-ratio: 4 / 3; height: auto; object-fit: contain; background: var(--color-soft); }
.inquiry__media img { aspect-ratio: 4 / 3; height: auto; max-height: none; object-fit: contain; background: var(--color-soft); border-radius: var(--radius-medium); }
.section > img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: var(--color-soft); }
@media (max-width: 900px) {
  .product-gallery img:first-child { height: auto; }
}

/* --- Real logo (v1.2) --- */
.site-logo__img { display: block; width: auto; height: 36px; }
.site-logo__img--footer { height: 34px; padding: 7px 12px; background: #fff; border-radius: 10px; }
@media (max-width: 640px) { .site-logo__img { height: 30px; } }
