/* Product content baseline v15
 * Editor-friendly rich product content, parameter tables, anchor navigation and responsive behavior.
 */

:root {
    --product-content-max: 1200px;
    --product-reading-max: 980px;
    --product-border: var(--color-border);
    --product-muted: #65706a;
    --product-soft: #f4f8f5;
    --product-soft-2: #fafcfb;
}

/* Product head: keep readable text sizes consistent with article pages. */
.detail-product-head { padding-bottom: clamp(52px, 6vw, 88px); }
.detail-product-desc p {
    font-size: clamp(16px, 1.05vw, 18px);
    line-height: 1.82;
    color: #4d5751;
}

/* Anchor navigation: real hash links, sticky below the fixed header, horizontally scrollable on small screens. */
.detail-product-nav {
    position: sticky;
    top: 80px;
    z-index: 20;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
}
.detail-product-nav::-webkit-scrollbar { display: none; }
.detail-product-nav ul {
    width: max-content;
    min-width: 100%;
    justify-content: center;
    padding-inline: 14px;
}
.detail-product-nav ul li {
    flex: 0 0 auto;
    margin-inline: clamp(12px, 2vw, 32px);
}
.detail-product-nav ul li a {
    white-space: nowrap;
}
.detail-product-nav ul li a:focus-visible {
    outline: 2px solid var(--default);
    outline-offset: -4px;
}

.product-section,
.detail-product-title.product-section {
    scroll-margin-top: 154px;
}

/* Product feature copy must never be truncated. */
.detail-product-special ul li {
    line-height: 1.75;
}
.detail-product-special ul li,
.detail-product-special ul li p {
    overflow: visible !important;
    display: block !important;
    -webkit-line-clamp: unset !important;
    line-clamp: unset !important;
    text-overflow: clip !important;
    white-space: normal !important;
}
.detail-product-special ul li {
    position: relative;
    padding-inline-start: 18px;
    font-size: clamp(16px, 1vw, 18px);
}
.detail-product-special ul li::before {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    top: .72em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--default);
}
.detail-product-special ul li p::before { display: none !important; }

.detail-product-contents {
    max-width: var(--product-content-max);
}
.detail-product-contents .detail-product-title {
    padding-top: clamp(60px, 7vw, 100px);
}
.product-section-intro,
.product-spec-note {
    max-width: var(--product-reading-max);
    margin: 18px auto 0;
    padding-inline: 20px;
    color: var(--product-muted);
    font-size: clamp(16px, 1vw, 17px);
    line-height: 1.82;
    text-align: start;
}

/* Editor content container. Editors may paste a normal <table>; JS adds the scroll region automatically. */
.product-richtext {
    max-width: var(--product-content-max);
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    margin: 38px auto 0;
    color: #303a34;
    font-size: clamp(15px, .95vw, 16px);
    line-height: 1.75;
}
.product-richtext > :first-child { margin-top: 0; }
.product-richtext > :last-child { margin-bottom: 0; }
.product-richtext p { margin: 0 0 1.1em; }
.product-richtext a {
    color: var(--default);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: .18em;
}

.product-table-scroll {
    position: relative;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
    border: 1px solid var(--product-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(25, 56, 39, .05);
}
.product-table-scroll:focus-visible {
    outline: 3px solid rgba(24, 119, 72, .32);
    outline-offset: 3px;
}

.product-spec-table,
.product-richtext table {
    width: 100%;
    min-width: 880px;
    border-collapse: separate;
    border-spacing: 0;
    font-variant-numeric: tabular-nums;
    background: #fff;
}
.product-spec-table caption,
.product-richtext table caption {
    padding: 14px 16px;
    text-align: start;
    font-weight: 600;
    color: #26382e;
    background: #fff;
    border-bottom: 1px solid var(--product-border);
}
.product-spec-table th,
.product-spec-table td,
.product-richtext table th,
.product-richtext table td {
    padding: 12px 14px;
    border-inline-end: 1px solid var(--product-border);
    border-bottom: 1px solid var(--product-border);
    text-align: center;
    vertical-align: middle;
    line-height: 1.55;
    white-space: nowrap;
}
.product-spec-table tr > :last-child,
.product-richtext table tr > :last-child { border-inline-end: 0; }
.product-spec-table tbody tr:last-child > *,
.product-richtext table tbody tr:last-child > * { border-bottom: 0; }
.product-spec-table thead th,
.product-richtext table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #edf5f0;
    color: #20372a;
    font-weight: 650;
}
.product-spec-table tbody tr:nth-child(even),
.product-richtext table tbody tr:nth-child(even) { background: var(--product-soft-2); }
.product-spec-table tbody tr:hover,
.product-richtext table tbody tr:hover { background: #f1f8f4; }
.product-spec-table tbody th[scope="row"],
.product-richtext table tbody th[scope="row"] {
    text-align: start;
    font-weight: 650;
    color: #24362c;
    background: #fff;
}

/* GWT requirement table has only two semantic columns and should fit the viewport.
   Do not force the generic wide-table minimum width here. */
.product-table-scroll--fit {
    overflow-x: hidden;
}
.product-table-scroll--fit .product-spec-table--requirements {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}
.product-table-scroll--fit .product-spec-table--requirements th,
.product-table-scroll--fit .product-spec-table--requirements td {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}
.product-table-scroll--fit .product-spec-table--requirements th:first-child,
.product-table-scroll--fit .product-spec-table--requirements td:first-child {
    width: 36%;
}
.product-table-scroll--fit .product-spec-table--requirements td {
    text-align: start;
}

.product-table-hint {
    display: none;
    margin: 10px 0 0;
    color: #68746d;
    font-size: 13px;
    line-height: 1.5;
}

/* Selection guidance belongs after specifications rather than before the product story. */
.product-selection-note {
    max-width: var(--product-content-max);
    margin: clamp(36px, 5vw, 64px) auto 0;
    padding: clamp(24px, 3vw, 36px);
    border: 1px solid var(--product-border);
    border-radius: 8px;
    background: var(--product-soft);
}
.product-selection-note h2 {
    margin: 0 0 12px;
    font-size: clamp(22px, 1.8vw, 28px);
    line-height: 1.45;
}
.product-selection-note p {
    margin: 0;
    color: #4f5b54;
    font-size: clamp(16px, 1vw, 17px);
    line-height: 1.8;
}

/* Technical illustrations remain secondary to text. */
.detail-product-content-image {
    margin-top: clamp(28px, 4vw, 50px);
}
.detail-product-content-image img {
    display: block;
    max-width: 100%;
    height: auto;
    margin-inline: auto;
}

@media (max-width: 1200px) {
    .detail-product-nav { top: 70px; }
    .product-richtext,
    .product-selection-note { margin-inline: 15px; }
    .product-section,
    .detail-product-title.product-section { scroll-margin-top: 132px; }
}

@media (max-width: 1024px) {
    .product-table-hint { display: block; }
    .product-spec-table th:first-child,
    .product-spec-table td:first-child,
    .product-richtext table th:first-child,
    .product-richtext table td:first-child {
        position: sticky;
        inset-inline-start: 0;
        z-index: 2;
        box-shadow: 2px 0 0 var(--product-border);
    }
    .product-spec-table thead th:first-child,
    .product-richtext table thead th:first-child {
        z-index: 4;
        background: #e8f2ec;
    }
    .product-spec-table tbody th:first-child,
    .product-spec-table tbody td:first-child,
    .product-richtext table tbody th:first-child,
    .product-richtext table tbody td:first-child { background: #fff; }

    .product-table-scroll--fit .product-spec-table--requirements th:first-child,
    .product-table-scroll--fit .product-spec-table--requirements td:first-child {
        position: static;
        inset-inline-start: auto;
        z-index: auto;
        box-shadow: none;
    }
    .product-table-scroll--fit .product-spec-table--requirements thead th:first-child {
        background: #edf5f0;
    }
}

@media (max-width: 768px) {
    .detail-product-nav { top: 50px; }
    .detail-product-nav ul {
        justify-content: flex-start;
        padding-inline: 10px;
    }
    .detail-product-nav ul li { margin-inline: 10px; }
    .detail-product-nav ul li a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        font-size: 15px;
        line-height: 1.25;
    }
    .product-section,
    .detail-product-title.product-section { scroll-margin-top: 108px; }
    .product-richtext {
        margin-top: 26px;
        font-size: 15px;
    }
    .product-selection-note { padding: 22px 18px; }
}

@media (max-width: 640px) {
    .detail-product-desc p,
    .detail-product-special ul li,
    .product-section-intro,
    .product-spec-note,
    .product-selection-note p {
        font-size: 16px;
        line-height: 1.8;
    }
    .detail-product-special { padding: 42px 20px; }
    .detail-product-special ul { margin-top: 28px; }
    .detail-product-special ul li { padding-block: 14px; }
    .detail-product-contents .detail-product-title { padding-top: 56px; }
    .product-section-intro,
    .product-spec-note { padding-inline: 4px; }
    .product-richtext,
    .product-selection-note { margin-inline: 0; }
    .product-table-scroll { border-radius: 6px; }
    .product-spec-table th,
    .product-spec-table td,
    .product-richtext table th,
    .product-richtext table td {
        padding: 11px 12px;
        font-size: 14px;
    }
}

@media (forced-colors: active) {
    .product-table-scroll,
    .product-selection-note { border: 1px solid CanvasText; box-shadow: none; }
    .product-spec-table thead th,
    .product-richtext table thead th { background: Canvas; color: CanvasText; }
}

/* Product gallery normalization v24.4
 * Keep the main poster and all thumbnails on one 885:538 visual frame.
 * Product imagery uses object-fit: contain to avoid cropping equipment edges.
 * Navigation buttons are locally normalized so Swiper/theme/browser defaults
 * cannot produce different arrow appearances between product templates.
 */
.detail-product-poster {
    position: relative;
    width: 100%;
    aspect-ratio: 885 / 538;
    overflow: hidden;
    background: #fff;
}
.detail-product-poster img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.detail-product-swiper {
    --product-gallery-nav-width: 44px;
    --product-gallery-nav-gap: 12px;
    margin-top: 32px;
    padding-inline: calc(var(--product-gallery-nav-width) + var(--product-gallery-nav-gap));
}
.detail-product-swiper .swiper {
    overflow: hidden;
}
.detail-product-swiper .swiper-wrapper {
    align-items: stretch;
}
.detail-product-swiper .swiper-slide {
    height: auto;
    aspect-ratio: 885 / 538;
    overflow: hidden;
    border: 1px solid #e3e7e5;
    background: #fff;
}
.detail-product-swiper .detail-product-thumb {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.detail-product-swiper .detail-product-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}
.detail-product-swiper .detail-product-thumb.is-active,
.detail-product-swiper .detail-product-thumb[aria-pressed="true"] {
    outline: 2px solid var(--default);
    outline-offset: -2px;
}

.detail-product-swiper > button.swiper-button-prev,
.detail-product-swiper > button.swiper-button-next {
    -webkit-appearance: none;
    appearance: none;
    top: 0;
    bottom: 0;
    width: var(--product-gallery-nav-width);
    height: auto;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #c8ceca;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    color: #626b66;
    z-index: 3;
    transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}
.detail-product-swiper > button.swiper-button-prev { left: 0; }
.detail-product-swiper > button.swiper-button-next { right: 0; }
.detail-product-swiper > button.swiper-button-prev::after,
.detail-product-swiper > button.swiper-button-next::after {
    display: none !important;
    content: none !important;
}
.detail-product-swiper > button.swiper-button-prev::before,
.detail-product-swiper > button.swiper-button-next::before {
    content: "";
    display: block;
    width: 10px;
    height: 10px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
}
.detail-product-swiper > button.swiper-button-prev::before {
    transform: rotate(-135deg);
}
.detail-product-swiper > button.swiper-button-next::before {
    transform: rotate(45deg);
}
.detail-product-swiper > button.swiper-button-prev:hover,
.detail-product-swiper > button.swiper-button-next:hover {
    border-color: var(--default);
    background: #f7fbf8;
    color: var(--default);
}
.detail-product-swiper > button.swiper-button-prev.swiper-button-disabled,
.detail-product-swiper > button.swiper-button-next.swiper-button-disabled {
    opacity: .38;
    cursor: default;
}

@media (max-width: 900px) {
    .detail-product-swiper {
        --product-gallery-nav-width: 40px;
        --product-gallery-nav-gap: 10px;
        margin-top: 22px;
    }
}

@media (max-width: 640px) {
    .detail-product-swiper {
        --product-gallery-nav-width: 38px;
        --product-gallery-nav-gap: 8px;
        margin-top: 18px;
    }
}
