/* Ampel */
.vtv-signal .green { fill: var(--vd-signal-green, #01ba07); }
.vtv-signal .yellow { fill: var(--vd-signal-yellow, #fce500); }
.vtv-signal .red { fill: var(--vd-signal-red, #c10000); }
.vtv-signal { flex: 0 0 auto; }

/*
 * Tabellen-Ansicht: alle Artikel stehen auf einer Seite.
 * Es bleibt nur die Anzahl ("126 Artikel"); Sortierung, Seiten und Ansichts-Auswahl entfallen,
 * die untere Toolbar wird komplett ausgeblendet.
 */
body:has(.vtv-form) .toolbar .limiter,
body:has(.vtv-form) .toolbar .modes,
body:has(.vtv-form) .toolbar .toolbar-sorter,
body:has(.vtv-form) .toolbar .pages,
body:has(.vtv-form) .vtv-form ~ .toolbar {
    display: none;
}

/* Inhalt über die volle Breite: leere linke Spalte ausblenden */
@media (min-width: 768px) {
    body:has(.vtv-form) .sidebar-main,
    body:has(.vtv-form) .sidebar-additional {
        display: none;
    }

    body:has(.vtv-form) .column.main {
        float: none;
        padding-left: 0;
        width: 100%;
    }
}

/* Filter */
.vtv-filter { margin: 0 0 20px; }
.vtv-filter-title { display: block; margin-bottom: 8px; color: var(--vd-filter, #1979c3); }
.vtv-filter-list { display: flex; flex-wrap: wrap; gap: 6px 24px; list-style: none; margin: 0; padding: 0; }
.vtv-filter-list label { color: var(--vd-filter, #1979c3); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.vtv-filter-list label:hover span:not(.vtv-count) { text-decoration: underline; }
.vtv-count { color: #757575; }

/* Gruppen + Tabellen */
.vtv-group { margin: 0 0 30px; }
.vtv-group + .vtv-group { border-top: 1px solid #ccc; padding-top: 30px; }
.vtv-group-title { font-weight: 300; margin: 0 0 15px; }
.vtv-table-wrapper { overflow-x: auto; }
.vtv-table {
    border-collapse: collapse;
    table-layout: fixed;
    width: 100%;
}
.vtv-table th,
.vtv-table td {
    border: 1px solid var(--vd-table-border, #000);
    padding: 8px 10px;
    text-align: center;
    vertical-align: middle;
}
.vtv-table thead th {
    background: var(--vd-table-head-bg, #e6e6e6);
    font-weight: 400;
    text-transform: uppercase;
}
.vtv-table thead th.vtv-col-qty {
    background: var(--vd-qty-head-bg, #3b5b8a);
    color: var(--vd-qty-head-text, #fff);
}
.vtv-col-photo { width: 20%; }
.vtv-col-name { width: 28%; }
.vtv-col-vault { width: 22%; }
.vtv-col-bundle { width: 12%; }
.vtv-col-qty { width: 18%; }
/* Schlanke Zeilen: Magento setzt Breite und Höhe des Bild-Rahmens inline, daher !important */
.vtv-table th,
.vtv-table td { padding: 4px 8px; }
/* Bildhöhe in der Zeile (Zeilenhöhe = Bildhöhe + 8 px). Hier anpassen, falls die Zeilen höher/niedriger sein sollen. */
.vtv-table { --vtv-row-img: 90px; }
.vtv-table .product-image-container {
    display: inline-block;
    height: var(--vtv-row-img);
    width: calc(var(--vtv-row-img) * .8) !important;
}
.vtv-table .product-image-wrapper {
    display: block;
    height: var(--vtv-row-img) !important;
    padding-bottom: 0 !important;
}
.vtv-table .product-image-photo {
    max-height: 100%;
    max-width: 100%;
    width: auto;
}
.vtv-table .vtv-col-photo { height: var(--vtv-row-img); padding: 4px; }
.vtv-table tr.vtv-row { height: calc(var(--vtv-row-img) + 8px); }
.vtv-table .vtv-name {
    align-items: center;
    display: inline-flex;
    gap: 8px;
    justify-content: center;
}
.vtv-table .vtv-name-link { color: #333; font-weight: 700; text-decoration: none; }
.vtv-table .vtv-name-link:hover { text-decoration: underline; }
.vtv-row.vtv-unavailable { background: var(--vd-unavailable-bg, #ececec); }
.vtv-qty { max-width: 100%; width: 100%; }
.vtv-state { color: #333; }

/* Feste Aktionsleiste */
.vtv-actions {
    bottom: 0;
    display: flex;
    gap: 10px;
    position: fixed;
    right: 20px;
    z-index: 50;
}
.vtv-actions .action.tocart {
    background: var(--vd-tocart-bg, #2eaa33);
    border-color: var(--vd-tocart-bg, #2eaa33);
    color: var(--vd-tocart-text, #fff);
}
.vtv-actions .action.tocart.disabled { opacity: .6; }

/*
 * Legende im Footer: rechts neben den Footer-Links (zweispaltig).
 * Das Legenden-Block steht im Layout als erstes Kind des Footers und schwebt rechts (50 %);
 * die Links laufen links daneben. Das Copyright räumt die Float-Spalte wieder.
 */
.vtv-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 20px;
    padding-top: 2px;
}
.vtv-legend-item { align-items: center; display: flex; gap: 8px; }

@media (min-width: 768px) {
    .vtv-legend {
        float: right;
        width: 50%;
    }

    .footer.content::after {
        clear: both;
        content: '';
        display: block;
    }

    .footer.content .copyright {
        clear: both;
    }
}

/* Popup */
.vtv-popup .modal-inner-wrap {
    margin: 2rem auto;
    max-width: 1200px;
    width: 90%;
}
.vtv-popup-loading { padding: 3rem; text-align: center; }
.vtv-detail-top { display: flex; justify-content: space-between; margin-bottom: 10px; }
.vtv-detail-art { color: #1d4ea3; }
.vtv-detail-breadcrumb { color: #757575; display: flex; gap: 10px; list-style: none; margin: 0; padding: 0; }
.vtv-detail-breadcrumb li + li::before { content: '\203A'; margin-right: 10px; }
.vtv-detail-title { align-items: center; display: flex; gap: 10px; font-weight: 300; margin-bottom: 20px; }
.vtv-detail-facts { margin-top: 20px; }
.vtv-detail-stock span + span { margin-left: 15px; }
.vtv-detail-stock { color: var(--vd-filter, #1979c3); }
.vtv-detail-blocked { margin-top: 10px; }

@media (max-width: 767px) {
    .vtv-table { min-width: 640px; }
}
