/*
|--------------------------------------------------------------------------
| JPL Product Detail — Clean Static Layout + Single Row Thumbnail Carousel
|--------------------------------------------------------------------------
| Desktop:
| - No sticky behaviour.
| - Main image is cropped to align with the right-side product information.
| - Only one row of thumbnails is visible.
| - Left/right arrows browse the remaining designs.
|
| Tablet/mobile:
| - Main image uses a square aspect ratio.
| - Thumbnail carousel remains one row.
*/

.product-detail {
    padding: 90px 0;
    overflow: visible;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(390px, .92fr);
    gap: 56px;
    align-items: start;
    overflow: visible;
    font-size: 14.5px;
}

.product-gallery {
    min-width: 0;
    position: relative;
}

/*
|--------------------------------------------------------------------------
| Main image
|--------------------------------------------------------------------------
| JS sets its desktop height to the actual right-side content height.
| object-fit: cover crops the bottom/top as necessary without distortion.
*/

.main-product-image {
    position: relative;
    width: 100%;
    height: 540px;
    min-height: 420px;

    background: #f8f8f8;
    overflow: hidden;
    box-shadow: 0 18px 55px rgba(0,0,0,.10);

    display: grid;
    place-items: center;
}

.main-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.main-product-image.empty {
    min-height: 420px;
    color: #777;
}

/*
|--------------------------------------------------------------------------
| Thumbnail carousel
|--------------------------------------------------------------------------
*/

.thumbnail-carousel {
    position: relative;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    gap: 10px;
    align-items: center;
    margin-top: 18px;
}

.thumbnail-viewport {
    min-width: 0;
    overflow: hidden;
    scroll-behavior: smooth;
}

.thumbnail-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    width: max-content;
    align-items: center;
}

.thumbnail-item {
    flex: 0 0 auto;
    width: 100px;
    height: 100px;
    aspect-ratio: 1 / 1;

    padding: 0;
    margin: 0;

    border: 2px solid transparent;
    background: transparent;

    overflow: hidden;
    cursor: pointer;

    box-shadow: 0 8px 24px rgba(0,0,0,.07);
}

.thumbnail-item.active {
    border-color: #e32b22;
}

.thumbnail-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.thumbnail-arrow {
    width: 42px;
    height: 58px;
    border: 1px solid rgba(0,0,0,.10);
    background: #ffffff;
    color: #222;
    cursor: pointer;

    display: grid;
    place-items: center;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 36px;
    line-height: 1;

    box-shadow: 0 8px 22px rgba(0,0,0,.06);
    transition: .2s ease;
}

.thumbnail-arrow:hover:not(:disabled) {
    background: #111;
    color: #fff;
}

.thumbnail-arrow:disabled {
    opacity: .25;
    cursor: default;
}

/*
|--------------------------------------------------------------------------
| Image design code
|--------------------------------------------------------------------------
*/

.image-design-code {
    position: absolute;
    top: 22px;
    right: 22px;
    bottom: auto;
    z-index: 2;

    background: #ffffff;
    color: #111111;

    padding: 12px 22px;
    border-radius: 12px;

    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 0.04em;

    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/*
|--------------------------------------------------------------------------
| Right-side product information
|--------------------------------------------------------------------------
| Sticky is intentionally removed per client request.
*/

.product-info {
    position: static;
    align-self: start;
    min-width: 0;
    overflow: visible;
}

.product-info h1 {
    font-size: clamp(38px, 3vw, 62px);
    line-height: 1.02;
    margin: 0 0 10px;
    letter-spacing: -.04em;
}

.product-subtitle {
    font-size: 18px;
    color: #777;
    margin: 0 0 20px;
}

.selected-design {
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 22px;
    padding: 22px;
    margin: 22px 0 0;
}

.selected-design .label {
    display: block;
    color: #777;
    font-size: .9rem;
    margin-bottom: 6px;
}

.selected-design strong {
    display: block;
    font-size: 1.7rem;
    line-height: 1.15;
    margin: 0;
}

.selected-design em {
    display: block;
    color: #777;
    font-style: normal;
    margin-top: 6px;
}

.selected-design-description {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #ececec;
    color: #555;
    font-size: 14px;
    line-height: 1.55;
}

.selected-design-description p {
    margin: 0 0 12px;
}

.selected-design-description p:last-child {
    margin-bottom: 0;
}

/*
|--------------------------------------------------------------------------
| Downloads
|--------------------------------------------------------------------------
*/

.document-downloads {
    margin-top: 22px;
}

.document-downloads h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.document-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.document-list a {
    display: flex;
    min-width: 0;
    min-height: 58px;
    padding: 10px 8px;
    border-radius: 14px;
    background: #fff;
    color: #111;
    border: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 8px 22px rgba(0,0,0,.05);
    font-size: 11px;
    line-height: 1.2;
    font-weight: 800;
    text-align: center;
    align-items: center;
    justify-content: center;
    transition: .22s ease;
}

.document-list a::after {
    display: none;
}

.document-list a:hover {
    transform: translateY(-2px);
    border-color: rgba(227,43,34,.35);
    box-shadow: 0 12px 28px rgba(0,0,0,.09);
}

/*
|--------------------------------------------------------------------------
| Responsive
|--------------------------------------------------------------------------
*/

@media (max-width: 1100px) and (min-width: 901px) {
    .product-detail-grid {
        grid-template-columns: minmax(0, 1fr) minmax(360px, .9fr);
        gap: 38px;
    }

    .document-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .thumbnail-item {
        width: 88px;
    }
}

@media (max-width: 900px) {
    .product-detail {
        padding: 60px 0;
    }

    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .main-product-image {
        height: auto !important;
        min-height: 0;
        aspect-ratio: 1 / 1;
    }

    .thumbnail-carousel {
        grid-template-columns: 38px minmax(0, 1fr) 38px;
        gap: 8px;
    }

    .thumbnail-arrow {
        width: 38px;
        height: 52px;
        font-size: 31px;
    }

    .thumbnail-item {
        width: 92px;
    }

    .document-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .document-list a {
        min-height: 62px;
        padding: 14px;
        font-size: 13px;
    }
}

@media (max-width: 520px) {
    .thumbnail-item {
        width: 78px;
    }

    .document-list {
        grid-template-columns: 1fr;
    }
}


/* Uploaded Pepsi font */
@font-face {
    font-family: "JPL Pepsi";
    src: url("/fonts/PEPSI_pl.ttf") format("truetype");
    font-style: normal;
    font-weight: normal;
    font-display: swap;
}

/*
|--------------------------------------------------------------------------
| Product heading typography
|--------------------------------------------------------------------------
| JPL Floors™ uses Pepsi when that font is installed/loaded by the site.
| Product/category name is black.
*/
.product-info .product-brand-label {
    margin-top: 0;
    margin-bottom: 0;
    font-family: "JPL Pepsi", sans-serif !important;
    font-weight: normal !important;
}

.product-info .product-category-label {
    margin-top: 0;
    margin-bottom: 0;
    color: #111111 !important;
}


/* Trademark/registered-mark sizing */
.jpl-trademark,
.inpro-registered,
sup.registered-mark {
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 0.48em !important;
    line-height: 0 !important;
    vertical-align: super !important;
    position: relative;
    top: -0.05em;
}

/* Consistent small superscript brand marks */
.brand-registered-mark,
.brand-trademark-mark,
.jpl-trademark,
.inpro-registered {
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 0.48em !important;
    font-weight: 700;
    line-height: 0 !important;
    vertical-align: super !important;
    position: relative;
    top: -0.05em;
    margin-left: 0.04em;
}


/* Brand mark size refinement */
.brand-registered-mark,
.brand-trademark-mark,
.jpl-trademark,
.inpro-registered {
    font-size: 0.65em !important;
    top: -0.02em;
}


/* Product category heading: JPL Floors™ in supplied Pepsi font */
.products-category-page .category-jpl-floors-brand {
    font-family: "JPL Pepsi", "PEPSI", sans-serif !important;
}
