.hl-compare {
    --compare-red: #ad202a;
    --compare-border: #e6e6e6;
}
.hl-compare [hidden] { display: none !important; }
.hl-compare-page {
    width: min(1200px, calc(100% - 32px));
    margin: 28px auto 56px;
}
.hl-compare-page h1 { margin: 0 0 20px; }
.hl-compare .hl-compare-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid var(--compare-red);
    border-radius: 6px;
    background: #fff;
    color: var(--compare-red);
    font: inherit;
    line-height: 1.35;
    text-decoration: none;
}
.hl-compare .hl-compare-button:hover,
.hl-compare .hl-compare-button[aria-pressed="true"] {
    background: var(--compare-red);
    color: #fff;
}
.hl-compare button:disabled { opacity: .55; cursor: wait; }
.hl-compare :is(a, button, input, [tabindex]):focus-visible {
    outline: 2px solid #205eba;
    outline-offset: 2px;
}
.hl-compare-status { margin: 8px 0; }
.hl-compare-status:empty { display: none; }
.hl-compare-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    position: fixed;
    z-index: 40;
    left: 50%;
    bottom: 82px;
    transform: translateX(-50%);
    width: min(800px, calc(100% - 24px));
    padding: 10px;
    border: 1px solid var(--compare-border);
    border-radius: 8px;
    box-shadow: 0 6px 24px #0002;
    background: #fff;
    color: #242424;
}
.hl-compare-chips {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    order: 1;
    flex: 0 0 100%;
}
.hl-compare-chip {
    display: flex;
    gap: 6px;
    align-items: center;
    min-width: 0;
    padding: 4px 6px;
    border: 2px solid #b7b7b7;
    border-radius: 5px;
}
.hl-compare-chip img { flex: none; width: 42px; height: 42px; object-fit: contain; }
.hl-compare-chip a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl-compare .hl-compare-remove {
    flex: none;
    padding: 0 7px;
    border: 1px solid var(--compare-border);
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-size: 19px;
    line-height: 1.25;
}
.hl-compare-tools, .hl-compare-count-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.hl-compare-tools form label { display: block; margin-bottom: 6px; }
.hl-compare-tools form > div { display: flex; gap: 8px; flex-wrap: wrap; }
.hl-compare-tools input[type="search"] { width: min(320px, 100%); }
.hl-compare-count-row { margin: 18px 0 10px; }
.hl-compare-results { list-style: none; margin: 12px 0; padding: 0; }
.hl-compare-results li {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 4px 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--compare-border);
}
.hl-compare-scroll { overflow-x: auto; border: 1px solid var(--compare-border); border-radius: 8px; }
.hl-compare-scroll table { width: 100%; margin: 0; border-spacing: 0; border-collapse: separate; }
.hl-compare-scroll :is(th, td) {
    min-width: 186px;
    padding: 10px;
    vertical-align: top;
    text-align: left;
    border: 0;
    border-bottom: 1px solid var(--compare-border);
    overflow-wrap: anywhere;
}
.hl-compare-scroll th:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    width: 140px;
    min-width: 105px;
    background: #f5f5f5;
}
.hl-compare-product > * { display: block; margin-bottom: 8px; }
.hl-compare-product img { width: 100%; max-width: 190px; height: 118px; object-fit: contain; }
.hl-compare-scroll .hl-compare-difference { background: #fff3e5; }
.hl-compare-scroll del { display: block; font-size: .9em; }
@media (max-width: 600px) {
    .hl-compare-scroll :is(th, td) { min-width: 154px; padding: 8px; }
    .hl-compare-bar { bottom: calc(78px + env(safe-area-inset-bottom)); }
}
