/* Cable-only product view in the existing shop palette. No core template edits. */
.product-detail.kem-cable-layout {
    --kem-cable-accent: #f8bf00;
    --kem-cable-ink: #525252;
    --kem-cable-muted: #686868;
    --kem-cable-edge: #dedede;
    --kem-cable-surface: #f5f7fa;
}

.kem-cable-layout .product-headline .product-title {
    color: var(--kem-cable-ink);
    font-weight: 700;
}

.kem-cable-layout .info-essential {
    display: flex;
    flex-wrap: wrap;
    column-gap: 1.5rem;
    row-gap: .15rem;
    margin-bottom: .2rem;
    color: var(--kem-cable-muted);
}

.kem-cable-layout .info-essential li {
    margin: 0;
}

.kem-cable-layout #image_wrapper.gallery-with-action,
.kem-cable-layout .shortdesc,
.kem-cable-layout .kem-product-description,
.kem-cable-layout .product-offer {
    border: 1px solid var(--kem-cable-edge);
    border-radius: 8px;
    background: #fff;
}

.kem-cable-layout #image_wrapper.gallery-with-action {
    background: var(--kem-cable-surface);
    padding: 1rem;
    overflow: hidden;
}

.kem-cable-layout .shortdesc,
.kem-cable-layout .kem-product-description {
    padding: 1.3rem;
}

.kem-cable-layout .shortdesc table {
    width: 100%;
    margin: 0;
}

.kem-cable-layout .shortdesc tbody {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem 1rem;
}

.kem-cable-layout .shortdesc tr {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-bottom: 1px solid #ececec;
    padding: .4rem 0 .65rem;
}

.kem-cable-layout .shortdesc th,
.kem-cable-layout .shortdesc td {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    text-align: left;
}

/* Wawi stores ordinary key-fact list markup; only the cable shop view uses this grid. */
.kem-cable-layout .shortdesc .kem-cable-keyfacts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .35rem .9rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.kem-cable-layout .shortdesc .kem-cable-keyfacts li {
    min-width: 0;
    padding: .2rem 0 .45rem;
    border-bottom: 1px solid #ececec;
    color: var(--kem-cable-ink);
    font-size: .96rem;
    line-height: 1.35;
}

.kem-cable-layout .shortdesc .kem-cable-keyfacts strong {
    display: block;
    color: var(--kem-cable-muted);
    font-size: .78rem;
    font-weight: 500;
}

/* Other cable sizes are not interchangeable alternatives. Hide the generic
   carousel until verified substitute articles exist in the Shop. */
body:has(.kem-cable-layout) .recommendations .x-related {
    display: none;
}

.kem-cable-layout .shortdesc th {
    font-size: .86rem;
    font-weight: 400;
    color: var(--kem-cable-muted);
}

.kem-cable-layout .shortdesc td {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--kem-cable-ink);
}

.kem-cable-layout .product-offer {
    border-top: 4px solid var(--kem-cable-accent);
    padding: 1.35rem;
    box-shadow: 0 5px 18px rgba(0, 0, 0, .06);
}

.kem-cable-layout .product-offer > .row {
    margin: 0;
}

.kem-cable-layout .product-offer > .row > .col {
    display: flex;
    flex-direction: column;
    padding: 0;
}

.kem-cable-layout .kem-cable-length-slider {
    order: -1;
    margin-bottom: 1rem !important;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--kem-cable-edge);
}

.kem-cable-layout .kem-cable-length-slider .custom-range {
    accent-color: var(--kem-cable-accent);
}

.kem-cable-layout .kem-cable-slider-current-row {
    position: relative;
    height: 1.65rem;
    margin-bottom: -.15rem;
}

.kem-cable-layout .kem-cable-slider-current {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    min-width: 2.5rem;
    padding: .1rem .35rem;
    border-radius: .3rem;
    background: var(--kem-cable-surface);
    color: var(--kem-cable-ink);
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.25rem;
    text-align: center;
    white-space: nowrap;
}

.kem-cable-layout .kem-cable-slider-track {
    margin-bottom: .15rem;
    line-height: 1;
}

.kem-cable-layout .kem-cable-slider-track .custom-range {
    margin-bottom: 0;
}

.kem-cable-layout .kem-cable-slider-bounds {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    column-gap: .45rem;
    color: var(--kem-cable-muted);
}

.kem-cable-layout .kem-cable-slider-bounds strong {
    color: var(--kem-cable-ink);
    font-size: .78rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

.kem-cable-layout .kem-cable-slider-bounds span:last-child {
    text-align: right;
}

.kem-cable-layout .kem-cable-length-slider input[type="number"] {
    max-width: 10rem;
}

.kem-cable-layout .kem-cable-price-detail {
    padding: 0;
    margin: 0 !important;
    color: var(--kem-cable-ink);
    background: transparent;
}

.kem-cable-layout .kem-cable-price-caption {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
}

.kem-cable-layout .kem-cable-price-net,
.kem-cable-layout .kem-cable-price-gross {
    display: block;
}

.kem-cable-layout .kem-cable-price-net {
    margin-top: .4rem;
    font-size: clamp(1.7rem, 2vw, 2.25rem);
    line-height: 1.2;
    color: var(--kem-cable-ink);
}

.kem-cable-layout .kem-cable-price-gross {
    margin-top: .2rem;
    color: var(--kem-cable-muted);
}

.kem-cable-layout .kem-cable-fee-preview {
    margin-top: 1.1rem;
    padding-top: .9rem;
    border-top: 1px solid var(--kem-cable-edge);
}

.kem-cable-layout .kem-cable-fee-preview > strong {
    display: block;
    margin-bottom: .6rem;
}

.kem-cable-layout .kem-cable-fee-row,
.kem-cable-layout .kem-cable-fee-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: .75rem;
    line-height: 1.45;
}

.kem-cable-layout .kem-cable-fee-row + .kem-cable-fee-row {
    margin-top: .2rem;
}

.kem-cable-layout .kem-cable-fee-row > :last-child,
.kem-cable-layout .kem-cable-fee-total > :last-child {
    text-align: right;
    white-space: nowrap;
}

.kem-cable-layout .kem-cable-fee-total {
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px solid var(--kem-cable-edge);
}

.kem-cable-layout .kem-cable-fee-note,
.kem-cable-layout .kem-cable-length-note {
    display: block;
    margin-top: .65rem;
    color: var(--kem-cable-muted);
    line-height: 1.45;
}

.kem-cable-layout .kem-cable-calculation {
    margin-top: .85rem;
    padding-top: .75rem;
    border-top: 1px solid var(--kem-cable-edge);
    font-size: .87rem;
}

.kem-cable-layout .kem-cable-calculation summary {
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: var(--kem-cable-accent);
    text-underline-offset: .18em;
}

.kem-cable-layout .kem-cable-calculation[open] > div:first-of-type {
    margin-top: .5rem;
}

.kem-cable-layout .product-buy {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--kem-cable-edge);
}

/* Preview remains available until the article is explicitly released. */
.kem-cable-order-locked .product-buy,
.kem-cable-order-locked [id^="ppc-paypal-button"],
.kem-cable-order-locked [id^="paypal-button"],
.kem-cable-order-locked #ppc-productDetails-instalment-banner {
    display: none !important;
}

.kem-cable-layout .kem-cable-release-note {
    margin: .75rem 0 0;
    padding: .65rem .75rem;
    border-left: 3px solid var(--kem-cable-accent);
    background: var(--kem-cable-surface);
    color: var(--kem-cable-ink);
    font-size: .9rem;
}

.kem-cable-layout .product-buy .basket-form-inline {
    align-items: center;
}

.kem-cable-layout .product-buy .purchase-info {
    margin-top: .7rem;
    margin-bottom: .8rem;
}

.kem-cable-layout .product-buy [id^="ppc-paypal-button"],
.kem-cable-layout .product-buy [id^="paypal-button"],
.kem-cable-layout #ppc-productDetails-instalment-banner {
    margin-top: .65rem;
}

.kem-cable-layout #ppc-productDetails-instalment-banner {
    padding-top: .8rem;
    border-top: 1px solid var(--kem-cable-edge);
}

@media (min-width: 992px) {
    .product-detail.kem-cable-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(390px, 38%);
        column-gap: 1rem;
        row-gap: .9rem;
        margin-inline: 0;
    }

    .kem-cable-layout > .product-gallery,
    .kem-cable-layout > .product-info,
    .kem-cable-layout .product-info-inner {
        display: contents;
    }

    .kem-cable-layout .product-headline { grid-column: 1 / -1; grid-row: 1; }
    .kem-cable-layout .info-essential { grid-column: 1; grid-row: 2; }
    .kem-cable-layout #image_wrapper {
        grid-column: 1;
        grid-row: 3;
        width: 100%;
        max-width: 540px;
        justify-self: start;
    }
    .kem-cable-layout #gallery .square.square-image::before {
        padding-bottom: 42%;
    }
    .kem-cable-layout .shortdesc { grid-column: 1; grid-row: 4; }
    .kem-cable-layout .kem-product-description { grid-column: 1; grid-row: 5; }
    .kem-cable-layout .kem-product-extra-tabs { grid-column: 1; grid-row: 6; }
    .kem-cable-layout .kem-product-weight-block { grid-column: 1; grid-row: 7; }
    .kem-cable-layout .product-offer {
        grid-column: 2;
        grid-row: 2 / 8;
        align-self: start;
        position: sticky;
        top: 5.5rem;
    }
}

@media (max-width: 991px) {
    .kem-cable-layout .shortdesc .kem-cable-keyfacts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .kem-cable-layout .shortdesc tbody {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .kem-cable-layout .product-offer,
    .kem-cable-layout .shortdesc,
    .kem-cable-layout .kem-product-description {
        margin-top: 1rem;
    }
}

@media (max-width: 520px) {
    .kem-cable-layout .shortdesc .kem-cable-keyfacts {
        grid-template-columns: 1fr;
    }
    .kem-cable-layout .shortdesc tbody {
        grid-template-columns: 1fr;
    }
    .kem-cable-layout .kem-cable-fee-total,
    .kem-cable-layout .kem-cable-fee-row {
        flex-wrap: wrap;
    }
    .kem-cable-layout .kem-cable-fee-row > :last-child,
    .kem-cable-layout .kem-cable-fee-total > :last-child {
        white-space: normal;
    }
}
