/*
 * CHAMAELEONSTYLE – Product detail
 * =================================
 *
 * Purpose
 * -------
 * Modern product detail page for the new ChamaeleonStyle brand system.
 *
 * Design rules:
 * - warm page background (#F2F2EF)
 * - no rounded cards
 * - no drop shadows
 * - thin rules instead of boxes
 * - image and purchase area are visually separated, not "carded"
 * - important purchase controls stay high on the page
 * - related products scroll horizontally
 */


/* ==========================================================================
   PRODUCT HERO
   ========================================================================== */

.cs-product-detail {
    display: grid;
    grid-template-columns:
        minmax(0, 1.12fr)
        minmax(390px, 0.88fr);

    gap: clamp(34px, 5vw, 86px);

    align-items: start;

    width: 100%;
    margin: 0 0 54px;
}


/* ==========================================================================
   IMAGE COLUMN
   ========================================================================== */

.product_pic {
    min-width: 0;
}

.productpicture {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 560px;

    padding: clamp(18px, 2.6vw, 38px);

    background: #FFFFFF;

    border: 1px solid var(--cs-border);
}

.productpicture center {
    display: block;
    width: 100%;
}

#zoomparent,
#link_image {
    display: block;
    width: 100%;
    text-align: center;
}

#link_image {
    cursor: zoom-in;
}

#productimage_small {
    display: block;

    width: auto;
    max-width: 100%;
    max-height: min(72vh, 780px);

    margin: 0 auto;

    object-fit: contain;
}


/* --------------------------------------------------------------------------
   Thumbnail gallery
   -------------------------------------------------------------------------- */

.product_smallimages {
    display: block;
    margin-top: 12px;
}

#productimagel_small_div {
    display: none;
}

#additional_images {
    display: flex;
    flex-wrap: wrap;

    justify-content: flex-start;

    gap: 4px;

    margin-top: 0;
    padding: 0;

    background: transparent;
    border: 0;
}

#additional_images a {
    display: flex;

    width: 78px;
    height: 78px;

    align-items: center;
    justify-content: center;

    background: #FFFFFF;

    border: 1px solid var(--cs-border);
}

#additional_images a:hover {
    border-color: var(--cs-brand-black);
}

#additional_images img {
    display: block;

    width: 100% !important;
    height: 100% !important;

    padding: 5px;

    object-fit: contain;
}


/* ==========================================================================
   PURCHASE COLUMN
   ========================================================================== */

.product_description {
    min-width: 0;

    padding: 0 !important;

    background: transparent !important;

    border: 0 !important;
}

.product_description > span:first-child {
    display: block;
    min-height: 24px;
}

.product_description .picframe {
    width: auto;
    max-width: 82px;
    max-height: 30px;

    margin-bottom: 10px;

    background: transparent;

    border: 0;
}

.product_description h1 {
    max-width: 720px;

    margin: 0 0 14px;
    padding: 0;

    color: var(--cs-brand-black);

    border: 0;

    font-size: clamp(2.25rem, 3.3vw, 4rem);
    line-height: 1.02;
    font-weight: 800;
    letter-spacing: -0.045em;
}

.cs-product-service-note {
    margin: 0 0 20px;

    padding-bottom: 18px;

    color: var(--cs-muted);

    border-bottom: 1px solid var(--cs-border);

    font-size: 12px;
    line-height: 1.5;
}


/* ==========================================================================
   PRICE
   ========================================================================== */

.cs-product-priceblock {
    margin: 18px 0 8px;
}

.cs-product-price-main {
    display: flex;
    align-items: baseline;

    gap: 6px;

    min-height: 48px;
}

.prodprice,
.cs-product-price-static,
.cs-product-price-input {
    color: var(--cs-brand-black) !important;

    font-family: var(--font) !important;
    font-size: clamp(2rem, 2.7vw, 2.7rem) !important;
    line-height: 1 !important;
    font-weight: 800 !important;
    letter-spacing: -0.035em;
}

.cs-product-price-input {
    display: inline-block;

    width: 122px !important;
    min-width: 0 !important;

    padding: 0 !important;
    margin: 0 !important;

    background: transparent !important;

    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;

    appearance: none;
}

.cs-product-currency {
    color: var(--cs-brand-black);

    font-size: 24px;
    line-height: 1;
    font-weight: 700;
}

.cs-product-prepayment {
    margin-top: 8px;

    color: var(--cs-muted);

    font-size: 12px;
}

.product_description .text-grau {
    color: var(--cs-muted);
    font-size: 13px;
}


/* ==========================================================================
   COLOUR SWATCHES
   ========================================================================== */

.picframe-minicols {
    width: 23px !important;
    height: 23px !important;

    margin: 12px 4px 3px 0;

    object-fit: cover;

    border: 1px solid var(--cs-border) !important;
}


/* ==========================================================================
   PRODUCT OPTIONS
   ========================================================================== */

.cs-product-options {
    display: grid;

    gap: 16px;

    margin: 22px 0 0;
    padding: 22px 0;

    background: transparent;

    border-top: 1px solid var(--cs-border);
    border-bottom: 1px solid var(--cs-border);
}

.cs-product-option {
    display: grid;
    gap: 7px;
}

.cs-product-option > label,
.cs-product-quantity > label {
    color: var(--cs-brand-black);

    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.cs-product-option__control {
    display: flex;
    align-items: stretch;

    gap: 8px;
}

.cs-product-option .products-drop-selected,
.products-drop-selected,
.drop-bestellmenge {
    width: 100%;
    min-width: 0;
    max-width: none;

    margin: 0;
    padding: 12px 38px 12px 12px;

    color: var(--cs-text);

    background: #FFFFFF;

    border: 1px solid var(--cs-border-dark);

    border-radius: 0;
}

.cs-product-option .products-drop-selected:focus,
.drop-bestellmenge:focus {
    outline: 2px solid rgba(217, 37, 37, 0.16);
    outline-offset: 0;

    border-color: var(--cs-brand-black);
}

.cs-product-option__guide {
    display: inline-flex;
    flex: 0 0 48px;

    align-items: center;
    justify-content: center;

    background: #FFFFFF;

    border: 1px solid var(--cs-border-dark);
}

.cs-product-option__guide img {
    display: block;

    width: auto;
    max-width: 38px;
    max-height: 30px;
}

#item_available {
    min-height: 1px;

    font-size: 12px;
}


/* ==========================================================================
   QUANTITY + ADD TO CART
   ========================================================================== */

.cs-product-quantity {
    display: grid;

    grid-template-columns: 1fr 110px;

    align-items: center;

    gap: 16px;

    margin-top: 18px;
}

.cs-product-quantity label {
    margin: 0;
}

.cs-product-quantity .drop-bestellmenge {
    padding-right: 12px;
}

.cs-add-to-cart {
    margin-top: 14px;
}

.cs-add-cart-button {
    width: 100%;
    min-height: 52px;

    padding: 13px 20px;

    background: var(--cs-brand-black);
    color: #FFFFFF;

    border: 1px solid var(--cs-brand-black);

    font-family: var(--font);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.01em;

    cursor: pointer;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease;
}

.cs-add-cart-button span {
    font-weight: 500;
    opacity: 0.78;
}

.cs-add-cart-button:hover {
    background: var(--cs-red);
    border-color: var(--cs-red);
}


/* ==========================================================================
   PRODUCT FACTS + COPY
   ========================================================================== */

.cs-product-facts {
    display: flex;
    flex-wrap: wrap;

    gap: 0;

    margin: 22px 0 0;

    border-top: 1px solid var(--cs-border);
}

.cs-product-facts > span {
    padding: 10px 16px 10px 0;
    margin-right: 16px;

    color: var(--cs-muted);

    font-size: 12px;
}

.cs-product-facts a {
    color: var(--cs-brand-black);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cs-product-copy {
    margin-top: 24px;
    padding-top: 22px;

    border-top: 1px solid var(--cs-border);
}

.cs-product-copy h2 {
    margin: 0 0 14px;

    color: var(--cs-brand-black);

    font-size: 17px;
    line-height: 1.3;
    font-weight: 800;
}

.cs-product-copy h2 span {
    color: var(--cs-muted);
    font-weight: 500;
}

.cs-product-copy__text {
    max-width: 720px;

    color: #454545;

    font-size: 14px;
    line-height: 1.68;
}


/* ==========================================================================
   LOWER LEGACY INFORMATION BLOCKS
   ========================================================================== */

.product_informations {
    margin-top: 40px;
    padding-top: 24px;

    border-top: 2px solid var(--cs-brand-black);
}

.product_informations #information,
#container_availableinfo #information {
    margin: 0;
    padding: 18px 0;

    border-bottom: 1px solid var(--cs-border);
}

.product_informations .linkleiste {
    margin: 0;
}

.product_informations .linkleiste a {
    color: var(--cs-brand-black);

    font-size: 13px;
    font-weight: 650;
}

.dbox {
    margin: 18px 0;
    padding: 20px;

    background: #FFFFFF;

    border: 1px solid var(--cs-border);
}


/* ==========================================================================
   RELATED PRODUCTS – HORIZONTAL BRAND RAIL
   ========================================================================== */

.cs-related-products {
    width: 100%;

    margin: 54px 0 58px;
    padding: 30px 0 0;

    border-top: 1px solid var(--cs-border);
}

.cs-related-products__head {
    display: flex;

    align-items: end;
    justify-content: space-between;

    gap: 30px;

    margin-bottom: 20px;
}

.cs-related-products__eyebrow {
    margin-bottom: 5px;

    color: var(--cs-red);

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.cs-related-products h2 {
    margin: 0;

    color: var(--cs-brand-black);

    font-size: clamp(1.45rem, 2vw, 2.1rem);
    line-height: 1.2;
    font-weight: 750;
    letter-spacing: -0.025em;
}

.cs-related-products h2 span {
    color: var(--cs-muted);

    font-size: 0.62em;
    font-weight: 500;
}

.cs-related-products__controls {
    display: flex;
    gap: 1px;
}

.cs-related-products__arrow {
    width: 44px;
    height: 40px;

    background: transparent;
    color: var(--cs-brand-black);

    border: 1px solid var(--cs-border-dark);

    font-size: 19px;

    cursor: pointer;

    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}

.cs-related-products__arrow:hover {
    background: var(--cs-brand-black);
    color: #FFFFFF;
}

.cs-related-products__track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(210px, 255px);

    gap: 1px;

    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-behavior: smooth;
    scroll-snap-type: inline mandatory;

    padding-bottom: 8px;

    background: var(--cs-border);

    scrollbar-width: thin;
}

.cs-related-card {
    min-width: 0;

    background: #FFFFFF;

    scroll-snap-align: start;
}

.cs-related-card__link {
    display: block;

    height: 100%;

    color: inherit;
    text-decoration: none;
}

.cs-related-card__image {
    display: flex;

    height: 250px;

    align-items: center;
    justify-content: center;

    overflow: hidden;

    background: #FFFFFF;

    border-bottom: 1px solid var(--cs-border);
}

.cs-related-card__image img {
    width: 100%;
    height: 100%;

    object-fit: contain;

    transition: transform 0.2s ease;
}

.cs-related-card:hover .cs-related-card__image img {
    transform: scale(1.02);
}

.cs-related-card__body {
    padding: 14px 14px 16px;
}

.cs-related-card__brand {
    margin-bottom: 5px;

    color: var(--cs-muted);

    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.cs-related-card h3 {
    margin: 0;

    color: var(--cs-brand-black);

    font-size: 14px;
    line-height: 1.3;
    font-weight: 750;
}

.cs-related-card p {
    margin: 5px 0 0;

    color: var(--cs-muted);

    font-size: 11px;
    line-height: 1.4;
}

.cs-related-card__price {
    margin-top: 12px;

    color: var(--cs-brand-black);

    font-size: 15px;
    font-weight: 800;
}


/* ==========================================================================
   AVAILABILITY
   ========================================================================== */

.product_availability {
    width: 100%;

    margin-top: 24px;
    padding: 28px;

    overflow-x: auto;

    background: #FFFFFF;

    border: 1px solid var(--cs-border);
}

.product_availability table,
#container_availableinfo table {
    width: 100% !important;
    max-width: none;

    margin-inline: auto;

    table-layout: auto !important;
}

.product_availability td,
.product_availability th,
#container_availableinfo td,
#container_availableinfo th {
    padding: 8px !important;

    border: 1px solid #FFFFFF !important;
}


/* ==========================================================================
   QUICK VIEW MODAL
   ========================================================================== */

.cs-product-modal {
    position: fixed;
    inset: 0;

    z-index: 5000;

    display: none;

    background: rgba(23, 23, 23, 0.62);
}

.cs-product-modal.is-open {
    display: block;
}

.cs-product-modal__dialog {
    position: absolute;

    top: 50%;
    left: 50%;

    width: min(1500px, calc(100vw - 64px));
    height: min(900px, calc(100vh - 64px));

    transform: translate(-50%, -50%);

    background: var(--cs-brand-background);

    border: 1px solid #666666;
}

.cs-product-modal__close {
    position: absolute;

    top: 0;
    right: 0;

    z-index: 3;

    width: 48px;
    height: 48px;

    display: grid;
    place-items: center;

    background: var(--cs-brand-black);
    color: #FFFFFF;

    border: 0;

    font-size: 25px;
    line-height: 1;

    cursor: pointer;
}

.cs-product-modal__close:hover {
    background: var(--cs-red);
}

.cs-product-modal__frame {
    display: block;

    width: 100%;
    height: 100%;

    border: 0;
}


/* --------------------------------------------------------------------------
   Image lightbox
   -------------------------------------------------------------------------- */

.cs-image-modal {
    position: fixed;
    inset: 0;

    z-index: 5100;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 42px;

    background: rgba(23, 23, 23, 0.88);
}

.cs-image-modal.is-open {
    display: flex;
}

.cs-image-modal img {
    display: block;

    max-width: 94vw;
    max-height: 90vh;

    object-fit: contain;
}

.cs-image-modal__close {
    position: fixed;

    top: 16px;
    right: 18px;

    width: 48px;
    height: 48px;

    display: grid;
    place-items: center;

    background: #FFFFFF;
    color: var(--cs-brand-black);

    border: 0;

    font-size: 25px;

    cursor: pointer;
}


/* ==========================================================================
   QUICK-VIEW PAGE INSIDE IFRAME
   ========================================================================== */

body.cs-quickview-page {
    background: var(--cs-brand-background);
}

body.cs-quickview-page #flexbox-main_head,
body.cs-quickview-page .content_menu,
body.cs-quickview-page #flexbox-main_footer,
body.cs-quickview-page #cookiedb,
body.cs-quickview-page .cs-related-products,
body.cs-quickview-page .product_availability {
    display: none !important;
}

body.cs-quickview-page .content_content {
    width: 100%;

    padding: 34px;
}

body.cs-quickview-page .cs-product-detail {
    margin-bottom: 0;
}


/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1050px) {

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

    .productpicture {
        min-height: 420px;
    }

    #productimage_small {
        max-height: 660px;
    }

    .cs-related-products__track {
        grid-auto-columns: minmax(205px, 42vw);
    }

}


@media (max-width: 640px) {

    .cs-product-detail {
        gap: 22px;
        margin-bottom: 34px;
    }

    .productpicture {
        min-height: 0;
        padding: 10px;
    }

    #productimage_small {
        max-height: 68vh;
    }

    #additional_images a {
        width: 66px;
        height: 66px;
    }

    .product_description h1 {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .cs-product-price-main {
        min-height: 42px;
    }

    .cs-product-quantity {
        grid-template-columns: 1fr 95px;
    }

    .cs-related-products {
        margin-top: 38px;
    }

    .cs-related-products__head {
        align-items: start;
    }

    .cs-related-products h2 span {
        display: block;
        margin-top: 3px;
    }

    .cs-related-products__controls {
        display: none;
    }

    .cs-related-products__track {
        grid-auto-columns: minmax(210px, 78vw);
    }

    .cs-related-card__image {
        height: 235px;
    }

    .product_availability {
        padding: 12px;
    }

    .cs-product-modal__dialog {
        width: 100vw;
        height: 100vh;

        border: 0;
    }

    .cs-product-modal__close {
        width: 44px;
        height: 44px;
    }

    body.cs-quickview-page .content_content {
        padding: 18px;
    }

}
