/*
 * Artikelseite (productdetails/*.tpl, snippets/produktseite/*.tpl), Klassen mit Präfix tt-pdp / tt-uvp / tt-kaufleiste.
 * Ziel: Titel, Preis, Verfügbarkeit und Kaufknopf stehen ohne Scrollen im Bild, Artikelnummern rücken nach unten,
 * direkt am Kaufknopf stehen Vorteile und Zahlarten.
 */

/* ---------- Reihenfolge im Kaufbereich ---------- */
#product-offer .product-info-inner { display: flex; flex-direction: column; }
#product-offer .product-info-inner > .product-headline { order: 1; }
#product-offer .product-info-inner > .rating-wrapper { order: 2; margin-bottom: 8px; }
#product-offer .product-info-inner > .shortdesc { order: 3; }
#product-offer .product-info-inner > .product-offer { order: 4; }
#product-offer .product-info-inner > * { order: 5; }
#product-offer .product-info-inner > .info-essential { order: 6; }

/* ---------- Marke und Titel ---------- */
.tt-pdp__marke {
    margin-bottom: 6px;
    color: var(--tt-grau-text, #4a4d52);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.tt-pdp__marke a { color: inherit; text-decoration: none; }
.tt-pdp__marke a:hover { color: var(--tt-schwarz, #131317); text-decoration: underline; text-underline-offset: 3px; }
#product-offer .product-headline { margin-bottom: 12px; }
#product-offer .product-title {
    margin: 0;
    color: var(--tt-schwarz, #131317);
    font-size: 28px;
    font-weight: 600;
    line-height: 1.2;
}
#product-offer .shortdesc {
    margin: 0 0 20px;
    color: var(--tt-grau-text, #4a4d52);
    font-size: 16px;
    line-height: 1.5;
}

/* ---------- Artikeldaten: klein, unter dem Kaufbereich ---------- */
#product-offer .info-essential {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 20px;
    margin: 24px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--tt-grau-linie, #e4e4e7);
    color: var(--tt-grau-text, #4a4d52);
    font-size: 13px;
    line-height: 1.5;
}
#product-offer .info-essential li { margin: 0; }
#product-offer .info-essential strong { font-weight: 500; }
/* Marke steht über dem Titel, die Kategorie im Brotkrumenpfad */
#product-offer .info-essential .product-manufacturer,
#product-offer .info-essential .product-category { display: none; }

/* ---------- Varianten ---------- */
#product-offer .variations { margin-bottom: 20px; }
#product-offer .variations dt,
#product-offer .variations .variation-wrapper > label { margin-bottom: 6px; color: var(--tt-schwarz, #131317); font-size: 14px; font-weight: 600; }
#product-offer .variations .bootstrap-select > .dropdown-toggle,
#product-offer .variations select.form-control {
    min-height: 48px;
    border: 1px solid #c9c9ce;
    border-radius: 0;
    background-color: #fff;
    color: var(--tt-schwarz, #131317);
    font-size: 15px;
}
#product-offer .variations .bootstrap-select > .dropdown-toggle:focus,
#product-offer .variations .bootstrap-select.show > .dropdown-toggle { border-color: var(--tt-schwarz, #131317); box-shadow: none; outline: 0; }

/* Auswahlknöpfe statt Dropdown (productdetails/variation.tpl) */
#product-offer .variations dt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; }
#product-offer .variations .tt-vari__gewaehlt { color: var(--tt-grau-text, #4a4d52); font-weight: 400; }
#product-offer .variations .tt-vari { margin: 0 -4px; }
#product-offer .variations .tt-vari > [class*="col"] { padding: 0 4px 8px; }
#product-offer .variations .tt-vari label.swatches-text {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    min-height: 46px;
    margin: 0;
    padding: 6px 14px;
    border: 1px solid #c9c9ce;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    color: var(--tt-schwarz, #131317);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.25;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s, background-color .15s;
}
#product-offer .variations .tt-vari label.swatches-text:hover { border-color: var(--tt-schwarz, #131317); }
#product-offer .variations .tt-vari label.swatches-text.active {
    border-color: var(--tt-schwarz, #131317);
    box-shadow: inset 0 0 0 1px var(--tt-schwarz, #131317);
    background: var(--tt-grau-hell, #f4f4f5);
    font-weight: 600;
}
#product-offer .variations .tt-vari label.swatches-text:focus-within { outline: 2px solid var(--tt-schwarz, #131317); outline-offset: 2px; }
/* nicht kombinierbar oder ausverkauft: blass und durchgestrichen, bleibt aber anklickbar wie bei NOVA */
#product-offer .variations .tt-vari label.swatches-text.not-available,
#product-offer .variations .tt-vari label.swatches-text.swatches-not-in-stock,
#product-offer .variations .tt-vari label.swatches-text.swatches-sold-out {
    border-style: dashed;
    background: #fff;
    color: #9a9aa1;
    font-weight: 400;
}
#product-offer .variations .tt-vari label.swatches-text.not-available .label-variation,
#product-offer .variations .tt-vari label.swatches-text.swatches-not-in-stock .label-variation,
#product-offer .variations .tt-vari label.swatches-text.swatches-sold-out .label-variation { text-decoration: line-through; }
#product-offer .variations .tt-vari .variation-badge { margin: 2px 0 0; color: var(--tt-grau-text, #4a4d52); font-size: 12px; font-weight: 400; white-space: nowrap; }
#product-offer .variations .tt-vari .badge-not-available { display: none; }

/* ---------- Preis ---------- */
#product-offer .price_wrapper { margin-bottom: 4px; }
#product-offer .price_wrapper .price {
    color: var(--tt-schwarz, #131317);
    font-family: var(--tt-ueberschrift, Montserrat, sans-serif);
    font-size: 34px;
    font-weight: 600;
    line-height: 1.1;
}
#product-offer .price_wrapper .price.special-price { color: var(--tt-rot, #c01d29); }
#product-offer .price_wrapper .price_label { font-size: 16px; font-weight: 400; }
#product-offer .price-note { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; color: var(--tt-grau-text, #4a4d52); font-size: 13px; }
#product-offer .price-note .tt-uvp { order: -1; }
.tt-uvp { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 4px; font-size: 15px; }
.tt-uvp__label { border: 0; text-decoration: none; cursor: help; }
.tt-uvp__wert { text-decoration: line-through; }
.tt-uvp__marke {
    padding: 2px 8px;
    background: var(--tt-rot, #c01d29);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
}
.tt-uvp__ersparnis { color: var(--tt-rot, #c01d29); font-weight: 600; }

/* ---------- Verfügbarkeit ---------- */
#product-offer .stock-information {
    margin: 16px 0;
    padding: 12px 0;
    border: 0;
    border-top: 1px solid var(--tt-grau-linie, #e4e4e7);
    border-bottom: 1px solid var(--tt-grau-linie, #e4e4e7);
    font-size: 15px;
}
#product-offer .stock-information .status { font-weight: 600; }
#product-offer .stock-information .status-2 { color: #1d7a3c; }
#product-offer .stock-information .status-1 { color: #b26a00; }
#product-offer .stock-information .status-0 { color: var(--tt-rot, #c01d29); }
#product-offer .stock-information .estimated-delivery { color: var(--tt-grau-text, #4a4d52); font-size: 14px; }
#product-offer .question-on-item .btn { padding: 0; color: var(--tt-grau-text, #4a4d52); font-size: 13px; }

/* ---------- Kaufknopf ---------- */
#add-to-cart .basket-form-inline { align-items: stretch; margin-left: -6px; margin-right: -6px; }
#add-to-cart .basket-form-inline > [class*="col"] { padding-left: 6px; padding-right: 6px; }
/* Menge und Kaufknopf stehen auch auf dem Handy nebeneinander */
#add-to-cart .basket-form-inline { flex-wrap: nowrap; }
#add-to-cart .basket-form-inline > [class*="col"]:first-child:not(:last-child) { flex: 0 0 132px; max-width: 132px; }
#add-to-cart .basket-form-inline > [class*="col"]:last-child:not(:first-child) { flex: 1 1 0; max-width: none; min-width: 0; }
#add-to-cart .basket-form-inline .form-counter { height: 54px; max-height: none; border: 1px solid #c9c9ce; border-radius: 0; }
#add-to-cart .basket-form-inline .form-counter .btn,
#add-to-cart .basket-form-inline .form-counter .form-control { height: 52px; border: 0; }
#add-to-cart .basket-form-inline .form-counter .form-control { min-width: 0; padding: 0; font-size: 16px; text-align: center; }
#add-to-cart button[name="inWarenkorb"] {
    height: 54px;
    padding-top: 0;
    padding-bottom: 0;
    border: 0;
    border-radius: 0;
    background: var(--tt-rot, #c01d29);
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .01em;
    transition: background-color .15s;
}
#add-to-cart button[name="inWarenkorb"]:hover,
#add-to-cart button[name="inWarenkorb"]:focus { background: var(--tt-rot-dunkel, #a1171f); }
/* NOVA zeigt auf dem Handy nur das Warenkorb-Symbol, der Knopf braucht aber seinen Text */
#add-to-cart button[name="inWarenkorb"] .btn-basket-check > span { display: inline !important; }
#add-to-cart .alert.choose-variations {
    margin: 0;
    padding: 12px 14px;
    border: 0;
    border-left: 3px solid var(--tt-schwarz, #131317);
    border-radius: 0;
    background: var(--tt-grau-hell, #f4f4f5);
    color: var(--tt-schwarz, #131317);
    font-size: 14px;
}

/* ---------- Vorteile und Zahlarten ---------- */
.tt-pdp__vertrauen { margin-top: 20px; }
.tt-pdp__vorteile { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.tt-pdp__vorteil { display: flex; align-items: flex-start; gap: 10px; color: var(--tt-schwarz, #131317); font-size: 15px; line-height: 1.4; }
.tt-pdp__vorteil .sp-icon { flex-shrink: 0; margin-top: 1px; color: var(--tt-rot, #c01d29); }
.tt-pdp__chat {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.tt-pdp__chat:hover { color: var(--tt-rot, #c01d29); }
.tt-pdp__vertrauen .tt-google { margin-top: 16px; }
.tt-pdp__zahlung { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; padding: 0; list-style: none; }
.tt-pdp__zahlung li { display: flex; align-items: center; justify-content: center; width: 52px; height: 32px; padding: 3px 5px; border: 1px solid var(--tt-grau-linie, #e4e4e7); background: #fff; }
.tt-pdp__zahlung img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }

/* ---------- Beschreibung und Merkmale ---------- */
#tabAccordion .card-header,
.tab-navigation .nav-link { font-family: var(--tt-ueberschrift, Montserrat, sans-serif); font-weight: 600; }
#tab-description .desc,
.tab-content .desc { max-width: 860px; font-size: 16px; line-height: 1.65; }
.product-attributes table td,
.product-attributes table th { padding: 10px 14px; font-size: 15px; vertical-align: top; }
.product-attributes .attr-label { width: 34%; color: var(--tt-grau-text, #4a4d52); font-weight: 600; }

/* ---------- Kaufleiste (Handy und Tablet) ---------- */
.tt-kaufleiste {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--tt-grau-linie, #e4e4e7);
    background: #fff;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, .08);
}
.tt-kaufleiste[hidden] { display: none; }
.tt-kaufleiste__info { display: flex; flex-direction: column; flex: 1 1 0; min-width: 0; }
.tt-kaufleiste__name { overflow: hidden; color: var(--tt-grau-text, #4a4d52); font-size: 12px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.tt-kaufleiste__preis { color: var(--tt-schwarz, #131317); font-family: var(--tt-ueberschrift, Montserrat, sans-serif); font-size: 18px; font-weight: 600; line-height: 1.2; white-space: nowrap; }
.tt-kaufleiste__knopf {
    flex-shrink: 0;
    min-height: 46px;
    padding: 0 18px;
    border: 0;
    background: var(--tt-rot, #c01d29);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}
.tt-kaufleiste__knopf:hover,
.tt-kaufleiste__knopf:focus { background: var(--tt-rot-dunkel, #a1171f); }
@media (min-width: 992px) {
    .tt-kaufleiste { display: none; }
}
@media (max-width: 991.98px) {
    /* Platz für die Leiste, damit sie den Footer nicht verdeckt; Chat-Knopf rückt nach oben */
    body.tt-kaufleiste-aktiv { padding-bottom: 72px; }
    body.tt-kaufleiste-aktiv .BeaconFabButtonFrame { bottom: 84px !important; }
    body.tt-kaufleiste-aktiv #consent-manager,
    body.tt-kaufleiste-aktiv #consent-settings-btn { transform: translateY(-68px); }
    #product-offer .product-title { font-size: 22px; }
    #product-offer .price_wrapper .price { font-size: 28px; }
    #product-offer .product-gallery { margin-bottom: 16px; }
}
@media (max-width: 575.98px) {
    #add-to-cart button[name="inWarenkorb"] { padding-left: 8px; padding-right: 8px; font-size: 16px; }
}

/* ---------- Warenkorb und Kasse ---------- */
.cart-summary .tt-pdp__vertrauen { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--tt-grau-linie, #e4e4e7); }
.cart-summary .tt-pdp__vorteil { font-size: 14px; }
.cart-summary #cart-checkout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    border: 0;
    border-radius: 0;
    background: var(--tt-rot, #c01d29);
    color: #fff;
    font-size: 17px;
    font-weight: 700;
}
.cart-summary #cart-checkout-btn:hover,
.cart-summary #cart-checkout-btn:focus { background: var(--tt-rot-dunkel, #a1171f); }
.tt-kasse-vertrauen {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 24px;
    margin: 0 0 24px;
    padding: 12px 16px;
    background: var(--tt-grau-hell, #f4f4f5);
}
.tt-kasse-vertrauen__sicher { display: inline-flex; align-items: center; gap: 8px; color: var(--tt-schwarz, #131317); font-size: 14px; font-weight: 600; }
.tt-kasse-vertrauen .tt-pdp__zahlung { margin: 0; }
.tt-kasse-vertrauen .tt-pdp__zahlung li { width: 44px; height: 28px; }
@media (max-width: 575.98px) {
    .tt-kasse-vertrauen { gap: 8px 16px; padding: 10px 12px; }
    .tt-kasse-vertrauen .tt-pdp__zahlung li:nth-child(n+5) { display: none; }
}
@media (max-width: 991.98px) {
    /* Der „nach oben“-Pfeil von NOVA läge sonst auf dem Knopf der Kaufleiste */
    body.tt-kaufleiste-aktiv .smoothscroll-top { display: none !important; }
}

/* ---------- Günstigere Alternativen (snippets/produktseite/alternativen.tpl) ---------- */
.tt-alt { margin: 8px 0 40px; padding: 24px; background: var(--tt-grau-hell, #f4f4f5); }
.tt-alt__titel { margin: 0 0 16px; color: var(--tt-schwarz, #131317); font-size: 20px; font-weight: 600; line-height: 1.25; }
.tt-alt__liste { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 12px; }
.tt-alt__karte {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid var(--tt-grau-linie, #e4e4e7);
    background: #fff;
    color: var(--tt-schwarz, #131317);
    text-decoration: none;
    transition: border-color .15s;
}
.tt-alt__karte:hover { border-color: var(--tt-schwarz, #131317); color: var(--tt-schwarz, #131317); text-decoration: none; }
.tt-alt__bild { flex: 0 0 96px; display: flex; align-items: center; justify-content: center; height: 80px; }
.tt-alt__bild img, .tt-alt__bild picture { max-width: 100%; max-height: 80px; width: auto; height: auto; object-fit: contain; }
.tt-alt__text { display: flex; flex-direction: column; flex: 1 1 0; min-width: 0; gap: 3px; }
.tt-alt__marke { align-self: flex-start; padding: 2px 8px; background: var(--tt-schwarz, #131317); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .03em; line-height: 1.5; }
.tt-alt__marke--tipp { background: var(--tt-rot, #c01d29); }
.tt-alt__name { font-size: 15px; font-weight: 600; line-height: 1.3; }
.tt-alt__karte:hover .tt-alt__name { text-decoration: underline; text-underline-offset: 3px; }
.tt-alt__wert { color: var(--tt-grau-text, #4a4d52); font-size: 13px; }
.tt-alt__preis .price,
.tt-alt__preis .productbox-price { color: var(--tt-schwarz, #131317); font-family: var(--tt-ueberschrift, Montserrat, sans-serif); font-size: 19px; font-weight: 600; line-height: 1.2; }
.tt-alt__preis .price_label { font-size: 13px; font-weight: 400; }
.tt-alt__preis .price-note { display: none; }
.tt-alt__pfeil { flex-shrink: 0; color: var(--tt-grau-text, #4a4d52); }
@media (max-width: 575.98px) {
    .tt-alt { margin-left: -16px; margin-right: -16px; padding: 20px 16px; }
    .tt-alt__bild { flex-basis: 72px; height: 64px; }
    .tt-alt__bild img, .tt-alt__bild picture { max-height: 64px; }
    .tt-alt__pfeil { display: none; }
}

/* ---------- „Dazu passend“ unter dem Kaufknopf (snippets/produktseite/dazu-passend.tpl) ---------- */
.tt-dazu { margin-top: 20px; border: 1px solid var(--tt-grau-linie, #e4e4e7); background: #fff; }
.tt-dazu__titel { padding: 10px 14px; border-bottom: 1px solid var(--tt-grau-linie, #e4e4e7); background: var(--tt-grau-hell, #f4f4f5); color: var(--tt-schwarz, #131317); font-size: 14px; font-weight: 700; }
.tt-dazu__zeile { display: flex; align-items: center; gap: 12px; padding: 10px 14px; color: var(--tt-schwarz, #131317); text-decoration: none; }
.tt-dazu__zeile + .tt-dazu__zeile { border-top: 1px solid var(--tt-grau-linie, #e4e4e7); }
a.tt-dazu__zeile:hover { background: var(--tt-grau-hell, #f4f4f5); color: var(--tt-schwarz, #131317); text-decoration: none; }
.tt-dazu__bild { flex: 0 0 48px; display: flex; align-items: center; justify-content: center; height: 48px; color: var(--tt-rot, #c01d29); }
.tt-dazu__bild img, .tt-dazu__bild picture { max-width: 48px; max-height: 48px; width: auto; height: auto; object-fit: contain; }
.tt-dazu__text { display: flex; flex-direction: column; flex: 1 1 0; min-width: 0; gap: 2px; }
.tt-dazu__name { color: var(--tt-schwarz, #131317); font-size: 14px; font-weight: 600; line-height: 1.3; text-decoration: none; }
a.tt-dazu__name:hover { color: var(--tt-schwarz, #131317); text-decoration: underline; text-underline-offset: 3px; }
.tt-dazu__zusatz { color: var(--tt-grau-text, #4a4d52); font-size: 13px; line-height: 1.3; }
#product-offer .tt-dazu__preis .price_wrapper { margin: 0; }
#product-offer .tt-dazu__preis .price_wrapper .price,
#product-offer .tt-dazu__preis .productbox-price { color: var(--tt-schwarz, #131317); font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.2; }
#product-offer .tt-dazu__preis .price_wrapper .price_label { font-size: 12px; font-weight: 400; }
.tt-dazu__preis .price-note { display: none; }
.tt-dazu__aktion { flex-shrink: 0; color: var(--tt-grau-text, #4a4d52); }
.tt-dazu__knopf {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--tt-schwarz, #131317);
    background: #fff;
    color: var(--tt-schwarz, #131317);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .15s, color .15s;
}
.tt-dazu__knopf:hover { background: var(--tt-schwarz, #131317); color: #fff; text-decoration: none; }
.tt-dazu__knopf.io-loading { opacity: .6; pointer-events: none; }
.tt-dazu__knopf.ist-drin { border-color: #1d7a3c; background: #1d7a3c; color: #fff; pointer-events: none; }
.tt-dazu__knopf.ist-drin .sp-icon { display: none; }
