/* ==========================================================================
   1. EINZELANSICHT (SINGLE PRODUCT)
   ========================================================================== */
/* Container Layout */
.mwd-single-product-container { max-width: 1200px; margin: 0 auto; font-family: inherit; }
.mwd-product-top { display: flex; flex-wrap: wrap; gap: 40px; margin-bottom: 50px; }
.mwd-product-images { flex: 1 1 45%; max-width: 500px; }
.mwd-product-summary { flex: 1 1 50%; }

/* Bilder & Galerie */
.mwd-main-image { position: relative; border: 1px solid #eee; padding: 10px; border-radius: 4px; cursor: pointer; text-align: center; }
.mwd-main-image img { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.mwd-sale-badge { position: absolute; top: 10px; right: 10px; background: #d63638; color: #fff; padding: 4px 8px; border-radius: 3px; font-weight: bold; font-size: 12px; }
.mwd-gallery-thumbnails { display: flex; gap: 10px; margin-top: 15px; flex-wrap: wrap; }
.mwd-thumbnail { width: 80px; height: 80px; border: 1px solid #eee; border-radius: 4px; cursor: pointer; overflow: hidden; }
.mwd-thumbnail img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.2s; }
.mwd-thumbnail:hover img { opacity: 0.7; }

/* Typografie & Info */
.mwd-product-brand { text-transform: uppercase; font-size: 12px; letter-spacing: 1px; color: #666; margin-bottom: 5px; }
.mwd-product-title { font-size: 2em; margin-top: 0; margin-bottom: 10px; line-height: 1.2; }
.mwd-product-meta-top { font-size: 13px; color: #777; margin-bottom: 20px; display: flex; gap: 15px; }
.mwd-product-short-desc { margin-bottom: 25px; line-height: 1.6; }
.mwd-read-more-link { display: inline-block; margin-top: 8px; font-weight: 600; color: #111; text-decoration: none; border-bottom: 1px solid #111; transition: color 0.2s ease, border-color 0.2s ease; }
.mwd-read-more-link:hover { color: #d63638; border-color: #d63638; }

/* Preisgestaltung */
.mwd-product-price-wrap { margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid #eee; }
.mwd-regular-price { color: #999; font-size: 1.2em; margin-right: 10px; }
.mwd-sale-price, .mwd-price { color: #d63638; font-size: 1.8em; font-weight: bold; }
.mwd-price { color: #111; }
.mwd-tax-info { font-size: 12px; color: #666; margin-left: 10px; }
.mwd-base-price { display: block; font-size: 13px; color: #666; margin-top: 5px; }

/* Status */
.mwd-product-stock-delivery { margin-bottom: 25px; display: flex; gap: 20px; align-items: center; font-weight: 500; font-size: 14px; }
.mwd-stock.in-stock { color: #0f834d; }
.mwd-stock.out-of-stock { color: #d63638; }
.mwd-stock.backorder { color: #e27730; }
.mwd-stock.clearance, .mwd-stock.remaining { color: #d4ac0d; font-weight: bold; } /* Kräftiges, lesbares Gold-Gelb */

/* Tabelle Specs */
.mwd-specs-table { width: 100%; text-align: left; border-collapse: collapse; margin-bottom: 20px; }
.mwd-specs-table th { width: 40%; font-weight: bold; color: #444; padding: 8px 0; border-bottom: 1px dashed #eee; }
.mwd-specs-table td { padding: 8px 0; border-bottom: 1px dashed #eee; }

/* Unten */
.mwd-product-bottom h2 { font-size: 1.5em; border-bottom: 2px solid #111; padding-bottom: 10px; margin-bottom: 20px; }
.mwd-product-description { margin-bottom: 50px; scroll-margin-top: 50px; }
.mwd-doc-list { list-style: none; padding: 0; }
.mwd-doc-list li { margin-bottom: 10px; }
.mwd-doc-list a { text-decoration: none; font-weight: 500; }
.mwd-doc-list a:hover { text-decoration: underline; }

/* Herstellerangaben */
.mwd-product-manufacturer { margin-bottom: 50px; }
.mwd-manufacturer-details { background: #fdfdfd; border: 1px solid #eee; padding: 20px; border-radius: 4px; line-height: 1.6; font-size: 14px; color: #444; }
.mwd-manufacturer-details strong { color: #111; font-size: 15px; }
.mwd-manufacturer-details a { color: #111; text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.mwd-manufacturer-details a:hover { border-color: #111; }

/* CF7 Anfrageformular Wrapper */
.mwd-product-inquiry { margin-top: 50px; background: #f9f9f9; padding: 30px; border-radius: 8px; border: 1px solid #eee; }
.mwd-product-inquiry h2 { margin-top: 0; border-bottom: none; padding-bottom: 0; margin-bottom: 10px; }
.mwd-inquiry-intro { color: #666; margin-bottom: 25px; }

/* Lightbox */
#mwd-lightbox-overlay { display: none; position: fixed; z-index: 999999; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s; }
#mwd-lightbox-overlay.active { display: flex; opacity: 1; }
#mwd-lightbox-image { max-width: 90%; max-height: 90vh; box-shadow: 0 0 20px rgba(0,0,0,0.5); border: 2px solid #fff; }
.mwd-lightbox-close { position: absolute; top: 20px; right: 30px; color: #fff; font-size: 40px; cursor: pointer; user-select: none; }
.mwd-lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); color: #fff; font-size: 40px; cursor: pointer; user-select: none; padding: 20px; transition: color 0.2s; opacity: 0.7; }
.mwd-lightbox-nav:hover { color: #fff; opacity: 1; }
.mwd-lightbox-prev { left: 20px; }
.mwd-lightbox-next { right: 20px; }


/* ==========================================================================
   2. PRODUKT KACHELN & LISTENANSICHT (KATALOG)
   ========================================================================== */

/* Cross/Up-Sells Header */
.mwd-linked-products { margin-top: 60px; border-top: 2px solid #111; padding-top: 30px; }
.mwd-linked-products h2 { font-size: 1.5em; margin-bottom: 30px; border: none; padding: 0; }

/* Grid Layout */
.mwd-products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; justify-content: start; }

/* Kachel Design */
.mwd-product-card { display: flex; flex-direction: column; border: 1px solid #ccc; border-radius: 6px; text-decoration: none; color: inherit; transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; background: #fff; text-align: center; overflow: hidden; }
.mwd-product-card:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); border-color: #111; }
.mwd-card-image { position: relative; width: 100%; aspect-ratio: 1/1; background: #fafafa; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid #eee; }
.mwd-card-image img { width: 100%; height: 100%; object-fit: cover; }
.mwd-no-image-small { color: #aaa; font-size: 13px; }
.mwd-sale-badge-small { position: absolute; top: 5px; right: 5px; background: #d63638; color: #fff; font-size: 11px; font-weight: bold; padding: 3px 6px; border-radius: 3px; }
.mwd-card-content { padding: 15px 10px; flex-grow: 1; display: flex; flex-direction: column; justify-content: center; }
.mwd-card-title { font-size: 18px; margin: 0 0 10px 0; line-height: 1.3; font-weight: 600; }
.mwd-card-price { font-size: 16px; margin-bottom: 0; }
.mwd-card-price del { color: #999; font-size: 13px; margin-right: 5px; }
.mwd-card-price ins { color: #d63638; text-decoration: none; font-weight: bold; }
.mwd-card-price span { font-weight: bold; }
.mwd-card-btn { display: block; width: 100%; text-align: center; background: #f0f0f0; color: #333; padding: 12px; font-size: 15px; font-weight: 600; transition: background 0.2s ease, color 0.2s ease; border-top: 1px solid #eee; margin-top: auto; }
.mwd-product-card:hover .mwd-card-btn { background: #111; color: #fff; }

/* Wrapper Listenansicht */
.mwd-catalog-wrapper { display: flex; flex-wrap: wrap; gap: 40px; max-width: 1250px; margin: 0 auto; font-family: inherit; align-items: flex-start; }

/* Sidebar (Links) */
.mwd-catalog-sidebar { flex: 0 0 250px; width: 250px; background: #fff; }
.mwd-filter-header { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid #111; padding-bottom: 10px; margin-bottom: 20px; }
.mwd-filter-header h3 { margin: 0; font-size: 1.5em; }
#mwd-reset-filters { background: none; border: none; color: #666; cursor: pointer; font-size: 13px; text-decoration: underline; padding: 0; }
#mwd-reset-filters:hover { color: #d63638; }

.mwd-filter-group { margin-bottom: 25px; }
.mwd-filter-title { font-size: 15px; font-weight: 600; margin: 0 0 12px 0; color: #333; }
.mwd-filter-options { display: flex; flex-direction: column; gap: 8px; max-height: 250px; overflow-y: auto; padding-right: 10px; }

/* Checkbox Styles */
.mwd-checkbox-label { display: flex; align-items: center; font-size: 14px; color: #555; cursor: pointer; user-select: none; margin: 0; }
.mwd-checkbox-label input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; }
.mwd-custom-checkbox { height: 18px; width: 18px; background-color: #fff; border: 1px solid #ccc; border-radius: 3px; margin-right: 10px; position: relative; transition: all 0.2s; flex-shrink: 0; }
.mwd-checkbox-label:hover input ~ .mwd-custom-checkbox { border-color: #888; }
.mwd-checkbox-label input:checked ~ .mwd-custom-checkbox { background-color: #111; border-color: #111; }
.mwd-custom-checkbox:after { content: ""; position: absolute; display: none; left: 5px; top: 2px; width: 4px; height: 8px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.mwd-checkbox-label input:checked ~ .mwd-custom-checkbox:after { display: block; }
.mwd-term-count { font-size: 12px; color: #999; margin-left: 5px; }

/* Hauptbereich (Rechts) */
.mwd-catalog-main { flex: 1; min-width: 0; position: relative; min-height: 300px; }
.mwd-no-results { background: #fdfdfd; border: 1px solid #eee; padding: 30px; text-align: center; border-radius: 4px; color: #666; width: 100%; grid-column: 1 / -1; }


/* ==========================================================================
   3. ANIMATIONEN & RESPONSIVE OVERRIDES
   ========================================================================== */

/* Smooth Fade-In/Out Animation für Filter */
.mwd-fade-in { animation: mwdFadeInUp 0.3s ease forwards; }
.mwd-fade-out { animation: mwdFadeOutDown 0.3s ease forwards; }

@keyframes mwdFadeInUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes mwdFadeOutDown {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(15px); }
}

/* Kugelsichere CSS-Klassen für exakte Spaltenanzahl (Desktop) */
@media (min-width: 769px) {
    .mwd-products-grid.mwd-cols-1 { grid-template-columns: repeat(1, 1fr) !important; }
    .mwd-products-grid.mwd-cols-2 { grid-template-columns: repeat(2, 1fr) !important; }
    .mwd-products-grid.mwd-cols-3 { grid-template-columns: repeat(3, 1fr) !important; }
    .mwd-products-grid.mwd-cols-4 { grid-template-columns: repeat(4, 1fr) !important; }
    .mwd-products-grid.mwd-cols-5 { grid-template-columns: repeat(5, 1fr) !important; }
    .mwd-products-grid.mwd-cols-6 { grid-template-columns: repeat(6, 1fr) !important; }
}

/* Mobile Anpassung */
@media (max-width: 768px) {
    .mwd-catalog-sidebar { flex: 1 1 100%; width: 100%; max-width: 100%; }
    .mwd-catalog-main { flex: 1 1 100%; }
    .mwd-filter-options { flex-direction: row; flex-wrap: wrap; max-height: none; gap: 15px; }
    
    /* Zwingt mobile Ansicht zu 1-2 Spalten je nach Platz */
    .mwd-products-grid[class*="mwd-cols-"] {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
    }
}





/* --- Produktekatalog Seitenleisten Navigation --- */
.mwd-product-sidebar-nav {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.mwd-product-sidebar-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Einrückung für Untermenüs */
.mwd-product-sidebar-nav .mwd-nav-submenu {
    padding-left: 15px;
    margin-top: 5px;
    border-left: 1px dashed #ddd;
    margin-left: 10px;
}

.mwd-nav-item {
    margin-bottom: 5px;
}

.mwd-nav-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9f9f9;
    border-radius: 4px;
    padding: 8px 12px;
    transition: all 0.2s ease;
}

.mwd-nav-item-header:hover {
    background: #f0f0f0;
}

.mwd-nav-cat-link {
    text-decoration: none !important;
    color: #333;
    font-weight: 600;
    font-size: 15px;
    flex-grow: 1;
}

.mwd-nav-cat-link:hover {
    color: #e3000b;
}

.mwd-toggle-icon {
    cursor: pointer;
    color: #888;
    padding: 5px;
    font-size: 14px;
    transition: transform 0.3s ease;
}

.mwd-toggle-icon:hover {
    color: #e3000b;
}

/* Produkte in der Liste */
.mwd-nav-products li {
    padding: 5px 0;
}

.mwd-nav-products a {
    text-decoration: none !important;
    color: #555;
    font-size: 14px;
    display: block;
    transition: color 0.2s;
}

.mwd-nav-products a i {
    font-size: 10px;
    margin-right: 5px;
    color: #ccc;
}

.mwd-nav-products a:hover {
    color: #e3000b;
}

.mwd-nav-products a:hover i {
    color: #e3000b;
}

/* Hervorhebung des aktiven Produkts (Auto-Open) */
.mwd-nav-products li.current-product a {
    color: #e3000b;
    font-weight: bold;
}
.mwd-nav-products li.current-product a i {
    color: #e3000b;
}

.mwd-product-layout {
    margin: 0 10% 0 10% !important;
}