﻿.compare-page {
    margin-bottom: 30px;
}

.compare-header {
    background: linear-gradient(135deg, var(--avh-green) 0%, var(--avh-green-dark) 100%);
    color: #fff;
    border-radius: var(--avh-radius-lg);
    padding: 22px 26px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: 0 12px 32px rgba(20, 139, 116, 0.28);
}

.compare-header-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .compare-header-icon svg {
        width: 26px;
        height: 26px;
        stroke: #fff;
        fill: none;
    }

.compare-header-text {
    flex: 1 1 auto;
    min-width: 0;
}

    .compare-header-text h1 {
        margin: 0 0 4px;
        font-size: 21px;
        font-weight: 800;
        color: #fff;
    }

    .compare-header-text p {
        margin: 0;
        font-size: 13.5px;
        color: rgba(255, 255, 255, 0.9);
    }

.compare-clear-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 10px;
    padding: 9px 16px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
}

    .compare-clear-btn svg {
        width: 15px;
        height: 15px;
        stroke: currentColor;
        fill: none;
    }

    .compare-clear-btn:hover {
        background: rgba(255, 255, 255, 0.3);
    }

.compare-empty {
    background: var(--avh-bg-soft);
    border: 1px dashed var(--avh-border);
    border-radius: var(--avh-radius-lg);
    padding: 60px 24px;
    text-align: center;
}

.compare-empty-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: var(--avh-green-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--avh-green);
}

    .compare-empty-icon svg {
        width: 44px;
        height: 44px;
    }

.compare-empty h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--avh-ink);
    margin: 0 0 10px;
}

.compare-empty p {
    color: var(--avh-muted);
    font-size: 14.5px;
    line-height: 1.9;
    max-width: 460px;
    margin: 0 auto 20px;
}

.compare-table-wrap {
    overflow-x: auto;
    background: #fff;
    border: 1px solid var(--avh-border);
    border-radius: var(--avh-radius-lg);
    box-shadow: var(--avh-shadow-sm);
    -webkit-overflow-scrolling: touch;
}

.compare-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 640px;
}

    .compare-table th,
    .compare-table td {
        padding: 14px 16px;
        border-bottom: 1px solid var(--avh-border);
        text-align: center;
        vertical-align: middle;
        font-size: 13.5px;
        color: var(--avh-ink);
    }

    .compare-table tbody tr:hover td {
        background: var(--avh-bg-soft);
    }

    .compare-table tbody tr:last-child td {
        border-bottom: none;
    }

.compare-spec-col {
    background: var(--avh-green-light);
    font-weight: 700;
    color: var(--avh-ink) !important;
    text-align: right !important;
    width: 140px;
    min-width: 120px;
    border-left: 1px solid var(--avh-border);
}

.compare-attr-label {
    font-size: 14px;
    font-weight: 800;
    color: var(--avh-green-dark);
}

.compare-product-col {
    width: 22%;
    min-width: 160px;
    padding: 14px 12px 12px !important;
    border-left: 1px solid var(--avh-border);
}

.compare-table thead th:last-child,
.compare-table tbody td:last-child {
    border-left: none;
}

.compare-product-head {
    position: relative;
    margin-bottom: 10px;
}

.compare-image-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    background: var(--avh-bg-soft);
    border: 1px solid var(--avh-border);
    border-radius: var(--avh-radius);
    overflow: hidden;
    padding: 6px;
    text-decoration: none;
    transition: border-color 0.25s ease;
}

    .compare-image-link:hover {
        border-color: var(--avh-green);
    }

    .compare-image-link img {
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
        display: block;
    }

.compare-product-head .product-discount-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 6;
}

.compare-product-head .product-card-top-icons {
    position: absolute;
    top: 6px;
    left: 6px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 8;
}

.compare-product-head .product-icon-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.96);
    color: var(--avh-green);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(20, 46, 53, 0.22);
    transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease;
    padding: 0;
    text-decoration: none;
    line-height: 1;
}

    .compare-product-head .product-icon-btn svg {
        width: 14px;
        height: 14px;
        display: block;
        stroke: currentColor;
        fill: none;
        pointer-events: none;
    }

    .compare-product-head .product-icon-btn:hover {
        background: var(--avh-green);
        color: #fff;
        transform: scale(1.08);
    }

    .compare-product-head .product-icon-btn:focus-visible {
        outline: 2px solid var(--avh-green);
        outline-offset: 2px;
    }

.compare-product-head .compare-remove-btn {
    color: #e74c3c;
}

    .compare-product-head .compare-remove-btn:hover {
        background: #e74c3c;
        color: #fff;
    }

.compare-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--avh-ink);
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3.2em;
}

    .compare-title a {
        color: inherit;
        text-decoration: none;
    }

        .compare-title a:hover {
            color: var(--avh-green);
        }

.compare-price-final {
    display: inline-block;
    font-weight: 800;
    font-size: 13.5px;
    color: #b64535;
}

.compare-price-old {
    display: block;
    color: var(--avh-muted);
    text-decoration: line-through;
    font-size: 11.5px;
    margin-top: 2px;
}

.compare-price-normal {
    font-weight: 800;
    font-size: 13.5px;
    color: var(--avh-ink);
}

.compare-price-call {
    font-weight: 700;
    color: #c98a00;
    font-size: 13px;
}

.compare-stock-in {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 999px;
    background: var(--avh-green-light);
    color: var(--avh-green-dark);
    font-weight: 700;
    font-size: 12px;
}

.compare-stock-out {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 999px;
    background: rgba(149, 165, 166, 0.15);
    color: #7f8c8d;
    font-weight: 700;
    font-size: 12px;
}

.compare-match {
    background: rgba(20, 139, 116, 0.12) !important;
    color: var(--avh-green-dark);
    font-weight: 700;
    border-radius: 6px;
}

@media (max-width: 767.98px) {
    .compare-header {
        padding: 18px;
    }

    .compare-header-text h1 {
        font-size: 18px;
    }

    .compare-spec-col {
        width: 110px;
        font-size: 12.5px;
    }

    .compare-product-col {
        min-width: 140px;
    }

    .compare-table th,
    .compare-table td {
        padding: 10px 8px;
        font-size: 12.5px;
    }
}
.compare-product-col-empty {
    background: var(--avh-bg-soft);
    opacity: 0.7;
}

.compare-empty-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    aspect-ratio: 1 / 1;
    border: 2px dashed var(--avh-border);
    border-radius: var(--avh-radius);
    background: #fff;
    color: var(--avh-muted);
    font-size: 12px;
    font-weight: 600;
    padding: 10px;
}

    .compare-empty-slot svg {
        width: 28px;
        height: 28px;
        stroke: var(--avh-muted);
        opacity: 0.5;
    }

.compare-empty-cell {
    color: var(--avh-muted);
    opacity: 0.4;
    font-size: 14px;
}