.package-box {
    position: relative;
}

/* Keep the price and action buttons pinned to the bottom of every tour card. */
.tours-item {
    display: flex;
    flex-direction: column;
}

.tours-item > .image {
    flex: 0 0 auto;
}

.tours-item .contentt {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
}

.tour-compare-toggle {
    position: relative;
    z-index: auto;
    top: auto;
    right: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    margin: 10px;
    padding: 8px 14px;
    border: 1px solid #064f7d;
    border-radius: 8px;
    color: #064f7d;
    background: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    cursor: pointer;
    transition: .2s ease;
}

.tour-compare-toggle:hover,
.tour-compare-toggle.is-selected {
    color: #fff;
    background: #064f7d;
}

.tour-compare-toggle.is-selected {
    border-color: #f5a216;
}

.tour-compare-toggle:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.tour-compare-toggle span,
.tour-compare-toggle.is-selected span {
    display: inline;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: inherit;
    background: transparent;
    box-shadow: none;
    font: inherit;
}

.tour-card-price-row {
    width: 100%;
    margin-top: auto;
    padding: 0 0 9px;
    /* border-top: 1px solid #e3e9ee; */
    text-align: left;
}

.tour-card-price-row .person {
    display: flex !important;
    align-items: baseline;
    gap: 4px;
    color: #60717e;
    font-size: 12px;
}

.tour-card-price-row .tour-price-basis {
    color: #60717e;
    font-weight: 600;
}

.tour-card-price-row .price {
    color: #064f7d;
    font-size: 20px;
    font-weight: 800;
}

.tour-card-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    align-items: stretch !important;
    gap: 8px;
    width: 100%;
    margin-top: 0;
}

.tour-card-actions .grey-btn,
.tour-card-actions .grey-btn a,
.tour-card-actions .tour-compare-toggle {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    margin: 0;
}

.tour-card-actions .grey-btn a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    border-radius: 8px;
    white-space: nowrap;
}

.tour-card-actions .tour-compare-toggle {
    padding: 8px 9px;
    white-space: normal;
}

.tour-compare-dock {
    position: fixed;
    z-index: 200000;
    left: 50%;
    bottom: 22px;
    width: min(980px, calc(100% - 32px));
    min-height: 68px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-radius: 18px;
    color: #fff;
    background: #064f7d;
    box-shadow: 0 16px 42px rgba(4, 38, 63, .3);
    transform: translateX(-50%);
}

.tour-compare-dock[hidden] {
    display: none;
}

.compare-dock-summary {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    padding: 0;
    border: 0;
    color: inherit;
    background: transparent;
    text-align: left;
}

.compare-dock-summary strong {
    font-size: 14px;
    white-space: nowrap;
}

.compare-dock-summary>span {
    color: #dcecf5;
    font-size: 10px;
}

.compare-selected-trips {
    min-width: 0;
    flex: 1;
    display: flex;
    gap: 7px;
    overflow-x: auto;
}

.compare-selected-chip {
    min-width: 0;
    max-width: 190px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 8px 7px 11px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 18px;
    background: rgba(255, 255, 255, .1);
}

.compare-selected-chip b {
    overflow: hidden;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compare-selected-chip button {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #064f7d;
    background: #fff;
    font-size: 17px;
    line-height: 1;
}

.compare-dock-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.compare-clear,
.compare-open {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 19px;
    border-radius: 23px;
    font-weight: 800;
    text-decoration: none;
}

.compare-clear {
    border: 1px solid rgba(255, 255, 255, .55);
    color: #fff;
    background: transparent;
}

.compare-open {
    border: 0;
    color: #06436f;
    background: #fff;
}

.compare-open.is-disabled {
    opacity: .6;
    cursor: not-allowed;
}

.tour-compare-page {
    padding: 42px 0 70px;
    background: #f8fbfd;
}

.tour-compare-page__header {
    margin-bottom: 25px;
    text-align: center;
}

.tour-compare-page__header small {
    color: #e88e08;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.tour-compare-page__header h1 {
    margin: 5px 0 8px;
    color: #06436f;
}

.tour-compare-page__header p {
    color: #637685;
}

.compare-trip-grid {
    display: grid;
    grid-template-columns: repeat(var(--compare-count), minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.compare-trip-card {
    overflow: hidden;
    border: 2px solid #e98a24;
    border-radius: 18px;
    background: #fff;
}

.compare-trip-card>img {
    display: block;
    width: 100%;
    height: 210px;
    object-fit: cover;
}

.compare-trip-card>div {
    padding: 17px;
}

.compare-trip-card small {
    color: #e36d12;
    font-weight: 800;
}

.compare-trip-card h2 {
    min-height: 54px;
    margin: 7px 0 9px;
    color: #06436f;
    font-size: 20px;
    line-height: 1.35;
}

.compare-trip-card p {
    min-height: 63px;
    color: #5c6f7d;
    font-size: 13px;
    line-height: 1.55;
}

.compare-trip-card dl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 14px 0;
    border: 1px solid #d9e4eb;
    border-radius: 10px;
}

.compare-trip-card dl div {
    padding: 10px 12px;
}

.compare-trip-card dl div+div {
    border-left: 1px solid #d9e4eb;
}

.compare-trip-card dt {
    color: #71808c;
    font-size: 11px;
}

.compare-trip-card dd {
    margin: 2px 0 0;
    color: #06436f;
    font-weight: 800;
}

.compare-trip-card a {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    color: #fff;
    background: #064f7d;
    font-weight: 800;
    text-decoration: none;
}

.compare-table-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid #dbe5eb;
    border-radius: 14px;
    background: #fff;
    scrollbar-color: #064f7d #dfe8ed;
    scrollbar-width: auto;
    cursor: grab;
    overscroll-behavior: contain;
}

.compare-table-wrap.is-dragging {
    cursor: grabbing;
    user-select: none;
}

.compare-table-wrap::-webkit-scrollbar {
    height: 14px;
}

.compare-table-wrap::-webkit-scrollbar-track {
    background: #dfe8ed;
}

.compare-table-wrap::-webkit-scrollbar-thumb {
    border: 3px solid #dfe8ed;
    border-radius: 10px;
    background: #064f7d;
}

.compare-table {
    width: 100%;
    min-width: var(--compare-table-min-width, 1110px);
    border-collapse: collapse;
    table-layout: fixed;
}

.compare-table th,
.compare-table td {
    padding: 15px;
    border-right: 1px solid #e2e9ee;
    border-bottom: 1px solid #e2e9ee;
    vertical-align: top;
    color: #40535f;
    font-size: 13px;
    line-height: 1.6;
    white-space: normal;
    word-break: break-word;
}

.compare-table thead th {
    position: sticky;
    z-index: 3;
    top: 0;
    color: #06436f;
    background: #eef7fb;
    font-size: 14px;
}

.compare-table th:first-child {
    width: 150px;
    color: #06436f;
    font-weight: 800;
}

.compare-table tr:last-child>* {
    border-bottom: 0;
}

.compare-table tr>*:last-child {
    border-right: 0;
}

.compare-itinerary-day {
    padding: 0 0 13px;
}

.compare-itinerary-day + .compare-itinerary-day {
    padding-top: 13px;
    border-top: 1px solid #dfe8ed;
}

.compare-itinerary-day strong,
.compare-itinerary-day span {
    display: block;
}

.compare-itinerary-day strong {
    margin-bottom: 4px;
    color: #064f7d;
    font-size: 14px;
}

.compare-itinerary-toggle,
.compare-itinerary-extra {
    display: none;
}

.compare-itinerary-toggle:checked + .compare-itinerary-extra {
    display: block;
}

.compare-show-more {
    display: inline-flex;
    margin-top: 4px;
    padding: 8px 15px;
    border: 1px solid #064f7d;
    border-radius: 8px;
    color: #fff;
    background: #064f7d;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.compare-show-more .show-less-text {
    display: none;
}

.compare-itinerary-toggle:checked ~ .compare-show-more .show-more-text {
    display: none;
}

.compare-itinerary-toggle:checked ~ .compare-show-more .show-less-text {
    display: inline;
}

.compare-detail-list {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
}

.compare-detail-list li {
    position: relative;
    display: block;
    padding-left: 23px;
    color: #40535f;
    font-size: 13px;
    line-height: 1.55;
}

.compare-detail-list li::before {
    position: absolute;
    top: 0;
    left: 0;
    font-weight: 900;
}

.compare-detail-list--check li::before {
    content: "\2713";
    color: #17864b;
}

.compare-detail-list--cross li::before {
    content: "\00d7";
    color: #c83d3d;
    font-size: 18px;
    line-height: 1.2;
}

.compare-detail-list--dash li::before {
    content: "-";
    color: #064f7d;
}

.compare-detail-list li.compare-empty::before {
    content: none;
}

.compare-detail-list li.compare-empty {
    padding-left: 0;
}

.compare-prices-wrap {
    width: 100%;
    overflow: hidden;
}

.compare-prices-table {
    width: 100%;
    min-width: 0;
    border-collapse: collapse;
    table-layout: auto;
}

.compare-prices-table th,
.compare-prices-table td {
    width: auto !important;
    padding: 8px !important;
    border: 1px solid #dbe5eb !important;
    color: #40535f !important;
    font-size: 11px !important;
    text-align: left;
}

.compare-prices-table thead th {
    position: static;
    color: #06436f !important;
    background: #eef7fb;
    font-weight: 800;
}

.compare-prices-table .compare-price-category th {
    position: static;
    padding: 11px 8px !important;
    border: 1px solid #b9ceda !important;
    border-top: 4px solid #e19a31 !important;
    color: #fff !important;
    background: #064f7d !important;
    font-size: 13px !important;
    text-align: left;
}

.compare-prices-table tbody .compare-price-category:first-child th {
    border-top-width: 1px !important;
}

.compare-page-empty {
    max-width: 620px;
    margin: 40px auto;
    padding: 40px 24px;
    border: 1px dashed #bdcbd5;
    border-radius: 16px;
    background: #fff;
    text-align: center;
}

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

    .compare-trip-card {
        display: grid;
        grid-template-columns: 220px 1fr;
    }

    .compare-trip-card>img {
        height: 100%;
        min-height: 250px;
    }
}

@media (max-width: 767.98px) {
    body.has-tour-compare-dock {
        padding-bottom: 132px;
    }

    .tour-compare-dock {
        /* Keep the comparison controls above the fixed mobile shortcut bar. */
        bottom: calc(68px + env(safe-area-inset-bottom));
        width: min(360px, calc(100% - 20px));
        min-height: 0;
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        padding: 8px 10px;
        border-radius: 16px;
    }

    .compare-dock-summary {
        width: auto;
        min-width: 0;
        min-height: 38px;
        justify-content: center;
        padding: 0 4px;
        cursor: pointer;
    }

    .compare-dock-summary strong {
        font-size: 12px;
    }

    .compare-dock-summary strong::after {
        content: "\2303";
        display: inline-block;
        margin-left: 6px;
        font-size: 11px;
        transform: translateY(2px);
        transition: transform .2s ease;
    }

    .tour-compare-dock.is-mobile-expanded .compare-dock-summary strong::after {
        transform: translateY(-1px) rotate(180deg);
    }

    .compare-dock-summary>span {
        display: none;
    }

    .compare-selected-trips {
        display: none;
    }

    .tour-compare-dock.is-mobile-expanded {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .tour-compare-dock.is-mobile-expanded .compare-selected-trips {
        grid-column: 1 / -1;
        display: flex;
        width: 100%;
        padding-top: 8px;
        border-top: 1px solid rgba(255, 255, 255, .2);
        overflow-x: auto;
        scrollbar-width: none;
    }

    .tour-compare-dock.is-mobile-expanded .compare-selected-trips::-webkit-scrollbar {
        display: none;
    }

    .compare-selected-chip {
        flex: 0 0 auto;
        width: min(142px, 43vw);
        max-width: none;
        padding-top: 5px;
        padding-bottom: 5px;
    }

    .compare-dock-actions {
        margin-left: auto;
    }

    .compare-clear,
    .compare-open {
        min-height: 38px;
        padding: 0 11px;
        font-size: 11px;
    }

    .compare-clear {
        width: 38px;
        padding: 0;
        overflow: hidden;
        font-size: 0;
    }

    .compare-clear::before {
        content: "\00d7";
        font-size: 22px;
        font-weight: 500;
        line-height: 1;
    }

    .compare-open {
        max-width: 116px;
        text-align: center;
        line-height: 1.15;
    }

    .tour-compare-page {
        padding: 26px 0 42px;
    }

    .tour-compare-page__header {
        margin-bottom: 18px;
    }

    .tour-compare-page__header h1 {
        font-size: 27px;
    }

    .compare-trip-card {
        display: block;
    }

    .compare-trip-card>img {
        height: 185px;
        min-height: 0;
    }

    .compare-trip-card h2,
    .compare-trip-card p {
        min-height: 0;
    }

    /* On phones each comparison subject becomes its own readable section.
       This avoids a desktop-width table leaving only a sliver of content visible. */
    .compare-table-wrap {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
        cursor: default;
    }

    .compare-table {
        display: block;
        width: 100%;
        min-width: 0 !important;
    }

    .compare-table > thead {
        display: none;
    }

    .compare-table > tbody,
    .compare-table > tbody > tr,
    .compare-table > tbody > tr > th,
    .compare-table > tbody > tr > td {
        display: block;
        width: 100% !important;
    }

    .compare-table > tbody {
        display: grid;
        gap: 14px;
    }

    .compare-table > tbody > tr {
        overflow: hidden;
        border: 1px solid #dbe5eb;
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 5px 18px rgba(4, 67, 111, .06);
    }

    .compare-table > tbody > tr > th:first-child {
        padding: 12px 14px;
        border: 0;
        color: #fff;
        background: #064f7d;
        font-size: 15px;
    }

    .compare-table > tbody > tr > td {
        padding: 13px 14px 16px;
        border-right: 0;
        border-bottom: 1px solid #e2e9ee;
        font-size: 13px;
        line-height: 1.6;
    }

    .compare-table > tbody > tr > td::before {
        content: attr(data-trip-name);
        display: block;
        margin-bottom: 9px;
        padding-bottom: 8px;
        border-bottom: 2px solid #e98a24;
        color: #06436f;
        font-size: 13px;
        font-weight: 800;
        line-height: 1.35;
    }

    .compare-table > tbody > tr > td:last-child {
        border-bottom: 0;
    }

    .compare-prices-wrap {
        overflow-x: auto;
    }

    .compare-prices-table {
        min-width: 420px;
    }
}

@media (max-width: 389.98px) {
    .compare-dock-summary>span {
        display: none;
    }

    .compare-clear,
    .compare-open {
        padding-right: 9px;
        padding-left: 9px;
    }
}
