/* ============================================================
   pdp.css | Produktdetailseite: Galerie, Lightbox, Tabs, Technische Daten, Downloads, Anfrageformular, Modal, Accordion, Ähnliche-Maschinen-Carousel.
   Genutzt auf: pdp.php.
   ============================================================ */

.pdp-main { padding: 2.5rem 0; }

.pdp-layout {
    display: grid;
    grid-template-columns: minmax(0, 65fr) minmax(0, 35fr);
    grid-template-areas:
        "gallery info"
        "tabs    info";
    gap: 0 3rem;
    align-items: start;
}

.pdp-gallery { grid-area: gallery; }

.pdp-info {
    grid-area: info;
    position: sticky;
    top: calc(var(--header-total-h) + var(--breadcrumb-h) + 1.5rem);
    align-self: start;
}

.gallery-main {
    position: relative;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--c-smoke);
}

.gallery-main-img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s ease, filter .2s ease; }
.gallery-main-img.is-loading { filter: blur(6px); transform: scale(1.03); }

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: .5rem;
    margin-top: .8rem;
}

.thumb-btn {
    width: 100%;
    aspect-ratio: 4 / 3;
    border: 2px solid var(--c-border);
    border-radius: var(--radius);
    overflow: hidden; background: var(--c-smoke);
    cursor: pointer; padding: 0;
    transition: border-color var(--transition);
}

.thumb-btn img { width: 100%; height: 100%; object-fit: cover; }

.thumb-btn.active, .thumb-btn:hover { border-color: var(--c-accent); }

.pdp-subcat {
    font-size: .73rem; text-transform: uppercase;
    letter-spacing: .1em; color: var(--c-muted);
    margin-bottom: .4rem; font-weight: 600;
}

.pdp-title {
    font-size: clamp(1.35rem, 2.5vw, 1.9rem);
    font-weight: 800; line-height: 1.2;
    color: var(--c-mid); margin-bottom: 1rem;
}

.pdp-description { font-size: .93rem; color: var(--c-mid); line-height: 1.75; margin-bottom: 1.5rem; }

.tech-table { width: 100%; border-collapse: collapse; font-size: .88rem; margin-bottom: 1.6rem; }

.tech-table:last-child { margin-bottom: 0; }

.tech-table tr { border-bottom: 1px solid var(--c-border); }

.tech-table tr:last-child { border-bottom: none; }

.tech-table .tech-group {
    text-align: left;
    padding: .55rem .8rem ;
    font-size: .95rem; font-weight: 700; color: var(--c-mid);
    border-bottom: 2px solid var(--c-border);
    color: var(--c-mid);
    background-color: var(--c-smoke);
}

.tech-table .tech-key { font-size: .85rem; text-align: left; width: 45%; padding: .25rem 1rem ; color: var(--c-mid); overflow-wrap: anywhere; hyphens: auto; }

.tech-table .tech-val { font-size: .85rem; text-align: right; padding: .25rem 1rem; color: var(--c-mid); font-weight: 600; overflow-wrap: anywhere; hyphens: auto; }

.tech-table tr:hover td { background: var(--c-smoke); transition: background var(--transition); }

.tech-table .tech-text { font-size: .85rem; text-align: left; padding: .6rem 1rem; color: var(--c-mid); font-weight: 400; line-height: 1.7; }

.tech-table .tech-text-line { display: block; }

.tech-table tr.tech-text-row:hover td { background: none; }

.tech-unit { color: var(--c-muted); font-size: .85em; margin-left: .2rem; font-weight: 400; }

.gallery-main-btn {
    position: relative; display: block; width: 100%;
    padding: 0; border: none; background: none; cursor: zoom-in;
}

.gallery-zoom-hint {
    position: absolute; bottom: .6rem; right: .6rem;
    background: rgba(0,0,0,.45); color: #fff;
    font-size: .9rem; padding: .25rem .45rem;
    border-radius: var(--radius); opacity: 0;
    transition: opacity var(--transition);
    pointer-events: none;
}

.gallery-main-btn:hover .gallery-zoom-hint { opacity: 1; }

.lb-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.82);
    z-index: 1100;
}

.lb-stage {
    max-width: min(92vw, 1100px);
    max-height: 90vh;
    display: flex; align-items: center; justify-content: center;
}

.lb-close, .lb-prev, .lb-next {
    position: fixed;
    background: rgba(255,255,255,.12);
    border: none; color: #fff;
    cursor: pointer; border-radius: 50%;
    width: 2.4rem; height: 2.4rem;
    font-size: 1.1rem; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    transition: background var(--transition);
    z-index: 1102;
}

.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,.25); }

.lb-close { top: 1.2rem; right: 1.2rem; }

.lb-prev  { left: 1.2rem; top: 50%; transform: translateY(-50%); }

.lb-next  { right: 1.2rem; top: 50%; transform: translateY(-50%); }

.modal {
    position: fixed; inset: 0;
    z-index: 1200;
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
    pointer-events: none;
}

.modal:not([hidden]) { pointer-events: auto; }

.modal-box {
    position: relative;
    background: var(--c-white);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    width: 100%; max-width: 560px;
    max-height: 92vh; overflow-y: auto;
    padding: 2rem;
}

.modal-close {
    position: absolute; top: 1rem; right: 1rem;
    background: none; border: none;
    font-size: 1rem; cursor: pointer;
    color: var(--c-muted); line-height: 1;
    width: 2rem; height: 2rem;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    transition: background var(--transition), color var(--transition);
}

.modal-close:hover { background: var(--c-smoke); color: var(--c-mid); }

.modal-title {
    font-size: 1.1rem; font-weight: 700;
    color: var(--c-mid); margin-bottom: 1.4rem;
    padding-right: 2rem;
}

.inquiry-form { display: flex; flex-direction: column; gap: .9rem; }

.form-row { display: flex; flex-direction: column; gap: .3rem; }

.form-row--3 { display: grid; grid-template-columns: 140px 1fr 1fr; gap: .6rem; }

.form-row--3 .form-row { gap: .3rem; }

.form-label { font-size: .78rem; font-weight: 600; color: var(--c-mid); }

.req { color: var(--c-accent); }

.form-input {
    width: 100%;
    padding: .48rem .7rem;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    font-size: .88rem;
    font-family: inherit;
    color: var(--c-mid);
    background: var(--c-white);
    transition: border-color var(--transition), box-shadow var(--transition);
    line-height: 1.4;
}

.form-input:focus {
    outline: none;
    border-color: var(--c-accent);
    box-shadow: 0 0 0 3px rgba(105,190,40,.15);
}

.form-input:invalid:not(:placeholder-shown) { border-color: #c0392b; }

.form-textarea { resize: vertical; min-height: 80px; }

.form-hint { font-size: .74rem; color: var(--c-muted); }

.form-actions { display: flex; gap: .7rem; justify-content: flex-end; padding-top: .3rem; }

.form-success {
    background: #edfaec; border: 1px solid #a3d9a0;
    color: #2a7d4f; border-radius: var(--radius);
    padding: .7rem 1rem; font-size: .88rem;
}

.pdp-facts {
    width: 100%; border-collapse: collapse;
    margin: .8rem 0 1.2rem;
    font-size: .86rem;
}

.pdp-facts tr { border-bottom: 1px solid var(--c-smoke); }

.pdp-facts tr:last-child { border-bottom: none; }

.pdp-facts th {
    width: 42%; text-align: left; padding: .45rem 0;
    color: var(--c-muted); font-weight: 400;
}

.pdp-facts td { padding: .45rem 0; color: var(--c-mid); font-weight: 500; }

.fact-badge {
    display: inline-block; padding: .15rem .6rem; border-radius: 3px;
    font-size: .72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .05em; color: var(--c-white);
}

.pdp-contact {
    display: flex; align-items: stretch;
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-top: .6rem;
}

.pdp-contact__img { flex: 0 0 35%; max-width: 170px; min-height: 130px; background: var(--c-smoke); }

.pdp-contact__img img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }

.contact-info { display: flex; flex-direction: column; justify-content: center; gap: .2rem; padding: .9rem 1.1rem; min-width: 0; }

.contact-name { font-weight: 700; font-size: .9rem; color: var(--c-mid); margin: 0; }

.contact-name span { display: block; font-weight: 400; font-size: .78rem; color: var(--c-muted); }

.contact-phone,
.contact-mail { display: inline-flex; align-items: center; gap: .45rem; font-size: .87rem; font-weight: 600; color: var(--c-mid); text-decoration: none; }

.contact-mail { word-break: break-all; }

.contact-phone .bi,
.contact-mail .bi { flex-shrink: 0; color: var(--c-accent); font-size: .95rem; }

.contact-phone:hover,
.contact-mail:hover { color: var(--c-accent-dark); }

.pdp-tabs-section {
    grid-area: tabs;
    margin-top: 1.75rem;
    padding: 1.5rem 0 0;
}

.tab-nav { display: flex; flex-wrap: wrap; gap: 0; margin-bottom: 0; }

.tab-btn {
    padding: .65rem 1rem; margin: 0 .15rem;
    background: #fff; border: none; border-bottom: 2px solid var(--c-border);
    border-top-left-radius: 5px; border-top-right-radius: 5px;
    font-size: .9rem; font-weight: 600; color: var(--c-muted);
    cursor: pointer; position: relative;
    opacity: .8;
    transition: color var(--transition), opacity var(--transition);
    display: flex; align-items: center; gap: .3rem;
}

.tab-btn:first-child { margin-left: 0; }

.tab-btn.active, .tab-btn:hover { color: var(--c-mid); opacity: 1; }

.tab-btn.active { border-bottom-color: var(--c-white); }

.tab-count { font-size: .72rem; color: var(--c-muted); }

.acc-btn {
    display: none;
    width: 100%; margin-top: .5rem;
    padding: .9rem 1.1rem;
    background: #fff; border: 1px solid var(--c-border);
    border-radius: var(--radius);
    font-size: .95rem; font-weight: 700; color: var(--c-mid);
    cursor: pointer; text-align: left;
    align-items: center; justify-content: space-between; gap: .5rem;
    transition: background var(--transition);
}

.acc-btn:hover { background: var(--c-smoke); }

.acc-btn .tab-count { margin-right: auto; margin-left: -.15rem; }

.acc-icon { font-size: 1.6rem; font-weight: 500; color: var(--c-accent); line-height: 1; flex-shrink: 0; transition: transform var(--transition); }

.acc-btn[aria-expanded="true"] .acc-icon { transform: rotate(45deg); }

.tab-panel { display: none; background: var(--c-white); border-radius: 0 var(--radius-lg) var(--radius-lg) var(--radius-lg); padding: 1.75rem 1.25rem; }

.tab-panel.is-open { display: block; }

.tab-empty { color: var(--c-muted); font-size: .9rem; }

.pdp-description { font-size: .93rem; color: var(--c-mid); line-height: 1.8; }

.download-list { list-style: none; display: flex; flex-direction: column; gap: .6rem; padding: 0; margin: 0; }

.download-item { width: 100%; }

.dl-link {
    display: flex; align-items: stretch; height: 100%;
    border: 1px solid var(--c-border); border-radius: var(--radius-lg);
    overflow: hidden; background: var(--c-white);
    color: inherit; text-decoration: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.dl-link:hover { border-color: var(--c-accent); box-shadow: var(--shadow-sm); }

.dl-side {
    flex: 0 0 44px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem;
    background: var(--c-mid); color: var(--c-white);
    padding: .6rem .2rem;
}

.dl-icon { font-size: 1.1rem; line-height: 1; }

.dl-kind { font-size: .55rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #c0c3cc; }

.dl-body { display: flex; flex-direction: column; justify-content: center; gap: .15rem; padding: .7rem .9rem .7rem .75rem; min-width: 0; }

.dl-name {
    font-size: .82rem; font-weight: 600; line-height: 1.3; color: var(--c-darker);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.dl-size { font-size: .7rem; color: var(--c-muted); }

.pdp-title .pdp-title-main { display: block; }

.pdp-title .pdp-title-state { display: block; font-size: .6em; font-weight: 600; color: var(--c-muted); letter-spacing: .01em; margin-top: .15em; }

.btn--cta-main { width: 100%; font-size: 1rem; padding: .8rem 1.5rem; margin-bottom: 1.2rem; }

.accessory-grid {
    list-style: none;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: .5rem; padding-left: 0;
}

.accessory-grid li {
    display: flex; align-items: stretch;
    background: var(--c-smoke);
    border-radius: var(--radius);
    font-size: .86rem; color: var(--c-mid);
    overflow: hidden;
}

.accessory-grid li::before {
    content: '✓';
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; align-self: stretch;
    width: 35px;
    background: var(--c-accent);
    color: #fff;
    font-size: .8rem; font-weight: 700;
}

.accessory-grid li span {
    padding: .4rem .7rem;
    display: flex; align-items: center;
}

.section-title { font-size: 1.2rem; font-weight: 800; margin-bottom: 1.5rem; color: var(--c-mid); }

#lightbox { position: fixed; inset: 0; z-index: 1101; display: flex; align-items: center; justify-content: center; pointer-events: none; }

#lightbox:not([hidden]) { pointer-events: auto; }

#lb-img { max-width: 100%; max-height: 88vh; object-fit: contain; border-radius: var(--radius-lg); box-shadow: 0 16px 60px rgba(0,0,0,.6); transition: opacity .15s ease; }

.lb-close, .lb-prev, .lb-next { position: fixed; background: rgba(255,255,255,.12); border: none; color: #fff; cursor: pointer; border-radius: 50%; width: 2.4rem; height: 2.4rem; font-size: 1.1rem; display: flex; align-items: center; justify-content: center; transition: background var(--transition); z-index: 1102; }

#inquiry-backdrop { z-index: 1199; }

.modal-box--wide { max-width: var(--container-width, 1280px); padding: 0; overflow: hidden; max-height: 92vh; max-height: 92dvh; }

.modal-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; font-size: 1rem; cursor: pointer; color: var(--c-muted); width: 2rem; height: 2rem; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: background var(--transition); z-index: 2; }

.modal-layout { display: grid; grid-template-columns: clamp(220px, 32%, 380px) 1fr; }

.modal-product-img { background: var(--c-darker); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 1.5rem 1.2rem; gap: .7rem; }

.modal-product-img img { width: 100%; max-height: 200px; object-fit: cover; border-radius: var(--radius); }

.modal-product-name { color: #fff; font-size: .85rem; font-weight: 600; text-align: center; line-height: 1.3; margin: 0; }

.modal-eckdaten { width: 100%; border-collapse: collapse; margin-top: .3rem; }

.modal-eckdaten td { font-size: .76rem; padding: .28rem 0; vertical-align: top; }

.modal-eckdaten td:first-child { color: #8a8f99; padding-right: .6rem; white-space: nowrap; }

.modal-eckdaten td:last-child { color: #d0d3da; font-weight: 500; }

.modal-form-col { padding: 1.8rem; overflow-y: auto; max-height: 92vh; max-height: 92dvh; }

.modal-title { font-size: 1.05rem; font-weight: 700; color: var(--c-mid); margin-bottom: 1.1rem; padding-right: 2rem; }

.inquiry-form { display: flex; flex-direction: column; gap: .75rem; }

.form-row--3 { display: grid; grid-template-columns: 110px 1fr 1fr; gap: .5rem; }

.form-input { width: 100%; padding: .45rem .65rem; border: 1px solid var(--c-border); border-radius: var(--radius); font-size: .86rem; font-family: inherit; color: var(--c-mid); transition: border-color var(--transition), box-shadow var(--transition); }

.form-textarea { resize: vertical; min-height: 72px; }

.form-hint { font-size: .72rem; color: var(--c-muted); margin-top: -.1rem; }

.form-input[readonly] { background: var(--c-smoke); cursor: not-allowed; }

.form-hint--locked { margin-top: .1rem; color: var(--c-mid); }

.form-hint--locked a { color: var(--c-accent-dark); text-decoration: underline; }

.form-actions { display: flex; gap: .6rem; justify-content: flex-end; padding-top: .3rem; }

.form-success { background: #edfaec; border: 1px solid #a3d9a0; color: #2a7d4f; border-radius: var(--radius); padding: .65rem 1rem; font-size: .86rem; }

.inquiry-done { display: flex; flex-direction: column; gap: 1.1rem; }

.inquiry-done .form-success { padding: 1.1rem 2.75rem 1.1rem 1.1rem; font-size: .92rem; line-height: 1.5; }

.inquiry-done[hidden],
.inquiry-form[hidden] { display: none; }

.inquiry-agent { position: relative; padding-top: .3rem; }

.inquiry-agent-title { display: flex; align-items: center; gap: .6rem; font-size: 1.2rem; font-weight: 700; color: var(--c-searchagent); margin: 0 0 .5rem; }

.inquiry-agent-title .bi { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: var(--c-searchagent); color: var(--c-white); font-size: 1.1rem; }

.inquiry-agent-text { font-size: .9rem; line-height: 1.55; color: var(--c-mid); margin: 0 0 1rem; }

.inquiry-agent-form { display: flex; flex-direction: column; gap: .9rem; }

.inquiry-agent .form-row { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); align-items: center; column-gap: .75rem; row-gap: .15rem; }

.inquiry-agent .form-row .field-error { grid-column: 2; }

.inquiry-agent .form-label { white-space: nowrap; margin: 0; }

.inquiry-agent .req { color: var(--c-searchagent); }

.inquiry-agent .form-hint { margin: -.3rem 0 0; }

.inquiry-agent .btn--outline { border-color: var(--c-border); color: var(--c-muted); background: transparent; }

.inquiry-agent .btn--outline:hover { border-color: var(--c-muted); color: var(--c-mid); background: var(--c-smoke); }

.inquiry-agent-names { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: .9rem .75rem; }

.inquiry-agent-names .form-row { display: contents; }

.inquiry-agent .agent-card-body { min-height: 76px; grid-template-columns: 84px minmax(0, 1fr) 28px; }

.inquiry-agent .agent-card-thumb { width: 84px; }

.inquiry-agent .agent-card-body:hover,
.inquiry-agent .agent-card input:checked + .agent-card-body,
.inquiry-agent .agent-card input:checked + .agent-card-body .agent-card-mark { border-color: var(--c-searchagent); }

.inquiry-agent .agent-card input:checked + .agent-card-body { background: var(--c-white); }

.inquiry-agent .agent-card input:checked + .agent-card-body .agent-card-mark { background: var(--c-searchagent); }

.inquiry-agent .agent-card input:focus-visible + .agent-card-body { outline-color: var(--c-searchagent); }

.inquiry-agent-more summary { font-size: .84rem; font-weight: 600; color: var(--c-searchagent-dark); cursor: pointer; margin: .1rem 0 .6rem; }

.inquiry-agent-privacy { display: flex; align-items: flex-start; gap: .55rem; font-size: .78rem; line-height: 1.45; color: var(--c-mid); cursor: pointer; }

.inquiry-agent-privacy input { width: 18px; height: 18px; flex-shrink: 0; margin-top: .05rem; accent-color: var(--c-searchagent); }

.inquiry-agent-privacy a { color: var(--c-searchagent-dark); text-decoration: underline; }

.inquiry-agent .form-input:focus { border-color: var(--c-searchagent); box-shadow: 0 0 0 3px rgba(231, 91, 38, .15); }

.form-consent { font-size: .74rem; color: var(--c-muted); line-height: 1.45; margin: .2rem 0 0; }

.form-consent a { color: var(--c-accent); text-decoration: underline; }

.form-consent a:hover { text-decoration: none; }

.form-input.is-invalid { border-color: #d64545; box-shadow: 0 0 0 3px rgba(214,69,69,.12); }

.field-error { color: #d64545; font-size: .72rem; margin-top: .15rem; }

@media (max-width: 900px) {
    .pdp-layout {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "gallery"
            "info"
            "tabs";
    }
    .pdp-info { position: static; top: auto; }
    .pdp-tabs-section { margin-top: 2rem; }
}

@media (max-width: 768px) {
    .tab-nav { display: none; }
    .acc-btn { display: flex; }
    .tab-panel { padding: 1.25rem; border-radius: 0 0 var(--radius) var(--radius); }
    .tab-panel.is-open { border: 1px solid var(--c-border); border-top: none; }
    .accessory-grid { grid-template-columns: 1fr; }
    .tech-table .tech-key,
    .tech-table .tech-val { padding: .3rem .5rem; }
}

@media (max-width: 680px) {
    .modal-box--wide { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
    .modal-layout { grid-template-columns: 1fr; }
    .modal-product-img { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; padding: 1rem 3rem 1rem 1rem; gap: .5rem 1rem; }
    .modal-product-img img { width: 120px; max-height: 90px; flex-shrink: 0; }
    .modal-product-img .fact-badge { display: none; }
    .modal-product-name { flex: 1 1 120px; font-size: 1rem; text-align: left; }
    .modal-eckdaten { flex: 1 1 220px; margin-top: 0; }
    #inquiry-modal .modal-eckdaten { display: none; }
    .modal-form-col { padding: 1.2rem; max-height: none; overflow: visible; }
    .inquiry-agent-names { display: flex; flex-direction: column; gap: .9rem; }
    .inquiry-agent-names .form-row { display: grid; }
    .inquiry-agent .form-row { grid-template-columns: 110px minmax(0, 1fr); }
    .modal-form-col .form-row:not(.form-row--3) { display: grid; grid-template-columns: 110px 1fr; align-items: center; column-gap: .75rem; row-gap: .15rem; }
    .modal-form-col .form-row .field-error { grid-column: 2; }
    .modal-form-col .form-row--3 { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: .75rem; }
    .modal-form-col .form-row--3 > div { display: contents; }
    .modal-form-col .form-row--3 select.form-input { grid-column: 2 / -1; }
    .modal-form-col .form-row--3 .field-error { grid-column: 2 / -1; margin-top: -.6rem; }
    .modal-form-col label[for="iq-msg"] { align-self: start; padding-top: .5rem; }
}

@media (max-width: 440px) {
    .modal-form-col .form-row--3 { grid-template-columns: 110px minmax(0, 1fr); }
}

.pdp-gallery--sold .gallery-main-img,
.pdp-gallery--sold .gallery-thumbs img {
    filter: grayscale(100%);
}

.gallery-sold-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 0.75rem 1rem;
    text-align: center;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    color: #fff;
    background: rgba(0, 0, 0, 0.72);
    text-transform: uppercase;
}
.related-carousel {
    position: relative;
}

.related-track {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: .25rem 0 .75rem;
}

.related-track::-webkit-scrollbar { display: none; }

.related-track > .product-card {
    flex: 0 0 calc((100% - 4.5rem) / 4);
    scroll-snap-align: start;
}

.related-nav {
    position: absolute;
    top: 40%;
    z-index: 2;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0 .2rem;
    font-size: 1.75rem;
    line-height: 1;
    color: var(--c-darker);
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
    transform: translateY(-50%);
    cursor: pointer;
    transition: opacity var(--transition), background var(--transition), color var(--transition);
}

.related-nav:hover {
    color: var(--c-white);
    background: var(--c-accent);
    border-color: var(--c-accent);
}

.related-nav:disabled {
    opacity: 0;
    pointer-events: none;
}

.related-nav--prev { left: -1.25rem; }
.related-nav--next { right: -1.25rem; }

@media (max-width: 992px) {
    .related-track > .product-card { flex-basis: calc((100% - 1.5rem) / 2); }
}

@media (max-width: 576px) {
    .related-track > .product-card { flex-basis: 100%; }
    .related-nav--prev { left: .25rem; }
    .related-nav--next { right: .25rem; }
}

.btn--config { background: var(--c-mid); border-color: var(--c-mid); color: var(--c-white); }

.btn--config:hover { background: var(--c-darker); border-color: var(--c-darker); color: var(--c-white); }

.btn--cta-main + .btn--config { margin-top: -.6rem; }

.modal-layout--cfg { grid-template-columns: 40% 60%; }
.modal-layout--cfg .modal-product-img { padding: 1.8rem 1.6rem; gap: .9rem; overflow-y: auto; max-height: 92vh; }
.modal-layout--cfg .modal-product-img img { max-height: none; height: auto; aspect-ratio: 4 / 3; }
.modal-layout--cfg .modal-product-name { font-size: 1.05rem; }
.cfg-specs td { font-size: .82rem; padding: .32rem 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.cfg-specs tr:last-child td { border-bottom: none; }
.cfg-specs td:last-child { text-align: right; }

.cfg-col { display: flex; flex-direction: column; }

.cfg-section { margin-bottom: 1.4rem; }

.cfg-section-title { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--c-muted); margin-bottom: .6rem; }

.cfg-group { margin-bottom: .9rem; }

.cfg-group-title { font-size: .9rem; font-weight: 700; color: var(--c-mid); margin-bottom: .45rem; }

.cfg-item { display: grid; grid-template-columns: auto 56px 1fr auto; align-items: center; gap: .8rem; padding: .6rem .75rem; border: 1px solid var(--c-border); border-radius: var(--radius); margin-bottom: .4rem; cursor: pointer; transition: border-color var(--transition), background var(--transition); }

.cfg-item:hover { border-color: var(--c-muted); }

.cfg-item.is-selected { border-color: var(--c-accent); background: #f5fbf1; }

.cfg-item--acc { cursor: default; }

.cfg-item input[type=radio], .cfg-item input[type=checkbox] { appearance: none; -webkit-appearance: none; flex-shrink: 0; width: 18px; height: 18px; margin: 0; border: 1.5px solid #b8bcc4; background: #fff; cursor: pointer; transition: border-color var(--transition), background-color var(--transition), box-shadow var(--transition); }
.cfg-item input[type=radio] { border-radius: 50%; }
.cfg-item input[type=checkbox] { border-radius: 4px; background-position: center; background-repeat: no-repeat; background-size: 12px 12px; }
.cfg-item:hover input[type=radio], .cfg-item:hover input[type=checkbox] { border-color: var(--c-muted); }
.cfg-item input[type=radio]:checked { border-color: var(--c-accent); background: var(--c-accent); box-shadow: inset 0 0 0 3.5px #fff; }
.cfg-item input[type=checkbox]:checked { border-color: var(--c-accent); background-color: var(--c-accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E"); }
.cfg-item input[type=radio]:focus-visible, .cfg-item input[type=checkbox]:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.cfg-item input[type=radio]:disabled, .cfg-item input[type=checkbox]:disabled { background-color: var(--c-smoke); cursor: not-allowed; }

.cfg-item-img { width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius); background: var(--c-smoke); }

.cfg-item--noimg { grid-template-columns: auto 1fr auto; }

.cfg-item-text { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }

.cfg-item-text strong { font-size: .88rem; color: var(--c-mid); }

.cfg-item-desc { font-size: .78rem; color: var(--c-muted); line-height: 1.4; }

.cfg-item-sku { font-size: .72rem; color: var(--c-muted); }

.cfg-item-na { display: none; font-size: .72rem; color: #b45309; }

.cfg-item-price { font-size: .85rem; font-weight: 600; color: var(--c-mid); white-space: nowrap; }

.cfg-item-price small { font-weight: 400; color: var(--c-muted); }

.cfg-item.is-disabled { opacity: .55; cursor: not-allowed; background: var(--c-smoke); }

.cfg-item.is-disabled .cfg-item-na { display: block; }

.cfg-qty { display: inline-flex; align-items: center; border: 1px solid var(--c-border); border-radius: var(--radius); overflow: hidden; }

.cfg-qty-btn { width: 30px; height: 32px; border: 0; background: var(--c-smoke); color: var(--c-mid); font-size: 1rem; cursor: pointer; }

.cfg-qty-btn:hover:not(:disabled) { background: var(--c-border); }

.cfg-qty-input { width: 40px; height: 32px; border: 0; text-align: center; font-size: .88rem; -moz-appearance: textfield; }

.cfg-qty-input::-webkit-outer-spin-button, .cfg-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.cfg-footer { position: sticky; bottom: -1.8rem; display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; margin: .5rem -1.8rem -1.8rem; padding: 1rem 1.8rem; background: var(--c-white); border-top: 1px solid var(--c-border); }

.cfg-back { align-self: flex-start; background: none; border: 0; padding: 0; margin: -.6rem 0 1rem; color: var(--c-muted); font-size: .82rem; cursor: pointer; }

.cfg-back:hover { color: var(--c-mid); text-decoration: underline; }

.cfg-form-title { font-size: .95rem; font-weight: 700; color: var(--c-mid); margin: 1.6rem 0 .9rem; }

@media (max-width: 900px) {
    .modal-box--cfg { overflow-y: auto; }
    .modal-layout--cfg { grid-template-columns: 1fr; }
    .modal-layout--cfg .modal-product-img { flex-direction: column; flex-wrap: nowrap; align-items: center; max-height: none; overflow: visible; padding: 1.4rem 1.2rem; gap: .7rem; }
    .modal-layout--cfg .modal-product-img img { width: 100%; max-width: 520px; max-height: none; aspect-ratio: 4 / 3; }
    .modal-layout--cfg .modal-product-img .fact-badge { display: inline-block; }
    .modal-layout--cfg .modal-product-name { flex: none; text-align: center; }
    .modal-layout--cfg .cfg-specs { flex: none; width: 100%; max-width: 520px; }
    .modal-layout--cfg .modal-form-col { max-height: none; overflow: visible; }
    .modal-box--cfg .cfg-footer { bottom: 0; }
    .modal-box--cfg .modal-close { background: rgba(255,255,255,.92); color: var(--c-mid); }
}

@media (max-width: 680px) {
    .cfg-item { grid-template-columns: auto 44px 1fr; }
    .cfg-item--noimg { grid-template-columns: auto 1fr; }
    .cfg-item-img { width: 44px; height: 44px; }
    .cfg-item-price { grid-column: 3; }
    .cfg-item--noimg .cfg-item-price { grid-column: 2; }
    .cfg-footer { margin: .5rem -1.2rem -1.2rem; padding: .8rem 1.2rem; bottom: -1.2rem; }
    .cfg-footer .btn { flex: 1 1 100%; }
}
