/*---*\
    Product Highlights
    Tabbed product specs/features accordion for product detail pages

    KEY FEATURES:
    - Desktop: all tabs visible; tablet/mobile: carousel tabs with arrows
    - Accordion: first item open; one open at a time; chevron rotates
    - Spec rows: label/value pairs with dividers
    - Compare Products: SpecCheck Lite embed restyled to styleguide tokens
    - Background: bg-gray-pattern utility

    IMPLEMENTATION NOTES:
    - Mobile-first; breakpoints 768px / 1200px
    - section-padding on <section> for patterned band
    - Layout: flexbox; active tab caret via ::after
\*---*/

.product-highlights__heading {
    margin: 0 0 35px;
    text-align: center;
    text-transform: uppercase;
}

.product-highlights__card {
    display: flex;
    flex-direction: column;
    gap: 35px;
    width: 100%;
    padding: 32px 13px;
    border-radius: 5px;
    background-color: var(--color-surface-white);
}

.product-highlights__tabs {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.product-highlights__tab-nav {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 16px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--color-secondary);
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    -webkit-text-stroke: 0.25;
}

.product-highlights__tab-nav[hidden] {
    display: none;
}

.product-highlights__tab-nav:focus-visible {
    outline: 2px solid var(--color-secondary);
    outline-offset: 2px;
}

.product-highlights__tabs-viewport {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    padding-bottom: 14px;
}

.product-highlights__tabs-track {
    display: flex;
    gap: 10px;
    width: 100%;
    transition: transform 0.3s ease;
}

.product-highlights__tab {
    position: relative;
    display: flex;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 56px;
    margin: 0;
    padding: 16px 20px;
    border: 0;
    border-radius: 5px;
    box-shadow: inset 0 0 0 2px var(--color-secondary);
    background-color: var(--color-surface-white);
    color: var(--color-secondary);
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.product-highlights__tab::before {
    content: "";
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background-color: var(--color-secondary);
}

.product-highlights__tab::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    width: 0;
    height: 0;
    border-top: 14px solid var(--color-secondary);
    border-right: 11px solid transparent;
    border-left: 11px solid transparent;
    opacity: 0;
    transform: translateX(-50%);
    transition: opacity 0.2s ease;
}

@media (hover: hover) {
    .product-highlights__tab:hover {
        background-color: var(--color-primary);
        box-shadow: inset 0 0 0 0 var(--color-primary);
        color: var(--color-secondary);
    }
}

.product-highlights__tab:focus-visible {
    outline: 2px solid var(--color-secondary);
    outline-offset: 2px;
}

.product-highlights__tab.is-active {
    background-color: var(--color-primary);
    border-color: transparent;
    box-shadow: inset 0 0 0 0 var(--color-primary);
    color: var(--color-secondary);
}

.product-highlights__tab.is-active::after {
    opacity: 1;
}

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

.product-highlights__speccheck {
    --scl-brand-color-primary: var(--color-primary);
    width: 100%;
    min-height: 320px;
}

.product-highlights__speccheck.is-fallback {
    min-height: 0;
}

.product-highlights__speccheck-fallback {
    margin: 0;
    color: var(--color-paragraph-body);
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.5;
}

/* SpecCheck Lite embed - styleguide-aligned overrides */
.product-highlights__speccheck .specCheckLite .scl-screen,
.product-highlights__speccheck .specCheckLite .scl-screen * {
    font-family: var(--font-body);
}

.product-highlights__speccheck .specCheckLite .scl-screen {
    background-color: transparent;
    color: var(--color-paragraph-body);
}

.product-highlights__speccheck .specCheckLite .scl-screen h1 {
    margin: 0 0 8px;
    color: var(--color-heading);
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
}

.product-highlights__speccheck .specCheckLite .scl-screen h2 {
    margin: 0 0 12px;
    border: 0;
    color: var(--color-text-muted);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
}

.product-highlights__speccheck .specCheckLite .scl-screen .scl-button {
    float: right;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--button-gap);
    box-sizing: border-box;
    min-height: calc(var(--button-padding-y) * 2 + var(--button-font-size) + 5px);
    margin: 0 0 12px 16px;
    padding: var(--button-padding-y) var(--button-padding-x);
    border: 2px solid transparent;
    border-radius: var(--radius-button);
    background-color: transparent;
    background-image: var(--button-gradient-primary);
    box-shadow: inset 0 -5px 0 0 var(--color-primary-hover);
    color: var(--color-secondary);
    font-family: var(--font-button);
    font-size: var(--button-font-size);
    font-weight: 700;
    letter-spacing: 0;
    line-height: var(--button-line-height);
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

/* Sit title + subtitle beside floated Compare/Back */
.product-highlights__speccheck .specCheckLite .scl-screen > h1,
.product-highlights__speccheck .specCheckLite .scl-screen > h2 {
    overflow: hidden;
}

.product-highlights__speccheck .specCheckLite .scl-screen > h2 {
    margin-bottom: 12px;
}

.product-highlights__speccheck .specCheckLite .scl-screen > #sclAttributeSelection,
.product-highlights__speccheck .specCheckLite .scl-screen > #sclMachineSelection,
.product-highlights__speccheck .specCheckLite .scl-screen > .scl-button-compare-container,
.product-highlights__speccheck .specCheckLite .scl-screen > .scl-powered-by {
    clear: both;
}

/* SpecCheck hides these; keep them hidden after our .scl-button display override */
.product-highlights__speccheck .specCheckLite .scl-screen .scl-back-alt,
.product-highlights__speccheck .specCheckLite .scl-screen .scl-button-compare-alt,
.product-highlights__speccheck .specCheckLite .scl-button-compare-container {
    display: none;
}

.product-highlights__speccheck .specCheckLite .scl-screen .scl-button:hover,
.product-highlights__speccheck .specCheckLite .scl-screen .scl-button:focus-visible {
    border-color: transparent;
    background-image: var(--button-gradient-secondary);
    box-shadow: inset 0 -5px 0 0 var(--color-paragraph-body);
    color: var(--color-primary);
}

.product-highlights__speccheck .specCheckLite .scl-screen .scl-button:focus-visible {
    outline: 2px solid var(--color-secondary);
    outline-offset: 2px;
}

.product-highlights__speccheck .specCheckLite .scl-screen .scl-back {
    background-image: var(--button-gradient-secondary);
    box-shadow: inset 0 -5px 0 0 var(--color-paragraph-body);
    color: var(--color-primary);
}

.product-highlights__speccheck .specCheckLite .scl-screen .scl-back:hover,
.product-highlights__speccheck .specCheckLite .scl-screen .scl-back:focus-visible {
    background-image: var(--button-gradient-primary);
    box-shadow: inset 0 -5px 0 0 var(--color-primary-hover);
    color: var(--color-secondary);
}

.product-highlights__speccheck .specCheckLite label[for="attributeSelect"] {
    display: block;
    margin: 0 0 8px;
    color: var(--color-heading);
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
}

.product-highlights__speccheck .specCheckLite select {
    box-sizing: border-box;
    min-height: 53px;
    margin: 0 0 16px;
    padding: 15px 44px 15px 16px;
    border: 1px solid var(--color-border-input);
    border-radius: 4px;
    appearance: none;
    background-color: var(--color-surface-white);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='21' height='21' viewBox='0 0 21 21' fill='none'%3E%3Cpath d='M5 8l5.5 5L16 8' stroke='%23010203' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    background-size: 21px 21px;
    color: var(--color-paragraph-content);
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.3;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.product-highlights__speccheck .specCheckLite select:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    background-color: var(--color-surface-input-focus);
}

.product-highlights__speccheck .specCheckLite #sclMachineSelection {
    gap: 24px;
    align-items: stretch;
}

.product-highlights__speccheck .specCheckLite .scl-machineSelectPane {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    background-color: var(--color-surface-gray);
    overflow: hidden;
}

.product-highlights__speccheck .specCheckLite .scl-paneHead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    background-image: var(--button-gradient-primary);
    color: var(--color-secondary);
}

.product-highlights__speccheck .specCheckLite .scl-paneHead .scl-title {
    color: var(--color-heading);
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
}

.product-highlights__speccheck .specCheckLite #sclMachineSelection ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.product-highlights__speccheck .specCheckLite #sclMachineSelection li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
    padding: 12px 20px;
    border-bottom: 1px solid var(--color-border);
    transition: background-color 0.2s ease;
}

.product-highlights__speccheck .specCheckLite #sclMachineSelection li:before {
    display: none;
}

.product-highlights__speccheck .specCheckLite #sclMachineSelection li:last-child {
    border-bottom: 0;
}

.product-highlights__speccheck .specCheckLite #sclMachineSelection li:hover {
    background-color: var(--color-surface-white);
}

.product-highlights__speccheck .specCheckLite #sclMachineSelection li.scl-selected {
    background-color: var(--color-surface-card-hover);
}

.product-highlights__speccheck .specCheckLite #sclMachineSelection li.scl-locked {
    opacity: 0.72;
}

.product-highlights__speccheck .specCheckLite #sclMachineSelection input[type="checkbox"] {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin: 1px 0 0;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.product-highlights__speccheck .specCheckLite #sclMachineSelection label {
    flex: 1 1 auto;
    margin: 0;
    color: var(--color-paragraph-body);
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
    cursor: pointer;
}

.product-highlights__speccheck .specCheckLite #sclMachineSelection .scl-machine-manufacturer {
    display: block;
    margin-bottom: 2px;
    color: var(--color-text-muted);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.product-highlights__speccheck .specCheckLite #sclMachineSelection .scl-machine-model {
    display: block;
    color: var(--color-heading);
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
}

.product-highlights__speccheck .specCheckLite #sclMachineSelection .scl-attr,
.product-highlights__speccheck .specCheckLite #sclMachineSelection .scl-attrval {
    color: var(--color-text-muted);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
}

.product-highlights__speccheck .specCheckLite .scl-powered-by {
    margin-top: 24px;
    opacity: 0.7;
}

.product-highlights__speccheck .specCheckLite #sclMachineSelectScreen ul li a,
.product-highlights__speccheck .specCheckLite #sclRangeSelectScreen ul li a {
    color: var(--color-heading);
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    padding: 16px 12px;
    border-radius: var(--radius-card);
    transition: background-color 0.2s ease;
}

.product-highlights__speccheck .specCheckLite #sclMachineSelectScreen ul li a:hover,
.product-highlights__speccheck .specCheckLite #sclMachineSelectScreen ul li a:active,
.product-highlights__speccheck .specCheckLite #sclRangeSelectScreen ul li a:hover,
.product-highlights__speccheck .specCheckLite #sclRangeSelectScreen ul li a:active {
    background-color: var(--color-surface-card-hover);
}

.product-highlights__speccheck .specCheckLite #sclComparisonScreen table tbody.scl-section th > span {
    color: var(--color-heading);
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    padding: 16px 20px;
    background-color: var(--color-surface-search-hover);
}

.product-highlights__speccheck .specCheckLite #sclComparisonScreen table tbody.scl-section th.scl-expanded > span {
    background-image: var(--button-gradient-primary);
    background-color: transparent;
}

.product-highlights__speccheck .specCheckLite #sclComparisonScreen table tbody.data th,
.product-highlights__speccheck .specCheckLite #sclComparisonScreen table tbody.data td,
.product-highlights__speccheck .specCheckLite #sclComparisonScreen table tbody.data .scl-attrval {
    color: var(--color-paragraph-body);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.4;
}

.product-highlights__speccheck .specCheckLite #sclComparisonScreen table tbody.data tr:not(:first-child) {
    border-top: 1px solid var(--color-border);
}

.product-highlights__speccheck .specCheckLite #sclComparisonScreen table tbody.data tr.scl-data-row:hover,
.product-highlights__speccheck .specCheckLite #sclComparisonScreen table tbody.data tr.scl-data-row:hover th {
    background-color: var(--color-surface-card-hover);
}

.product-highlights__speccheck .specCheckLite #sclComparisonScreen table tbody.data tr.scl-modelNameRow th {
    color: var(--color-heading);
    font-family: var(--font-heading);
    font-weight: 700;
}

@media (min-width: 768px) {
    .product-highlights__speccheck .specCheckLite .scl-screen h1 {
        font-size: 28px;
    }

    .product-highlights__speccheck .specCheckLite .scl-paneHead .scl-title {
        font-size: 20px;
    }

    .product-highlights__speccheck .specCheckLite #sclMachineSelection {
        gap: 32px;
    }
}

@media (max-width: 767px) {
    .product-highlights__speccheck .specCheckLite .scl-screen > .scl-button {
        float: none;
        display: flex;
        width: 100%;
        margin: 0 0 12px;
    }

    .product-highlights__speccheck .specCheckLite .scl-screen > h1,
    .product-highlights__speccheck .specCheckLite .scl-screen > h2 {
        overflow: visible;
    }
}

.product-highlights__accordion {
    display: flex;
    flex-direction: column;
    gap: 35px;
    width: 100%;
}

.product-highlights__item {
    width: 100%;
    background-color: var(--color-surface-gray);
}

.product-highlights__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    margin: 0;
    padding: 15px 25px;
    border: 0;
    background-color: var(--color-surface-search-hover);
    color: var(--color-heading);
    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.25s ease, background-image 0.25s ease;
}

.product-highlights__toggle:focus-visible {
    outline: 2px solid var(--color-secondary);
    outline-offset: 2px;
}

.product-highlights__toggle-text {
    flex: 1 1 auto;
}

.product-highlights__icon {
    flex-shrink: 0;
    font-size: 21px;
    line-height: 1;
    pointer-events: none;
    transform: rotate(90deg);
    transition: transform 0.25s ease;
}

.product-highlights__item.is-expanded .product-highlights__toggle {
    padding: 20px 25px;
    background-color: transparent;
    background-image: var(--button-gradient-primary);
}

.product-highlights__item.is-expanded .product-highlights__icon {
    transform: rotate(-90deg);
}

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

.product-highlights__content-inner {
    padding: 35px 25px;
}

.product-highlights__rows {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 0;
}

.product-highlights__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 7px;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-paragraph-body);
}

.product-highlights__label {
    flex: 1 1 auto;
    margin: 0;
    font-family: var(--font-button);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.27;
}

.product-highlights__value {
    flex: 0 1 auto;
    max-width: 50%;
    margin: 0;
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 400;
    line-height: 1.5;
    text-align: right;
}

.product-highlights__wysiwyg > *:first-child {
    margin-top: 0;
}

.product-highlights__wysiwyg > *:last-child {
    margin-bottom: 0;
}

.product-highlights__wysiwyg p {
    margin: 0;
    color: var(--color-paragraph-body);
    font-size: 15px;
    line-height: 1.5;
}

.product-highlights__panel .scl-comparisongrid-holder {
    margin-bottom: 30px;
}

@media (min-width: 768px) {
    .product-highlights__card {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        padding: 32px;
    }

    .product-highlights__tab-nav {
        width: 56px;
        height: 24px;
        font-size: 24px;
    }

    .product-highlights__toggle {
        padding: 20px 25px;
        font-size: 28px;
    }

    .product-highlights__item.is-expanded .product-highlights__toggle {
        padding: 25px;
    }

    .product-highlights__label {
        font-size: 16px;
        line-height: 1.25;
    }
}

@media (min-width: 1200px) {
    .product-highlights__card {
        max-width: 1106px;
        padding: 32px;
    }

    .product-highlights__tabs {
        gap: 32px;
    }

    .product-highlights__tabs-track {
        gap: 32px;
    }

    .product-highlights__tab {
        flex: 1 1 0;
    }

    .product-highlights__toggle {
        font-size: 28px;
    }

    .product-highlights__item.is-expanded .product-highlights__toggle {
        padding: 35px 25px;
    }

    .product-highlights__label {
        font-size: 18px;
    }
}

/*
 * Spanish (Weglot): "Características de serie/opcionales" is longer than
 * "Standard/Optional Features" and overflows the nowrap tab border.
 */
@media (min-width: 1200px) {
    html:lang(es) .product-highlights__tab {
        padding: 12px 10px;
        font-size: 18px;
        line-height: 1.2;
        white-space: normal;
    }
}
