/* ===== PRODUCT COMPARE PAGE STYLES ===== */

/* ===== PAGE BACKGROUND ===== */
body {
    background-color: #f0f0f0;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    padding: 1rem 0;
    font-size: 13px;
    color: #666;
    margin-bottom: 1.5rem;
    background: white;
    padding: 12px 20px;
    border-radius: 6px;
    margin-top: 1rem;
}

.breadcrumb a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--primary-green);
}

.breadcrumb .separator {
    margin: 0 8px;
    color: #767676;
}

/* ===== COMPARE SECTION ===== */
.compare-section {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    min-height: 500px;
}

.compare-header {
    margin-bottom: 2rem;
    text-align: center;
}

.compare-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.compare-subtitle {
    color: #666;
    font-size: 14px;
}

/* ===== EMPTY STATE ===== */
.compare-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.empty-icon {
    color: #d1d5db;
    margin-bottom: 1.5rem;
}

.compare-empty h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.75rem;
}

.compare-empty p {
    color: #666;
    font-size: 14px;
    margin-bottom: 2rem;
    max-width: 400px;
}

.btn-browse {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #16a34a;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-browse:hover {
    background: #15803d;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

/* ===== COMPARE CONTAINER ===== */
.compare-container {
    width: 100%;
}

.compare-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
}

.btn-clear-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fee;
    color: #dc2626;
    padding: 8px 16px;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-clear-all:hover {
    background: #fecaca;
    border-color: #f87171;
}

.btn-clear-all svg {
    width: 16px;
    height: 16px;
}

/* ===== COMPARE TABLE ===== */
.compare-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.compare-table thead th {
    padding: 1rem;
    background: #f9fafb;
    border-bottom: 2px solid #e5e5e5;
    vertical-align: top;
    min-width: 250px;
    position: relative;
}

.compare-table thead th:first-child {
    background: white;
    min-width: 180px;
    position: sticky;
    left: 0;
    z-index: 10;
}

/* Product Header in Table */
.product-header-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.product-remove-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fee;
    border: 1px solid #fca5a5;
    color: #dc2626;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.product-remove-btn:hover {
    background: #dc2626;
    color: white;
    transform: scale(1.1);
}

.product-remove-btn svg {
    width: 16px;
    height: 16px;
}

.product-image-compare {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 8px;
    background: #f8f8f8;
    padding: 0.5rem;
}

.product-info-compare {
    text-align: center;
}

.product-brand-compare {
    font-size: 12px;
    color: #888;
    margin-bottom: 0.25rem;
}

.product-name-compare {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.product-price-compare {
    font-size: 18px;
    font-weight: 700;
    color: #16a34a;
}

/* Table Body */
.compare-table tbody tr {
    border-bottom: 1px solid #e5e5e5;
}

.compare-table tbody tr:last-child {
    border-bottom: none;
}

.compare-table tbody th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #1f2937;
    background: #fafafa;
    position: sticky;
    left: 0;
    z-index: 5;
}

.compare-table tbody td {
    padding: 1rem;
    text-align: center;
    color: #666;
    vertical-align: middle;
}

/* Property Values */
.property-value-yes {
    color: #16a34a;
    font-weight: 600;
}

.property-value-no {
    color: #9CA3AF;
    opacity: 0.7;
}

.property-check {
    display: inline-flex;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.property-check.check {
    color: #16a34a;
    background: #f0fdf4;
}

.property-check.cross {
    color: #dc2626;
    background: #fef2f2;
    opacity: 0.6;
}

/* Größe wählen Row */
.size-select-row td,
.size-select-row th {
    padding: 0.75rem 1rem;
}

.compare-size-select {
    width: 100%;
    min-height: 44px;
    background: #004D45;
    color: white;
    padding: 10px 14px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='white' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    transition: background-color 0.2s ease;
}

.compare-size-select:hover,
.compare-size-select:focus {
    background-color: #003830;
    outline: none;
}

.compare-size-static {
    display: block;
    font-size: 14px;
    color: #374151;
    min-height: 44px;
    line-height: 44px;
}

/* Ausgewählte Größe Row */
.selected-size-row td,
.selected-size-row th {
    padding: 0.5rem 1rem 0.75rem;
}

.selected-size-cell {
    text-align: center;
}

.selected-size-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
}

.selected-size-artnr {
    display: block;
    font-size: 11px;
    color: #6b7280;
    margin-top: 2px;
    font-family: monospace;
}

/* Add to Cart Row */
.add-to-cart-row td {
    padding: 0.75rem 1rem 1.5rem;
}

.btn-add-to-cart-compare {
    width: 100%;
    height: 48px;
    background: #004D45;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
    box-sizing: border-box;
}

.btn-add-to-cart-compare:hover {
    background: #003830;
}

/* Empty Slot */
.empty-product-slot {
    padding: 2rem;
    text-align: center;
    color: #9CA3AF;
}

.empty-slot-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d1d5db;
}

.empty-slot-text {
    font-size: 13px;
    color: #9CA3AF;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    body {
        background-color: white;
    }

    .compare-section {
        border-radius: 0;
        padding: 1rem;
        box-shadow: none;
        margin-left: calc(-1 * var(--spacing-md));
        margin-right: calc(-1 * var(--spacing-md));
        width: calc(100% + 2 * var(--spacing-md));
    }

    .compare-header h1 {
        font-size: 22px;
    }

    .compare-empty {
        padding: 3rem 1rem;
    }

    .compare-table thead th {
        min-width: 200px;
    }

    .compare-table thead th:first-child {
        min-width: 140px;
    }

    .product-image-compare {
        width: 100px;
        height: 100px;
    }

    .compare-table tbody th {
        font-size: 13px;
        padding: 0.75rem;
    }

    .compare-table tbody td {
        font-size: 13px;
        padding: 0.75rem;
    }
}

/* ===== COMPARE ICON ON PRODUCT DETAIL PAGE ===== */
.product-compare-icon {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: auto;
    min-width: 40px;
    padding: 6px 10px;
    height: auto;
    min-height: 40px;
    background: white;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
}

.compare-icon-label {
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1;
    color: inherit;
}

.product-compare-icon:hover {
    border-color: #16a34a;
    background: #f0fdf4;
    color: #16a34a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.2);
}

.product-compare-icon.active {
    background: #16a34a;
    border-color: #16a34a;
    color: white;
}

.product-compare-icon svg {
    width: 20px;
    height: 20px;
    transform: rotate(90deg);
}

/* Header row for compare icon */
.product-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.product-header-left {
    flex: 1;
}

.product-header-right {
    display: flex;
    gap: 0.5rem;
}
.compare-size-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.compare-size-chip {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.compare-size-chip:hover {
    border-color: #16a34a;
    color: #166534;
}
.compare-size-chip.is-active {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}
.compare-price-stack {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}
.compare-price-stack__main {
    font-size: 18px;
    font-weight: 700;
    color: #16a34a;
}
.compare-price-stack__old {
    font-size: 12px;
    color: #94a3b8;
    text-decoration: line-through;
}
.compare-unit-price {
    font-size: 12px;
    color: #64748b;
}
.compare-selected-size {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    color: #1f2937;
}

.compare-selected-size .compare-action-note {
    display: block;
    margin-top: 0;
}
.compare-action-note {
    margin-top: 8px;
    font-size: 12px;
    color: #64748b;
}
.category-header-row th {
    text-align: center;
    background: #f9fafb;
    font-weight: 700;
    color: #004D45;
    padding: 12px;
    border-top: 2px solid #e5e5e5;
}

.empty-product-slot--link {
    display: block;
    text-decoration: none;
}

.compare-selected-size-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.75rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: #ecfdf5;
    color: #166534;
    font-size: 12px;
    font-weight: 700;
}

.compare-size-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.compare-size-option.is-active .compare-size-status {
    color: #0f766e;
}

.compare-size-status {
    font-size: 11px;
    line-height: 1.2;
    color: #64748b;
}

.compare-size-status.is-order {
    color: #1d4ed8;
}

.compare-size-status.is-low {
    color: #b45309;
}

.compare-size-status.is-unavailable {
    color: #b91c1c;
}

.compare-unit-price--table {
    display: inline-block;
    max-width: 170px;
}

@media (max-width: 768px) {
    .compare-size-selector {
        min-width: 180px;
    }

    .compare-size-option {
        min-width: 120px;
    }

    .btn-add-to-cart-compare {
        min-width: 180px;
    }
}