#litcompareMainRoot {
    position: relative;
    min-height: 220px;
}

.litcompare-main-loader {
    position: absolute;
    inset: 0;
    z-index: 95;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: linear-gradient(180deg, rgba(248, 250, 252, .97) 0%, rgba(241, 245, 249, .98) 100%);
    opacity: 1;
    visibility: visible;
    transition: opacity .28s ease, visibility .28s ease;
}

.litcompare-main-loader__panel {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    min-height: 48px;
    padding: .65rem .95rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, .35);
    box-shadow: 0 10px 28px rgba(15, 23, 42, .12);
    color: #334155;
    font-size: .9rem;
    font-weight: 600;
}

.litcompare-main-loader__spinner {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    border-top-color: #0ea5e9;
    animation: litcompare-spin .9s linear infinite;
}

.litcompare-main-content {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .32s ease, visibility .32s ease, transform .32s ease;
}

#litcompareMainRoot.litcompare-main-pending .litcompare-main-content {
    opacity: 0;
    visibility: hidden;
    transform: none;
}

#litcompareMainRoot:not(.litcompare-main-pending) .litcompare-main-loader {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.comparison-wrapper {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
    overflow: hidden;
    position: relative;
    min-height: 260px;
}

.litcompare-loader {
    position: absolute;
    inset: 0;
    z-index: 45;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: linear-gradient(180deg, rgba(248, 250, 252, .94) 0%, rgba(241, 245, 249, .96) 100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .3s ease, visibility .3s ease;
}

.comparison-wrapper.litcompare-ready-pending .litcompare-loader {
    opacity: 1;
    visibility: visible;
}

.litcompare-loader__panel {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    min-height: 48px;
    padding: .65rem .95rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, .35);
    box-shadow: 0 10px 28px rgba(15, 23, 42, .12);
    color: #334155;
    font-size: .9rem;
    font-weight: 600;
}

.litcompare-loader__spinner {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    border-top-color: #0ea5e9;
    animation: litcompare-spin .9s linear infinite;
}

.litcompare-loader__text {
    line-height: 1.2;
    white-space: nowrap;
}

.litcompare-content {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .28s ease, visibility .28s ease, transform .28s ease;
}

.comparison-wrapper.litcompare-ready-pending .litcompare-content {
    opacity: 0;
    visibility: hidden;
    transform: none;
}

.table-responsive {
    max-height: 80vh;
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.comparison-table {
    margin-bottom: 0;
    width: 100%;
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.comparison-table .litcompare-col-params {
    width: 200px;
    min-width: 200px;
    max-width: 200px;
}

.comparison-table .litcompare-col-item {
    width: auto;
}

.comparison-table th,
.comparison-table td {
    vertical-align: middle;
    border-color: #e9ecef;
    padding: .75rem;
    font-size: .9rem;
    white-space: nowrap;
}

.comparison-table thead th {
    position: sticky;
    top: 0;
    z-index: 20;
    background-color: #fff;
    border-bottom: 2px solid #dee2e6;
    text-align: center;
}

.sticky-col {
    position: sticky;
    left: 0;
    z-index: 10;
    background-color: #fff;
    border-right: 2px solid #e9ecef;
    box-shadow: 4px 0 6px rgba(0, 0, 0, .04);
}

.corner-cell {
    z-index: 30 !important;
    background-color: #f8f9fa;
}

.litcompare-corner-cell {
    text-align: center;
    vertical-align: middle !important;
    padding: 0 !important;
}

.litcompare-corner-icon {
    display: flex;
    width: var(--litcompare-corner-icon-size, 120px);
    height: var(--litcompare-corner-icon-size, 120px);
    max-width: 100%;
    max-height: 100%;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    line-height: 0;
    color: #2f4b66;
}

.litcompare-corner-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    transform: translateY(-1px);
}

.litcompare-corner-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.product-header {
    width: auto;
}

.product-img-wrapper {
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #eee;
}

.product-img-wrapper img {
    max-height: 100px;
    max-width: 90%;
    object-fit: contain;
    transition: transform .3s;
}

.product-img-wrapper:hover img {
    transform: scale(1.05);
}

.product-title {
    font-size: .85rem;
    font-weight: 600;
    color: #343a40;
    white-space: normal;
    word-wrap: break-word;
    min-height: 2.5em;
}

.product-title a {
    color: inherit;
    text-decoration: none;
}

.product-title a:hover {
    text-decoration: underline;
}

.product-price {
    font-size: 1rem;
    font-weight: 700;
    color: #212529;
    margin: .35rem 0;
    white-space: normal;
    word-break: break-word;
}

.btn-remove {
    font-size: .75rem;
    color: #adb5bd;
    cursor: pointer;
    transition: color .2s;
    text-decoration: none;
}

.btn-remove:hover {
    color: #dc3545;
    text-decoration: none;
}

.char-row td {
    background-color: #fff;
    transition: background-color .2s;
}

.char-row:hover td {
    background-color: #f8f9fa;
}

.char-row:hover td.sticky-col {
    background-color: #f1f3f5;
}

.char-name {
    font-weight: 500;
    color: #6c757d;
    width: 200px !important;
    min-width: 200px !important;
    max-width: 200px !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.25;
}

.comparison-table .diff-highlight {
    background-color: transparent;
    color: inherit;
    font-weight: normal;
}

.comparison-table.highlight-active .diff-highlight {
    background-color: #fff3cd !important;
    font-weight: 600;
    color: #856404;
}

.comparison-table.highlight-active .char-row:hover td.diff-highlight {
    background-color: #ffeeba !important;
}

.comparison-table.highlight-active .diff-highlight.diff-highlight-tone-1 {
    background-color: #fff3cd !important;
    color: #856404;
}

.comparison-table.highlight-active .diff-highlight.diff-highlight-tone-2 {
    background-color: #ffe9b8 !important;
    color: #7c5600;
}

.comparison-table.highlight-active .diff-highlight.diff-highlight-tone-3 {
    background-color: #ffe1a7 !important;
    color: #6f4b00;
}

.comparison-table.highlight-active .diff-highlight.diff-highlight-tone-4 {
    background-color: #ffd899 !important;
    color: #644200;
}

.comparison-table.highlight-active .diff-highlight.diff-highlight-tone-5 {
    background-color: #ffcf8a !important;
    color: #573900;
}

.comparison-table.highlight-active .diff-highlight.diff-highlight-tone-6 {
    background-color: #ffc57c !important;
    color: #4d3100;
}

.comparison-table.highlight-active .char-row:hover td.diff-highlight.diff-highlight-tone-1 {
    background-color: #ffeeba !important;
}

.comparison-table.highlight-active .char-row:hover td.diff-highlight.diff-highlight-tone-2 {
    background-color: #ffe2a2 !important;
}

.comparison-table.highlight-active .char-row:hover td.diff-highlight.diff-highlight-tone-3 {
    background-color: #ffd991 !important;
}

.comparison-table.highlight-active .char-row:hover td.diff-highlight.diff-highlight-tone-4 {
    background-color: #ffd083 !important;
}

.comparison-table.highlight-active .char-row:hover td.diff-highlight.diff-highlight-tone-5 {
    background-color: #ffc774 !important;
}

.comparison-table.highlight-active .char-row:hover td.diff-highlight.diff-highlight-tone-6 {
    background-color: #ffbe66 !important;
}

.scroll-indicator {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 25;
    display: none;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}

.comparison-wrapper.litcompare-scroll-ready .scroll-indicator {
    display: flex;
}

.comparison-wrapper:hover .scroll-indicator.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.scroll-indicator-right {
    right: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, .95) 50%);
    justify-content: flex-end;
    padding-right: 20px;
}

.scroll-indicator-left {
    left: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 0), rgba(255, 255, 255, .95) 50%);
    justify-content: flex-start;
    padding-left: 20px;
}

.scroll-indicator-icon {
    width: 32px;
    height: 32px;
    color: #007bff;
}

@keyframes litcompare-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .litcompare-main-loader,
    .litcompare-main-content,
    .litcompare-main-loader__spinner,
    .litcompare-loader,
    .litcompare-content,
    .litcompare-loader__spinner {
        transition: none !important;
        animation: none !important;
    }
}

@media (max-width: 767.98px) {
    .litcompare-corner-icon {
        width: 96px;
        height: 96px;
    }

    .litcompare-loader__text {
        white-space: normal;
    }

    .scroll-indicator {
        display: none !important;
    }

    .char-name,
    .corner-cell {
        position: relative !important;
        left: auto !important;
        z-index: 1 !important;
        box-shadow: none !important;
        border-right: none !important;
        white-space: normal !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: 110px !important;
    }

    .comparison-table { min-width: 800px; }

    .comparison-table th,
    .comparison-table td {
        padding: .5rem;
        font-size: .8rem;
    }

    .product-header {
        width: 130px;
    }

    .product-img-wrapper {
        height: 90px;
        margin-bottom: 5px;
    }

    .product-img-wrapper img {
        max-height: 70px;
    }

    .product-title {
        font-size: .75rem;
        min-height: auto;
    }

    .product-price {
        font-size: .9rem;
    }
}
