/* Schnelle Ajax-Suche (Plugin tt_ajaxsuche) */

.ttas-dropdown {
    position: absolute;
    z-index: 10000;
    box-sizing: border-box;
    max-height: 70vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    background: #fff;
    border: 1px solid var(--ttas-border, #dcdcdc);
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
    font-size: 14px;
    color: #222;
}

.ttas-dropdown .ttas-results-inner {
    padding-bottom: 12px;
}

.ttas-dropdown .ttas-topbar {
    position: sticky;
    top: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    background: #fff;
    border-bottom: 1px solid var(--ttas-border, #dcdcdc);
}

.ttas-dropdown .ttas-topbar-count {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.ttas-dropdown .ttas-topbar-close {
    flex: 0 0 auto;
    padding: 3px 10px;
    font-size: 12px;
    line-height: 1.4;
    color: #444;
    background: #f2f4f7;
    border: 1px solid var(--ttas-border, #dcdcdc);
    border-radius: 4px;
    cursor: pointer;
}

.ttas-dropdown .ttas-topbar-close:hover {
    background: #e6eaf0;
    color: #111;
}

.ttas-dropdown .ttas-list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
}

.ttas-dropdown .ttas-item {
    margin: 0;
    padding: 0;
}

.ttas-dropdown .ttas-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    text-decoration: none;
    color: inherit;
}

.ttas-dropdown .ttas-item:hover .ttas-link,
.ttas-dropdown .ttas-item.ttas-active .ttas-link {
    background: #f3f6fb;
}

.ttas-dropdown .ttas-thumb {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ttas-thumb-bg, #fafafa);
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
}

.ttas-dropdown .ttas-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.ttas-dropdown .ttas-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.3;
}

.ttas-dropdown .ttas-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ttas-dropdown .ttas-attrs {
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: 6px;
    row-gap: 2px;
    align-items: baseline;
    margin-top: 2px;
    min-width: 0;
}

.ttas-dropdown .ttas-attr-label {
    white-space: nowrap;
    color: #777;
    font-size: 12px;
}

.ttas-dropdown .ttas-attr-val {
    min-width: 0;
    color: #777;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ttas-dropdown .ttas-merkmal {
    color: #555;
    font-size: 12px;
}

.ttas-dropdown .ttas-desc {
    margin-top: 2px;
    font-size: 12px;
    color: #777;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ttas-dropdown .ttas-price-wrap {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 2px;
}

.ttas-dropdown .ttas-price {
    font-weight: 600;
    color: #c8102e;
}

.ttas-dropdown .ttas-price-old {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
}

.ttas-dropdown .ttas-uvp {
    margin-top: 1px;
    font-size: 12px;
    color: #777;
}

.ttas-dropdown .ttas-empty {
    padding: 12px 14px;
    color: #777;
    font-style: italic;
}

/* ---- Box-/Kachel-Darstellung (Bild oben = box, Bild links = boxh) ---- */
.ttas-dropdown .ttas-layout-box .ttas-list,
.ttas-dropdown .ttas-layout-boxh .ttas-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
    padding: 10px;
}

.ttas-dropdown .ttas-layout-box .ttas-item,
.ttas-dropdown .ttas-layout-boxh .ttas-item {
    height: 100%;
}

.ttas-dropdown .ttas-layout-box .ttas-link,
.ttas-dropdown .ttas-layout-boxh .ttas-link {
    height: 100%;
    padding: 8px;
    border: 1px solid var(--ttas-border, #dcdcdc);
    border-radius: 8px;
    background: var(--ttas-box-bg, #fff);
}

.ttas-dropdown .ttas-layout-box .ttas-item:hover .ttas-link,
.ttas-dropdown .ttas-layout-box .ttas-item.ttas-active .ttas-link,
.ttas-dropdown .ttas-layout-boxh .ttas-item:hover .ttas-link,
.ttas-dropdown .ttas-layout-boxh .ttas-item.ttas-active .ttas-link {
    border-color: #cdd8ea;
    background: var(--ttas-box-hover-bg, #f7f9fc);
}

.ttas-dropdown .ttas-layout-box .ttas-name,
.ttas-dropdown .ttas-layout-boxh .ttas-name {
    white-space: normal;
}

.ttas-dropdown .ttas-layout-box .ttas-attr-val,
.ttas-dropdown .ttas-layout-box .ttas-desc,
.ttas-dropdown .ttas-layout-boxh .ttas-attr-val,
.ttas-dropdown .ttas-layout-boxh .ttas-desc {
    white-space: normal;
}

/* Bild oben - Text unten */
.ttas-dropdown .ttas-layout-box .ttas-link {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
}

.ttas-dropdown .ttas-layout-box .ttas-thumb {
    width: 100%;
    height: 96px;
}

.ttas-dropdown .ttas-layout-box .ttas-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Bild links - Text rechts */
.ttas-dropdown .ttas-layout-boxh .ttas-link {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.ttas-dropdown .ttas-layout-boxh .ttas-thumb {
    width: 64px;
    height: 64px;
}

/* ---- Listen-/Zeilen-Darstellung (mit Rahmen je Eintrag) ---- */
.ttas-dropdown .ttas-layout-list .ttas-list {
    padding: 8px;
}

.ttas-dropdown .ttas-layout-list .ttas-item + .ttas-item {
    margin-top: 6px;
}

.ttas-dropdown .ttas-layout-list .ttas-link {
    border: 1px solid var(--ttas-border, #dcdcdc);
    border-radius: 6px;
    background: #fff;
}

.ttas-dropdown .ttas-layout-list .ttas-item:hover .ttas-link,
.ttas-dropdown .ttas-layout-list .ttas-item.ttas-active .ttas-link {
    border-color: var(--ttas-border, #dcdcdc);
    background: #f3f6fb;
}

/* ---- "Meinten Sie …?" (Auto-Korrektur) ---- */
.ttas-dropdown .ttas-didyoumean {
    padding: 9px 13px;
    border-bottom: 1px solid #eef1f4;
    background: #fafbfc;
    font-size: 13px;
    color: #555;
}
.ttas-dropdown .ttas-correct {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: #3062d4;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}
.ttas-dropdown .ttas-correct:hover { color: #2450b8; }

/* ---- Lade-Hinweis waehrend der Suche ---- */
.ttas-dropdown .ttas-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    font-size: 13px;
    color: #555;
}

.ttas-dropdown .ttas-spinner {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    border: 2px solid #cdd8ea;
    border-top-color: #3062d4;
    border-radius: 50%;
    animation: ttas-spin 0.7s linear infinite;
}

.ttas-dropdown .ttas-loading-text {
    line-height: 1.3;
}

@keyframes ttas-spin {
    to { transform: rotate(360deg); }
}


/* tt_ajaxsuche - Overlay-/Filtersuche (Phase 1) */

html.ttaso-lock { overflow: hidden; }

.ttaso-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    flex-direction: column;
    background: #fff;
    color: #222;
    font-size: 14px;
    -webkit-overflow-scrolling: touch;
}

.ttaso-overlay.ttaso-open { display: flex; }

/* Kopf mit Suchleiste + Schliessen */
.ttaso-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--ttaso-border, #dcdcdc);
}

.ttaso-searchbar {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--ttaso-border, #dcdcdc);
    border-radius: 999px;
    padding: 6px 8px 6px 16px;
    background: #f7f8fa;
}

.ttaso-search-ic { width: 20px; height: 20px; color: #6b7280; flex: 0 0 auto; }
.ttaso-search-ic svg { width: 20px; height: 20px; display: block; }

.ttaso-input {
    flex: 1 1 auto;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 18px;
    color: #111;
    min-width: 0;
    padding: 6px 0;
}

.ttaso-submit {
    flex: 0 0 auto;
    border: 0;
    border-radius: 999px;
    background: #1c2430;
    color: #fff;
    font-size: 15px;
    padding: 9px 22px;
    cursor: pointer;
}
.ttaso-submit:hover { background: #0f1620; }

.ttaso-close {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border: 1px solid var(--ttaso-border, #dcdcdc);
    border-radius: 8px;
    background: #fff;
    color: #333;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.ttaso-close svg { width: 20px; height: 20px; }
.ttaso-close:hover { background: #f2f4f7; }

/* Zwischenleiste: Zuletzt gesucht + Werkzeuge */
.ttaso-subbar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 18px;
    border-bottom: 1px solid var(--ttaso-border, #dcdcdc);
    min-height: 56px;
}
.ttaso-tools { margin-left: auto; }

.ttaso-recent { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ttaso-recent-lbl { color: #374151; font-weight: 600; }
.ttaso-recent-row { display: inline-flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.ttaso-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--ttaso-border, #dcdcdc);
    border-radius: 999px;
    background: #fff;
    color: #111;
    padding: 4px 10px;
    font-size: 13px;
    cursor: pointer;
}
.ttaso-chip:hover { background: #f2f4f7; }
.ttaso-chip-x { color: #9aa3af; font-size: 15px; line-height: 1; }
.ttaso-chip-x:hover { color: #ef4444; }
.ttaso-clear { border: 0; background: none; color: #c8102e; cursor: pointer; font-size: 13px; }
.ttaso-clear:hover { text-decoration: underline; }

.ttaso-tools { display: inline-flex; align-items: center; gap: 12px; }
.ttaso-view { display: inline-flex; border: 1px solid var(--ttaso-border, #dcdcdc); border-radius: 8px; overflow: hidden; }
.ttaso-view-btn {
    width: 38px; height: 34px;
    border: 0; background: #fff; color: #6b7280; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
}
.ttaso-view-btn + .ttaso-view-btn { border-left: 1px solid var(--ttaso-border, #dcdcdc); }
.ttaso-view-btn svg { width: 18px; height: 18px; }
.ttaso-view-btn.ttaso-active { background: #1c2430; color: #fff; }

.ttaso-sort {
    border: 1px solid var(--ttaso-border, #dcdcdc);
    border-radius: 8px;
    background: #fff;
    color: #111;
    padding: 7px 10px;
    font-size: 14px;
    cursor: pointer;
}

/* Ergebnis-Bereich */
.ttaso-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 18px;
}

.ttaso-status { display: flex; align-items: center; gap: 10px; color: #555; padding: 10px 2px; }
.ttaso-status-tx { line-height: 1.3; }
.ttaso-spinner {
    width: 16px; height: 16px; flex: 0 0 auto;
    border: 2px solid #cdd8ea; border-top-color: #3062d4; border-radius: 50%;
    animation: ttaso-spin .7s linear infinite;
}
@keyframes ttaso-spin { to { transform: rotate(360deg); } }

.ttaso-count { color: #374151; font-weight: 600; margin-bottom: 12px; }
.ttaso-empty { color: #6b7280; padding: 20px 2px; }

/* Grid-Ansicht */
.ttaso-results.ttaso-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
}

.ttaso-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 1px solid var(--ttaso-border, #dcdcdc);
    border-radius: 10px;
    background: var(--ttaso-box-bg, #fff);
    padding: 12px;
    text-decoration: none;
    color: inherit;
}
.ttaso-card:hover { background: var(--ttaso-box-hover-bg, #f7f9fc); border-color: #cdd8ea; }

.ttaso-thumb {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 150px;
    background: var(--ttaso-thumb-bg, #fafafa);
    border-radius: 8px;
    overflow: hidden;
}
.ttaso-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }

.ttaso-info { display: flex; flex-direction: column; gap: 4px; }
.ttaso-name {
    font-weight: 600; color: #111; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ttaso-manu { color: #6b7280; font-size: 12px; }

.ttaso-priceblock { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.ttaso-price { color: #c8102e; font-weight: 700; font-size: 18px; }
.ttaso-price-old { color: #9aa3af; text-decoration: line-through; font-size: 13px; }
.ttaso-uvp { color: #6b7280; font-size: 12px; width: 100%; }
.ttaso-badge {
    display: inline-block; background: #c8102e; color: #fff;
    font-size: 12px; font-weight: 700; border-radius: 4px; padding: 1px 6px;
}
.ttaso-art { color: #6b7280; font-size: 12px; margin-top: 2px; }

/* Listen-Ansicht */
.ttaso-results.ttaso-list { display: flex; flex-direction: column; gap: 10px; }
.ttaso-results.ttaso-list .ttaso-card-link { flex-direction: row; align-items: center; gap: 14px; }
.ttaso-results.ttaso-list .ttaso-thumb { width: 90px; height: 90px; flex: 0 0 auto; }
.ttaso-results.ttaso-list .ttaso-info { flex: 1 1 auto; }
.ttaso-results.ttaso-list .ttaso-name { -webkit-line-clamp: 1; }

@media (max-width: 640px) {
    .ttaso-head { flex-wrap: wrap; }
    .ttaso-submit { padding: 9px 16px; }
    .ttaso-results.ttaso-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
    .ttaso-thumb { height: 120px; }
}

/* Nachladen */
.ttaso-more-wrap { display: flex; justify-content: center; padding: 18px 0 6px; }
.ttaso-more {
    border: 1px solid var(--ttaso-border, #dcdcdc);
    background: #fff;
    color: #1c2430;
    cursor: pointer;
    padding: 10px 24px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
}
.ttaso-more:hover { background: #f2f4f7; }

/* ---- Overlay: Inner-Breite, Sidebar, Filter ---- */
.ttaso-inner {
    width: 100%;
    max-width: var(--ttaso-max, 1200px);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.ttaso-body {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.ttaso-sidebar {
    flex: 0 0 250px;
    width: 250px;
    align-self: stretch;
    overflow-y: auto;
    padding-right: 4px;
}
.ttaso-sidebar:empty { display: none; }

.ttaso-main { flex: 1 1 auto; min-width: 0; }

.ttaso-fgroup { margin-bottom: 18px; }
.ttaso-fgroup-hd { font-weight: 700; color: #1c2430; margin-bottom: 8px; font-size: 14px; }
.ttaso-fgroup-bd { display: flex; flex-direction: column; gap: 4px; }

.ttaso-frow {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: #333; cursor: pointer; padding: 2px 0;
}
.ttaso-frow input { margin: 0; flex: 0 0 auto; }
.ttaso-fname { flex: 1 1 auto; }
.ttaso-fcount { color: #9aa3af; font-size: 12px; }

.ttaso-more-f {
    align-self: flex-start; margin-top: 4px;
    border: 0; background: none; color: #3062d4; cursor: pointer;
    font-size: 13px; padding: 2px 0;
}
.ttaso-more-f:hover { text-decoration: underline; }

.ttaso-price-f { display: flex; align-items: center; gap: 6px; }
.ttaso-price-sep { color: #6b7280; font-size: 13px; }
.ttaso-pin {
    width: 74px; border: 1px solid var(--ttaso-border, #dcdcdc);
    border-radius: 6px; padding: 6px 8px; font-size: 13px;
}
.ttaso-papply {
    border: 1px solid var(--ttaso-border, #dcdcdc); background: #1c2430; color: #fff;
    border-radius: 6px; padding: 6px 12px; font-size: 13px; cursor: pointer;
}
.ttaso-papply:hover { background: #0f1620; }

@media (max-width: 780px) {
    .ttaso-body { flex-direction: column; }
    .ttaso-sidebar { flex: 1 1 auto; width: 100%; }
}

/* ---- Kategorie: durchsuchbares Dropdown ---- */
.ttaso-catdd { display: flex; flex-direction: column; gap: 6px; }
.ttaso-cat-search {
    border: 1px solid var(--ttaso-border, #dcdcdc);
    border-radius: 6px; padding: 6px 8px; font-size: 13px; width: 100%;
}
.ttaso-cat-list {
    max-height: 200px; overflow-y: auto;
    border: 1px solid var(--ttaso-border, #dcdcdc);
    border-radius: 6px; padding: 4px 6px;
    display: flex; flex-direction: column; gap: 2px;
}
.ttaso-catrow { display: block; }

/* ---- Karte: Link-Wrapper + Aktionen (Menge, Warenkorb, Zum Artikel) ---- */
.ttaso-card-link {
    display: flex; flex-direction: column; gap: 10px;
    text-decoration: none; color: inherit;
}
.ttaso-card-actions {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    margin-top: auto; padding-top: 4px;
}
.ttaso-qty { display: inline-flex; align-items: center; border: 1px solid var(--ttaso-border, #dcdcdc); border-radius: 8px; overflow: hidden; }
.ttaso-qbtn {
    border: 0; background: #f3f4f6; color: #1c2430; width: 30px; height: 34px;
    font-size: 18px; line-height: 1; cursor: pointer;
}
.ttaso-qbtn:hover { background: #e5e7eb; }
.ttaso-qin {
    width: 46px; height: 34px; border: 0; text-align: center; font-size: 14px;
    -moz-appearance: textfield;
}
.ttaso-qin::-webkit-outer-spin-button, .ttaso-qin::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ttaso-cart-btn {
    flex: 1 1 auto; min-width: 140px;
    border: 0; background: #1c2430; color: #fff; border-radius: 8px;
    padding: 8px 14px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.ttaso-cart-btn:hover { background: #0f1620; }
.ttaso-cart-btn:disabled { opacity: .7; cursor: default; }
.ttaso-cart-done { background: #1a7f4b !important; }
.ttaso-detail-btn {
    display: inline-block; border: 1px solid var(--ttaso-border, #dcdcdc);
    border-radius: 8px; padding: 8px 14px; font-size: 14px; font-weight: 600;
    color: #1c2430; text-decoration: none; background: #fff;
}
.ttaso-detail-btn:hover { background: #f7f9fc; border-color: #cdd8ea; }

/* ---- Leerer Zustand: Topprodukte und Bestseller ---- */
.ttaso-feat { margin-bottom: 26px; }
.ttaso-feat-hd { font-size: 18px; font-weight: 700; color: #1c2430; margin: 0 0 12px; }
.ttaso-feat-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px;
}
@media (max-width: 640px) {
    .ttaso-feat-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
    .ttaso-cart-btn { min-width: 0; }
}

/* ---- Beliebte Kategorien im Kopf ---- */
.ttaso-popcats {
    flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
    flex-wrap: wrap; padding: 10px 18px;
    border-bottom: 1px solid var(--ttaso-border, #dcdcdc);
}
.ttaso-popcats-lbl { color: #374151; font-weight: 600; font-size: 13px; }
.ttaso-popcat {
    border: 1px solid var(--ttaso-border, #dcdcdc); background: #fff;
    border-radius: 999px; padding: 6px 14px; font-size: 13px; color: #1c2430;
    cursor: pointer;
}
.ttaso-popcat:hover { background: #1c2430; color: #fff; border-color: #1c2430; }

/* ---- Bewertungssterne ---- */
.ttaso-rating { display: inline-flex; align-items: center; gap: 2px; }
.ttaso-star { color: #d1d5db; font-size: 14px; line-height: 1; }
.ttaso-star-on { color: #f5b301; }
.ttaso-rating-c { color: #6b7280; font-size: 12px; margin-left: 4px; }

/* ---- Warenkorb-Button mit Symbol, Variations-Hinweis, ID-Zeile ---- */
.ttaso-cart-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.ttaso-cart-ic { width: 18px; height: 18px; flex: 0 0 auto; }
.ttaso-var-hint {
    flex: 1 1 100%; color: #6b7280; font-size: 12px; font-style: italic;
    margin-bottom: 4px;
}
.ttaso-idline { display: flex; flex-direction: column; gap: 2px; }
