/* Card base */
.tour-card {
    display: flex;
    flex-direction: column;
    background-color: var(--light-00);
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    max-width: 360px;
    width: 100%;
}

/* Header imagen */
.tour-card-header {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.tour-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Body */
.tour-card-body {
    flex: 1;
}

/* Tags */
.tour-tags-row {
    position: absolute;
    top: 16px;
    left: 16px;
}

.tour-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 9999px;
    font-family: 'Work Sans';
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
}

.tour-tag-green {
    background-color: #39b86b;
}

.tour-tag-orange {
    background-color: #ff8b5b;
}

.tour-tag-soft {
    background-color: #ffd9aa;
    color: #8b4a16;
}

/* Pills (duración / grupo) */
.tour-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 9999px;
    border: 1px solid var(--light-20);
    background-color: var(--light-00);
    white-space: nowrap;
}

.tour-pill-icon {
    font-size: 14px;
}

/* Precios */
.tour-price-main {
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-family: 'Work Sans';
}

.tour-price-currency {
    font-size: 14px;
    font-weight: 600;
}

.tour-price-amount {
    font-size: 24px;
    font-weight: 600;
}

.tour-price-main-sale .tour-price-amount {
    color: #e4553f;
}

.tour-price-old {
    font-size: 14px;
    color: var(--dark-30);
    text-decoration: line-through;
    margin-left: 8px;
}

/* Botones derecha */
.tour-icon-button {
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    border: 1px solid var(--blue-80);
    background-color: var(--light-00);
    color: var(--blue-80);
    font-size: 22px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.tour-cta-button {
    border-radius: 9999px;
    border: none;
    padding: 10px 20px;
    background-color: #e86a46;
    color: var(--light-00);
    font-family: 'Work Sans';
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

/* Responsive suave */
@media screen and (max-width: 964px) {
    .tour-card {
        max-width: 100%;
    }
}

/* Y/W view-specific adjustments */

/* Keep ports scrollbar always visible only on itinerary rows used by these views */
#ports-scroll-main.ports-scroll {
    scrollbar-width: thin;
    overflow-x: scroll;
    overflow-y: hidden;
}

/* Itinerary ports visual states:
   - Available ports: blue card
   - Active port: emphasized with stronger blue
   - At Sea cards remain unchanged (.card-port--small) */
#ports-scroll-main [model="card-port"].card-port--default.pointer {
    border-width: 1px;
    border-style: solid;
    border-color: var(--blue-70);
}

#ports-scroll-main [model="card-port"].card-port--default.pointer>div:first-child {
    background-color: var(--light-00);
}

#ports-scroll-main [model="card-port"].card-port--default.pointer>div:last-child {
    background-color: var(--light-10);
}

#ports-scroll-main [model="card-port"].card-port--default.pointer p,
#ports-scroll-main [model="card-port"].card-port--default.pointer span {
    color: var(--blue-70);
}

#ports-scroll-main [model="card-port"].card-port--default.pointer[data-status="active"]>div:first-child {
    background-color: var(--blue-70);
}

#ports-scroll-main [model="card-port"].card-port--default.pointer[data-status="active"]>div:last-child {
    background-color: var(--blue-80);
}

#ports-scroll-main [model="card-port"].card-port--default.pointer[data-status="active"] p,
#ports-scroll-main [model="card-port"].card-port--default.pointer[data-status="active"] span {
    color: var(--light-00);
}

/* Limit thumbs to 3 on these cards */
.gallery-thumb .tour-thumb:nth-of-type(n + 4) {
    display: none !important;
}

/* Avoid stretched cards on desktop when there are <4 visible tours */
@media (min-width: 965px) {
    #tours.tours-compact-desktop .card-clickable {
        flex: 0 0 410px;
        width: 410px;
        max-width: 410px;
    }
}

/* Prevent long pill labels from stretching cards horizontally */
.card-clickable .flex-row.wrap.min-w-0 {
    min-width: 0;
    max-width: 100%;
}

.card-clickable .flex-row.wrap.min-w-0 .pill-outline {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
}

.card-clickable .flex-row.wrap.min-w-0 .pill-outline .f1 {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}
