/**
 * AT Filter System - 前端樣式
 * 行程篩選系統完整樣式表
 * 仿義大利旅遊範例設計
 */
/*
████████╗ █████╗ ██╗██╗    ██╗ █████╗ ███╗   ██╗
╚══██╔══╝██╔══██╗██║██║    ██║██╔══██╗████╗  ██║
   ██║   ███████║██║██║ █╗ ██║███████║██╔██╗ ██║
   ██║   ██╔══██║██║██║███╗██║██╔══██║██║╚██╗██║
   ██║   ██║  ██║██║╚███╔███╔╝██║  ██║██║ ╚████║
   ╚═╝   ╚═╝  ╚═╝╚═╝ ╚══╝╚══╝ ╚═╝  ╚═╝╚═╝  ╚═══╝
*/
/* ================================
   CSS 變數定義
   顏色變數由 AT Global Color Settings 統一輸出
   設定位置：外觀 > AT 配色設定
   ================================ */
:root {
    /* 陰影與圓角（這些變數保留在此） */
    --at-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --at-shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
    --at-radius: 8px;
    --at-radius-sm: 4px;

    /* 行程卡片圓角 */
    --at-card-radius: 80px;
    --at-card-radius-mobile: 50px;

    /* 動畫與間距 */
    --at-transition: 0.2s linear;
    --at-letter-spacing: 0.05em;

    /* Symbol G 邊距模式 (三邊圓角) */
    --at-symbol-g: 0.5rem 0.5rem 0 0.5rem;
}

/* ================================
   Filter Buttons 區塊 - 與網站 aside ul 一致的 Tab 風格
   ================================ */
.at-filter-buttons-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 0;
    margin-top: 0px;
    margin-bottom: 60px;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    list-style: none;
    width: 100%;
}

.at-filter-buttons-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    justify-content: center;
    align-items: center;
    padding: 0;
    width: 100%;
}

/* Row 1 - 全部行程獨立一行 */
.at-filter-buttons-row-row1 {
    margin-bottom: 10px;
}

/* 移除所有行的特殊樣式，統一處理 */
.at-filter-buttons-row1,
.at-filter-buttons-row2,
.at-filter-buttons-row3,
.at-filter-buttons-row4 {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

/* 各行標籤前的視覺標記（可選） */
.at-filter-buttons-row2::before,
.at-filter-buttons-row3::before,
.at-filter-buttons-row4::before {
    content: '';
    display: none;
}

/* 按鈕基本樣式 - 模擬 aside ul li a */
.at-filter-btn {
    font-family: "Noto Serif TC", serif;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 4px;
    line-height: 190%;
    color: var(--at-text-color);
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--at-border-color);
    border-radius: 0;
    padding: 10px 15px;
    min-width: 250px;
    text-align: center;
    cursor: pointer;
    position: relative;
    display: block;
    white-space: nowrap;
    box-shadow: none;
    transition: all 0.2s linear;
    -webkit-transition: all 0.2s linear;
}

/* Hover 底線動畫效果 - 模擬 aside li h4 a::after */
.at-filter-btn::after {
    content: "";
    position: absolute;
    display: block;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    -webkit-transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--at-primary-color);
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    -webkit-transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}



.at-filter-btn:hover::after {
    width: 100%;
}

.at-filter-btn:hover {
    color: var(--at-text-color);
    background: transparent;
    transform: none;
    box-shadow: none;
    border-bottom-color: transparent;
}

/* Active 狀態 - 模擬 aside .action h4 a */
.at-filter-btn.active {
    color: var(--at-primary-color);
    background: transparent;
    border-bottom: 1px solid var(--at-border-color);
    box-shadow: none;
}

.at-filter-btn.active::after {
    width: 100%;
}

.at-filter-btn.active:hover {
    color: var(--at-primary-color);
    background: transparent;
}

/* 移除第一行的特殊樣式 */
.at-filter-buttons-row1 .at-filter-btn {
    background: transparent;
    color: var(--at-text-color);
    border-color: transparent;
    border-bottom: 1px solid var(--at-border-color);
    font-size: 18px;
    font-weight: 500;
    padding: 10px 15px;
}

.at-filter-buttons-row1 .at-filter-btn:hover {
    background: transparent;
    color: var(--at-text-color);
}

.at-filter-buttons-row1 .at-filter-btn.active {
    color: var(--at-primary-color);
}

/* 行程分類群組樣式 */
.at-filter-buttons-row2,
.at-filter-buttons-row3,
.at-filter-buttons-row4 {
    position: relative;
}

/* 分隔線效果 - 各行之間 */
.at-filter-buttons-row2 {
    padding-top: 0;
}

/* RWD - 手機版 */
@media (max-width: 768px) {
    .at-filter-buttons-wrapper {
        padding: 0;
        border-radius: 0;
        overflow-x: visible;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 30px;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        flex-direction: row;
    }

    /* Row 1 保持獨立行 */
    .at-filter-buttons-row1 {
        width: 100%;
        display: flex;
        justify-content: center;
        margin-bottom: 5px;
        flex-direction: row;
    }

    .at-filter-buttons-row1 .at-filter-btn {
        width: auto !important;
        min-width: 120px;
        text-align: center;
        padding: 10px 20px;
        font-size: 15px;
        letter-spacing: 2px;
        display: inline-block;
    }

    /* Row2, Row3, Row4 使用 display: contents 讓按鈕脫離容器限制 */
    .at-filter-buttons-row2,
    .at-filter-buttons-row3,
    .at-filter-buttons-row4 {
        display: contents;
    }

    /* 所有非 Row1 的按鈕 - 一排 3 個 */
    .at-filter-buttons-row2 .at-filter-btn,
    .at-filter-buttons-row3 .at-filter-btn,
    .at-filter-buttons-row4 .at-filter-btn {
        padding: 8px 6px !important;
        font-size: 16px !important;
        min-width: auto !important;
        width: 30% !important;
        max-width: 30%;
        letter-spacing: 0.5px;
        box-sizing: border-box;
        text-align: center;
        margin: 2px !important;
        display: inline-block;
        flex: 0 0 30%;
    }
}

/* ================================
   進階搜尋觸發按鈕 - 圓角搜尋框風格
   ================================ */
.at-advanced-search-trigger-wrapper {
    padding: 0 0 80px;
    width: 100%;
}

.at-advanced-search-trigger {
    position: relative;
    width: 344px;
    margin: 0 auto;
    cursor: pointer;
}

.at-advanced-search-trigger input {
    width: 100%;
    height: 50px;
    border-radius: 25px;
    border: 0;
    padding-left: 25px;
    padding-right: 50px;
    font-size: 15px;
    font-family: "Noto Sans TC", "SF Pro TC", "SF Pro Text", "SF Pro Icons", "PingFang TC", "微軟正黑體", sans-serif;
    color: var(--at-text-light);
    background: var(--at-bg-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    pointer-events: none;
    outline: 0;
    appearance: none;
    -webkit-appearance: none;
    letter-spacing: var(--at-letter-spacing);
    line-height: 1.5;
}

.at-advanced-search-trigger input::placeholder {
    color: var(--at-text-grey);
}

.at-advanced-search-trigger .at-search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--at-text-light);
    text-decoration: none;
}

.at-advanced-search-trigger .at-search-btn svg {
    width: 13px;
    height: 13px;
    stroke: var(--at-text-light);
}

.at-advanced-search-trigger:hover {
    opacity: 0.9;
}

.at-advanced-search-trigger:hover input {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    clip-path: inset(50%);
    border: 0;
}

.at-filter-count {
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--at-primary-color);
    color: var(--at-bg-white);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* 已選擇的篩選條件標籤區塊 */
.at-active-filters {
    display: flex;
    justify-content: center;
    padding: 20px 0 0;
    width: 100%;
}

.at-active-filters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    max-width: 800px;
}

.at-active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--at-bg-white);
    border: 1px solid var(--at-border-color);
    border-radius: 6px;
    font-size: 14px;
    color: var(--at-text-color);
    transition: all var(--at-transition);
}

.at-active-filter-tag:hover {
    border-color: var(--at-primary-color);
}

.at-active-filter-tag .tag-label {
    white-space: nowrap;
}

.at-active-filter-tag .tag-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #999;
    font-size: 18px;
    line-height: 1;
    transition: color var(--at-transition);
}

.at-active-filter-tag .tag-remove:hover {
    color: #d4453b;
}

/* RWD - 手機版 */
@media (max-width: 768px) {
    .at-active-filters {
        padding: 15px 0 0;
    }

    .at-active-filters-list {
        gap: 8px;
        padding: 0 15px;
    }

    .at-active-filter-tag {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* RWD - 桌面版 */
@media (min-width: 996px) {
    .at-advanced-search-trigger {
        width: 474px;
        margin: 12px auto 0;
    }

    .at-advanced-search-trigger input {
        height: 57px;
        border-radius: 28.5px;
        padding-left: 28.5px;
        font-size: 16px;
    }

    .at-advanced-search-trigger .at-search-btn {
        width: 41px;
        height: 41px;
    }

    .at-advanced-search-trigger .at-search-btn svg {
        width: 15px;
        height: 15px;
    }
}

/* ================================
   側邊搜尋面板 - 遮罩
   ================================ */
.at-search-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all var(--at-transition);
}

.at-search-panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ================================
   側邊搜尋面板 - 主體
   ================================ */
.at-search-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 90%;
    max-width: 1100px;
    height: 70vh;
    background: var(--at-bg-white);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: transform var(--at-transition), opacity var(--at-transition), visibility var(--at-transition);
    box-shadow: var(--at-shadow-lg);
    border-radius: 16px;
    overflow: hidden;
}

.at-search-panel.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
}

.at-search-panel-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 70vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* 面板標題 */
.at-search-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 0px solid var(--at-border-color);
    background: #f1edea00;
    position: static;
    /* 不使用 fixed/sticky，隨內容捲動 */
}

.at-search-panel-header h2 {
    margin: 0;
    font-size: 20px;
    color: #b8a596;
}

.at-search-panel-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--at-text-light);
    transition: color var(--at-transition);
}

.at-search-panel-close:hover {
    color: var(--at-primary-color);
}

/* 面板內容區 */
.at-search-panel-content {
    flex: 1;
    padding: 24px;
    /* overflow-y 移到 inner，讓 header 也能捲動 */
}

/* 搜尋區塊 */
.at-search-section {
    margin-bottom: 0;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--at-border-color);
}

.at-search-section+.at-search-section {
    padding-top: 28px;
}

.at-search-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.at-search-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 600;
    color: var(--at-text-color);
}

.at-section-icon {
    font-size: 18px;
}



/* 關鍵字輸入框 */
.at-search-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--at-border-color);
    border-radius: var(--at-radius);
    font-size: 15px;
    transition: border-color var(--at-transition);
}

.at-search-input:focus {
    outline: none;
    border-color: var(--at-primary-color);
}

/* 熱搜標籤 - 與搜尋框同一區塊 */
.at-recommend-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    margin-top: 12px;
    margin-bottom: 0;
}

.at-hot-search-label {
    color: var(--at-text-grey);
    font-size: 15px;
    margin-right: 12px;
    white-space: nowrap;
}

.at-recommend-tag {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.at-recommend-tag input[type="checkbox"] {
    display: none;
}

.at-tag-label {
    padding: 4px 0;
    background: transparent;
    border: none;
    border-radius: 0;
    font-size: 15px;
    color: #C9A050;
    transition: all var(--at-transition);
}

.at-tag-separator {
    color: #C9A050;
    padding: 0 12px;
    font-size: 14px;
}

.at-recommend-tag:hover .at-tag-label {
    color: #b8903a;
    text-decoration: underline;
}

.at-recommend-tag input[type="checkbox"]:checked+.at-tag-label {
    color: #b8903a;
    font-weight: 600;
}

/* 月份選擇器（保留舊樣式以防萬一） */
.at-month-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.at-month-btn {
    padding: 8px 16px;
    background: var(--at-bg-light);
    border: 2px solid var(--at-border-color);
    border-radius: var(--at-radius-sm);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--at-transition);
}

.at-month-btn:hover {
    border-color: var(--at-primary-color);
}

.at-month-btn.active {
    background: var(--at-primary-color);
    border-color: var(--at-primary-color);
    color: var(--at-bg-white);
}

/* ================================
   日期區間選擇器
   ================================ */
.at-date-range-picker {
    position: relative;
    width: 100%;
}

.at-date-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.at-date-input {
    width: 100%;
    padding: 12px 45px 12px 16px;
    border: 1px solid var(--at-border-color);
    border-radius: var(--at-radius);
    font-size: 15px;
    color: var(--at-text-color);
    background: var(--at-bg-white);
    cursor: pointer;
    transition: border-color var(--at-transition);
}

.at-date-input:hover,
.at-date-input:focus {
    border-color: var(--at-primary-color);
    outline: none;
}

.at-date-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--at-text-grey);
    pointer-events: none;
}

/* 日曆區塊 - 直接顯示 */
.at-calendar-dropdown {
    display: block;
    position: relative;
    top: 0;
    left: 0;
    z-index: 1;
    background: var(--at-bg-light);
    border: none;
    border-radius: var(--at-radius);
    box-shadow: none;
    padding: 20px;
    margin-top: 12px;
}

/* 出發/回程標籤 */
.at-date-tabs {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 0;
    border-bottom: none;
}

.at-date-tab {
    padding: 10px 24px;
    background: var(--at-bg-white);
    border: 1px solid var(--at-border-color);
    border-radius: var(--at-radius);
    font-size: 14px;
    color: var(--at-text-color);
    cursor: pointer;
    transition: all var(--at-transition);
}

.at-date-tab:hover {
    border-color: var(--at-primary-color);
}

.at-date-tab.active {
    background: var(--at-bg-white);
    border-color: var(--at-text-color);
    font-weight: 500;
    color: #000000 !important;
}

.at-date-tab-arrow {
    color: var(--at-text-grey);
    font-size: 18px;
}

/* 雙月曆容器 */
.at-calendars-container {
    display: flex;
    gap: 40px;
}

.at-calendar {
    flex: 1;
    min-width: 280px;
    background: transparent;
}

/* 月曆標題 */
.at-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.at-calendar-title {
    font-size: 15px;
    font-weight: 400;
    color: var(--at-text-color);
    flex: 1;
    text-align: center;
}

.at-calendar-nav {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--at-text-grey);
    cursor: pointer;
    font-size: 16px;
    transition: color var(--at-transition);
}

.at-calendar-nav:hover {
    color: var(--at-text-color);
}

.at-calendar-nav-spacer {
    width: 32px;
}

/* 星期標題 */
.at-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
    margin-bottom: 4px;
}

.at-calendar-weekdays span {
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: var(--at-text-color);
    padding: 10px 0;
}

/* 日期格子 */
.at-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
}

.at-calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--at-text-color);
    background: transparent;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: all var(--at-transition);
    padding: 8px;
    min-height: 40px;
}

.at-calendar-day:hover:not(.disabled):not(.empty) {
    background: rgba(0, 0, 0, 0.05);
}

.at-calendar-day.empty {
    cursor: default;
}

.at-calendar-day.disabled {
    color: #aaa;
    cursor: default;
}

.at-calendar-day.today {
    background: #9a8a7a;
    color: var(--at-bg-white);
    font-weight: 500;
}

.at-calendar-day.selected {
    background: var(--at-primary-color);
    color: var(--at-bg-white);
}

.at-calendar-day.in-range {
    background: rgba(184, 165, 150, 0.3);
}

.at-calendar-day.range-start,
.at-calendar-day.range-end {
    background: var(--at-primary-color);
    color: var(--at-bg-white);
}

/* 國家地區選擇 */
.at-destination-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
}

@media (max-width: 768px) {
    .at-destination-columns {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 20px;
        -webkit-overflow-scrolling: touch;
        gap: 15px;
    }

    .at-destination-column {
        min-width: 280px;
        /* Adjust as needed for mobile card width */
        flex: 0 0 auto;
    }
}

.at-destination-column {
    background: transparent;
    border-radius: var(--at-radius);
    padding: 0;
    min-width: 150px;
    flex-shrink: 0;
}

/* 中國深度遊佔左側一整欄 - 在 Flex 模式下不再需要 span */


.at-destination-group-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-bottom: 12px;
}

.at-destination-group-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--at-primary-color);
    margin: 0;
}

.at-destination-group-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--at-secondary-color);
    padding-bottom: 0;
    border-bottom: none;
    white-space: nowrap;
    line-height: 1;
}

.at-destination-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.at-destination-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    padding: 4px 0;
    border-radius: var(--at-radius-sm);
    transition: background var(--at-transition);
}

.at-destination-checkbox:hover {
    background: transparent;
}

.at-destination-checkbox input[type="checkbox"] {
    margin-top: 5px;
    width: 18px;
    height: 18px;
    accent-color: var(--at-primary-color);
}

.at-checkbox-label {
    flex: 1;
}

.at-destination-name {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: var(--at-text-color);
    white-space: nowrap;
}

.at-destination-desc {
    display: block;
    font-size: 12px;
    color: var(--at-text-light);
    margin-top: 2px;
}

/* 面板底部按鈕 */
.at-search-panel-footer {
    display: flex;
    gap: 16px;
    padding: 20px 24px;
    border-top: 1px solid var(--at-border-color);
    background: var(--at-bg-light);
}

.at-btn-clear,
.at-btn-apply {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: var(--at-radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--at-transition);
}

.at-btn-clear {
    background: var(--at-bg-white);
    border: 2px solid var(--at-border-color);
    color: var(--at-text-color);
}

.at-btn-clear:hover {
    border-color: #d4453b00;
    color: #ffffff9c;
}

.at-btn-apply {
    background: var(--at-primary-color);
    color: var(--at-bg-white);
}

.at-btn-apply:hover {
    background: var(--at-primary-hover);
}

.at-apply-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

/* ================================
   行程列表 - 卡片式設計（仿義大利旅遊網站）
   ================================ */
.at-trip-list-wrapper {
    background: transparent;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    padding: 0 25px;
}

/* 隱藏表頭 - 卡片式不需要 */
.at-trip-list-header {
    display: none;
}

/* 行程列表容器 - 卡片網格 */
.at-trip-list-content {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 200px;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ================================
   滾動觸發動畫
   ================================ */
.at-filter-trip-item.left-in {
    transform: translateX(-50px);
    opacity: 0;
    transition: transform 0.7s ease-out, opacity 0.7s ease-out;
}

.at-filter-trip-item.right-in {
    transform: translateX(50px);
    opacity: 0;
    transition: transform 0.7s ease-out, opacity 0.7s ease-out;
}

.at-filter-trip-item.act {
    transform: translateX(0) !important;
    opacity: 1 !important;
}

/* ================================
   行程卡片項目 - 仿義大利旅遊範例
   ================================ */
.at-filter-trip-item {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: flex-start;
    gap: 90px;
    padding: 0;
    margin: 0 auto 100px auto;
    border-bottom: none;
    background: transparent;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    position: relative;
    max-width: 1280px;
    width: 100%;
}

.at-filter-trip-item:hover {
    background: transparent;
}

/* 偶數項目 - 圖片在右邊 */
.at-filter-trip-item:nth-child(even) {
    flex-direction: row-reverse;
}

/* 左側圖片區域 - .cover - 50%
   使用 CSS 變數統一管理圓角，確保任何尺寸圖片都能正確裁切 */
.at-filter-trip-cover {
    position: relative;
    width: 50%;
    min-width: 50%;
    aspect-ratio: 16 / 10;
    flex-shrink: 0;
    align-self: flex-start; /* 固定高度，不隨內容區域拉伸 */
    z-index: 1;
    overflow: hidden;
    border-radius: var(--at-card-radius);
    /* 背景色：防止圖片未完全覆蓋時露出 */
    background-color: #f5f5f5;
    /* 解決 Safari transform + border-radius + overflow 的 bug */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    isolation: isolate;
}

.at-filter-trip-cover a {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.at-filter-trip-cover img,
.elementor .at-filter-trip-cover img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    transition: transform 0.5s ease;
    display: block;
    border-radius: 0 !important;
    max-width: none !important;
}

/* 偶數項目 - 圖片在右邊（圓角一致，無需額外設定） */

.at-filter-trip-item:hover .at-filter-trip-cover img {
    transform: scale(1.05);
}

/* 圖片遮罩效果 - coverMask */
.at-filter-trip-cover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(201, 168, 108, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* 右側內容區域 - .content - 50% */
.at-filter-trip-content {
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px 30px;
    border-bottom: none;
    margin-bottom: 0;
    z-index: 1;
    position: relative;
    background: transparent;
}

/* 內容頭部 - .conHead */
.at-filter-trip-info {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 0;
}

/* 標題行 - 標題 + 收藏 */
.at-filter-trip-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

/* 標籤區域 */
.at-filter-trip-tags {
    display: none;
}

.at-filter-note-badge {
    display: inline-block;
    padding: 3px 10px;
    background: var(--at-gold);
    color: var(--at-bg-white);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: var(--at-letter-spacing);
    border-radius: var(--at-symbol-g);
}

.at-filter-note-badge.badge-hot {
    background: var(--at-danger-color);
}

.at-filter-note-badge.badge-confirm {
    background: var(--at-success-color);
}

.at-filter-note-badge.badge-discount {
    background: var(--at-gold);
}

/* 行程標題 - fontTitle2028 */
.at-filter-trip-title {
    margin: 0 0 8px 0;
    padding-right: 0;
}

.at-filter-trip-title a {
    font-family: "Noto Serif TC", "Noto Sans TC", "Noto Sans CJK TC", serif;
    font-size: 28px;
    font-weight: bold;
    line-height: 38px;
    letter-spacing: 0.1em;
    color: var(--at-primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.at-filter-trip-title a:hover {
    color: var(--at-secondary-color);
}

/* 副標題 */
.at-filter-trip-subtitle {
    font-size: 15px;
    color: var(--at-text-light);
    margin-bottom: 25px;
    letter-spacing: 0.08em;
}

.at-filter-trip-subtitle .subtitle-text {
    background-color: transparent;
    color: var(--at-text-light);
    padding: 0;
    border-radius: 0;
    font-weight: 400;
    display: inline-block;
}

/* 收藏按鈕 - 放在右上角 */
.at-filter-trip-info .at-filter-btn-favorite-top {
    position: absolute;
    top: 10px;
    right: 0;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--at-text-light);
    transition: color 0.3s ease;
}

.at-filter-trip-info .at-filter-btn-favorite-top:hover {
    color: var(--at-gold);
}

/* 熱門團體區塊 - .hotGroup */
.at-filter-trip-hotgroup {
    background: transparent;
    padding: 0;
    margin-bottom: 0;
    border-radius: 0;
    margin-top: 10px;
}

.at-filter-trip-hotgroup-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 35px;
}

.at-filter-trip-hotgroup-head p {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--at-primary-color);
    letter-spacing: 0.08em;
}

.at-filter-trip-hotgroup-head .text-link {
    font-size: 13px;
    color: var(--at-gold);
    text-decoration: none;
    display: none;
    align-items: center;
    gap: 5px;
}

.at-filter-trip-hotgroup-head .text-link:hover {
    color: #e0c48a;
    text-decoration: underline;
}

.at-filter-trip-hotgroup-head .text-link::after {
    content: '→';
}

/* 日期列表 - .dateList - 2欄排列 */
.at-filter-trip-dates {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 0;
    max-width: 420px;
}

.at-filter-date-btn {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: auto;
    min-height: 44px;
    padding: 10px 15px;
    background-color: var(--at-bg-white);
    border: 1px solid var(--at-primary-color);
    border-radius: 10px;
    font-size: 14px;
    color: var(--at-primary-color);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.at-filter-date-btn:hover {
    border-color: var(--at-gold);
    color: var(--at-gold);
}

.at-filter-date-btn .date {
    font-weight: 800;
    letter-spacing: 0.05em;
}

.at-filter-date-btn .oneTag {
    font-size: 14px;
    /* color 由 inline style 控制（後端設定） */
    margin-left: auto;
    padding-left: 10px;
    display: block;
    text-align: right;
    font-weight: 500;
}

/* 淡化樣式 (dimmed) - 例如：已額滿 */
.at-filter-date-btn.is-dimmed {
    opacity: 0.6;
    border-color: #999;
    color: #999;
}

/* 強調樣式 (highlight) - 例如：確定出團、即將額滿 */
.at-filter-date-btn.is-highlight {
    border-color: var(--status-color, var(--at-gold));
}

/* 一般樣式 (normal) */
.at-filter-date-btn.is-normal {
    /* 保持預設樣式 */
}

/* 狀態顏色由後端設定控制，不再硬編碼 */

/* 航空公司標籤 - 隱藏 */
.at-filter-trip-airline {
    display: none;
}

/* 內容下半部 - .conFoot */
.at-filter-trip-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: nowrap;
    margin-top: 30px;
    padding-top: 0;
    border-top: none;
}

/* 價格區域 - .price */
.at-filter-trip-price {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 0;
    text-align: left;
}

.at-filter-price-label {
    font-size: 1em !important;
    color: var(--at-primary-color) !important;
    margin-right: 0;
    font-weight: 400;
}

.at-filter-price-amount {
    font-family: "Noto Serif TC", "Noto Sans TC", "Noto Sans CJK TC", serif;
    font-size: 2.5rem;
    font-weight: 500;
    color: var(--at-primary-color) !important;
    letter-spacing: 0.02em;
    line-height: 1;
}

.at-filter-price-amount .digi {
    font-size: 2.5rem;
}

.at-filter-price-suffix {
    font-size: 1em !important;
    font-weight: 400;
    color: var(--at-primary-color) !important;
    margin-left: 0;
}

.at-filter-price-original {
    font-size: 14px;
    color: var(--at-text-grey);
    text-decoration: line-through;
    margin-right: 8px;
}

/* 按鈕區域 - .aCell */
.at-filter-trip-actions {
    display: flex;
    align-items: center;
    gap: 0;
}

/* 收藏按鈕 - .add2Favorite - 移到標題旁 */
.at-filter-btn-favorite {
    display: none;
}

.at-filter-btn-favorite:hover {
    border-color: var(--at-gold);
    color: var(--at-gold);
}

.at-filter-btn-favorite.active {
    background: var(--at-gold);
    border-color: var(--at-gold);
    color: var(--at-bg-white);
}

.at-filter-btn-favorite.active svg {
    fill: var(--at-bg-white);
}

/* 查看行程按鈕 - 深藍主色 */
.at-filter-btn-detail {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 24px;
    background: var(--at-primary-color);
    border: 1px solid var(--at-primary-color);
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.at-filter-btn-detail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--at-gold);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: -1;
}

.at-filter-btn-detail:hover::before {
    transform: translateX(0);
}

.at-filter-btn-detail:hover {
    color: #1a1a1a;
}

/* 載入中 */
.at-filter-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--at-text-light);
}

.at-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--at-border-color);
    border-top-color: var(--at-primary-color);
    border-radius: 50%;
    animation: at-spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes at-spin {
    to {
        transform: rotate(360deg);
    }
}

/* 無結果 */
.at-filter-no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--at-text-light);
}

.at-filter-no-results p {
    margin: 0;
    font-size: 16px;
}

/* 載入更多 */
.at-trip-list-footer {
    padding: 20px;
    text-align: center;
    border-top: 1px solid var(--at-border-color);
}

.at-filter-load-more {
    padding: 12px 32px;
    background: var(--at-primary-color);
    border: 2px solid var(--at-primary-color);
    border-radius: var(--at-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--at-transition);
    color: #ffffff;
}

.at-filter-load-more:hover {
    border-color: var(--at-primary-color);
    color: #ffffff;
    background-color: var(--at-primary-color);
    opacity: 0.9;
}

/* ================================
   響應式設計
   ================================ */
@media (max-width: 1024px) {
    .at-search-panel {
        width: 90%;
    }

    .at-destination-columns {
        grid-template-columns: 1fr;
    }

    .at-destination-column[data-parent="china-depth"] {
        grid-row: auto;
    }
}

@media (max-width: 768px) {

    /* Filter Buttons */
    .at-filter-buttons-row {
        justify-content: center;
        overflow-x: visible;
        flex-wrap: wrap;
        padding-bottom: 8px;
        gap: 8px;
    }

    /* 第一行「全部行程」單獨置中 */
    .at-filter-buttons-row1 {
        justify-content: center;
    }

    /* 其他行按鈕每行3個置中排列 */
    .at-filter-buttons-row2,
    .at-filter-buttons-row3,
    .at-filter-buttons-row4 {
        justify-content: center;
    }

    .at-filter-btn {
        flex-shrink: 0;
        padding: 8px 12px;
        font-size: 16px;
        /* User Request: 16px */
        flex: 0 0 calc(33.33% - 6px);
        max-width: calc(33.33% - 6px);
        text-align: center;
        box-sizing: border-box;
    }

    /* 第一行按鈕保持原本大小 */
    .at-filter-buttons-row1 .at-filter-btn {
        flex: 0 0 auto;
        max-width: none;
        padding: 10px 20px;
    }

    /* 搜尋面板 */
    .at-search-panel {
        width: 95%;
    }

    .at-search-panel-content {
        padding: 16px;
    }

    /* 行程卡片 - 手機版垂直排列 */
    .at-filter-trip-item {
        flex-direction: column !important;
        max-width: 100%;
        gap: 0;
        margin-bottom: 40px;
    }

    /* 手機版偶數項也使用垂直排列（覆蓋 row-reverse） */
    .at-filter-trip-item:nth-child(even) {
        flex-direction: column !important;
    }

    .at-filter-trip-cover,
    .at-filter-trip-item:nth-child(even) .at-filter-trip-cover {
        width: 100%;
        min-width: 100%;
        aspect-ratio: 16 / 9;
        border-radius: var(--at-card-radius-mobile);
    }

    .at-filter-trip-content {
        width: 100% !important;
        padding: 25px 10px;
        border: none;
        border-bottom: none;
        margin-bottom: 0;
        display: flex !important;
        flex-direction: column !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: auto !important;
        overflow: visible !important;
    }

    .at-filter-trip-info {
        display: flex !important;
        flex-direction: column !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .at-filter-trip-title {
        padding-right: 0px;
        display: flex !important;
        justify-content: center;
        align-items: center;
    }

    .at-filter-trip-title a {
        font-size: 20px;
        line-height: 28px;
    }

    .at-filter-trip-subtitle {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .at-filter-trip-hotgroup {
        padding: 0;
    }

    .at-filter-trip-hotgroup-head {
        justify-content: center;
        align-items: center;
    }

    .at-filter-trip-dates {
        grid-template-columns: 1fr;
        gap: 8px;
        max-width: 100%;
    }

    .at-filter-date-btn {
        padding: 10px 14px;
        font-size: 13px;
    }

    .at-filter-trip-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        margin-top: 25px;
    }

    .at-filter-trip-price {
        justify-content: center;
        align-items: center;
    }

    .at-filter-price-value {
        font-size: 24px;
        line-height: 1.2;
    }

    .at-filter-price-suffix {
        font-size: 12px;
        align-self: center;
        margin-top: 0;
        margin-left: 0;
    }

    .at-filter-price-label {
        font-size: 12px;
        margin-right: 0;
        margin-bottom: 2px;
        align-self: center;
        margin-top: 0;
    }

    /* 價格容器手機版佈局 - 與電腦版相同 (橫向排列) */
    .at-filter-trip-price {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: baseline;
        justify-content: center;
        width: 100%;
        gap: 0;
    }

    .at-filter-price-amount {
        order: unset;
        width: auto;
        text-align: center;
        font-size: 28px;
        margin-bottom: 0;
    }

    .at-filter-price-label {
        order: unset;
        font-size: 14px;
        margin-right: 0;
        align-self: baseline;
        color: #b8a596 !important;
    }

    .at-filter-price-suffix {
        order: unset;
        font-size: 14px;
        margin-left: 0;
        align-self: baseline;
        color: #b8a596 !important;
    }

    /* 確保手機版價格上方沒有額外間距 */
    .at-filter-trip-footer {
        margin-top: 20px;
    }

    /* 手機版無出團日期樣式 */
    .at-filter-no-dates {
        font-size: 20px;
        margin-top: 0;
        text-align: center;
    }

    .at-filter-trip-actions {
        justify-content: stretch;
    }

    .at-filter-btn-detail {
        flex: 1;
        justify-content: center;
        padding: 12px 24px;
    }

    /* 動畫調整 - 手機版統一從下方進入 */
    .at-filter-trip-item.left-in,
    .at-filter-trip-item.right-in {
        transform: translateY(30px);
    }

    .at-filter-trip-item.act {
        transform: translateY(0) !important;
    }
}

@media (max-width: 480px) {
    .at-filter-buttons-row1 .at-filter-btn {
        min-width: 150px;
        font-size: 14px;
    }

    .at-recommend-tags {
        gap: 0;
    }

    .at-hot-search-label {
        font-size: 14px;
        margin-right: 8px;
    }

    .at-tag-label {
        padding: 4px 0;
        font-size: 13px;
    }

    .at-tag-separator {
        padding: 0 8px;
        font-size: 13px;
    }

    .at-month-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* 響應式日曆樣式 */
@media (max-width: 768px) {
    .at-calendar-dropdown {
        min-width: auto;
        width: calc(100vw - 40px);
        max-width: 100%;
        left: 50%;
        transform: translateX(-50%);
        padding: 16px;
    }

    .at-calendars-container {
        flex-direction: column;
        gap: 20px;
    }

    .at-calendar {
        min-width: auto;
        width: 100%;
    }

    .at-date-tabs {
        flex-wrap: wrap;
        gap: 8px;
    }

    .at-date-tab {
        padding: 6px 16px;
        font-size: 13px;
    }
}

/* Hide favorite button in trip info */
.at-filter-trip-info .at-filter-btn-favorite-top {
    display: none;
}

/* Adjust swiper button position to be visually centered on the image (4/3 ratio)
   instead of the whole container which includes text below */
.tourItinerary .photoSwiper .swiper-button-prev,
.tourItinerary .photoSwiper .swiper-button-next {
    position: absolute;
    top: 36%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: 0;
}

.at-review-rating {
    display: none;
}

.at-reviews-section {
    background: linear-gradient(to bottom, #9fc934, #0883c4);
}

.at-filter-no-dates {
    display: flex;
    max-width: 100%;
    width: 100%;
    font-size: 28px;
    color: #999;
    text-align: left;
    margin-top: 20px;
    line-height: 1.4;
    white-space: nowrap;
}

.at-filter-trip-title a {
    color: #0883c4;
}