/* Product presentation follows the public type scale and restrained card style. */
html:has(.products-page) {
    scroll-behavior: auto;
}

.products-page {
    --product-section-space: clamp(2rem, 5vw, 4rem);
    --product-scroll-offset: calc(var(--public-header-height) + 0.75rem);
    color: var(--text-secondary);
}

.products-page .product-section {
    /* Keep the space outside the anchor so its heading is the scroll target. */
    margin-top: var(--product-section-space);
    padding-block: 0 var(--product-section-space);
    scroll-margin-top: var(--product-scroll-offset);
}

.public-site .products-page .product-hero h1 {
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    letter-spacing: -0.025em;
    text-wrap: pretty;
}

.public-site .products-page h3 {
    font-size: clamp(1.25rem, 2.2vw, 1.5rem);
    font-weight: 600;
    letter-spacing: -0.015em;
    text-wrap: pretty;
}

.products-page .product-section-heading {
    margin-bottom: clamp(1.5rem, 3vw, 2rem);
    text-align: start;
}

.products-page .product-section-heading h2 {
    margin: 0 0 1rem;
    text-wrap: pretty;
}

.products-page .product-section-heading p {
    margin: 0;
    font-weight: 400;
}

.products-page article[id] {
    scroll-margin-top: var(--product-scroll-offset);
}

.products-page .product-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 1.5rem;
}

.products-page .product-hero-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.625rem 1.25rem;
    border: 1px solid var(--bg-primary);
    border-radius: 6px;
    background: var(--bg-primary);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5 !important;
    text-align: center;
    text-decoration: none;
}

.products-page .product-hero-action:hover {
    border-color: #004d80;
    background: #004d80;
    color: #fff;
    text-decoration: none;
}

.products-page .product-feedback {
    margin-top: 1rem;
}

.products-page .product-gallery-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid #83929e;
    border-radius: 8px;
    background: #fff;
    color: var(--bg-primary);
    text-decoration: none;
    cursor: pointer;
}

.products-page .product-gallery-button:hover:not(:disabled) {
    border-color: var(--bg-primary);
    background: #f0f7fc;
    color: var(--bg-primary);
}

.products-page .product-model-grid,
.products-page .product-benefit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--layout-gap);
}

.products-page .product-model,
.products-page .product-benefit {
    min-width: 0;
    border: 1px solid #dce6ed;
    border-radius: var(--border-radius);
    background: #fff;
}

.products-page .product-model {
    display: flex;
    flex-direction: column;
}

.products-page .product-model-image {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--public-card-padding);
    aspect-ratio: 16 / 9;
    min-height: 0;
    border-bottom: 1px solid #dce6ed;
}

.products-page .product-model-image img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: contain;
}

.products-page .product-model-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: stretch;
    padding: var(--public-card-padding);
}

.products-page .product-model h3 {
    margin: 0 0 0.75rem;
}

.products-page .product-model-summary {
    margin: 0 0 1.25rem;
}

.products-page .product-specifications p {
    margin: 0 0 0.625rem;
}

.products-page .product-specifications p:last-child {
    margin-bottom: 0;
}

.products-page .product-model-details {
    margin-top: 0.75rem;
}

.products-page .product-model-details summary {
    width: fit-content;
    min-height: 44px;
    padding-block: 0.5rem;
    color: var(--bg-primary);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.6 !important;
    cursor: pointer;
}

.products-page .product-model-details[open] .product-specifications {
    margin-block: 0.5rem 1rem;
}

.products-page .product-configure-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 44px;
    margin-top: auto;
    padding-top: var(--public-card-padding);
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
}

.products-page .product-configure-link:hover > span:first-child,
.products-page .product-model-details summary:hover {
    text-decoration: underline;
    text-underline-offset: 0.25em;
}

.products-page .product-benefit-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.products-page .product-benefit {
    padding: var(--public-card-padding);
}

.products-page .product-feature-icon {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--bg-primary);
    font-size: clamp(3rem, 5vw, 4rem);
    line-height: 1 !important;
}

.products-page .product-benefit h3 {
    margin: 0 0 1rem;
}

.products-page .product-benefit p {
    margin: 0;
}

.products-page .product-system-list {
    display: grid;
    gap: clamp(2rem, 4vw, 3rem);
}

.products-page .product-system-feature {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    align-items: start;
    gap: var(--layout-gap);
}

.products-page .product-system-text h3 {
    margin: 0 0 0.75rem;
}

.products-page .product-system-text p {
    margin: 0;
}

.products-page .product-system-image {
    padding: var(--public-card-padding);
    border: 1px solid #dce6ed;
    border-radius: var(--border-radius);
    background: #f4f6f8;
}

.products-page .product-system-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* One gallery layout for installation photos and each product's pricing media. */
.products-page .product-gallery {
    min-width: 0;
}

.products-page .product-gallery-viewport {
    width: 100%;
    height: auto;
}

.products-page .product-gallery .swiper-wrapper {
    align-items: stretch;
}

.products-page .product-gallery .swiper-slide {
    height: auto;
    min-width: 0;
    margin: 0;
}

.products-page .product-gallery-item {
    min-width: 0;
    margin: 0;
}

.products-page .product-gallery:not(.is-ready) .swiper-wrapper {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
}

.products-page .product-gallery:not(.is-ready) .swiper-slide {
    scroll-snap-align: start;
}

.products-page .product-gallery-media {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 4 / 3;
    min-height: 0;
    border-radius: 12px;
    background: #f4f6f8;
}

.products-page .product-gallery-image {
    cursor: zoom-in;
}

.public-site .products-page .product-gallery .product-gallery-media :is(img, video) {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    border-radius: 12px;
    object-fit: contain;
}

.products-page .product-gallery--photos .product-gallery-media {
    aspect-ratio: 4 / 5;
}

.products-page .product-gallery figcaption {
    padding-top: 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6 !important;
    overflow-wrap: anywhere;
}

.products-page .product-gallery-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.products-page .product-gallery-button svg {
    width: 20px;
    height: 20px;
}

.products-page [data-gallery-previous] {
    justify-self: start;
}

.products-page [data-gallery-next] {
    justify-self: end;
}

.products-page .product-gallery-button:disabled {
    border-color: #dce3e8;
    color: #66717a;
    cursor: default;
}

.products-page .product-gallery-counter {
    color: #4d555b;
    font-size: 0.875rem;
    line-height: 1.6 !important;
    white-space: nowrap;
}

/* Retain the existing configurator's hooks and calculations within calmer cards. */
.products-page .prices .prices-grid-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: var(--layout-gap);
    margin: 0;
}

.products-page .prices-grid-container > .product-price-card {
    display: flex;
    min-width: 0;
    max-width: none;
    padding: 0;
}

.products-page .prices .price-box {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    padding: 0;
    border: 1px solid #dce6ed;
    border-radius: var(--border-radius);
    background: #fff;
}

.products-page .price-box:target {
    border-color: var(--bg-primary);
}

.products-page .prices .price-box-header {
    height: auto;
    min-width: 0;
    padding: var(--public-card-padding);
    border-bottom: 1px solid #dce6ed;
}

.products-page .prices .price-box-body {
    margin: 0;
    background: #fff;
}

.products-page .prices .feeder-name-and-price {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: var(--public-card-padding);
}

.products-page .feeder-name-and-price h3 {
    margin: 0;
}

.public-site .products-page .product-price-note {
    margin: 0;
    padding: 0;
    color: #4d555b;
    font-size: 0.875rem;
    font-weight: 400;
}

.public-site .products-page .product-option-key {
    margin: 0.75rem 0 0;
    color: #4d555b;
    font-size: 0.875rem;
    font-weight: 400;
}

.products-page .product-option-required {
    color: #b42318;
    font-weight: 600;
}

.products-page .product-option-status {
    display: inline-block;
    color: #4d555b;
    font-size: 0.875rem;
    font-weight: 400;
}

.products-page .prices .price-box-body :is(.price-box-container, fieldset) {
    min-width: 0;
    margin: 0;
    padding: var(--public-card-padding);
    border: 0;
    border-bottom: 1px solid #dce6ed;
    font-size: 1rem;
    line-height: 1.6 !important;
}

.products-page .prices .price-box-body fieldset legend {
    /* Put the legend in normal content layout so fieldset padding applies above it. */
    float: left;
    width: 100%;
    max-width: 100%;
    margin: 0;
    font-size: 1rem;
    line-height: 1.6 !important;
}

.products-page .prices .price-box-body fieldset > legend + * {
    clear: both;
}

.products-page .price-box-body .input-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.products-page .price-box-body .input-container > label {
    min-width: 0;
}

.products-page .prices .price-box-body .product-option-title {
    font-weight: 600;
}

.products-page .prices .price-box-body fieldset label {
    display: flex;
    justify-content: space-between;
}

.products-page .prices .price-box-body :is(.price-box-container, fieldset).hidden {
    display: none;
}

.products-page .product-option-help summary {
    width: fit-content;
    min-height: 44px;
    padding-block: 0.5rem;
    color: var(--bg-primary);
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.6 !important;
    cursor: pointer;
}

.products-page .product-option-help > div {
    padding: var(--public-card-padding);
    border-radius: 8px;
    background: #f4f6f8;
}

.products-page .product-option-help p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.6 !important;
}

.products-page .product-option-help img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 180px;
    margin-top: 0.75rem;
    object-fit: contain;
}

.products-page .prices .price-box-body label {
    align-items: center;
    gap: 1rem;
    min-height: 44px;
    margin: 0;
    font-weight: 400;
    line-height: 1.6 !important;
    cursor: pointer;
}

.products-page .price-box-body label > div {
    min-width: 0;
}

.products-page .price-box-body input {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    accent-color: var(--bg-primary);
    cursor: pointer;
}

.products-page .prices .price-change {
    font-size: 1.5rem;
    font-weight: 700;
}

.products-page .prices .pricing-box-description {
    padding: var(--public-card-padding);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6 !important;
}

.products-page .prices .pricing-box-outro-text {
    padding: var(--public-card-padding);
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.6 !important;
    text-align: start;
}

.products-page .prices .pricing-box-pdf-box {
    padding: var(--public-card-padding);
    text-align: start;
}

.products-page .prices .price-box-footer {
    display: flex;
    justify-content: flex-start;
    margin-top: auto;
    padding: var(--public-card-padding);
}

.products-page .product-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--layout-gap);
    margin: 0;
    padding-block: var(--public-card-padding);
    border-block: 1px solid #dce6ed;
}

.products-page .product-facts > div {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

.products-page .product-facts dt {
    font-size: var(--public-body-size);
    font-weight: 400;
    line-height: 1.6 !important;
}

.products-page .product-facts dd {
    order: -1;
    margin: 0;
    font-size: clamp(2rem, 3.4vw, 2.5rem);
    font-weight: 600;
    line-height: 1.25 !important;
}

.products-page .product-faq-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    align-items: start;
    gap: var(--layout-gap);
}

.products-page .product-faq-list {
    display: grid;
    gap: 1rem;
}

.products-page .product-faq-item {
    min-width: 0;
    border: 1px solid #dce6ed;
    border-radius: 12px;
    background: #fff;
}

.products-page .product-faq-item summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    min-height: 44px;
    padding: var(--public-card-padding);
    font-size: var(--public-body-size);
    font-weight: 600;
    line-height: 1.6 !important;
    list-style: none;
    cursor: pointer;
}

.products-page .product-faq-item summary::-webkit-details-marker {
    display: none;
}

.products-page .product-faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.25;
}

.products-page .product-faq-item[open] summary::after {
    content: '−';
}

.products-page .product-faq-answer {
    padding: 0 var(--public-card-padding) var(--public-card-padding);
    font-size: var(--public-body-size);
    line-height: 1.6 !important;
    overflow-wrap: anywhere;
}

.products-page .product-faq-answer :is(p, ul, ol) {
    margin-bottom: 1rem;
}

.products-page .product-faq-answer > :last-child {
    margin-bottom: 0;
}

.products-page .product-faq-image {
    width: 100%;
    max-width: 280px;
    height: auto;
    justify-self: center;
}

/* Keep existing form/order hooks while removing the old flipping button labels. */
.products-page .button {
    height: auto;
    border-radius: 8px;
}

.products-page .button button {
    align-items: center;
    min-width: 0;
    min-height: 44px;
    height: auto;
    padding: 0.625rem 1.125rem;
    border: 1px solid var(--bg-primary);
    border-radius: 8px;
    font-size: 1rem;
    letter-spacing: 0;
    text-transform: none;
    transition: none;
}

.products-page .button button::before,
.products-page .button .copy-text {
    display: none;
}

.public-site .products-page .button :is(.text-parent, .main-text) {
    height: auto;
    transform: none;
    transition: none;
}

.products-page .button button:hover {
    background: #004d80;
}

.products-page :is(a, button, input, select, summary):focus-visible {
    outline: 3px solid var(--bg-primary);
    outline-offset: 4px;
}

.products-page [hidden] {
    display: none !important;
}

@media (max-width: 1099px) {
    .products-page .product-benefit-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 767px) {
    .products-page .product-system-feature,
    .products-page .product-faq-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .products-page .product-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 699px) {
    .products-page .product-model-grid,
    .products-page .prices .prices-grid-container {
        grid-template-columns: minmax(0, 1fr);
    }
}
