/* ==========================================================================
   Marketplace Shop Styles
   ========================================================================== */

/* Header */
.mp-header {
    z-index: 1030;
}
.mp-header-inner {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0 15px;
    height: 50px;
}
.mp-header-logo {
    flex-shrink: 0;
}
.mp-header-logo img {
    height: 32px;
}
/* Category-Tabs (zweite Header-Zeile, ersetzt das frühere Hamburger-Menü).
   Hintergrund ist transparent → der Grünton der navbar-inverse-Top-Bar zieht
   sich durch; ein leichter Schwarz-Overlay setzt die Tab-Zeile optisch ab. */
.mp-category-tabs-wrapper {
    background: rgba(0,0,0,0.12);
    border-top: 1px solid rgba(255,255,255,0.12);
    border-bottom: 1px solid rgba(0,0,0,0.18);
}
.mp-category-tabs {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 0;
    padding: 0 15px;
    min-height: 40px;
}
.mp-category-tab {
    position: relative;
    display: flex;
    align-items: stretch;
}
.mp-category-tab-link {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.mp-category-tab-link:hover,
.mp-category-tab:hover > .mp-category-tab-link {
    color: #fff;
    background: rgba(255,255,255,0.10);
    text-decoration: none;
}
.mp-category-tab.active > .mp-category-tab-link {
    color: #fff;
    background: rgba(255,255,255,0.14);
    font-weight: 600;
    border-bottom-color: #fff;
}

/* Sub-Kategorien als Hover-Dropdown unter dem jeweiligen Top-Level-Tab */
.mp-category-tab-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    max-height: 70vh;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    padding: 6px 0;
    z-index: 1031;
}
.mp-category-tab.has-children:hover > .mp-category-tab-dropdown,
.mp-category-tab.has-children:focus-within > .mp-category-tab-dropdown {
    display: block;
}

/* Multi-column Layout: direkte Kinder werden zu Spaltenköpfen, deren Kinder zu Items.
   Wird statt der einspaltigen Liste verwendet, sobald Großkinder existieren.
   WICHTIG: kein default-display setzen — sonst überschreibt diese Klasse das
   `display: none` aus `.mp-category-tab-dropdown` (gleiche Spezifität, später im
   Source) und das Dropdown bliebe permanent sichtbar. Das `display: flex` wird
   ausschließlich auf :hover/:focus-within gesetzt (Regel weiter unten). */
.mp-category-tab-dropdown-cols {
    flex-wrap: nowrap;
    gap: 28px;
    min-width: 600px;
    max-width: 90vw;
    padding: 20px 24px;
}
.mp-category-tab.has-children:hover > .mp-category-tab-dropdown.mp-category-tab-dropdown-cols,
.mp-category-tab.has-children:focus-within > .mp-category-tab-dropdown.mp-category-tab-dropdown-cols {
    display: flex;
}
.mp-category-tab-dropdown-col {
    flex: 0 0 auto;
    min-width: 140px;
}
.mp-category-tab-dropdown-header {
    display: block;
    padding: 0 0 8px 0;
    margin-bottom: 8px;
    color: #222;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border-bottom: 1px solid #d0d0d0;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
}
.mp-category-tab-dropdown-header:hover {
    color: #2c5282;
    border-color: #2c5282;
    text-decoration: none;
}
.mp-category-tab-dropdown-cols .mp-category-tab-dropdown-item {
    padding: 6px 0;
    background: transparent;
}
.mp-category-tab-dropdown-cols .mp-category-tab-dropdown-item:hover {
    background: transparent;
    color: #2c5282;
}
.mp-category-tab-dropdown-more {
    display: block;
    padding: 8px 0 0 0;
    color: #666;
    font-size: 12px;
    font-style: italic;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s;
}
.mp-category-tab-dropdown-more:hover {
    color: #2c5282;
    text-decoration: underline;
}

.mp-category-tab-dropdown-item {
    display: block;
    padding: 8px 16px;
    color: #333;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.mp-category-tab-dropdown-item:hover {
    background: #f5f5f5;
    color: #2c5282;
    text-decoration: none;
}
.mp-header-search {
    flex: 1;
}
.mp-header-search .form-control {
    height: 32px;
    font-size: 13px;
    padding: 4px 12px;
    background-color: #f0f0f0;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}
.mp-header-search .btn {
    height: 32px;
    padding: 4px 12px;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}
.mp-header-actions {
    display: flex;
    align-items: center;
    align-self: stretch;
    gap: 15px;
    flex-shrink: 0;
}
.mp-cart-icon, .mp-user-icon, .mp-search-icon, .mp-header-burger {
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    position: relative;
    opacity: 0.85;
    transition: opacity 0.2s;
}
.mp-cart-icon:hover, .mp-user-icon:hover, .mp-search-icon:hover, .mp-header-burger:hover {
    opacity: 1;
    color: #fff;
    text-decoration: none;
}
.mp-portal-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    opacity: 0.9;
    padding: 4px 10px;
    border-radius: 3px;
    transition: opacity 0.2s, background 0.2s;
}
.mp-portal-link:hover,
.mp-portal-link:focus {
    opacity: 1;
    color: #fff;
    text-decoration: none;
    background: rgba(255,255,255,0.10);
}
.mp-portal-link i {
    font-size: 16px;
}
.mp-cart-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: #e74c3c;
    color: #fff;
    border-radius: 50%;
    font-size: 10px;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    padding: 0 3px;
}

/* Vertical divider between header sections */
.mp-header-divider {
    width: 1px;
    align-self: stretch;
    background: rgba(255,255,255,0.22);
    margin: 8px 0;
    flex-shrink: 0;
}

/* Logged-in user menu (avatar + name + dropdown) */
.mp-user-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.mp-user-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    cursor: pointer;
    opacity: 0.9;
    transition: opacity 0.2s;
    padding: 4px 6px;
    border-radius: 3px;
}
.mp-user-trigger:hover,
.mp-user-trigger:focus,
.mp-user-menu.open > .mp-user-trigger {
    opacity: 1;
    color: #fff;
    text-decoration: none;
    background: rgba(255,255,255,0.10);
}
.mp-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255,255,255,0.15);
}
.mp-user-name {
    font-size: 13px;
    font-weight: 500;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mp-user-menu .dropdown-menu {
    margin-top: 6px;
}
.mp-user-menu .dropdown-menu > li > a {
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
}
.mp-user-menu .dropdown-menu > li > a > i {
    margin-right: 6px;
}

/* Page Container — Offset = Header-Bar (50px) + Category-Tabs-Bar (40px).
   padding-top:0 überschreibt das globale `.page-container { padding-top:50px }`
   aus templates/styles/custom.css — das DOM-Element trägt beide Klassen, sonst
   stapeln sich Default-Offset und Marktplatz-Header-Offset und erzeugen ~50px
   Leerraum oberhalb des ersten Inhaltsblocks. */
.mp-page-container {
    margin-top: 90px;
    padding-top: 0;
    min-height: calc(100vh - 140px);
}
@media (max-width: 768px) {
    /* Tabs sind via hidden-xs ausgeblendet, daher Header wieder ohne Tab-Offset.
       Default-Header auf xs ist 56px hoch (Burger 40px + 2× 8px Padding); der
       margin-top muss exakt diese Höhe abdecken, sonst rutscht der erste Inhalt
       unter den fixed Header. */
    .mp-page-container {
        margin-top: 56px;
        min-height: calc(100vh - 100px);
    }
    /* Default-Mobile-Offset aus custom.css (`body { margin-top: 50px }`)
       neutralisieren — der Header-Offset wird auf der Marktplatz-Page bereits
       voll von .mp-page-container getragen, sonst entsteht ~50px Leerraum. */
    body.marketplace-shop {
        margin-top: 0;
    }
    /* Aufgeklappte Suche legt eine zweite Zeile unter die Header-Bar
       (input 38px + 5px margin-top) — Page-Container nachziehen, damit der
       Inhalt nicht hinter der ausgeklappten Search-Bar verschwindet. */
    .mp-header.mp-search-open ~ .mp-page-container {
        margin-top: 99px;
    }
}

/* Mobile Burger — sichtbar nur auf xs (Bootstrap visible-xs); ruft den Kategorie-Drawer auf. */
/* Mobile Drawer (Off-Canvas, slide from left).
   Höhe via 100dvh, damit iOS-Safari die dynamische URL-Bar berücksichtigt
   und der Drawer nicht hinter ihr verschwindet. */
.mp-mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    height: 100dvh;
    background: #fff;
    box-shadow: 4px 0 15px rgba(0,0,0,0.15);
    z-index: 1050;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    display: flex;
    flex-direction: column;
}
.mp-mobile-drawer.open {
    transform: translateX(0);
}
.mp-mobile-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(0,0,0,0.4);
    z-index: 1045;
}
.mp-mobile-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid #eee;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    flex-shrink: 0;
}
.mp-mobile-drawer-close {
    color: #999;
    font-size: 18px;
    cursor: pointer;
    padding: 6px 10px;
    line-height: 1;
}
.mp-mobile-drawer-close:hover {
    color: #333;
    text-decoration: none;
}
.mp-mobile-drawer-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.mp-mobile-drawer-loading {
    text-align: center;
    color: #999;
    padding: 30px 0;
}
.mp-mobile-cat-item {
    border-bottom: 1px solid #f0f0f0;
}
.mp-mobile-cat-toplevel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    color: #333;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    min-height: 48px;
}
.mp-mobile-cat-toplevel:hover,
.mp-mobile-cat-toplevel:focus {
    background: #f8f8f8;
    color: #333;
    text-decoration: none;
}
.mp-mobile-cat-chevron {
    color: #999;
    font-size: 14px;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
/* Direct-Child-Selektor (>): sonst rotiert auch das Chevron innerer Sub-Items,
   sobald das Top-Level expandiert ist. */
.mp-mobile-cat-item.expanded > .mp-mobile-cat-toplevel .mp-mobile-cat-chevron {
    transform: rotate(180deg);
}
.mp-mobile-cat-children {
    display: none;
    background: #fafafa;
}
.mp-mobile-cat-item.expanded > .mp-mobile-cat-children {
    display: block;
}
.mp-mobile-cat-child {
    display: block;
    padding: 12px 18px 12px 32px;
    color: #555;
    font-size: 14px;
    cursor: pointer;
    border-top: 1px solid #f0f0f0;
    min-height: 44px;
}
.mp-mobile-cat-child:hover,
.mp-mobile-cat-child:focus {
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
}
.mp-mobile-cat-child-all {
    color: #4a6fa5;
    font-weight: 500;
}

/* Level 3: Sub-Item innerhalb eines expandierten Top-Levels mit eigenem Accordion. */
.mp-mobile-cat-subitem {
    border-top: 1px solid #f0f0f0;
}
.mp-mobile-cat-child-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 0;
}
.mp-mobile-cat-grandchildren {
    display: none;
    background: #f0f0f0;
}
.mp-mobile-cat-subitem.expanded > .mp-mobile-cat-grandchildren {
    display: block;
}
.mp-mobile-cat-subitem.expanded > .mp-mobile-cat-child-toggle .mp-mobile-cat-chevron {
    transform: rotate(180deg);
}
.mp-mobile-cat-grandchild {
    display: block;
    padding: 10px 18px 10px 48px;
    color: #555;
    font-size: 13px;
    cursor: pointer;
    border-top: 1px solid #e6e6e6;
    min-height: 40px;
}
.mp-mobile-cat-grandchild:first-child {
    border-top: 0;
}
.mp-mobile-cat-grandchild:hover,
.mp-mobile-cat-grandchild:focus {
    background: #e6e6e6;
    color: #333;
    text-decoration: none;
}

/* Sections */
.mp-section {
    margin-bottom: 40px;
    padding: 0 15px;
}
.mp-section-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

/* Categories Grid */
.mp-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
}
.mp-category-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px 15px;
    text-align: center;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
}
.mp-category-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.mp-category-icon {
    font-size: 28px;
    color: #4a6fa5;
    margin-bottom: 10px;
}
.mp-category-label {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

/* Products Grid */
.mp-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}
.mp-product-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
}
.mp-product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* Products List — Single-Column-Layout mit dünnen Trennlinien zwischen den Zeilen.
   Layout je Zeile: Bild │ Titel + Art.-Nr. │ Info-Text │ Preis + Jetzt-Kaufen-Button. */
.mp-products-list {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}
.mp-product-row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 20px;
    border-top: 1px solid #ececec;
    cursor: pointer;
    transition: background 0.15s;
}
.mp-product-row:first-child {
    border-top: 0;
}
.mp-product-row:hover {
    background: #fafafa;
}
.mp-product-row-image {
    width: 80px;
    height: 80px;
    flex: 0 0 80px;
    border: 1px solid #ececec;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mp-product-row-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.mp-product-row-image .mp-product-no-image {
    height: 100%;
    width: 100%;
    font-size: 28px;
}
.mp-product-row-title-block {
    flex: 1 1 30%;
    min-width: 0;
}
.mp-product-row-title {
    display: block;
    color: #4a7a82;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 6px;
    word-break: break-word;
}
.mp-product-row:hover .mp-product-row-title {
    text-decoration: underline;
}
.mp-product-row-sku {
    font-size: 13px;
    color: #555;
}
.mp-product-row-sku-label {
    color: #888;
    margin-right: 4px;
}
.mp-product-row-info {
    flex: 1 1 30%;
    color: #999;
    font-size: 13px;
    line-height: 1.4;
    min-width: 0;
}
.mp-product-row-action {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    min-width: 220px;
}
.mp-product-row-price {
    color: #d97706;
    font-size: 18px;
    font-weight: 700;
    white-space: nowrap;
}
/* Preis + Wishlist-Heart in einer Zeile — Heart sitzt rechts neben dem Preis.
   space-between zieht den Heart auf Mobile (wo .mp-product-row-action volle Breite
   annimmt) ans rechte Ende; auf Desktop bleibt die Zeile content-width und beide
   Elemente liegen mit dem gap-Abstand nebeneinander. */
.mp-product-row-price-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
/* Variantendropdown sitzt oberhalb der Mengen-/Button-Gruppe und nimmt die volle
   Breite des Action-Blocks ein, damit lange Variantenlabels nicht abgeschnitten werden. */
.mp-product-row-variant {
    width: 100%;
    max-width: 280px;
}
/* Mengen-Input + In-den-Warenkorb-Button als Gruppe — Button-Styling kommt von
   .btn.btn-lg.btn-primary (analog zur Detailseite). */
.mp-product-row-buy-group {
    display: flex;
    align-items: stretch;
    gap: 6px;
}
.mp-product-row-qty {
    width: 60px;
    text-align: center;
    padding: 6px 4px;
}
.mp-product-row-buy {
    white-space: nowrap;
}
.mp-product-row-buy .icon-cart-add,
.mp-product-row-buy .icon-new-tab {
    margin-right: 6px;
}
.mp-product-image {
    height: 180px;
    overflow: hidden;
    position: relative;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mp-product-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}
.mp-product-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #ccc;
    font-size: 36px;
    background: #fff;
}
.mp-product-no-image-lg {
    font-size: 64px;
    min-height: 300px;
}
.mp-product-info {
    padding: 12px;
}
.mp-product-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 6px 0;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mp-product-price {
    font-size: 16px;
    font-weight: 700;
    color: #2ecc71;
}
.mp-product-location {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

/* Filter Bar — Bedienelemente liegen in einem panel.panel-default (analog Checkout).
   Padding/Background/Border kommen vom Panel; .mp-filter-bar steuert nur das Flex-Layout. */
.mp-filter-bar-panel {
    margin-bottom: 20px;
}
.mp-filter-bar-panel > .panel-body.mp-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
}
.mp-filter-bar-right {
    display: flex;
    gap: 10px;
    align-items: center;
}
.mp-view-toggle {
    display: inline-flex;
    align-items: center;
}
.mp-view-toggle .btn {
    padding: 4px 8px;
}
.mp-view-toggle .btn + .btn {
    margin-left: -1px;
}
.mp-sort-select {
    width: 240px;
    height: 30px;
    font-size: 13px;
}
/* Select2 wrapper greift den Select-Style nicht zuverlässig, wenn das
   Element initial unsichtbar gerendert wurde — Wrapper-Breite zusätzlich
   explizit setzen, damit Desktop-Sortierauswahl die gewünschte Breite hat. */
.mp-sort-select + .select2-container {
    width: 240px !important;
}
.mp-result-count {
    font-size: 14px;
    color: #666;
}

/* Listing Container */
.mp-listing-container {
    display: flex;
    gap: 20px;
}
.mp-filter-sidebar {
    width: 250px;
    flex-shrink: 0;
    /* Hintergrund/Border/Padding kommen aus .panel.panel-default + .panel-body. */
}
/* Klickbarer Filter-Heading: Titel links, Chevron rechts. State-Toggle per JS. */
.mp-filter-sidebar-heading {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.mp-filter-sidebar-toggle-icon {
    color: #888;
    margin-left: 10px;
    transition: transform 0.2s;
}
/* Trichter vor dem Titel-Text — markiert den Heading-Bereich auch dann visuell
   als "Filter", wenn der Titel-Text im eingeklappten Zustand ausgeblendet ist. */
.mp-filter-sidebar-funnel-icon {
    margin-right: 6px;
    color: #888;
}
/* Eingeklappter Zustand: Body ausblenden. Chevron-Drehung passiert pro Breakpoint
   weiter unten — die Klappe-Richtung unterscheidet sich:
     - xs (≤768px):  Filter klappen vertikal (Body wird unten weggeschnitten)
     - md+ (≥769px): Filter klappen seitlich nach links — Sidebar schrumpft zur Schmalspalte */
.mp-filter-sidebar.mp-filter-sidebar-collapsed .mp-filter-sidebar-body {
    display: none;
}
@media (max-width: 768px) {
    .mp-filter-sidebar.mp-filter-sidebar-collapsed .mp-filter-sidebar-toggle-icon {
        transform: rotate(180deg);
    }
}
@media (min-width: 769px) {
    /* Smooth transition für Breitenwechsel beim Toggle. */
    .mp-filter-sidebar {
        transition: width 0.2s;
    }
    /* Expanded auf md+: Chevron zeigt nach links (= "klick mich, ich klappe weg"). */
    .mp-filter-sidebar:not(.mp-filter-sidebar-collapsed) .mp-filter-sidebar-toggle-icon {
        transform: rotate(-90deg);
    }
    /* Collapsed auf md+: Sidebar schrumpft zur Schmalspalte. Es bleibt nur das
       Trichter-Icon sichtbar — Titel-Text und Chevron sind ausgeblendet, das
       Heading wird straff (kompakte vertikale Padding) um Weißraum unter dem
       Icon zu vermeiden. Klick aufs Icon klappt wieder auf.
       align-self: flex-start verhindert das Höhen-Stretchen durch den Flex-Container,
       sonst würde der Panel-Hintergrund unter dem Icon bis zum Listing-Boden weiterlaufen. */
    .mp-filter-sidebar.mp-filter-sidebar-collapsed {
        width: 40px;
        align-self: flex-start;
    }
    .mp-filter-sidebar.mp-filter-sidebar-collapsed .mp-filter-sidebar-heading {
        align-items: center;
        justify-content: center;
        padding: 6px 4px;
        border-bottom: 0;
    }
    .mp-filter-sidebar.mp-filter-sidebar-collapsed .mp-filter-sidebar-title-text,
    .mp-filter-sidebar.mp-filter-sidebar-collapsed .mp-filter-sidebar-toggle-icon {
        display: none;
    }
    .mp-filter-sidebar.mp-filter-sidebar-collapsed .mp-filter-sidebar-funnel-icon {
        margin-right: 0;
        font-size: 16px;
        color: #555;
    }
}
.mp-filter-group {
    margin-bottom: 15px;
}
.mp-filter-group label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
}
.mp-products-area {
    flex: 1;
}

/* Product Detail */
.mp-product-detail {
    padding: 20px;
}
.mp-gallery {
    margin-bottom: 20px;
}
.mp-gallery-main {
    position: relative;
    height: 400px;
    /* Hintergrund/Border-Radius kommen aus dem umschließenden .mp-gallery-panel. */
    overflow: hidden;
}
.mp-gallery-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: none;
}
.mp-gallery-img.active {
    display: block;
}
.mp-gallery-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
}
.mp-gallery-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}
.mp-gallery-thumb:hover {
    border-color: #4a6fa5;
}
.mp-detail-title {
    font-size: 24px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 15px;
}
.mp-detail-price {
    margin-bottom: 15px;
}
.mp-price-amount {
    font-size: 28px;
    font-weight: 700;
    color: #2ecc71;
}
.mp-price-tax {
    font-size: 13px;
    color: #999;
    margin-left: 5px;
}
.mp-detail-meta {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}
.mp-detail-sku {
    font-size: 13px;
    color: #555;
    margin-bottom: 10px;
}
.mp-detail-sku-label {
    color: #888;
    margin-right: 4px;
}
.mp-detail-stock {
    margin-bottom: 20px;
}
/* Stock-Badge ist das letzte Element im Header-Panel — Eigenabstand entfernen,
   damit kein Doppelabstand zur .panel-body-Padding entsteht. */
.mp-detail-header-panel .mp-detail-stock {
    margin-bottom: 0;
}
.mp-detail-variants {
    margin-bottom: 20px;
}
.mp-detail-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 20px;
}
/* Innerhalb des Bedienelemente-Panels (Varianten + Aktionen) übernimmt das
   .panel-body-Padding den oberen/unteren Abstand — eigene Außenabstände der
   Aktions-Reihe würden sonst zur Panel-Padding addieren. */
.mp-detail-controls-panel .mp-detail-actions {
    margin-top: 0;
    margin-bottom: 0;
}
.mp-detail-controls-panel .mp-detail-variants:last-child {
    margin-bottom: 0;
}
.mp-quantity-group {
    display: flex;
    flex-direction: column;
}
.mp-quantity-group label {
    margin-bottom: 5px;
}
.mp-detail-actions .btn {
    margin-bottom: 0;
}
/* .mp-detail-seller und .mp-detail-description liegen jetzt jeweils in einem
   eigenen panel.panel-default — die früheren margin-top/padding-top/border-top
   würden innerhalb des Panel-Bodys nur Doppelabstände erzeugen. */
.mp-detail-seller,
.mp-detail-description {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}
.mp-description-text {
    line-height: 1.6;
    color: #555;
}

/* Cart Sidebar */
.mp-cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    /* 100dvh berücksichtigt die dynamische iOS-Safari-URL-Bar — der Sidebar-Footer
       (Checkout-Button) bleibt sichtbar; mit 100vh würde er hinter der Bar landen.
       100vh als Fallback für ältere Browser. */
    height: 100vh;
    height: 100dvh;
    background: #fff;
    box-shadow: -4px 0 15px rgba(0,0,0,0.15);
    z-index: 1040;
    display: flex;
    flex-direction: column;
}
.mp-cart-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}
.mp-cart-sidebar-header h4 {
    margin: 0;
}
.mp-cart-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}
.mp-cart-sidebar-footer {
    border-top: 1px solid #eee;
    padding: 15px;
}
.mp-cart-sidebar-item {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
}
.mp-cart-item-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}
.mp-cart-item-info {
    flex: 1;
}
.mp-cart-item-title {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 2px;
}
.mp-cart-item-variant {
    font-size: 12px;
    color: #999;
}
.mp-cart-item-qty {
    font-size: 12px;
    color: #666;
}
.mp-cart-item-remove {
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 0 5px;
}
.mp-cart-item-remove:hover {
    color: #e74c3c;
}
.mp-cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(0,0,0,0.4);
    z-index: 1035;
}

/* Cart Totals */
.mp-cart-totals {
    margin-bottom: 15px;
}
.mp-cart-total-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 14px;
}
.mp-cart-total-grand {
    border-top: 1px solid #eee;
    padding-top: 8px;
    margin-top: 4px;
}
.mp-cart-total-voucher {
    color: #5cb85c;
}

/* Cart Voucher-Code-Panel */
.mp-cart-voucher-panel {
    margin-bottom: 20px;
}
.mp-cart-voucher-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 10px;
    margin-bottom: 6px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 14px;
}
.mp-cart-voucher-code {
    flex: 1;
    font-family: monospace;
    color: #333;
}
.mp-cart-voucher-amount {
    color: #5cb85c;
    font-weight: 600;
}

/* Cart Page */
.mp-cart-page {
    padding: 20px;
}
.mp-cart-table {
    margin-bottom: 0;
}
.mp-cart-img-cell {
    width: 60px;
}
.mp-cart-img-cell img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}
/* Cart-Page Panels (Items + Summary) */
.mp-cart-items-panel,
.mp-cart-summary-panel,
.mp-cart-empty-panel {
    margin-bottom: 20px;
}
.mp-cart-summary-panel a.btn-primary,
.mp-cart-summary-panel a.btn-primary:hover,
.mp-cart-summary-panel a.btn-primary:focus,
.mp-cart-summary-panel a.btn-primary:active,
a.mp-place-order-btn,
a.mp-place-order-btn:hover,
a.mp-place-order-btn:focus,
a.mp-place-order-btn:active,
.mp-detail-actions a.btn-primary,
.mp-detail-actions a.btn-primary:hover,
.mp-detail-actions a.btn-primary:focus,
.mp-detail-actions a.btn-primary:active,
a.mp-product-row-buy,
a.mp-product-row-buy:hover,
a.mp-product-row-buy:focus,
a.mp-product-row-buy:active,
a.mp-wishlist-continue-btn,
a.mp-wishlist-continue-btn:hover,
a.mp-wishlist-continue-btn:focus,
a.mp-wishlist-continue-btn:active {
    color: #fff;
}

/* Checkout */
.mp-checkout {
    padding: 0 20px 20px 20px;
}
.mp-checkout > h2 {
    margin-top: 0;
}
/* Bootstrap 3 .row nutzt Float → col-md-5 wäre nur so hoch wie sein Inhalt und
   Sticky hätte keinen Scroll-Spielraum. Mit Flex stretcht sich col-md-5 auf die
   Höhe von col-md-7 (Adressformular), damit Sticky funktioniert. */
.mp-checkout > .row {
    display: flex;
    flex-wrap: wrap;
}
/* Sticky offset = Header (50px) + Category-Tabs (40px) + 10px Abstand.
   Auf Mobile (single column) Sticky deaktivieren — Summary kommt eh erst nach
   den Adressformularen, kleben würde nur stören. */
.mp-checkout-summary {
    position: sticky;
    top: 100px;
}
@media (max-width: 768px) {
    .mp-checkout-summary {
        position: static;
    }
}
/* core.css setzt .panel-footer { padding-left:0; padding-right:0 } global zurück —
   für die Bestellübersicht den seitlichen Durchschuss wieder herstellen. */
.mp-checkout-summary > .panel-footer {
    padding-left: 15px;
    padding-right: 15px;
}
.mp-checkout-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid #f0f0f0;
}
.mp-checkout-item:last-child {
    border-bottom: none;
}
.mp-checkout-actions {
    background: #fff;
}
.mp-checkout-terms {
    margin: 0 0 12px 0;
}

/* Shipping Options */
.mp-shipping-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    font-weight: normal;
}
.mp-shipping-option:hover {
    border-color: #4a6fa5;
    background: #f8fbff;
}
.mp-shipping-option input[type="radio"] {
    margin: 0;
    flex-shrink: 0;
}
.mp-shipping-option input[type="radio"]:checked + .mp-shipping-option-content {
    font-weight: 600;
}
.mp-shipping-option:has(input[type="radio"]:checked) {
    border-color: #4a6fa5;
    background: #f0f7ff;
}
.mp-shipping-option-content {
    flex: 1;
}
.mp-shipping-option-label {
    font-size: 14px;
}
.mp-shipping-option-desc {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}
.mp-shipping-option-price {
    flex-shrink: 0;
    font-size: 14px;
    color: #2c5282;
}

/* Footer */
.mp-footer {
    background: #f8f8f8;
    border-top: 1px solid #e0e0e0;
    padding: 20px 0;
    margin-top: 40px;
    font-size: 13px;
    color: #666;
}
.mp-footer a {
    color: #666;
}
.mp-footer a:hover {
    color: #333;
}

/* Responsive */
@media (max-width: 768px) {
    .mp-header-inner {
        flex-wrap: wrap;
        height: auto;
        min-height: 56px;
        padding: 8px 10px;
        /* gap auf 0, damit der Aktion-Block (Lupe + Portal + Wishlist + Cart + User)
           via margin-left:auto sauber rechtsbündig sitzt und das Logo eng am
           Burger klebt (Burger bekommt unten ein eigenes margin-right). */
        gap: 0;
    }
    .mp-header-burger {
        margin-right: 6px;
    }
    .mp-header-actions {
        margin-left: auto;
        gap: 18px;
    }
    /* Portal-Link auf Mobile wie ein normales Icon rendern — auf Desktop hat
       er padding 4px 10px für den Hover-Hintergrund, das macht ihn auf Mobile
       (wo der Text "Revierwelt" via hidden-xs eh weg ist) zum optisch breiteren
       Block zwischen Lupe und Wishlist. Padding raus, damit alle Icons gleich
       groß wirken. */
    .mp-portal-link {
        padding: 0;
        background: transparent;
    }
    .mp-portal-link:hover,
    .mp-portal-link:focus {
        background: transparent;
    }
    /* Suche auf xs ausgeklappt nur per Lupen-Button — siehe marketplace_shop_toggle_search().
       Default versteckt; .mp-search-open auf .mp-header öffnet das Eingabefeld unter der
       Header-Bar (umgebrochen via order:3 + width:100%). */
    .mp-header-search {
        display: none;
        order: 3;
        max-width: none;
        width: 100%;
        margin-top: 5px;
    }
    .mp-header.mp-search-open .mp-header-search {
        display: block;
    }
    .mp-listing-container {
        flex-direction: column;
    }
    .mp-filter-sidebar {
        width: 100%;
    }
    .mp-products-grid {
        /* Min-Width >= Bildwrapper-Höhe (180px), damit Kacheln umbrechen,
           bevor der Bildwrapper portrait wird. */
        grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    }
    .mp-gallery-main {
        height: 250px;
    }
    .mp-cart-sidebar {
        width: 100%;
    }
    /* Listenzeile auf Mobile: Bild + Titel oben, Info + Preis darunter — gestapelt. */
    .mp-product-row {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px;
    }
    .mp-product-row-title-block {
        flex: 1 1 calc(100% - 100px);
    }
    .mp-product-row-info {
        flex: 1 1 100%;
        order: 3;
    }
    .mp-product-row-action {
        flex: 1 1 100%;
        order: 4;
        align-items: stretch;
        justify-content: flex-start;
        min-width: 0;
    }
    .mp-product-row-buy-group {
        width: 100%;
    }
    .mp-product-row-buy {
        flex: 1 1 auto;
    }

    /* Filter-Bar (über dem Listing): Result-Count und Bedienelemente liegen
       auf Mobile in zwei Zeilen. Die Sort-Select dehnt sich auf die verbleibende
       Breite, damit lange Optionen nicht abschneiden. Höhe 38px parallel zur
       Header-Such-Konvention, damit der iOS-Zoom-Fix (font-size:16px) nicht
       visuell quetscht. */
    .mp-filter-bar-panel > .panel-body.mp-filter-bar {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 12px;
    }
    .mp-filter-bar-left {
        flex: 1 1 100%;
    }
    .mp-filter-bar-right {
        flex: 1 1 100%;
        gap: 8px;
    }
    .mp-sort-select {
        flex: 1 1 auto;
        width: auto;
        height: 38px;
    }
    /* View-Toggle (Grid/List) — Tap-Fläche auf Mobile vergrößern, sonst sind die
       Icons (4×8 Padding + ~16px Icon ≈ 24×30) zu klein für komfortable Touches. */
    .mp-view-toggle .btn {
        padding: 8px 14px;
        height: 38px;
    }

    /* Cart-Item-Remove — sowohl im Sidebar-Item (× als button) als auch im
       Cart-Page-Item (btn btn-xs btn-danger) Tap-Fläche auf min. ~36×36 anheben.
       Default sind beide unter 28×28 = unkomfortabel auf Mobile. */
    .mp-cart-item-remove {
        font-size: 22px;
        padding: 6px 12px;
        min-width: 40px;
        min-height: 40px;
    }
    .mp-cart-table .mp-cart-remove-cell .btn {
        padding: 8px 12px;
        font-size: 14px;
        min-width: 36px;
        min-height: 36px;
    }

    /* Produkt-Detail-Actions: Quantity, Add-to-Cart und "Nachricht senden"
       brechen unsauber, weil sie nebeneinander mit btn-lg zu breit sind.
       Auf Mobile gestapelt + voll-breit. Das !important überschreibt das
       Inline-Style="width:80px" am Quantity-Input im Template. */
    .mp-detail-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .mp-detail-actions .mp-quantity-group,
    .mp-detail-actions .btn {
        width: 100%;
    }
    .mp-detail-actions .mp-quantity-group input {
        width: 100% !important;
    }

    /* Cart-Page: 6-spaltige Tabelle wird zur Card-Liste umgelayoutet.
       Markup bleibt unverändert (<table>/<tr>/<td>), die <td>s werden via
       Grid neu positioniert; Labels für Preis/Menge/Summe kommen aus den
       data-label-Attributen (siehe marketplace_shop_render_cart_item). */
    .mp-cart-items-panel > .panel-body {
        padding: 12px;
    }
    .mp-cart-table {
        margin: 0;
    }
    .mp-cart-table thead {
        display: none;
    }
    .mp-cart-table,
    .mp-cart-table tbody {
        display: block;
        width: 100%;
    }
    .mp-cart-table tr {
        display: grid;
        grid-template-columns: 80px 1fr auto;
        grid-template-areas:
            "img title  remove"
            "img price  total"
            "img qty    qty";
        column-gap: 12px;
        row-gap: 8px;
        padding: 12px;
        border: 1px solid #eee;
        border-radius: 6px;
        margin-bottom: 10px;
        background: #fff;
        align-items: center;
    }
    .mp-cart-table tr:last-child {
        margin-bottom: 0;
    }
    .mp-cart-table td {
        display: block;
        padding: 0;
        border: none;
    }
    .mp-cart-table .mp-cart-img-cell {
        grid-area: img;
        width: 80px;
        align-self: start;
    }
    .mp-cart-table .mp-cart-img-cell img,
    .mp-cart-table .mp-cart-img-cell .mp-cart-item-img {
        width: 80px;
        height: 80px;
    }
    .mp-cart-table .mp-cart-title-cell {
        grid-area: title;
        align-self: start;
        min-width: 0;
        word-break: break-word;
    }
    .mp-cart-table .mp-cart-price-cell,
    .mp-cart-table .mp-cart-qty-cell,
    .mp-cart-table .mp-cart-total-cell {
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 14px;
        text-align: left;
    }
    .mp-cart-table .mp-cart-price-cell { grid-area: price; }
    .mp-cart-table .mp-cart-qty-cell   { grid-area: qty; }
    .mp-cart-table .mp-cart-total-cell { grid-area: total; }
    .mp-cart-table .mp-cart-remove-cell {
        grid-area: remove;
        align-self: start;
        text-align: right;
    }
    .mp-cart-table .mp-cart-price-cell::before,
    .mp-cart-table .mp-cart-qty-cell::before,
    .mp-cart-table .mp-cart-total-cell::before {
        content: attr(data-label) ":";
        color: #888;
        font-size: 13px;
        font-weight: normal;
        margin-right: 8px;
    }

    /* iOS-Auto-Zoom-Schutz: Safari zoomt beim Tap in ein Eingabefeld rein,
       sobald dessen font-size < 16px ist. Auf den `.marketplace-shop`-Body
       scoped, damit andere Subdomains (Portal, Booking) unverändert bleiben. */
    body.marketplace-shop input[type="text"],
    body.marketplace-shop input[type="email"],
    body.marketplace-shop input[type="tel"],
    body.marketplace-shop input[type="number"],
    body.marketplace-shop input[type="search"],
    body.marketplace-shop input[type="url"],
    body.marketplace-shop input[type="password"],
    body.marketplace-shop select,
    body.marketplace-shop textarea {
        font-size: 16px;
    }
    /* Header-Such-Feld ist mit height:32px für Desktop-Optik gesetzt — auf
       Mobile leicht erhöhen, damit 16px-Text nicht visuell quetscht. */
    .mp-header-search .form-control,
    .mp-header-search .btn {
        height: 38px;
    }
}

/* ==========================================================================
   Sehr kleine Phones (≤480px) — engerer Spacing.
   Der primäre Mobile-Cut bei 768px deckt Tablet-Portrait + Phone gleichermaßen
   ab; auf 320–375px-Geräten (iPhone SE/mini, Android-Kleinformate) wird's mit
   Burger + Logo + 5 Header-Aktion-Icons sonst eng, und die 80×80-Cart-Bild-Kachel
   lässt zu wenig Platz für Titel + Preis-Zeile.
   ========================================================================== */
@media (max-width: 480px) {
    /* Header-Innenabstand der Aktion-Icons leicht enger als die ≤768px-Variante,
       damit auf 320–360px-Geräten Lupe + Portal + Wishlist + Cart + Avatar
       komfortabel nebeneinander passen. Burger-Größe und Padding werden hier
       nicht angefasst — sonst rutscht der Burger optisch nach links. */
    .mp-header-actions {
        gap: 10px;
    }
    /* Cart-Card-Bild auf 64×64 verkleinern; Grid-Spalte mitziehen. */
    .mp-cart-table tr {
        grid-template-columns: 64px 1fr auto;
        column-gap: 10px;
        padding: 10px;
    }
    .mp-cart-table .mp-cart-img-cell {
        width: 64px;
    }
    .mp-cart-table .mp-cart-img-cell img,
    .mp-cart-table .mp-cart-img-cell .mp-cart-item-img {
        width: 64px;
        height: 64px;
    }
    /* Products-Grid: Min-Width >= Bildwrapper-Höhe (180px); auf sehr
       schmalen Screens lieber einspaltig als hochformatige Bildwrapper. */
    .mp-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
        gap: 10px;
    }
}

/* ==========================================================================
   Hero Slider (Marktplatz-Startseite)
   Layout angelehnt an Referenz-Screenshot: vollflächiges Bild oben, Dots
   in eigenem hellen Streifen darunter (nicht über dem Bild).
   ========================================================================== */
.mp-hero-slider {
    position: relative;
    width: 100%;
    margin: 0 0 30px 0;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.mp-hero-slides {
    /* Grid-Stack: alle Slides liegen in derselben Zelle übereinander,
       die Zelle wächst auf die natürliche Bildhöhe → kein Letterboxing,
       kein fixer Aspect-Ratio. Maximalhöhe 50vh, sodass sehr hohe Banner
       nicht den halben Viewport sprengen. Hintergrund weiß (statt grau),
       damit ein evtl. seitlicher Leerraum bei Höhen-Cap nicht als grauer
       Letterbox-Streifen sichtbar wird. */
    display: grid;
    place-items: center;
    width: 100%;
    max-height: 50vh;
    overflow: hidden;
    background: #fff;
}
.mp-hero-slide {
    grid-area: 1 / 1;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    pointer-events: none;
}
/* Vor JS-Init: erstes Slide sichtbar, damit kein Flash leerer Bühne.
   Sobald der Slider initialisiert ist (data-initialized="1"), übernimmt
   .active die Sichtbarkeit. */
.mp-hero-slider:not([data-initialized="1"]) .mp-hero-slide:first-child {
    opacity: 1;
    pointer-events: auto;
}
.mp-hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}
.mp-hero-slide img,
.mp-hero-slide .mp-hero-link {
    display: block;
    /* width:auto + max-width:100%: Bild füllt die volle Breite, schrumpft
       aber proportional, sobald max-height greift → kein internes
       Letterboxing (links/rechts grauer Streifen im Bildbereich). */
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 50vh;
    margin: 0 auto;
}
.mp-hero-link {
    text-decoration: none;
}
.mp-hero-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 14px 0;
    background: #fff;
}
.mp-hero-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #ededed;
    border: 1px solid #d4d4d4;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    line-height: 1;
    user-select: none;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.mp-hero-dot:hover {
    background: #e0e0e0;
    transform: translateY(-1px);
}
.mp-hero-dot.active {
    background: #f5a623;
    color: #fff;
    border-color: #d8861a;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}
@media (max-width: 768px) {
    .mp-hero-slider {
        margin-bottom: 20px;
        border-radius: 0;
    }
    .mp-hero-dots {
        padding: 10px 0;
        gap: 10px;
    }
    /* Touch-Target: Apple HIG empfiehlt min. 44×44 — wir gehen auf 32×32 als
       Kompromiss zwischen visueller Optik (kleine Pagination-Punkte) und
       Bedienbarkeit. Bei vielen Bannern (z.B. >9) bleibt das Layout kompakt. */
    .mp-hero-dot {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
}

/* ----------------------- Product Reviews ----------------------- */
.mp-detail-tabs-panel {
    /* Top-Ecken kappen, damit der erste Tab links bündig sitzen kann ohne
       dass die abgerundete Panel-Ecke neben/über ihm durchscheint. */
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}
.mp-detail-tabs-panel .panel-body {
    padding: 0;
}
.mp-detail-tabs-nav {
    border-bottom: 1px solid #ddd;
    padding: 0;
    margin-bottom: 0;
}
/* Erster Tab linksbündig: 1px nach links ziehen, damit der linke Rand des
   aktiven Tabs exakt auf dem linken Rand des Panels liegt — sonst zeichnet
   Bootstrap zwei nebeneinander stehende 1px-Linien (Panel + Tab). */
.mp-detail-tabs-nav > li:first-child {
    margin-left: -1px;
}
.mp-detail-tabs-nav > li:first-child > a {
    border-top-left-radius: 0;
}
.mp-detail-tabs-nav > li > a {
    color: #555;
    font-weight: 500;
}
.mp-detail-tabs-nav > li.active > a,
.mp-detail-tabs-nav > li.active > a:hover,
.mp-detail-tabs-nav > li.active > a:focus {
    color: #222;
}
.mp-tab-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 6px;
    color: #f5a623;
    font-weight: 600;
    font-size: 13px;
}
.mp-tab-rating .icon-star-full2 {
    font-size: 12px;
}
.mp-detail-tabs-content {
    padding: 20px;
}
.mp-reviews-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}
.mp-reviews-stars-static,
.mp-review-stars-input {
    display: inline-flex;
    gap: 2px;
    line-height: 1;
}
.mp-review-star {
    font-size: 18px;
    color: #d4d4d4;
}
.mp-review-star.filled {
    color: #f5a623;
}
.mp-review-stars-input .mp-review-star {
    cursor: pointer;
    font-size: 24px;
    transition: color 0.1s ease;
}
.mp-reviews-avg-text {
    font-size: 14px;
    color: #555;
}
.mp-review-form {
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 16px;
    margin-bottom: 20px;
}
.mp-review-form-heading {
    margin-top: 0;
    margin-bottom: 12px;
}
.mp-review-textarea {
    margin-top: 12px;
    margin-bottom: 12px;
    resize: vertical;
}
.mp-review-form-actions {
    text-align: right;
}
.mp-review-login {
    margin-bottom: 20px;
}
.mp-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.mp-review-item {
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 12px 14px;
    background: #fff;
}
.mp-review-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.mp-review-date {
    font-size: 12px;
    color: #888;
}
.mp-review-text {
    font-size: 14px;
    color: #333;
    word-break: break-word;
}
.mp-review-item-actions {
    margin-top: 10px;
    text-align: right;
}
.mp-reviews-empty {
    text-align: center;
    color: #888;
    padding: 16px 0;
    font-style: italic;
}

/* =========================================================================
 * Wunschliste — Header-Icon, Heart-Buttons, Sidebar, Vollseite
 * ========================================================================= */

/* Header-Icon (analog mp-cart-icon) */
.mp-wishlist-icon {
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    position: relative;
    opacity: 0.85;
    transition: opacity 0.2s;
}
.mp-wishlist-icon:hover {
    opacity: 1;
    color: #fff;
    text-decoration: none;
}

/* Heart-Button: Grundzustand (umrandetes Herz) */
.mp-wishlist-btn {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: #777;
    cursor: pointer;
    transition: color 0.15s, background 0.15s, border-color 0.15s, transform 0.1s;
}
.mp-wishlist-btn:hover {
    color: #e74c3c;
    border-color: #e74c3c;
}
.mp-wishlist-btn.mp-wishlist-active {
    color: #e74c3c;
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.08);
}
.mp-wishlist-btn.mp-wishlist-active:hover {
    color: #c0392b;
    border-color: #c0392b;
}
.mp-wishlist-btn:active {
    transform: scale(0.95);
}

/* Variante: rundes Heart auf der Produktkarte (Grid-Ansicht), oben rechts auf dem Bild */
.mp-wishlist-btn-card {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.08);
    line-height: 30px;
    text-align: center;
    z-index: 2;
    font-size: 16px;
}
.mp-wishlist-btn-card:hover {
    background: #fff;
}

/* Listenansicht: dezenter, runder Icon-Button in der Preiszeile (kein weißer
   Kreis mehr, der mit dem Preis kollidierte). Hover-/Active-Färbung kommt aus
   .mp-wishlist-btn — hier nur Form, Größe und Default-Look. */
.mp-wishlist-btn-row {
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 50%;
    background: transparent;
    border: 1px solid #e0e0e0;
    color: #999;
    line-height: 26px;
    text-align: center;
    font-size: 14px;
    flex-shrink: 0;
}

/* Detailseite: vollwertiger Button neben "In den Warenkorb" — erbt btn-lg */
.mp-wishlist-btn-detail {
    /* keine Sonderpositionierung — erbt von .btn / .btn-lg */
}

/* .mp-product-image braucht position:relative, damit das absolute Heart oben
   rechts korrekt sitzt. Falls das in den bestehenden Card-Styles fehlt: */
.mp-product-card .mp-product-image {
    position: relative;
}

/* Wishlist Sidebar — Layout 1:1 wie Cart Sidebar */
.mp-wishlist-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    height: 100vh;
    height: 100dvh;
    background: #fff;
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.15);
    z-index: 1040;
    display: flex;
    flex-direction: column;
}
.mp-wishlist-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}
.mp-wishlist-sidebar-header h4 {
    margin: 0;
}
.mp-wishlist-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}
.mp-wishlist-sidebar-footer {
    border-top: 1px solid #eee;
    padding: 15px;
}
.mp-wishlist-sidebar-item {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
}
.mp-wishlist-item-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}
.mp-wishlist-item-info {
    flex: 1;
    min-width: 0;
}
.mp-wishlist-item-title {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 2px;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mp-wishlist-item-title:hover {
    color: #2c3e50;
    text-decoration: underline;
}
.mp-wishlist-item-variant {
    font-size: 12px;
    color: #999;
}
.mp-wishlist-item-price {
    font-size: 13px;
    color: #2c3e50;
    font-weight: 600;
}
.mp-wishlist-item-remove {
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 0 5px;
}
.mp-wishlist-item-remove:hover {
    color: #e74c3c;
}
.mp-wishlist-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1035;
}

/* Wishlist-Vollseite */
.mp-wishlist-page-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.mp-wishlist-table {
    margin-bottom: 0;
}
.mp-wishlist-table .mp-wishlist-img-cell {
    width: 70px;
}
.mp-wishlist-table .mp-wishlist-img-cell img,
.mp-wishlist-table .mp-wishlist-img-cell .mp-product-no-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}
.mp-wishlist-table .mp-wishlist-action-cell,
.mp-wishlist-table .mp-wishlist-remove-cell {
    width: 1%;
    white-space: nowrap;
}

/* Mobile: Tabelle in Card-Liste umlayouten (analog Cart) */
@media (max-width: 767px) {
    .mp-wishlist-sidebar {
        width: 100vw;
    }
    .mp-wishlist-table thead {
        display: none;
    }
    .mp-wishlist-table tbody tr {
        display: grid;
        grid-template-columns: 70px 1fr;
        grid-gap: 8px 12px;
        padding: 10px 0;
        border-bottom: 1px solid #eee;
    }
    .mp-wishlist-table tbody td {
        border: none;
        padding: 2px 0;
    }
    .mp-wishlist-table .mp-wishlist-img-cell {
        grid-row: 1 / span 4;
    }
    .mp-wishlist-table .mp-wishlist-action-cell,
    .mp-wishlist-table .mp-wishlist-remove-cell {
        width: auto;
    }
    .mp-wishlist-table td[data-label]::before {
        content: attr(data-label) ': ';
        font-weight: 600;
        color: #999;
        margin-right: 4px;
    }
}

/* ----------------------------------------------------------------- */
/* My Orders — Card-Layout für die Käufer-Bestellübersicht.          */
/* Header-Zeile zeigt Meta-Daten (Datum, Summe, Adresse, Bestellnr). */
/* ----------------------------------------------------------------- */
.mp-orders-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.mp-order-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}
.mp-order-card-header {
    display: flex;
    align-items: stretch;
    background: #f3f4f6;
    border-bottom: 1px solid #e0e0e0;
    padding: 12px 20px;
}
.mp-order-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    flex: 1 1 auto;
    min-width: 0;
}
.mp-order-meta-block {
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 100%;
}
.mp-order-meta-label {
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    color: #888;
    margin-bottom: 2px;
}
.mp-order-meta-value {
    font-size: 13px;
    color: #222;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mp-order-meta-block.mp-order-meta-number {
    margin-left: auto;
    text-align: right;
    align-items: flex-end;
}
.mp-order-meta-block.mp-order-meta-number .mp-order-meta-value a {
    cursor: pointer;
}
.mp-order-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
    font-weight: 500;
}
.mp-order-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #999;
}
.mp-order-status.is-awaiting-payment .mp-order-status-dot,
.mp-order-status.is-pending .mp-order-status-dot { background: #f0ad4e; }
.mp-order-status.is-paid .mp-order-status-dot { background: #5bc0de; }
.mp-order-status.is-shipped .mp-order-status-dot { background: #337ab7; }
.mp-order-status.is-completed .mp-order-status-dot { background: #5cb85c; }
.mp-order-status.is-cancelled .mp-order-status-dot { background: #d9534f; }
.mp-order-status-text {
    color: #222;
}
.mp-order-status-detail {
    color: #777;
    font-weight: normal;
    font-size: 13px;
    margin-left: 6px;
}
.mp-order-items {
    display: flex;
    flex-direction: column;
}
.mp-order-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    border-bottom: 1px solid #ececec;
}
.mp-order-item:last-child {
    border-bottom: 0;
}
.mp-order-item-image {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    border: 1px solid #ececec;
    border-radius: 4px;
    overflow: hidden;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mp-order-item-image img {
    max-width: 100%;
    max-height: 100%;
}
.mp-order-item-image-placeholder {
    color: #ccc;
    font-size: 28px;
}
.mp-order-item-info {
    flex: 1 1 auto;
    min-width: 0;
}
.mp-order-item-title {
    color: #222;
    font-size: 14px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.mp-order-item-variant {
    color: #777;
    font-size: 12px;
    margin-top: 2px;
}
.mp-order-item-qty {
    color: #555;
    font-size: 13px;
    flex: 0 0 auto;
    min-width: 60px;
    text-align: center;
}
.mp-order-item-price {
    color: #222;
    font-size: 14px;
    font-weight: 500;
    flex: 0 0 auto;
    min-width: 90px;
    text-align: right;
}
.mp-order-card-body {
    padding: 16px 20px;
    border-top: 1px solid #ececec;
    background: #fafafa;
}
.mp-order-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}
.mp-order-actions .btn i {
    margin-right: 4px;
}
@media (max-width: 600px) {
    .mp-order-actions {
        justify-content: stretch;
    }
    .mp-order-actions .btn {
        flex: 1 1 calc(50% - 4px);
    }
}
.mp-orders-empty {
    padding: 40px;
    text-align: center;
    color: #999;
}
@media (max-width: 600px) {
    .mp-order-card-header {
        flex-direction: column;
        gap: 10px;
    }
    .mp-order-meta {
        flex-direction: column;
        gap: 10px;
    }
    .mp-order-meta-block.mp-order-meta-number {
        margin-left: 0;
        align-items: flex-start;
        text-align: left;
    }
}

/* ----------------------------------------------------------------- */
/* Order Detail — Amazon-artiges Layout: kompakte Meta-Zeile, eine    */
/* Card mit Adressen + Bestellübersicht (2 Spalten), Items-Card mit   */
/* Status oben.                                                       */
/* ----------------------------------------------------------------- */
.mp-order-detail {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.mp-order-detail-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}
.mp-order-detail-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding-bottom: 4px;
}
.mp-order-detail-meta-text {
    flex: 1 1 auto;
    color: #555;
    font-size: 13px;
    line-height: 1.5;
}
.mp-order-detail-meta-text strong {
    color: #222;
    font-weight: 600;
}
.mp-order-detail-meta-item + .mp-order-detail-meta-item::before {
    content: " · ";
    color: #bbb;
    margin: 0 6px;
}
.mp-order-detail-meta-actions {
    margin-left: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.mp-order-detail-meta-actions .btn i {
    margin-right: 4px;
}
.mp-order-detail-summary-card {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 32px;
    padding: 20px;
}
.mp-order-detail-summary-card-col {
    min-width: 0;
}
.mp-order-detail-summary-card-totals {
    border-left: 1px solid #ececec;
    padding-left: 32px;
}
.mp-order-detail-h {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: #222;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.mp-order-detail-address + .mp-order-detail-address {
    margin-top: 16px;
}
.mp-order-detail-address-label {
    font-size: 14px;
    font-weight: 600;
    color: #222;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 6px;
}
.mp-order-detail-address-body {
    font-style: normal;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    margin-bottom: 0;
}
.mp-order-detail-address-contact {
    margin-top: 8px;
    color: #555;
    font-size: 13px;
    line-height: 1.6;
}
.mp-order-detail-address-contact i {
    margin-right: 4px;
    color: #999;
}
.mp-order-detail-summary {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.mp-order-detail-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 14px;
    color: #333;
    padding: 3px 0;
}
.mp-order-detail-summary-row .mp-order-detail-summary-label {
    color: #555;
}
.mp-order-detail-summary-row .mp-order-detail-summary-value {
    text-align: right;
    white-space: nowrap;
}
.mp-order-detail-summary-sub {
    color: #888;
    font-size: 12px;
    font-weight: normal;
}
.mp-order-detail-summary-row.mp-order-detail-summary-discount {
    color: #2c8c54;
}
.mp-order-detail-summary-row.mp-order-detail-summary-discount .mp-order-detail-summary-label {
    color: #2c8c54;
}
.mp-order-detail-summary-row.mp-order-detail-summary-total {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
    font-size: 16px;
    font-weight: 600;
    color: #222;
}
.mp-order-detail-summary-row.mp-order-detail-summary-total .mp-order-detail-summary-label {
    color: #222;
}
@media (max-width: 700px) {
    .mp-order-detail-summary-card {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 16px;
    }
    .mp-order-detail-summary-card-totals {
        border-left: 0;
        border-top: 1px solid #ececec;
        padding-left: 0;
        padding-top: 16px;
    }
    .mp-order-detail-meta-actions {
        margin-left: 0;
        width: 100%;
    }
    .mp-order-detail-meta-actions .btn {
        flex: 1 1 auto;
    }
}
