.evc-compare {
    margin: 20px 0;
    border: 1px solid #e6e6e6;
    background: #fff;
    padding: 16px;
    border-radius: 8px;
}

.evc-compare-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.evc-compare-count {
    font-size: 14px;
    color: #333;
}

.evc-compare-controls {
    display: flex;
    gap: 8px;
}

.evc-toggle {
    border: 1px solid #d2d2d2;
    background: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.evc-toggle.is-active {
    background: #111;
    color: #fff;
    border-color: #111;
}

.evc-toggle:hover {
    border-color: #111;
}

.evc-clear {
    color: #b91c1c;
    border-color: #f0c0c0;
    background: #fff6f6;
}

.evc-clear:hover {
    border-color: #b91c1c;
}

.evc-compare-search {
    border: 1px solid #efefef;
    background: #fafafa;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.evc-search-label {
    font-size: 13px;
    color: #444;
    margin-bottom: 6px;
}

.evc-search-field {
    display: flex;
    align-items: center;
    gap: 8px;
}

.evc-search-input {
    flex: 1;
    border: 1px solid #d6d6d6;
    padding: 8px 10px;
    border-radius: 6px;
    background: #fff;
}

.evc-search-status {
    font-size: 12px;
    color: #666;
    min-height: 16px;
}

.evc-search-results {
    margin-top: 10px;
    display: grid;
    gap: 8px;
}

.evc-search-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px;
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    background: #fff;
}

.evc-search-main {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.evc-search-main img {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: 6px;
    background: #f5f5f5;
}

.evc-search-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.evc-search-title {
    font-weight: 600;
    color: #111;
}

.evc-search-subtitle {
    font-size: 12px;
    color: #666;
}

.evc-search-badges {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.evc-badge {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
}

.evc-search-add {
    border: 1px solid #111;
    background: #111;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.evc-search-add[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.evc-search-message {
    padding: 10px;
    border: 1px dashed #d0d0d0;
    border-radius: 6px;
    background: #fff;
    color: #666;
    font-size: 13px;
}

.evc-compare-table {
    overflow-x: auto;
}

.evc-compare-desktop {
    display: block;
}

.evc-compare-mobile {
    display: none;
}

.evc-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    border-radius: 6px;
    overflow: hidden;
}

.evc-table th,
.evc-table td {
    border: 1px solid #e0e0e0;
    padding: 8px 10px;
    vertical-align: top;
}

.evc-table thead th {
    background: #fafafa;
    position: sticky;
    top: 0;
    z-index: 2;
}

.evc-attr-head {
    text-align: left;
    width: 220px;
    position: sticky;
    left: 0;
    z-index: 3;
    background: #fafafa;
}

.evc-group th {
    background: #f3f3f3;
    font-weight: 600;
    text-align: left;
}

.evc-item-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}

.evc-item-card img {
    max-width: 90px;
    height: auto;
}

.evc-item-title {
    font-weight: 600;
}

.evc-item-head--empty {
    background: #f8fafc;
}

.evc-item-card--empty {
    align-items: center;
    text-align: center;
    gap: 8px;
    min-height: 120px;
}

.evc-add-slot {
    border: 1px dashed #94a3b8;
    background: #fff;
    color: #0f172a;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}

.evc-add-slot:hover {
    border-color: #0f172a;
}

.evc-item-hint {
    font-size: 12px;
    color: #64748b;
}

.evc-table tbody tr:hover td:not(.evc-best):not(.evc-mid):not(.evc-worst) {
    background: #fafafa;
}

.evc-attr {
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 1;
    font-weight: 500;
}

.evc-cell.evc-best {
    background: #e6f7e6;
}

.evc-cell.evc-mid {
    background: #fff8e1;
}

.evc-cell.evc-worst {
    background: #fdecea;
}

.evc-cell--empty {
    text-align: center;
    color: #9ca3af;
}

.evc-row-hover:not(.evc-best):not(.evc-mid):not(.evc-worst) {
    background: #f8fafc;
}

.evc-na {
    color: #999;
    font-style: italic;
}

.evc-remove,
.evc-bar-remove {
    border: 1px solid #ddd;
    background: #fff;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 12px;
}

.evc-compare-button {
    border: 1px solid #111;
    background: #111;
    color: #fff;
    padding: 8px 14px;
    cursor: pointer;
}

.evc-compare-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    gap: 12px;
    align-items: center;
    padding: 10px 16px;
    background: #111;
    color: #fff;
    z-index: 9999;
}

.evc-compare-bar__items {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    flex: 1;
}

.evc-bar-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #1e1e1e;
    padding: 4px 8px;
    border-radius: 4px;
}

.evc-bar-item img {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 2px;
}

.evc-compare-bar__cta {
    background: #fff;
    color: #111;
    padding: 8px 14px;
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
}

.evc-loading,
.evc-error,
.evc-empty {
    padding: 12px;
    border: 1px dashed #ccc;
    background: #fafafa;
}

.evc-single {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.evc-single-actions {
    margin-bottom: 16px;
}

.evc-compare-inline {
    margin-bottom: 12px;
}

.evc-single-media {
    display: grid;
    gap: 16px;
    margin-bottom: 24px;
}

.evc-media-main img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.evc-media-gallery {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.evc-media-thumb {
    display: block;
}

.evc-media-thumb img {
    width: 100%;
    height: 100%;
    max-height: 140px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.evc-media-youtube {
    margin-top: 12px;
}

.evc-media-youtube h3 {
    margin: 0 0 8px;
    font-size: 14px;
}

.evc-media-youtube ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 6px;
}

.evc-specs {
    display: grid;
    gap: 16px;
}

.evc-spec-group {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.evc-spec-group h3 {
    margin: 0;
    padding: 10px 12px;
    background: #f8fafc;
    font-size: 14px;
}

.evc-spec-table {
    width: 100%;
    border-collapse: collapse;
}

.evc-spec-table th,
.evc-spec-table td {
    padding: 8px 12px;
    border-top: 1px solid #eee;
    text-align: left;
}

.evc-spec-table th {
    width: 48%;
    color: #555;
    font-weight: 500;
}

@media (max-width: 768px) {
    .evc-compare-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .evc-compare-controls {
        flex-wrap: wrap;
    }

    .evc-search-field {
        flex-direction: column;
        align-items: stretch;
    }

    .evc-search-item {
        flex-direction: column;
        align-items: stretch;
    }

    .evc-search-add {
        width: 100%;
    }

    .evc-attr-head {
        width: 160px;
    }

    .evc-compare-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .evc-compare-desktop {
        display: none;
    }

    .evc-compare-mobile {
        display: block;
    }

    .evc-mobile-head {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-bottom: 12px;
    }

    .evc-mobile-card {
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 8px;
        background: #fff;
        text-align: center;
        display: flex;
        flex-direction: column;
        gap: 6px;
        align-items: center;
        justify-content: space-between;
    }

    .evc-mobile-card img {
        max-width: 100%;
        height: auto;
        border-radius: 6px;
        background: #f5f5f5;
    }

    .evc-mobile-title {
        font-weight: 600;
        font-size: 13px;
    }

    .evc-mobile-remove {
        margin-top: 4px;
    }

    .evc-mobile-card--empty {
        border-style: dashed;
        background: #f8fafc;
    }

    .evc-mobile-group {
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        overflow: hidden;
        margin-bottom: 12px;
        background: #fff;
    }

    .evc-mobile-group-title {
        padding: 8px 10px;
        background: #f3f3f3;
        font-weight: 600;
        font-size: 13px;
    }

    .evc-mobile-row {
        padding: 10px;
        border-top: 1px solid #eee;
    }

    .evc-mobile-label {
        font-weight: 600;
        margin-bottom: 6px;
    }

    .evc-mobile-values {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .evc-mobile-value {
        background: #fafafa;
        border: 1px solid #e5e7eb;
        border-radius: 6px;
        padding: 6px;
        text-align: center;
        font-size: 13px;
    }

    .evc-mobile-value--empty {
        color: #9ca3af;
        background: #fff;
        border-style: dashed;
    }
}
