/**
 * B2B Catalog Styles
 * @package Modual_Configurator
 */

/* ================================
   LAYOUT
================================ */
.mc-b2b-catalog {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: var(--font-body, 'Montserrat', sans-serif);
}

/* ================================
   TIER WIDGET
================================ */
.mc-tier-widget {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, var(--grey-dark, #404042) 0%, var(--grey-dark, #404042) 100%);
    color: #fff;
    padding: 16px 24px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.mc-tier-status {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.mc-tier-icon {
    font-size: 24px;
}

.mc-tier-info {
    display: flex;
    flex-direction: column;
}

.mc-tier-info strong {
    font-size: 16px;
}

.mc-tier-info span {
    font-size: 13px;
    color: #7dd87d;
}

.mc-tier-progress {
    flex: 1;
    min-width: 0;
}

.mc-tier-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    overflow: hidden;
}

.mc-tier-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #7dd87d, #4caf50);
    border-radius: 4px;
    transition: width 0.6s ease;
}

.mc-tier-progress small {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

/* ================================
   NOTICES
================================ */
.mc-b2b-notice {
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 24px;
}

.mc-b2b-notice-pending {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
}

.mc-b2b-notice-guest {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8edff 100%);
    border: 1px solid #c5cae9;
    color: #1a237e;
}

.mc-b2b-notice p {
    margin: 6px 0 12px;
}

/* ================================
   FILTER BAR
================================ */
.mc-b2b-filters {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 14px 18px;
    background: var(--grey-50, #f7f7f7);
    border-radius: 10px;
}

.mc-b2b-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mc-b2b-filter-group label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--grey-500, #7a7a7c);
    letter-spacing: 0.5px;
}

.mc-b2b-filter-group select {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    min-width: 120px;
    cursor: pointer;
}

.mc-b2b-view-toggle {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.mc-view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    color: var(--grey-500, #7a7a7c);
    transition: all 0.2s;
}

.mc-view-btn.active,
.mc-view-btn:hover {
    background: var(--grey-dark, #404042);
    color: #fff;
    border-color: var(--grey-dark, #404042);
}

/* ================================
   COMPARE BAR
================================ */
.mc-b2b-compare-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

/* ================================
   PRODUCT GRID / LIST
================================ */
.mc-b2b-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.mc-b2b-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mc-b2b-list .mc-b2b-product-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
}

.mc-b2b-list .mc-b2b-product-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    flex-shrink: 0;
}

.mc-b2b-list .mc-b2b-product-name {
    flex: 1;
    min-width: 0;
}

/* ================================
   PRODUCT CARD
================================ */
.mc-b2b-product-card {
    background: #fff;
    border: 1px solid var(--border-1, #e3e3e4);
    border-radius: 12px;
    padding: 16px;
    transition: box-shadow 0.2s, transform 0.2s;
    position: relative;
}

.mc-b2b-product-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.mc-b2b-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.mc-b2b-compare-check {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--grey-500, #7a7a7c);
    cursor: pointer;
}

.mc-b2b-compare-check input {
    cursor: pointer;
}

.mc-b2b-product-image {
    width: 100%;
    height: 160px;
    object-fit: contain;
    margin-bottom: 12px;
}

.mc-b2b-product-image-placeholder {
    width: 100%;
    height: 160px;
    background: #f1f3f5;
    border-radius: 8px;
    margin-bottom: 12px;
}

.mc-b2b-product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.mc-b2b-product-link:hover {
    opacity: 0.9;
}

.mc-b2b-product-name {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--grey-dark, #404042);
}

.mc-b2b-product-name .mc-b2b-product-link {
    display: inline;
    color: var(--grey-dark, #404042);
}

.mc-b2b-product-name .mc-b2b-product-link:hover {
    color: #2a2a4e;
    text-decoration: underline;
    opacity: 1;
}

.mc-b2b-product-specs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.mc-b2b-product-specs span {
    display: inline-block;
    padding: 3px 8px;
    background: #f1f3f5;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #495057;
}

/* ================================
   PRICE DISPLAY
================================ */
.mc-b2b-price {
    margin-bottom: 4px;
}

.mc-b2b-price span {
    font-size: 18px;
    font-weight: 700;
    color: var(--grey-dark, #404042);
}

.mc-b2b-price-hint small {
    font-size: 12px;
    color: var(--grey-500, #7a7a7c);
}

/* UVP + Staffelpreis block (Installateur) */
.mc-b2b-price-block {
    margin-bottom: 8px;
}

.mc-b2b-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 2px 0;
}

.mc-b2b-price-label {
    font-size: 12px;
    color: var(--grey-500, #7a7a7c);
    font-weight: 500;
    white-space: nowrap;
}

.mc-b2b-price-uvp-val {
    font-size: 14px;
    color: #adb5bd;
    text-decoration: line-through;
    font-weight: 600;
}

.mc-b2b-price-row-staffel {
    background: #f0faf0;
    border-radius: 6px;
    padding: 4px 8px;
    margin-top: 2px;
}

.mc-b2b-price-staffel {
    font-size: 17px;
    font-weight: 700;
    color: #2e7d32;
}

.mc-b2b-price-badge {
    font-size: 11px;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    margin-left: auto;
}

/* ================================
   CARD ACTIONS
================================ */
.mc-b2b-card-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

.mc-b2b-card-actions .mc-btn {
    flex: 1;
    text-align: center;
}

.mc-b2b-cart-link {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--grey-dark, #404042);
    text-decoration: none;
    margin-top: 6px;
    transition: color 0.2s;
}

.mc-b2b-cart-link:hover {
    color: #2a2a4e;
    text-decoration: underline;
}

/* ================================
   STOCK BADGES
================================ */
.mc-stock-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

.mc-stock-ok {
    background: #e8f5e9;
    color: #2e7d32;
}

.mc-stock-low {
    background: #fff3e0;
    color: #e65100;
}

.mc-stock-out {
    background: #fce4ec;
    color: #c62828;
}

/* ================================
   COMPARE MODAL
================================ */
.mc-b2b-compare-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.mc-b2b-compare-modal.mc-hidden {
    display: none;
}

.mc-b2b-compare-content {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    max-width: 800px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.mc-b2b-compare-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.mc-b2b-compare-header h2 {
    margin: 0;
    font-size: 20px;
}

.mc-b2b-compare-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #f1f3f5;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mc-b2b-compare-table table {
    width: 100%;
    border-collapse: collapse;
}

.mc-b2b-compare-table th,
.mc-b2b-compare-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-1, #e3e3e4);
    font-size: 14px;
}

.mc-b2b-compare-table th {
    font-weight: 600;
    color: var(--grey-dark, #404042);
    background: var(--grey-50, #f7f7f7);
}

.mc-compare-label {
    font-weight: 600;
    color: var(--grey-500, #7a7a7c);
    white-space: nowrap;
}

/* ================================
   QUOTE MODAL
================================ */
.mc-b2b-quote-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.mc-b2b-quote-modal.mc-hidden {
    display: none;
}

.mc-b2b-quote-content {
    background: #fff;
    border-radius: 14px;
    padding: 28px;
    max-width: 500px;
    width: 100%;
    position: relative;
}

.mc-b2b-quote-content h2 {
    margin: 0 0 20px;
    font-size: 20px;
}

.mc-b2b-quote-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f1f3f5;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mc-b2b-quote-content .mc-input-group {
    margin-bottom: 12px;
}

.mc-b2b-quote-content label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
    color: #495057;
}

.mc-b2b-quote-content input,
.mc-b2b-quote-content textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.mc-b2b-quote-content .mc-input-row {
    display: flex;
    gap: 12px;
}

.mc-b2b-quote-content .mc-input-row .mc-input-group {
    flex: 1;
}

/* ================================
   BUTTONS (shared)
================================ */
.mc-b2b-catalog .mc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
}

.mc-b2b-catalog .mc-btn-primary {
    background: var(--grey-dark, #404042);
    color: #fff;
}

.mc-b2b-catalog .mc-btn-primary:hover {
    background: #2a2a4e;
}

.mc-b2b-catalog .mc-btn-secondary {
    background: var(--border-1, #e3e3e4);
    color: var(--grey-dark, #404042);
}

.mc-b2b-catalog .mc-btn-secondary:hover {
    background: #dee2e6;
}

.mc-b2b-catalog .mc-btn-outline {
    background: transparent;
    border: 1px solid #dee2e6;
    color: #495057;
}

.mc-b2b-catalog .mc-btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.mc-b2b-catalog .mc-btn-success {
    background: #2e7d32 !important;
    color: #fff !important;
}

/* ================================
   LOADING / EMPTY / ERROR
================================ */
.mc-b2b-loading,
.mc-b2b-empty,
.mc-b2b-error {
    text-align: center;
    padding: 40px;
    color: var(--grey-500, #7a7a7c);
    font-size: 15px;
}

/* ================================
   UTILITY
================================ */
.mc-hidden {
    display: none !important;
}

/* ================================
   RESPONSIVE
================================ */
@media (max-width: 768px) {
    .mc-b2b-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .mc-b2b-view-toggle {
        margin-left: 0;
    }

    .mc-b2b-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .mc-tier-widget {
        flex-direction: column;
        text-align: center;
    }

    .mc-b2b-compare-content {
        max-height: 90vh;
    }

    .mc-b2b-list .mc-b2b-product-card {
        flex-wrap: wrap;
    }
}
