/* ================================================
   Lionex Product Detail Page
   Used with layout product (_layouts/product.html).
   ================================================ */

/* Avoid scroll jump when accordion opens on load (mobile reload) */
#product-page-container {
    overflow-anchor: none;
}

/* Page title – centered on product detail pages */
#product-page-container .page-title.page-title--visible {
    text-align: center;
}

#product-page-container .page-title--lines {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    line-height: 1.25;
}

#product-page-container .page-title--lines .page-title__line {
    display: block;
    font-weight: 600;
    color: var(--lionex-heading);
}

/* Summary */
.summary {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 24px;
    margin-bottom: 8px;
}

/* Intro paragraphs – hidden when moved to Overview tab */
#product-page-container .details > p {
    display: none;
}

/* Product hero: gallery left, spec list right (stack on narrow viewports) */
.product-hero {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 20px 28px;
}

.product-hero .image {
    flex: 0 0 auto;
    min-width: 0;
    text-align: left;
    align-self: flex-start;
}

.product-hero .image-gallery-container {
    display: flex;
    flex-flow: column nowrap;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 10px;
}

.product-hero .thumbnail-gallery {
    display: flex;
    flex-flow: row wrap;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    max-width: 420px;
}

.product-hero .spec-card--hero {
    flex: 1 1 200px;
    min-width: 0;
    max-width: 100%;
    margin-top: 0;
    padding: 0 0 8px 14px;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    align-self: flex-start;
}

/* Hero specs as a table: aligned label column, left-aligned values (wide viewports) */
.spec-table--hero {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    margin: 0;
}

.spec-table--hero tbody {
    vertical-align: top;
}

.spec-table--hero th.spec-label,
.spec-table--hero td.spec-value {
    text-align: left;
    text-align: start;
    vertical-align: top;
    padding: 6px 0;
    line-height: 1.35;
}

.spec-table--hero th.spec-label {
    font-weight: bold;
    color: #333;
    padding-right: 14px;
    /* Override global .spec-label { width: 140px } — let the table size the label column */
    width: auto;
    min-width: 0;
}

.spec-table--hero td.spec-value {
    color: #555;
}

.summary .image {
    text-align: left;
}

.summary .image img {
    max-width: 100%;
    height: auto;
    border-radius: 0;
    border: none;
    cursor: pointer;
    display: block;
}

/* Image gallery – main image on top, thumbnails in a row below (product pages only) */
#product-page-container .image-gallery-container {
    display: flex;
    flex-flow: column nowrap;
    align-items: flex-start;
    gap: 10px;
    justify-content: flex-start;
    flex-wrap: nowrap;
    max-width: 100%;
}

#product-page-container .image-gallery-container .image-carousel {
    flex-shrink: 0;
    position: relative;
}

#product-page-container .thumbnail-gallery {
    display: flex;
    flex-flow: row wrap;
    justify-content: flex-start;
    gap: 8px;
    flex-shrink: 0;
    width: 100%;
    max-width: 420px;
}

#product-page-container .thumbnail-gallery.is-single {
    display: none;
}

.image-carousel.single-image .carousel-arrow {
    display: none;
}

.image-carousel.single-image #product-image {
    cursor: pointer;
}

.thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 0;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    opacity: 0.7;
}

.thumbnail:hover {
    opacity: 1;
    transform: scale(1.05);
}

.thumbnail.active {
    opacity: 1;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}

#product-image {
    max-width: 100%;
    height: auto;
    display: block;
    box-sizing: border-box;
    border: var(--lionex-border-subtle);
}

/* Carousel arrows – positioned relative to image wrap */
.image-carousel {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.carousel-image-wrap {
    position: relative;
    display: block;
    max-width: 420px;
}

/* Arrow position: left/right = inset from image edges. White, sharp rendering. */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) translateZ(0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    padding: 0;
    cursor: pointer;
    user-select: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.carousel-arrow svg {
    width: 28px;
    height: 48px;
    shape-rendering: geometricPrecision;
}

.carousel-image-wrap:hover .carousel-arrow {
    opacity: 0.5;
    pointer-events: auto;
}

.carousel-arrow:hover {
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6));
}

.carousel-arrow.left {
    left: 0;
}

.carousel-arrow.right {
    right: 0;
}

/* Product image lightbox / maximize preview */
.product-image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.product-image-lightbox.open {
    opacity: 1;
    visibility: visible;
}

.product-image-lightbox[hidden] {
    display: none;
}

.product-lightbox__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    line-height: 1;
    cursor: pointer;
    border-radius: 4px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.product-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.product-lightbox__content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 60px 80px;
    max-width: 100%;
    max-height: 100%;
}

.product-lightbox__img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    display: block;
}

.product-lightbox__arrow {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    line-height: 1;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.product-lightbox__arrow:hover {
    background: rgba(255, 255, 255, 0.25);
}

.product-lightbox__arrow--prev {
    order: -1;
}

.product-image-lightbox.single-image .product-lightbox__arrow {
    display: none;
}

/* Spec card */
.spec-card {
    background: #fff;
    border-radius: 0;
    padding: 20px;
    margin-top: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.spec-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--lionex-primary);
}

/* Linked product names — bold primary blue, no underline (products.css on category pages) */
#product-page-container a.trademark-link,
#product-page-container a.trademark-link:visited {
    color: var(--lionex-primary);
    text-decoration: none;
    font-weight: inherit;
}

#product-page-container a.trademark-link strong.trademark,
#product-page-container a.trademark-link strong.product-name {
    color: var(--lionex-primary);
    font-weight: 700;
}

#product-page-container a.trademark-link:hover,
#product-page-container a.trademark-link:focus,
#product-page-container a.trademark-link:hover strong.trademark,
#product-page-container a.trademark-link:focus strong.trademark,
#product-page-container a.trademark-link:hover strong.product-name,
#product-page-container a.trademark-link:focus strong.product-name {
    color: var(--lionex-primary-dark);
    text-decoration: none;
}

/* Spec-cards and downloads: no internal borders (separators only between sections) */
.tab-content .spec-card,
.tab-content .downloads {
    padding: 0;
    background: transparent;
    border: none;
}

#product-page-container .tab-content > .spec-card {
    margin-top: 20px;
}

#product-page-container .tab-content > .spec-card:first-child {
    margin-top: 0;
}

#product-page-container .tab-content > .spec-card + .spec-card {
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* Horizontal separator between tab sections (expand all view) */
.tab-content + .tab-content {
    border-top: 1px solid rgba(0, 0, 0, 0.12);
}

/* Automated spacing between content blocks within tabs */
.tab-content>*+* {
    margin-top: 12px;
}

.tab-content .spec-card h3,
.tab-content .downloads h3 {
    font-weight: 700;
    margin: 0 0 12px 0;
    color: #111;
    letter-spacing: 0.01em;
}

/* Unified body text in tab content */
.tab-content .spec-card p,
.tab-content .downloads p,
.tab-content p {
    margin: 0 0 12px 0;
    line-height: 1.6;
    color: #374151;
}

/* Prose in tab spec-cards: justified, flush to tab panel edge */
#product-page-container .tab-content .spec-card p {
    text-align: justify;
    text-align-last: left;
    text-justify: inter-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    text-indent: 0;
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
}

.tab-content .spec-card p:last-child,
.tab-content .downloads p:last-child {
    margin-bottom: 0;
}

.tab-content .spec-card ul:last-child,
.tab-content .spec-card ol:last-child,
.tab-content .downloads ul:last-child {
    margin-bottom: 0;
}

/* Key Product Information Grid – one item per row */
.spec-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px 0;
    margin-top: 8px;
}

.spec-item {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

.spec-label {
    font-weight: bold;
    width: 140px;
    color: #333;
}

.spec-value {
    color: #555;
    flex: 1;
}

/* Feature grid */
.features-section {
    margin-top: 32px;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.feature-card {
    background: #fff;
    padding: 16px;
    border-radius: 0;
    border: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    position: relative;
    text-align: center;
}

.feature-card::before {
    content: "";
    position: absolute;
    top: 12px;
    right: 12px;
    width: 20px;
    height: 20px;
    background-image: url("../img/icons/feature-check.svg");
    background-size: 20px 20px;
    background-repeat: no-repeat;
    background-position: center;
    transform: translateZ(0);
}

.feature-card img {
    display: none;
}

.feature-card h4 {
    margin: 0 0 6px 0;
    color: var(--lionex-primary);
}

.feature-card p {
    margin: 0;
    color: var(--lionex-primary);
    line-height: 1.6;
}

/* Tabs */
.tabs {
    margin-top: 30px;
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.tab-button {
    padding: 10px 20px;
    margin-right: 4px;
    border: none;
    border-radius: 0;
    background: #f0f0f0;
    cursor: pointer;
    font-weight: bold;
    color: #555;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-bottom: none;
}

.tab-button:focus-visible {
    outline: 2px solid var(--lionex-primary);
    outline-offset: -2px;
}

.tab-button:hover {
    background: #e0e0e0;
}

.tab-button.active {
    background: var(--lionex-primary);
    color: #fff;
    border-color: var(--lionex-primary);
    border-bottom: none;
}

/* Tab labels: instant activation */
#product-page-container .tab-label {
    transition: none;
}

/* Expand all: next to Citations, muted when inactive; sharper rendering */
.tab-label--expand {
    color: #6b7280;
    background: #fff;
    border-color: rgba(0, 0, 0, 0.2);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.tab-label--expand:hover {
    background: #f3f4f6;
}

/* Hidden on desktop; kept identical for Show vs Hide if tab bar is visible */
#product-page-container .product-tabs .tab-label.tab-label--expand,
#product-page-container .product-tabs #tab-all:checked ~ .tab-bar .tab-label--expand,
#product-page-container .product-tabs #tab-closed:checked ~ .tab-bar .tab-label--expand {
    background: #fff;
    color: #6b7280;
    border-color: rgba(0, 0, 0, 0.2);
    font-weight: 500;
    box-shadow: none;
}

.tab-content {
    display: none;
    background: #fff;
    padding: 12px 20px 12px 20px;
    border-radius: 0;
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    min-height: 360px;
    box-shadow: none;
}

/* Remove shadows from product page tabs (override framework.css) */
#product-page-container .product-tabs {
    --product-tab-content-inset-x: 10px;
}

#product-page-container .product-tabs .tab-content {
    box-shadow: none;
    padding: 12px var(--product-tab-content-inset-x);
}

#product-page-container .tab-content {
    box-shadow: none;
}

#product-page-container .tab-label {
    box-shadow: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

#product-page-container .tab-input:checked + .tab-label {
    box-shadow: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/* Tab bar (desktop): horizontal row of labels */
#product-page-container .product-tabs .tab-bar {
    display: flex;
    flex-wrap: wrap;
    column-gap: 4px;
    width: 100%;
    order: 0;
}

/* Accordion items: hidden by default, shown when tab selected (via inline style) */
#product-page-container .product-tabs .tab-accordion-item {
    display: none;
    order: 999;
    width: 100%;
}

/* Accordion headers: hidden on desktop (tab-bar used instead) */
#product-page-container .product-tabs .tab-accordion-header {
    display: none;
}

/* Expand all / Hide all row (mobile) */
#product-page-container .product-tabs .tab-accordion-item-expand {
    width: 100%;
}

#product-page-container .product-tabs label.tab-accordion-header.tab-accordion-header--expand {
    justify-content: flex-end;
    text-align: right;
    font-weight: 500;
    background: #fff;
    color: #6b7280;
    border: none;
    box-shadow: none;
}

#product-page-container .product-tabs label.tab-accordion-header.tab-accordion-header--expand::after {
    display: none;
    content: none;
}

@media (min-width: 769px) {
    #product-page-container .product-tabs .tab-bar .tab-label--expand,
    #product-page-container .product-tabs .tab-accordion-item-expand {
        display: none !important;
    }
}

.tab-content.active {
    display: block;
}

.tab-content h3 {
    font-weight: 700;
    margin: 0 0 12px 0;
    color: #111;
}

.tab-content .features {
    margin-top: 0;
    margin-bottom: 0;
}

/* Unified list styling – compact, consistent */
.tabs-container .spec-card ul,
.tabs-container .spec-card ol,
.tabs-container .downloads ul,
.tabs-container .downloads ol {
    margin: 0 0 12px 0;
    padding-left: 1.25em;
    line-height: 1.6;
    color: #374151;
}

.tabs-container .spec-card ul li,
.tabs-container .spec-card ol li,
.tabs-container .downloads ul li,
.tabs-container .downloads ol li {
    margin-bottom: 4px;
}

.tabs-container .spec-card ul li:last-child,
.tabs-container .spec-card ol li:last-child,
.tabs-container .downloads ul li:last-child,
.tabs-container .downloads ol li:last-child {
    margin-bottom: 0;
}

/* Footnote below spec lists (not a bullet in the main list) */
#product-page-container .tab-content .spec-card .spec-card-footnote {
    margin: 10px 0 0;
    padding: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    font-weight: 400;
    color: var(--lionex-text-muted, #6b7280);
    text-align: left;
    text-align-last: left;
}

#product-page-container .tab-content .spec-card .spec-card-footnote__marker {
    margin-right: 0.15em;
}

.citation-list {
    list-style: decimal;
}

/* Citation list: more spacing than download/spec lists (citation entries are longer) */
.tabs-container .spec-card ol.citation-list li {
    margin-bottom: 16px;
}

.tabs-container .spec-card ol.citation-list li:last-child {
    margin-bottom: 0;
}

.citation-list a {
    color: var(--lionex-primary);
    text-decoration: none;
}

.citation-list a:hover {
    text-decoration: underline;
}

.citation-list .citation-pdf-link {
    display: inline-flex;
    align-items: baseline;
    margin-left: 6px;
    vertical-align: baseline;
    color: var(--lionex-primary);
}

.citation-list .citation-pdf-icon {
    display: inline-block;
    vertical-align: -0.2em;
    margin-right: 2px;
    opacity: 0.75;
}

.citation-list .citation-pdf-link:hover {
    color: var(--lionex-primary-dark);
}

.citation-list .citation-pdf-link:hover .citation-pdf-icon {
    opacity: 1;
}

/* Ordering list – 3 lines per item (override .spec-card ul) */
.tabs-container .spec-card .product-ordering-list,
.product-ordering-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    padding-left: 0 !important;
}
.tabs-container .spec-card .product-ordering-list li,
.product-ordering-list li {
    padding: 14px 0 !important;
    margin-bottom: 0 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    display: block;
}
.tabs-container .spec-card .product-ordering-list li:last-child,
.product-ordering-list li:last-child {
    border-bottom: none;
}
/* Legacy catalogue-number line — stripped on product pages by product.html */
.product-ordering-list__cat {
    display: none;
}
#product-page-container .product-ordering-catalogue-note {
    margin: 16px 0 0 0;
    color: var(--lionex-intro-text);
    font-size: var(--lionex-font-body);
}
.product-ordering-catalogue-note a {
    color: var(--lionex-primary);
    text-decoration: none;
    font-weight: 600;
}
.product-ordering-catalogue-note a:hover,
.product-ordering-catalogue-note a:focus {
    color: var(--lionex-primary-dark);
    text-decoration: underline;
}
.product-ordering-list__name {
    display: block;
    color: #111;
    margin-bottom: 4px;
}
.product-ordering-list__desc {
    display: block;
    color: var(--lionex-text-secondary);
    line-height: 1.5;
}


/* Downloads */
.downloads a {
    display: inline-block;
    margin-bottom: 0;
    color: var(--lionex-primary);
    text-decoration: none;
}

.downloads a:hover {
    text-decoration: underline;
}

/* Contact box – grey-blue fill matching call-out boxes */
#product-page-container .contact-box {
    margin-top: 8px;
    padding: 20px;
    background: #eef2f7;
    border-radius: 0;
    border: 1px solid rgba(0, 91, 159, 0.15);
    border-left: 4px solid var(--lionex-primary);
}

.contact-box h3 {
    margin-top: 0;
    margin-bottom: 12px;
    color: var(--lionex-primary);
}

#ordering-contact h3 {
    text-align: left;
}

.contact-box .contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 20px;
    margin-bottom: 20px;
}

.contact-box .contact-item {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

.contact-box .contact-label {
    font-weight: bold;
    width: 70px;
    color: #333;
}

.contact-box .contact-item a {
    color: var(--lionex-primary);
    text-decoration: none;
}

.contact-box .contact-item a:hover {
    text-decoration: underline;
}

/* Contact Form */
.contact-form {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-form h4 {
    margin: 0 0 10px 0;
    color: var(--lionex-primary);
}

.contact-form label {
    font-weight: bold;
    margin-bottom: 2px;
    color: #333;
}

.contact-form input,
.contact-form textarea {
    padding: 10px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 0;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
    background: #fff;
    transition: all 0.2s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #999;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--lionex-primary);
    outline: 2px solid rgba(0, 91, 159, 0.2);
    outline-offset: 2px;
}

.contact-form button {
    padding: 12px 24px;
    background-color: var(--lionex-primary);
    color: #fff;
    font-family: inherit;
    font-weight: bold;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.contact-form button:hover {
    background-color: var(--lionex-primary-dark);
    transform: translateY(-1px);
}

.contact-form button:focus-visible {
    outline: 2px solid rgba(0, 91, 159, 0.5);
    outline-offset: 2px;
}

.contact-form button:active {
    transform: translateY(0);
}

/* Order Here – below hero spec table (override framework .order-button overlay) */
.spec-card--hero .order-button--hero,
.spec-card--hero .order-button--hero:link,
.spec-card--hero .order-button--hero:visited,
.spec-card--hero .order-button--hero:hover,
.spec-card--hero .order-button--hero:active,
.spec-card--hero .order-button--hero:focus {
    color: #fff;
}

.spec-card--hero .order-button--hero {
    position: static;
    transform: none;
    left: auto;
    right: auto;
    bottom: auto;
    top: auto;
    z-index: auto;
    max-width: none;
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 16px;
    padding: 8px 16px;
    text-align: center;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    background: var(--lionex-primary-dark);
    border: none;
    border-radius: 0;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color 0.2s ease;
    scroll-margin-top: 16px;
}

.spec-card--hero .order-button--hero:hover,
.spec-card--hero .order-button--hero:active {
    background: #003d70;
    color: #fff;
    text-decoration: none;
}

.spec-card--hero .order-button--hero:focus-visible {
    outline: 2px solid rgba(0, 77, 140, 0.55);
    outline-offset: 2px;
}

.spec-card--hero .order-button--hero:first-child {
    margin-top: 0;
}

/* Responsive */
@media (max-width: 768px) {
    /* Spec lists: two columns on narrow viewports (wide = single column above) */
    .spec-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px 14px;
    }

    /* Hero spec table: compact 2-column grid in portrait only */
    @media (max-width: 768px) and (orientation: portrait) {
        .spec-table--hero tbody {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 8px 14px;
        }

        .spec-table--hero tr {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            min-width: 0;
        }

        .spec-table--hero th.spec-label,
        .spec-table--hero td.spec-value {
            display: block;
            width: 100%;
            padding: 0;
        }

        .spec-table--hero th.spec-label {
            padding-right: 0;
            white-space: normal;
            margin-bottom: 2px;
            text-align: left;
            text-align: start;
        }

        .spec-table--hero td.spec-value {
            text-align: left;
            text-align: start;
            width: 100%;
        }
    }

    /* Landscape phone / narrow tablet: normal table rows (label | value) */
    @media (max-width: 768px) and (orientation: landscape) {
        .spec-table--hero tbody {
            display: table-row-group;
        }

        .spec-table--hero tr {
            display: table-row;
        }

        .spec-table--hero th.spec-label,
        .spec-table--hero td.spec-value {
            display: table-cell;
            width: auto;
            padding: 6px 0;
        }

        .spec-table--hero th.spec-label {
            padding-right: 14px;
            margin-bottom: 0;
        }
    }

    .product-hero {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .product-hero .spec-card--hero {
        margin-top: 0;
        padding: 0 14px 8px;
    }

    .summary {
        flex-direction: column;
        margin-bottom: 24px;
    }

    /* Mobile accordion: hide tab bar, show all accordion headers (so user can tap to switch) */
    #product-page-container .product-tabs .tab-bar {
        display: none;
    }
    #product-page-container .product-tabs .tab-accordion-item {
        display: block !important;
    }

    /* Section accordion headers: always blue (stable size/color when opening/closing) */
    #product-page-container .product-tabs .tab-accordion-item:not(.tab-accordion-item-expand) .tab-accordion-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 14px 16px;
        font-weight: 600;
        color: #fff;
        background: var(--lionex-primary);
        border: none;
        border-top: 1px solid var(--lionex-primary);
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        min-height: 48px;
        box-sizing: border-box;
    }

    #product-page-container .product-tabs .tab-accordion-item:not(.tab-accordion-item-expand) .tab-accordion-header::after {
        content: "";
        width: 8px;
        height: 8px;
        border-right: 2px solid #fff;
        border-bottom: 2px solid #fff;
        transform: rotate(45deg);
        margin-left: 8px;
        flex-shrink: 0;
        transition: transform 0.2s ease;
    }

    #product-page-container .product-tabs #tab-all:checked ~ .tab-accordion-item:not(.tab-accordion-item-expand) .tab-accordion-header::after {
        transform: rotate(-135deg);
    }

    #product-page-container .product-tabs #tab-all:checked ~ .tab-accordion-item.tab-accordion-item--user-collapsed:not(.tab-accordion-item-expand) .tab-content {
        display: none !important;
    }

    #product-page-container .product-tabs #tab-all:checked ~ .tab-accordion-item.tab-accordion-item--user-collapsed:not(.tab-accordion-item-expand) .tab-accordion-header::after {
        transform: rotate(45deg);
    }

    /* Expand all / Hide all — utility row (grey, not bold, no borders) */
    #product-page-container .product-tabs label.tab-accordion-header.tab-accordion-header--expand {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        text-align: right;
        width: 100%;
        padding: 14px 16px;
        min-height: 48px;
        font-weight: 500;
        color: #6b7280;
        background: #fff;
        border: none;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        box-sizing: border-box;
        box-shadow: none;
    }

    #product-page-container .product-tabs label.tab-accordion-header.tab-accordion-header--expand::after {
        display: none;
        content: none;
    }

    #product-page-container .product-tabs .tab-accordion-item-expand--bottom[hidden] {
        display: none !important;
    }

    #product-page-container .product-tabs .tab-accordion-item-expand--bottom:not([hidden]) {
        display: block !important;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
    }

    #product-page-container .product-tabs button.tab-accordion-header.tab-accordion-header--hide-all-bottom {
        appearance: none;
        -webkit-appearance: none;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        text-align: right;
        width: 100%;
        padding: 14px 16px;
        min-height: 48px;
        font-weight: 500;
        font-family: inherit;
        color: #6b7280;
        background: #fff;
        border: none;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        box-sizing: border-box;
        box-shadow: none;
    }

    #product-page-container .product-tabs .tab-accordion-item .tab-content {
        min-height: 0;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        padding-left: var(--product-tab-content-inset-x);
        padding-right: var(--product-tab-content-inset-x);
    }

    /* Tab buttons: even spacing when stacked vertically */
    #product-page-container .tabs-container {
        gap: 8px;
    }

    .tabs {
        margin-top: 24px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab-button {
        padding: 8px 16px;
        white-space: nowrap;
    }

    #product-page-container .product-tabs .tab-content {
        padding: 12px var(--product-tab-content-inset-x);
    }

    .contact-box {
        margin-top: 24px;
        padding: 16px;
    }

    .carousel-arrow svg {
        width: 24px;
        height: 40px;
    }

    .carousel-arrow.left {
        left: 0;
    }

    .carousel-arrow.right {
        right: 0;
    }

    .image-carousel {
        max-width: 100%;
        flex: 0 0 auto;
    }

    .carousel-image-wrap {
        max-width: 100%;
    }

    #product-image {
        max-width: 100%;
        height: auto;
    }

    #product-page-container .image-gallery-container {
        flex-flow: column nowrap;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 10px;
    }

    #product-page-container .thumbnail-gallery {
        flex-flow: row wrap;
        justify-content: flex-start;
        max-width: 100%;
    }

    .contact-section {
        padding: 16px;
        scroll-margin-top: 16px;
    }

    .contact-section .contact-grid {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
}

@media (max-width: 600px) {
    .spec-label,
    .contact-box .contact-label {
        width: 100%;
        margin-bottom: 4px;
    }

    .contact-box .contact-grid {
        grid-template-columns: 1fr;
        gap: 10px 0;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .feature-card {
        padding: 16px;
    }

    .contact-box {
        padding: 14px;
    }

    .contact-form {
        margin-top: 16px;
    }

    .contact-section {
        padding: 14px;
        scroll-margin-top: 12px;
    }
}

/* ================================================
   Why Choose Lionex (product footer block)
   Used in product-footer-blocks.html on both product and category pages.
   Scoped to #product-page-container for product pages; .main-content fallback for category pages.
   ================================================ */
.main-content .why-lionex .benefit-icon-large {
    width: 40px;
    height: 40px;
    min-width: 40px;
    max-width: 40px;
    min-height: 40px;
    max-height: 40px;
    overflow: hidden;
    flex-shrink: 0;
}
.main-content .why-lionex .benefit-icon-large svg {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    flex-shrink: 0;
}
@media (max-width: 768px) {
    .main-content .why-lionex .benefit-icon-large {
        width: 36px;
        height: 36px;
        min-width: 36px;
        max-width: 36px;
        min-height: 36px;
        max-height: 36px;
    }
}
@media (max-width: 480px) {
    .main-content .why-lionex .benefit-icon-large {
        width: 32px;
        height: 32px;
        min-width: 32px;
        max-width: 32px;
        min-height: 32px;
        max-height: 32px;
    }
}

#product-page-container .why-lionex {
    margin-top: 30px;
    padding: 28px 24px;
    background: #fff;
    border-radius: 0;
}

#product-page-container .why-lionex h2 {
    margin: 0 0 12px 0;
    font-weight: 600;
    color: var(--lionex-primary);
    text-align: center;
}

#product-page-container .benefits-grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}

#product-page-container .benefit-card {
    min-width: 0;
    text-align: center;
    padding: 20px 16px;
    background: transparent;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

#product-page-container .benefit-icon-large {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    max-width: 40px;
    max-height: 40px;
    margin: 0 auto 12px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

#product-page-container .benefit-icon-large svg {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    object-fit: contain;
}

#product-page-container .benefit-card h3 {
    margin: 0 0 6px 0;
    font-weight: 600;
    color: #333;
}

#product-page-container .benefit-card p {
    margin: 0;
    color: #666;
    line-height: 1.6;
}

@media (max-width: 768px) {
    #product-page-container .why-lionex {
        padding: 24px 20px;
    }

    #product-page-container .benefits-grid-cards {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 12px;
    }

    #product-page-container .benefit-card {
        padding: 16px 12px;
    }

    #product-page-container .benefit-icon-large {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        max-width: 36px;
        max-height: 36px;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    #product-page-container .why-lionex {
        padding: 20px 16px;
    }

    #product-page-container .benefits-grid-cards {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    #product-page-container .benefit-card {
        padding: 14px 10px;
    }

    #product-page-container .benefit-icon-large {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
        max-width: 32px;
        max-height: 32px;
        margin-bottom: 8px;
    }
}

/* Unscoped fallback: why-lionex on category pages (no #product-page-container) */
.main-content .why-lionex .benefits-grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}
.main-content .why-lionex .benefit-card {
    min-width: 0;
}
.main-content .why-lionex .benefit-icon-large {
    width: 40px;
    height: 40px;
    min-width: 40px;
    max-width: 40px;
    min-height: 40px;
    max-height: 40px;
    overflow: hidden;
    flex-shrink: 0;
}
.main-content .why-lionex .benefit-icon-large svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
@media (max-width: 768px) {
    .main-content .why-lionex .benefit-icon-large {
        width: 36px;
        height: 36px;
        min-width: 36px;
        max-width: 36px;
        min-height: 36px;
        max-height: 36px;
    }
}
@media (max-width: 480px) {
    .main-content .why-lionex .benefits-grid-cards {
        grid-template-columns: 1fr;
    }
    .main-content .why-lionex .benefit-icon-large {
        width: 32px;
        height: 32px;
        min-width: 32px;
        max-width: 32px;
        min-height: 32px;
        max-height: 32px;
    }
}

/* ================================================
   Product footer blocks (contact, footer note)
   ================================================ */
.contact-section {
    margin-top: 20px;
    padding: 20px 20px;
    background: #eef2f7;
    border-radius: 0;
    border: 1px solid rgba(0, 91, 159, 0.25);
    border-left: 6px solid var(--lionex-primary);
    text-align: center;
    scroll-margin-top: 20px;
}

.contact-section h2 {
    margin: 0 0 14px 0;
    font-weight: 700;
    color: var(--lionex-primary-dark);
    letter-spacing: -0.3px;
}

.contact-section > p {
    margin: 0 0 24px 0;
    color: #333;
}

.contact-section .contact-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.contact-section .contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-section .contact-label {
    font-weight: 600;
    color: #333;
}

.contact-section .contact-item a {
    color: var(--lionex-primary);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.contact-section .contact-item a:hover,
.contact-section .contact-item a:focus {
    text-decoration: underline;
}

.product-specific-footer-note {
    text-align: center;
}

.product-specific-footer-note p {
    margin: 0;
    color: var(--lionex-text-muted);
}

.page-footer-notes {
    margin-top: 24px;
    padding-top: 0;
    text-align: center;
}

.page-footer-notes .footer-note {
    margin: 0;
    color: var(--lionex-text-muted);
}
