.compare-page {
    padding: 32px 0 64px;
}

.compare-pickers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 28px;
}

.compare-picker {
    position: relative;
    background: #fff;
    border: 1px solid #e5e5e5;
    padding: 14px 16px 16px;
}

.compare-picker__label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #222;
}

.compare-picker__input {
    width: 100%;
    height: 44px;
    border: 1px solid #d0d0d0;
    padding: 0 12px;
    font-size: 15px;
    background: #fafafa;
}

.compare-picker__results {
    position: absolute;
    z-index: 20;
    left: 16px;
    right: 16px;
    top: calc(100% - 4px);
    max-height: 280px;
    overflow: auto;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.compare-picker__item,
.compare-picker__unit {
    display: block;
    width: 100%;
    text-align: right;
    border: 0;
    background: transparent;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 14px;
    color: #222;
}

.compare-picker__item:hover,
.compare-picker__unit:hover {
    background: #f3f7f0;
}

.compare-picker__item small,
.compare-picker__selected small {
    display: block;
    color: #666;
    margin-top: 2px;
}

.compare-picker__selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    font-size: 14px;
}

.compare-picker__selected a {
    color: #8a6d1d;
    white-space: nowrap;
}

.compare-table-wrap {
    overflow-x: auto;
    background: #fff;
    border: 1px solid #e5e5e5;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

.compare-table th,
.compare-table td {
    border-bottom: 1px solid #ececec;
    padding: 14px 16px;
    vertical-align: middle;
    text-align: center;
}

.compare-table thead th {
    background: #f7f7f7;
    font-weight: 600;
}

.compare-table thead th:first-child,
.compare-table tbody th {
    text-align: right;
    width: 28%;
    color: #333;
    font-weight: 600;
}

.compare-table thead th a {
    display: block;
    color: #222;
    margin-top: 8px;
}

.compare-table thead th small {
    display: block;
    color: #666;
    font-weight: 400;
    margin-top: 4px;
}

.compare-gallery {
    margin: 0 auto 12px;
}

.compare-gallery__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid #d0d0d0;
    background: #fff;
    color: #222;
    border-radius: 0.2rem;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 160ms ease-out, opacity 160ms ease-out;
}

.compare-gallery__btn small {
    color: #666;
    font-size: 12px;
}

.compare-gallery__btn:hover {
    background: #f7f7f7;
}

.compare-gallery__btn.is-loading {
    opacity: 0.65;
    pointer-events: none;
}

.compare-table td.is-better {
    background: #e8f5e9;
    color: #1b5e20;
    font-weight: 700;
}

.compare-empty {
    text-align: center;
    color: #555;
    padding: 40px 16px;
    background: #fff;
    border: 1px dashed #ccc;
}

.compare-tray {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10050;
    display: none;
    background: #1f1f1f;
    color: #fff;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.2);
}

.compare-tray.is-open {
    display: block;
}

.compare-tray__inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.compare-tray__meta {
    font-size: 14px;
}

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

.compare-tray__actions a,
.compare-tray__actions button {
    border: 0;
    min-height: 40px;
    padding: 0 14px;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

.compare-tray__go {
    background: #c9a227;
    color: #111;
    text-decoration: none;
}

.compare-tray__clear {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
}

.compare-btn {
    border: 1px solid #c9a227;
    background: #fff;
    color: #8a6d1d;
    min-height: 36px;
    padding: 0 10px;
    font-size: 13px;
    cursor: pointer;
    line-height: 1;
    transition: background-color 160ms ease-out, color 160ms ease-out, border-color 160ms ease-out, transform 120ms ease-out;
}

.compare-btn--icon {
    width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.2rem;
    flex: 0 0 42px;
}

.compare-btn--icon:hover {
    background: #f8f1d8;
}

.compare-btn--icon:active {
    transform: scale(0.96);
}

.compare-btn__icon {
    display: block;
}

.compare-btn.is-on {
    background: #c9a227;
    border-color: #c9a227;
    color: #111;
}

.compare-btn.is-on:hover {
    background: #b89220;
    color: #111;
}

.listing-detail-footer .footer-flex {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
}

.listing-detail-footer--card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    max-height: none;
}

.listing-detail-footer--card .footer-first {
    flex: 1 1 auto;
    min-width: 0;
}

.listing-detail-footer--card .footer-flex {
    flex: 0 0 auto;
    width: auto;
}

.footer-flex__tools {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    min-width: auto;
}

.footer-flex .prt-view {
    flex: 0 0 auto;
    white-space: nowrap;
}

@media (max-width: 767px) {
    .compare-pickers {
        grid-template-columns: 1fr;
    }

    body {
        padding-bottom: calc(70px + env(safe-area-inset-bottom));
    }
}
