﻿/* PRODUCT CSS */

.product__information {
    display: grid;
    grid-template-columns: 1fr 3fr;
    column-gap: 1rem;
    margin-top: 10px;
}

.product__DetailsWrapper dd, .product__DetailsWrapper dt, .product__modelsDimensions dd, .product__modelsDimensions dt {
    font-family: var(--secondary-font-family);
}

.product-accordion ul.product-links {
    padding-left: 0px;
}

    .product-accordion ul.product-links li {
        list-style: none;
        font-size: 15px;
    }

        .product-accordion ul.product-links li a {
            font-size: 15px;
        }

            .product-accordion ul.product-links li a:hover {
                text-decoration: var(--text-decoration);
                text-underline-offset: var(--text-decoration-offset);
                text-decoration-thickness: var(--text-decoration-thickness);
            }

.product-accordion span {
    position: relative;
    font-size: var(--quaternary-heading-font-size);
}

details.product-accordion span svg {
    transform: rotate(180deg);
}

details[open].product-accordion span svg {
    transform: rotate(0deg);
}

.product-retailerLink svg {
    transform: rotate(90deg);
    margin-left: 9px;
}

details[open].product-accordion span svg, .product-retailerLink svg {
    height: 18px;
    width: 18px;
    transition: var(--arrowTransition);
}

.product__information > .product__DetailsWrapper,
.product__information > .product__modelsDimensions {
    display: contents;
}

.product__information dt {
    grid-column: 1;
    margin: 0;
    padding: 0.25rem 0;
    font-weight: 400;
}

.product__information dd {
    grid-column: 2;
    margin: 0;
    padding: 0.25rem 0;
}

.product__description {
    margin-bottom: 30px;
}

.product__heading {
    margin-bottom: 2rem;
    font-size: 27px;
}

.productNoticeContainer.productNoticeMobile p {
    margin-top: 30px;
    margin-bottom: 40px;
}

.productNoticeContainer.productNoticeDesktop {
    margin-right: 50px;
}

.productNoticeContainer p, .productNoticeContainer a {
    color: var(--tertiary-font-color);
    font-size: 14px;
    line-height: 19px;
}

.product__descriptionMobile {
    display: none;
}

.productNoticeMobile {
    display: none;
}

.product-accordion {
    margin-bottom: 5px;
    list-style: none;
}

.product-retailerLink {
    margin-bottom: 5px;
    font-family: var(--primary-font-family);
    font-size: var(--quaternary-heading-font-size)
}

/* Product header */

.product-header--mobile {
    display: none;
}

.product-header--desktop {
    display: block;
}

@media(max-width: 991px) {
    .productNoticeMobile {
        display: block;
    }

    .productNoticeDesktop {
        display: none;
    }
}

@media(max-width: 768px) {

    .product-header .product__description {
        display: unset;
        margin-bottom: 30px;
    }

    .product-header--mobile {
        margin-bottom: 10px;
    }

    .product__description {
        margin-bottom: 30px;
        margin-top: 20px;
    }

    .product__descriptionMobile {
        display: block;
    }

    #product__desktopHeader {
        display: none;
    }

    .product__heading {
        margin-bottom: 0px;
    }
    .product-header--mobile {
        display: block;
    }

    .product-header--desktop {
        display: none;
    }
    .product__page .row > *:has(.product__media) {
        padding-left: 0px;
        padding-right: 0px;
    }
    .productNoticeDesktop {
        margin-right: 5px;
    }
    .product__media-pager {
        padding-top: 0px;
        padding-bottom: 0px;
        margin-top: 11px;
    }

    .product__description {
        margin-bottom: 20px;
    }
}

/* GENERAL OVERWRITES */
@media(max-width: 768px) {
    .product__page h1 {
        font-size: 20px;
        line-height: var(--mobilePrimaryLineHeight);
    }

    .product__page h2 {
        font-size: var(--mobileSecondaryFontSize);
        line-height: var(--mobileSecondaryLineHeight);
    }

    .product__page h3 {
        font-size: var(--mobileTertiaryFontSize);
        line-height: var(--mobileTertiaryLineHeight);
    }

    .product__description {
        text-align: left !important;
    }
}

/* SWATCHES */
/* Swatches */
.swatch-group {
    border-bottom: unset;
    margin: 0 0 4px;
    font-family: Arial, sans-serif;
}

li.swatch.is-disabled {
    cursor: not-allowed;
}


.swatch-group__header h3 {
    margin: 0;
    font-size: 18px;
}


.swatch-group__header {
    position: relative;
    padding-right: 20px;
}


.swatch-group .swatch-list {
    display: none;
}


.swatch-group.is-open .swatch-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 10px 0 6px;
    padding: 0;
    list-style: none;
}


.swatch {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}


.swatch__img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #333;
    display: block;
}


.swatch__label {
    margin-top: 4px;
}

.swatch-group .swatch-list,
.swatch-group .swatch-brand {
    display: none;
}

.swatch-brand:first-child {
    margin-top: 0px;
}
/*
.swatch-group {
    margin-bottom: 20px;
}
    */


/* OPEN state � show brands + their swatch lists */
.swatch-group.is-open .swatch-brand {
    display: block;
}

.swatch__img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #fff; /* subtle inner border */
    box-shadow: 0 0 0 1px rgba(0,0,0,.15); /* default subtle ring */
    transition: box-shadow .15s ease, transform .15s ease;
}

/* Hover / focus */
.swatch:hover .swatch__img,
.swatch:focus-visible .swatch__img {
    transform: translateZ(0) scale(1.03);
    box-shadow: 0 0 0 2px rgba(0,0,0,.25);
}

/* Keyboard accessibility */
.swatch:focus {
    outline: none;
}

.swatch:focus-visible {
    outline: 1px solid rgba(0,0,0,.4);
    outline-offset: 4px;
    border-radius: 10px;
}

.swatch.is-disabled .swatch__img-wrap {
    position: relative;
}

.swatch[aria-disabled="true"]::before {
    opacity: 0; /* ensure line stays hidden if disabled */
}

li.swatch.is-active .swatch__img {
    transform: translateZ(0) scale(1.03);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, .25);
}

.swatch-group__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 4px 0;
    line-height: 1.2;
    margin-bottom: 20px;
    border-bottom: 1px solid #3a3a3a;
}


.swatch-group.is-open {
    border-bottom: 1.5px solid #444;
    margin-bottom: 20px;
}

.is-open .swatch-group__header {
    margin-bottom: 0px
}

.is-open .swatch-wrapper {
    padding-top: 20px;
}

h4.swatch-brand__title {
    font-size: 16px;
    font-weight: 400;
    padding-left: 5px;
    max-width: 100%;
    font-family: var(--secondary-font-family);
}

.swatch-list:last-child {
    margin-bottom: 0px;
}

.swatch-brand {
    margin-bottom: 20px;
    margin-top: 30px;
}

.swatch-group--wood .swatch {
    margin: 15px 0px;
}

.swatch-group__header svg {
    height: var(--arrowHeight);
    width: var(--arrowWidth);
    transition: var(--arrowTransition);
    transform: rotate(180deg);
}

.swatch-group.is-open .swatch-group__header svg {
    transform: rotate(0deg);
}

.swatch p {
    margin-top: 8px;
    margin-bottom: 8px;
    max-width: 70px;
    width: 70px;
    text-align: center;
    font-size: 12px;
    line-height: 18px;
}

/* Scroll styling */
.swatch-wrapper {
    max-height: 330px;
    overflow-y: auto;
}

.swatch.is-disabled .swatch__img-wrap:hover::after {
    content: "Preview currently unavailable";
    position: absolute;
    left: 50%;
    top: -8px;
    transform: translate(-50%, -100%);
    z-index: 2;
    pointer-events: none;
    padding: 6px 10px;
    background: rgb(160, 160, 160);
    border-radius: 6px;
    white-space: nowrap;
    color: #fff;
}

.swatch.is-disabled .swatch__img-wrap:hover::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -8px; 
    transform: translateX(-50%);
    z-index: 2;
    pointer-events: none;
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 7px solid rgb(160, 160, 160);
}

.product__media {
    position: relative;
    overflow: hidden;
}

.product__media-track {
    display: flex;
    transition: transform .35s ease;
    will-change: transform;
}

.product-media__item {
    min-width: 100%;
    margin: 0;
    display: grid;
    place-items: center;
}

    .product-media__item img {
        max-width: 100%;
        height: auto;
        display: block;
        width: 100%;
    }

/* Pager row */
.product__media-pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .75rem 1rem .75rem;
    gap: 1rem;
}

.media-pager__nums {
    display: flex;
    align-items: center;
    gap: .75rem;
    position: relative;
}

.media-pager__num {
    position: relative;
    appearance: none;
    border: 0;
    background: none;
    cursor: pointer;
    padding: 0 .15rem;
    font-family: var(--secondary-font-family);
    color: var(--primary-font-color);
    text-decoration: none;
}

    /* active underline + the owl-style marker line */
    .media-pager__num[aria-current="true"],
    .media-pager__num[aria-selected="true"] {
        opacity: 1;
    }

        .media-pager__num[aria-current="true"]::before,
        .media-pager__num[aria-selected="true"]::before {
            content: '';
            height: 1px;
            width: 25px;
            background: #3a3a3a;
            display: block;
            position: absolute;
            bottom: 6px; /* adjust visually */
            left: -30px; /* adjust visually */
            transition: 200ms all ease-in-out;
        }

/* Right CTA link */
.product__media-cta {
    margin-left: auto;
    text-decoration: none;
    color: inherit;
    position: relative;
    padding-bottom: 2px;
}

    .product__media-cta::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 1px;
        background: #111;
        opacity: .6;
    }


.product-retailerLink svg {
    margin-bottom: 6px;
}

button.media-pager__num.is-active {
    margin-left: 30px;
    color: var(--primary-font-color);
}

button.media-pager__num {
    color: var(--tertiary-font-color);
}

.product-accordion .accordion-inner {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height .5s ease, opacity .4s ease;
}

.product-accordion[open] .accordion-inner {
    max-height: 2000px; /* just higher than content will ever be */
    opacity: 1;
}

/* Page-level nav arrow using the media selected in Umbraco */
.product-accordion .nav-download-arrow-down, details[open].product-accordion .nav-download-arrow-down {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    vertical-align: middle;
    position: relative;
}

.product-accordion .nav-download-arrow-down::after, details[open].product-accordion .nav-download-arrow-down::after {
        content: '';
        position: absolute;
        inset: 0;
        background-image: url('@(navArrowDownMedia?.Url() ?? "")');
        background-repeat: no-repeat;
        background-position: center;
        background-size: contain;
        display: block;
        width: 20px;
        height: 20px;
        transform: translateY(-15%);
}

.product__media {
    margin-right: 50px;
}

.productNoticeDesktop {
    margin-right: 5px;
}

.product-links svg {
    transform: rotate(90deg);
    height: 16px;
    width: 16px;
}

.swatch-group,
.product-accordion,
.product-retailerLink {
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

.swatch-group__header svg {
    margin-top: -7px;
}

@media(max-width: 1400px) {
    .product__media {
        margin-right: 20px;
    }
}

@media(max-width: 1200px) {
    .product__media {
        margin-right: 5px;
    }
}

@media(max-width: 991px) {
    .product__media {
        margin-right: 0px;
    }
}

@media(max-width: 768px) {
    .swatch p {
        text-align: center !important;
    }

    .swatch-group.is-open .swatch-list {
        gap: 1px;
    }
    h4.swatch-brand__title {
        text-align: left;
    }

    .swatch-group__header {
        padding-top: 0px;
        padding-bottom: 0px;
        margin-bottom: 0px;
        margin-top: 0px;
        text-align: left;
    }

    .swatch-group {
        margin-top: 20px;
        margin-bottom: 20px;
    }
}