/*
 * Produktkarten in Kategorie- und Suchlisten (productlist/item_box.tpl).
 * Ziel: Das Produktbild ist frei, Marke, Titel, Preis und Lieferstatus sind auf einen Blick lesbar.
 */
#product-list .productbox .productbox-inner,
.productbox.productbox-column .productbox-inner {
    height: 100%;
    padding: 12px 12px 16px;
    border: 1px solid var(--tt-grau-linie, #e4e4e7);
    background: #fff;
    transition: border-color .15s;
}
.productbox.productbox-column:hover .productbox-inner { border-color: var(--tt-schwarz, #131317); }
.productbox .productbox-images { margin-bottom: 12px; }

.productbox .tt-karte__marke {
    margin-bottom: 4px;
    color: var(--tt-grau-text, #4a4d52);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.productbox .productbox-title { margin-bottom: 8px; }
.productbox .productbox-title a {
    color: var(--tt-schwarz, #131317);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
}
.productbox:hover .productbox-title a { text-decoration: underline; text-underline-offset: 3px; }

/* Preis: groß und schwarz, reduzierte Preise rot */
.productbox .price_wrapper .price,
.productbox .price_wrapper .productbox-price {
    color: var(--tt-schwarz, #131317);
    font-family: var(--tt-ueberschrift, Montserrat, sans-serif);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.2;
}
.productbox .price_wrapper .special-price { color: var(--tt-rot, #c01d29); }
.productbox .price_wrapper .price_label { font-size: 14px; font-weight: 400; }
.productbox .sp-uvp { display: block; margin-top: 2px; }

/* Lieferstatus mit Farbpunkt */
.tt-karte__lager { margin-top: 8px; font-size: 13px; font-weight: 500; line-height: 1.35; }
.tt-karte__lager small { font-size: inherit; }
.tt-karte__lager .signal_image { display: flex; align-items: center; gap: 6px; }
.tt-karte__lager .signal_image::before {
    content: "";
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}
.tt-karte__lager .status-2 { color: #1d7a3c; }
.tt-karte__lager .status-1 { color: #b26a00; }
.tt-karte__lager .status-0 { color: var(--tt-rot, #c01d29); }
.tt-karte__lager .estimated_delivery { color: var(--tt-grau-text, #4a4d52); font-weight: 400; }

@media (max-width: 575.98px) {
    #product-list .productbox .productbox-inner,
    .productbox.productbox-column .productbox-inner { padding: 8px 8px 12px; }
    .productbox .productbox-title a { font-size: 14px; }
    .productbox .price_wrapper .price,
    .productbox .price_wrapper .productbox-price { font-size: 17px; }
    .tt-karte__lager { font-size: 12px; }
}

/* ---------- Beschreibung über der Artikelliste: gekürzt mit „Mehr lesen“ (productlist/header.tpl) ---------- */
.tt-kat-text { margin-bottom: 20px; }
.tt-kat-text .desc { position: relative; overflow: hidden; line-height: 1.6; }
#result-wrapper .tt-kat-text .desc { margin-bottom: 0; }
.tt-kat-text .desc > :last-child { margin-bottom: 0; }
/* gekürzt, solange der Text weder kurz genug (is-kurz) noch aufgeklappt (is-offen) ist */
.tt-kat-text:not(.is-kurz):not(.is-offen) .desc { max-height: 4.9em; }
.tt-kat-text:not(.is-kurz):not(.is-offen) .desc::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1.6em;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff);
    pointer-events: none;
}
.tt-kat-text__knopf {
    margin-top: 6px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--tt-schwarz, #131317);
    font-size: 14px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.tt-kat-text__knopf:hover { color: var(--tt-rot, #c01d29); }

/* ---------- Unterkategorien über der Artikelliste auf dem Handy: zwei Kacheln nebeneinander, Name mittig unter dem Bild ---------- */
@media (max-width: 767.98px) {
    .content-cats-small { margin: 0 -6px 24px; }
    .content-cats-small > [class*="col"] { flex: 0 0 50%; max-width: 50%; margin-bottom: 12px; padding: 0 6px; }
    .content-cats-small .sub-categories { padding: 10px; border: 1px solid var(--tt-grau-linie, #e4e4e7); background: #fff; }
    .content-cats-small .sub-categories .subcategories-image { align-items: center; height: 96px; margin-bottom: 8px; }
    .content-cats-small .subcategories-image picture,
    .content-cats-small .subcategories-image img { max-width: 100%; max-height: 96px; width: auto; height: auto; object-fit: contain; }
    .content-cats-small .caption { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.3; text-align: center; }
    .content-cats-small .caption a { color: var(--tt-schwarz, #131317); text-decoration: none; }
}

/* ---------- Schneeketten-Finder (snippets/schneeketten-finder.tpl) ---------- */
.tt-sk { margin: 0 0 32px; padding: 28px; background: var(--tt-schwarz, #131317); color: #fff; scroll-margin-top: 150px; }
.tt-sk__eyebrow { display: inline-block; margin-bottom: 8px; color: #fff; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .75; }
/* :is(#home, …) gibt den Regeln genug Gewicht gegen „#home h2“ aus der custom.css des Live-Shops */
:is(#home, #result-wrapper, html) .tt-sk__titel { margin: 0 0 8px; color: #fff; font-size: 24px; font-weight: 600; line-height: 1.2; }
.tt-sk__lead { margin: 0; color: rgba(255, 255, 255, .85); font-size: 14px; line-height: 1.5; }
:is(#home, #result-wrapper, html) .tt-sk__titel { margin-bottom: 16px; }
.tt-sk__lead strong { color: #fff; white-space: nowrap; }
.tt-sk__form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; margin-bottom: 14px; }
.tt-sk__felder { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tt-sk__felder[hidden] { display: none; }
/* Reiter: Nach Auto / Nach Reifengröße */
.tt-sk__reiter { grid-column: 1 / -1; display: inline-flex; justify-self: start; gap: 0; padding: 3px; background: rgba(255, 255, 255, .14); }
.tt-sk__reiter-knopf { min-height: 36px; padding: 0 16px; border: 0; background: none; color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; }
.tt-sk__reiter-knopf[aria-selected="true"] { background: #fff; color: var(--tt-schwarz, #131317); }
.tt-sk__reiter-knopf:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.tt-sk__feld { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.tt-sk__feld > span { color: #fff; font-size: 13px; font-weight: 600; }
.tt-sk__feld select {
    width: 100%;
    height: 50px;
    padding: 0 36px 0 14px;
    border: 0;
    border-radius: 0;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23131317' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
    color: var(--tt-schwarz, #131317);
    font-size: 16px;
    -webkit-appearance: none;
    appearance: none;
}
.tt-sk__feld select:disabled { background-color: #d9d9de; color: #6b6b73; }
.tt-sk__feld select:focus { outline: 2px solid #fff; outline-offset: 2px; }
.tt-sk__knopf {
    height: 50px;
    padding: 0 22px;
    border: 0;
    background: var(--tt-rot, #c01d29);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .15s;
}
.tt-sk__knopf:hover:not(:disabled) { background: var(--tt-rot-dunkel, #a1171f); }
.tt-sk__knopf:disabled { opacity: .5; cursor: not-allowed; }
.tt-sk__ergebnis { margin-top: 24px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .2); }
:is(#home, #result-wrapper, html) .tt-sk__ergebnis-titel { margin: 0 0 14px; color: #fff; font-size: 19px; font-weight: 600; line-height: 1.3; }
.tt-sk__liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 10px; }
.tt-sk__karte { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: #fff; color: var(--tt-schwarz, #131317); text-decoration: none; }
.tt-sk__karte:hover { color: var(--tt-schwarz, #131317); text-decoration: none; box-shadow: inset 0 0 0 2px var(--tt-rot, #c01d29); }
.tt-sk__bild { flex: 0 0 84px; display: flex; align-items: center; justify-content: center; height: 76px; }
.tt-sk__bild img, .tt-sk__bild picture { max-width: 100%; max-height: 76px; width: auto; height: auto; object-fit: contain; }
.tt-sk__text { display: flex; flex-direction: column; flex: 1 1 0; min-width: 0; gap: 3px; }
.tt-sk__name { font-size: 15px; font-weight: 600; line-height: 1.3; }
.tt-sk__karte:hover .tt-sk__name { text-decoration: underline; text-underline-offset: 3px; }
.tt-sk__hinweis { align-self: flex-start; padding: 1px 7px; background: #fff3cd; color: #6b4e00; font-size: 12px; font-weight: 600; line-height: 1.5; }
.tt-sk__preis .price, .tt-sk__preis .productbox-price { color: var(--tt-schwarz, #131317); font-family: var(--tt-ueberschrift, Montserrat, sans-serif); font-size: 18px; font-weight: 600; line-height: 1.2; }
.tt-sk__preis .price_label { font-size: 13px; font-weight: 400; }
.tt-sk__preis .price-note { display: none; }
.tt-sk .tt-karte__lager { margin-top: 2px; font-size: 12px; }
.tt-sk__pfeil { flex-shrink: 0; color: var(--tt-grau-text, #4a4d52); }
.tt-sk__fuss { margin: 16px 0 0; color: rgba(255, 255, 255, .8); font-size: 13px; line-height: 1.5; }
.tt-sk__chat { padding: 0; border: 0; background: none; color: #fff; font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@media (max-width: 991.98px) {
    .tt-sk__form { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 575.98px) {
    .tt-sk { margin-left: -16px; margin-right: -16px; padding: 22px 16px; }
    :is(#home, #result-wrapper, html) .tt-sk__titel { font-size: 21px; }
    .tt-sk__form, .tt-sk__felder { gap: 10px 8px; }
    /* Auswahl nach Auto: Modellnamen sind lang, deshalb Marke und Größe nebeneinander, das Modell über die ganze Breite */
    .tt-sk__felder[data-tt-sk-gruppe="auto"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tt-sk__felder[data-tt-sk-gruppe="auto"] .tt-sk__feld--breit { grid-column: 1 / -1; grid-row: 2; }
    .tt-sk__felder[data-tt-sk-gruppe="auto"] .tt-sk__feld:last-child { grid-row: 3; grid-column: 1 / -1; }
    .tt-sk__felder[data-tt-sk-gruppe="auto"] .tt-sk__feld:first-child { grid-column: 1 / -1; }
    .tt-sk__reiter { justify-self: stretch; }
    .tt-sk__reiter-knopf { flex: 1 1 0; padding: 0 8px; }
    .tt-sk__feld select { padding-left: 10px; padding-right: 28px; background-position: right 8px center; }
    .tt-sk__pfeil { display: none; }
}

/* Startseite: helle Fassung, damit der Finder sich vom dunklen Hero darüber absetzt */
.tt-sk--hell { margin-bottom: 0; background: var(--tt-grau-hell, #f4f4f5); color: var(--tt-schwarz, #131317); }
.tt-sk--hell .tt-sk__eyebrow { color: var(--tt-rot, #c01d29); opacity: 1; }
:is(#home, #result-wrapper, html) .tt-sk--hell .tt-sk__titel { color: var(--tt-schwarz, #131317); }
.tt-sk--hell .tt-sk__lead { color: var(--tt-grau-text, #4a4d52); }
.tt-sk--hell .tt-sk__lead strong { color: var(--tt-schwarz, #131317); }
.tt-sk--hell .tt-sk__feld > span { color: var(--tt-schwarz, #131317); }
.tt-sk--hell .tt-sk__feld select { border: 1px solid #c9c9ce; }
.tt-sk--hell .tt-sk__feld select:disabled { background-color: #ececef; }
.tt-sk--hell .tt-sk__feld select:focus { outline-color: var(--tt-schwarz, #131317); }
.tt-sk--hell .tt-sk__reiter { background: #e2e2e6; }
.tt-sk--hell .tt-sk__reiter-knopf { color: var(--tt-schwarz, #131317); }
.tt-sk--hell .tt-sk__reiter-knopf[aria-selected="true"] { background: var(--tt-schwarz, #131317); color: #fff; }
.tt-sk--hell .tt-sk__reiter-knopf:focus-visible { outline-color: var(--tt-schwarz, #131317); }
/* Die Startseite (.sp) setzt Abstände von Abschnitten und Absätzen zurück */
.sp .tt-sk { padding: 28px; }
.sp .tt-sk .tt-sk__lead { margin: 0; }
.sp .tt-sk .tt-sk__form { margin-bottom: 14px; }
.sp .tt-sk .tt-sk__feld { margin: 0; }
@media (max-width: 575.98px) {
    .sp .tt-sk { padding: 22px 16px; }
}

/* ---------- Suche: passende Kategorien über den Treffern (productlist/header.tpl) ---------- */
.tt-suchkat { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 24px; padding: 16px 20px; background: var(--tt-grau-hell, #f4f4f5); }
.tt-suchkat__titel { color: var(--tt-schwarz, #131317); font-size: 15px; font-weight: 700; }
.tt-suchkat__liste { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tt-suchkat__link {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--tt-schwarz, #131317);
    background: #fff;
    color: var(--tt-schwarz, #131317);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .15s, color .15s;
}
.tt-suchkat__link:hover { background: var(--tt-schwarz, #131317); color: #fff; text-decoration: none; }

/* Fähnchen (Bestseller, Neu, Top bewertet) am oberen Kartenrand statt mitten auf dem Produktbild */
#product-list .productbox .productbox-ribbon.ribbon,
.productbox .productbox-ribbon.ribbon { top: 0; }
