/*
 * Frontend template layer.
 *
 * Core storefront layout stays in frontend.css. This file only adds theme
 * tokens, page-section ordering, visibility controls, and the editable custom
 * block styles used by the visual template builder.
 */
body.frontend-template {
  color: var(--template-ink);
  background-color: var(--template-paper);
}

body.frontend-template .wrap {
  max-width: var(--template-container-width);
}

.frontend-template-page-stack,
.frontend-template-section-stack,
.single-page-sections {
  display: flex;
  flex-direction: column;
}

.frontend-template-section {
  order: var(--template-section-order);
}

.frontend-template-section-shell {
  order: 20;
}

body.frontend-template .frontend-template-section-stack > .template-visual-banner-section,
body.frontend-template .frontend-template-section-stack > .template-page-hero-section,
body.frontend-template .frontend-template-section-stack > .mature-hero {
  width: 100vw;
  max-width: none;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

body.frontend-template .template-visual-banner-section {
  padding: 0;
}

.is-template-section-hidden {
  display: none !important;
}

.frontend-template-section-stack .section:where(:not(.inquiry-section):not(.frontend-template-custom-block)) {
  padding-top: 22px;
  padding-bottom: 36px;
}

body.frontend-template time {
  display: none !important;
}

body.frontend-template .product-page .product-summary .detail-meta-row > .meta {
  display: none !important;
}

body.frontend-template-page-product-list .frontend-template-section-key-intro.section,
body.frontend-template-page-product-category .frontend-template-section-key-intro.section,
body.frontend-template-page-article-list .frontend-template-section-key-intro.section,
body.frontend-template-page-article-category .frontend-template-section-key-intro.section {
  padding-top: 22px;
  padding-bottom: 0;
}

body.frontend-template-page-product-list .frontend-template-section-key-products.section,
body.frontend-template-page-product-category .frontend-template-section-key-products.section,
body.frontend-template-page-article-list .frontend-template-section-key-articles.section,
body.frontend-template-page-article-category .frontend-template-section-key-articles.section {
  padding-top: 0;
  padding-bottom: 36px;
}

body.frontend-template-page-product-category .frontend-template-section-key-content.section,
body.frontend-template-page-article-category .frontend-template-section-key-content.section {
  padding-top: 22px;
  padding-bottom: 36px;
}

body.frontend-template-page-product-category .frontend-template-section-key-faq.section,
body.frontend-template-page-article-category .frontend-template-section-key-faq.section {
  margin-top: 18px;
  padding-top: 18px;
  padding-bottom: 36px;
}

body.frontend-template-page-product-detail .frontend-template-section-key-faq.section {
  padding-bottom: 36px;
}

body.frontend-template-page-product-detail .frontend-template-section-key-related.section {
  padding-top: 22px;
  padding-bottom: 36px;
}

body.frontend-template-page-single .frontend-template-section-key-content.section {
  padding-top: 22px;
  padding-bottom: 36px;
}

body.frontend-template-page-single .frontend-template-section-key-modules,
body.frontend-template-page-single .frontend-template-section-key-faq.section {
  padding-top: 0;
  padding-bottom: 36px;
}

body.frontend-template-page-single .frontend-template-section-key-faq.section {
  margin-top: 0;
}

body.frontend-template-page-tag-list .frontend-template-section-key-tags.section {
  padding-top: 22px;
  padding-bottom: 36px;
}

body.frontend-template-page-search .frontend-template-section-key-search.section {
  padding-top: 22px;
  padding-bottom: 0;
}

body.frontend-template-page-search .search-results-section > .section {
  padding-top: 22px;
  padding-bottom: 36px;
}

body.frontend-template-page-product-detail .frontend-template-section-key-gallery.section {
  padding-top: 22px;
  padding-bottom: 42px;
}

body.frontend-template-page-product-detail .frontend-template-section-key-specifications.section {
  padding-top: 22px;
  padding-bottom: 18px;
}

body.frontend-template .frontend-template-custom-block {
  position: relative;
  overflow: hidden;
  padding-top: 36px;
  padding-bottom: 36px;
}

body.frontend-template .frontend-template-custom-block.frontend-template-section-style-band,
body.frontend-template .frontend-template-custom-block.frontend-template-section-style-showcase {
  background-color: var(--template-surface-2);
}

body.frontend-template .frontend-template-custom-block.frontend-template-section-style-showcase {
  border-top: 2px solid var(--template-primary);
}

body.frontend-template .frontend-template-custom-block.frontend-template-section-style-dark {
  background-color: var(--template-deep);
  color: rgba(255,255,255,.82);
}

body.frontend-template .frontend-template-custom-block.frontend-template-section-style-dark h2,
body.frontend-template .frontend-template-custom-block.frontend-template-section-style-dark h3 {
  color: #fff;
}

body.frontend-template .frontend-template-custom-block.frontend-template-section-style-compact {
  padding-top: 22px;
  padding-bottom: 22px;
}

body.frontend-template .frontend-template-custom-block.frontend-template-section-style-compact .section-head {
  margin-bottom: 18px;
}

body.frontend-template .frontend-template-custom-block-type-spacer {
  min-height: 1px;
  padding-top: 0;
  padding-bottom: 0;
}

body.frontend-template .template-custom-block-inner {
  display: grid;
  gap: 18px;
}

body.frontend-template .template-custom-block-head {
  margin-bottom: 0;
}

body.frontend-template .frontend-template-block-align-center .template-custom-block-head,
body.frontend-template .frontend-template-block-align-center .template-custom-block-button-row {
  text-align: center;
}

body.frontend-template .frontend-template-block-align-center .template-custom-block-head > div {
  margin-inline: auto;
}

body.frontend-template .frontend-template-block-spacing-compact {
  padding-top: 22px;
  padding-bottom: 22px;
}

body.frontend-template .frontend-template-block-spacing-spacious {
  padding-top: 44px;
  padding-bottom: 44px;
}

body.frontend-template .template-custom-block-head > div,
body.frontend-template .template-custom-block-media,
body.frontend-template .template-custom-block-copy,
body.frontend-template .template-custom-block-grid article,
body.frontend-template .template-custom-block-stats article,
body.frontend-template .template-custom-block-process li,
body.frontend-template .template-custom-block-testimonials blockquote {
  min-width: 0;
}

body.frontend-template .template-custom-block-head p {
  max-width: 760px;
}

body.frontend-template .template-custom-block-placeholder {
  min-height: 300px;
  border-radius: var(--template-radius);
  background:
    linear-gradient(135deg, rgba(22, 96, 184, .18), rgba(22, 96, 184, .04)),
    var(--template-surface-2);
}

body.frontend-template .template-custom-block-media {
  overflow: hidden;
  border-radius: var(--template-radius);
  background: var(--template-surface-2);
}

body.frontend-template .template-custom-block-media img {
  display: block;
  width: 100%;
  min-height: 320px;
  object-fit: cover;
}

body.frontend-template .template-custom-block-image img {
  min-height: 220px;
  max-height: 620px;
}

body.frontend-template .template-custom-block-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
}

body.frontend-template .frontend-template-block-media-right .template-custom-block-split > .template-custom-block-media {
  order: 2;
}

body.frontend-template .frontend-template-block-media-right .template-custom-block-split > .template-custom-block-copy {
  order: 1;
}

body.frontend-template .template-custom-block-copy {
  display: grid;
  gap: 16px;
  align-content: center;
}

body.frontend-template .template-custom-block-copy h2,
body.frontend-template .template-custom-block-copy p,
body.frontend-template .template-custom-block-grid article p,
body.frontend-template .template-custom-block-grid article small,
body.frontend-template .template-custom-block-testimonials p,
body.frontend-template .template-custom-block-cta p {
  margin: 0;
}

body.frontend-template .template-custom-block-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.frontend-template .template-custom-block-list li {
  display: grid;
  gap: 3px;
  padding: 11px 14px;
  border-left: 3px solid var(--template-primary);
  background: var(--template-surface-2);
}

body.frontend-template .template-custom-block-list strong,
body.frontend-template .template-custom-block-grid article strong,
body.frontend-template .template-custom-block-process strong,
body.frontend-template .template-custom-block-testimonials p {
  color: var(--template-ink);
}

body.frontend-template .template-custom-block-list span,
body.frontend-template .template-custom-block-grid p,
body.frontend-template .template-custom-block-grid small,
body.frontend-template .template-custom-block-testimonials cite,
body.frontend-template .template-custom-block-testimonials small,
body.frontend-template .template-custom-block-process span,
body.frontend-template .template-custom-block-stats span {
  color: var(--template-muted);
  line-height: 1.6;
}

body.frontend-template .template-custom-block-grid {
  display: grid;
  grid-template-columns: repeat(var(--template-block-columns, 3), minmax(0, 1fr));
  gap: 14px;
}

body.frontend-template .template-custom-block-grid article,
body.frontend-template .template-custom-block-testimonials blockquote {
  display: grid;
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--template-line);
  border-radius: var(--template-radius);
  background: var(--template-surface);
  box-shadow: var(--template-card-shadow);
}

body.frontend-template .template-custom-block-grid article strong {
  line-height: 1.35;
}

body.frontend-template .template-custom-block-stats {
  display: grid;
  grid-template-columns: repeat(var(--template-block-columns, 3), minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--template-line);
  border-radius: var(--template-radius);
  background: var(--template-line);
}

body.frontend-template .template-custom-block-stats article {
  display: grid;
  gap: 8px;
  padding: 24px;
  background: var(--template-surface);
}

body.frontend-template .template-custom-block-stats strong {
  color: var(--template-primary);
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1;
}

body.frontend-template .template-custom-block-stats span {
  font-size: .86rem;
}

body.frontend-template .template-custom-block-process {
  display: grid;
  grid-template-columns: repeat(var(--template-block-columns, 4), minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.frontend-template .template-custom-block-process li {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 20px;
  border-top: 3px solid var(--template-primary);
  background: var(--template-surface-2);
}

body.frontend-template .template-custom-block-process li > b {
  color: var(--template-primary);
  font-size: 1.1rem;
}

body.frontend-template .template-custom-block-process li > div {
  display: grid;
  gap: 6px;
}

body.frontend-template .template-custom-block-testimonials {
  display: grid;
  grid-template-columns: repeat(var(--template-block-columns, 3), minmax(0, 1fr));
  gap: 14px;
}

body.frontend-template .template-custom-block-testimonials blockquote {
  gap: 12px;
  margin: 0;
  padding: 22px;
}

body.frontend-template .template-custom-block-testimonials p {
  font-size: 1rem;
  line-height: 1.7;
}

body.frontend-template .template-custom-block-testimonials cite,
body.frontend-template .template-custom-block-testimonials small {
  font-style: normal;
}

body.frontend-template .template-custom-block-cta {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: clamp(26px, 5vw, 54px);
  border-radius: var(--template-radius);
  background: var(--template-deep);
  color: rgba(255,255,255,.82);
}

body.frontend-template .template-custom-block-cta h2 {
  margin: 5px 0 8px;
  color: #fff;
}

body.frontend-template .template-custom-block-cta p {
  max-width: 700px;
}

body.frontend-template .template-custom-block-cta .btn {
  flex: 0 0 auto;
  background: #fff;
  color: var(--template-deep);
}

body.frontend-template .template-custom-block-button-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--template-line);
  border-radius: var(--template-radius);
  background: var(--template-surface-2);
}

body.frontend-template .template-custom-block-button-row h2 {
  margin: 5px 0 8px;
}

body.frontend-template .template-custom-block-button-row p {
  max-width: 700px;
  margin: 0;
}

body.frontend-template .template-custom-block-button-row .btn {
  flex: 0 0 auto;
}

body.frontend-template .template-custom-block-faq {
  display: grid;
  gap: 8px;
}

body.frontend-template .template-custom-block-faq details {
  padding: 16px 18px;
  border: 1px solid var(--template-line);
  border-radius: var(--template-radius);
  background: var(--template-surface);
}

body.frontend-template .template-custom-block-faq summary {
  cursor: pointer;
  color: var(--template-ink);
  font-weight: 750;
}

body.frontend-template .template-custom-block-faq details > div {
  padding-top: 10px;
  color: var(--template-muted);
  line-height: 1.65;
}

body.frontend-template .frontend-template-custom-block-type-spacer .template-custom-block-inner {
  min-height: clamp(18px, 3vw, 48px);
}

body.frontend-template .single-page-content {
  max-width: none;
}

body.frontend-template .single-page-content-card {
  width: 100%;
  max-width: none;
}

body.frontend-template .single-page-content-card .article-content-head {
  margin-bottom: 26px;
}

body.frontend-template .single-page-content-card .article-content-head h1 {
  margin: 0;
}

body.frontend-template .single-page-module-section .detail-modules-section {
  margin-top: 0;
}

body.frontend-template .single-page-footer {
  background: var(--template-deep);
}

body.frontend-template .frontend-template-section-key-footer {
  width: 100%;
}

body.frontend-template .frontend-template-section-key-footer .site-footer {
  width: 100vw;
  margin-top: 0;
  margin-left: calc(50% - 50vw);
}

body.frontend-template.frontend-template-align-center .page-intro,
body.frontend-template.frontend-template-align-center .tag-heading {
  justify-items: center;
  text-align: center;
}

body.frontend-template.frontend-template-align-center .page-intro .lead,
body.frontend-template.frontend-template-align-center .tag-heading .lead,
body.frontend-template.frontend-template-align-center .tag-heading .sub {
  margin-right: auto;
  margin-left: auto;
}

@media (max-width: 760px) {
  body.frontend-template .wrap {
    width: min(100% - 20px, var(--template-container-width));
    max-width: calc(100% - 20px);
  }

  body.frontend-template .frontend-template-custom-block {
    padding-top: 26px;
    padding-bottom: 26px;
  }

  body.frontend-template .frontend-template-custom-block.frontend-template-section-style-compact,
  body.frontend-template .frontend-template-block-spacing-compact {
    padding-top: 20px;
    padding-bottom: 20px;
  }

  body.frontend-template .frontend-template-block-spacing-spacious {
    padding-top: 34px;
    padding-bottom: 34px;
  }

  .frontend-template-section-stack .section:where(:not(.inquiry-section):not(.frontend-template-custom-block)) {
    padding-top: 16px;
    padding-bottom: 36px;
  }

  body.frontend-template-page-product-list .frontend-template-section-key-intro.section,
  body.frontend-template-page-product-category .frontend-template-section-key-intro.section,
  body.frontend-template-page-article-list .frontend-template-section-key-intro.section,
  body.frontend-template-page-article-category .frontend-template-section-key-intro.section,
  body.frontend-template-page-tag-list .frontend-template-section-key-tags.section {
    padding-top: 16px;
    padding-bottom: 0;
  }

  body.frontend-template-page-product-list .frontend-template-section-key-products.section,
  body.frontend-template-page-product-category .frontend-template-section-key-products.section,
  body.frontend-template-page-article-list .frontend-template-section-key-articles.section,
  body.frontend-template-page-article-category .frontend-template-section-key-articles.section,
  body.frontend-template-page-single .frontend-template-section-key-modules,
  body.frontend-template-page-single .frontend-template-section-key-faq.section {
    padding-top: 0;
    padding-bottom: 36px;
  }

  body.frontend-template-page-product-category .frontend-template-section-key-content.section,
  body.frontend-template-page-article-category .frontend-template-section-key-content.section,
  body.frontend-template-page-single .frontend-template-section-key-content.section {
    padding-top: 16px;
    padding-bottom: 36px;
  }

  body.frontend-template-page-product-category .frontend-template-section-key-faq.section,
  body.frontend-template-page-article-category .frontend-template-section-key-faq.section {
    padding-top: 16px;
    padding-bottom: 36px;
  }

  body.frontend-template-page-search .frontend-template-section-key-search.section {
    padding-top: 16px;
    padding-bottom: 0;
  }

  body.frontend-template-page-search .search-results-section > .section {
    padding-top: 16px;
    padding-bottom: 36px;
  }

  body.frontend-template-page-product-detail .frontend-template-section-key-gallery.section {
    padding-top: 16px;
    padding-bottom: 42px;
  }

  body.frontend-template-page-product-detail .frontend-template-section-key-specifications.section {
    padding-top: 16px;
    padding-bottom: 18px;
  }

  body.frontend-template-page-product-detail .frontend-template-section-key-related.section {
    padding-top: 16px;
    padding-bottom: 36px;
  }

  body.frontend-template .template-custom-block-split,
  body.frontend-template .template-custom-block-grid,
  body.frontend-template .template-custom-block-stats,
  body.frontend-template .template-custom-block-process,
  body.frontend-template .template-custom-block-testimonials {
    grid-template-columns: 1fr;
  }

  body.frontend-template .template-custom-block-media img,
  body.frontend-template .template-custom-block-placeholder {
    min-height: 220px;
  }

  body.frontend-template .template-custom-block-cta {
    display: grid;
    align-items: start;
  }

  body.frontend-template .template-custom-block-button-row {
    display: grid;
    align-items: start;
  }

}
