/* ============================================================
   新途旅行 - 设计系统
   ============================================================ */

/* ------ 设计令牌 (Design Tokens) ------ */
:root {
    /* 品牌色 */
    --ota-primary: #f97316;
    --ota-primary-dark: #ea580c;
    --ota-primary-light: #ffedd5;
    --ota-primary-lighter: #fff7ed;

    /* 强调色 */
    --ota-accent: #f59e0b;
    --ota-accent-dark: #d97706;
    --ota-accent-light: #fef3c7;

    /* 语义色 */
    --ota-danger: #ef4444;
    --ota-success: #10b981;
    --ota-warning: #f59e0b;
    --ota-info: #3b82f6;

    /* 中性色 */
    --ota-dark: #0f172a;
    --ota-gray-900: #1e293b;
    --ota-gray-700: #334155;
    --ota-gray-500: #64748b;
    --ota-gray-400: #94a3b8;
    --ota-gray-300: #cbd5e1;
    --ota-gray-200: #e2e8f0;
    --ota-gray-100: #f1f5f9;
    --ota-gray-50: #f8fafc;
    --ota-white: #ffffff;

    /* 字体 */
    --ota-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;

    /* 圆角 */
    --ota-radius-sm: 8px;
    --ota-radius-md: 12px;
    --ota-radius-lg: 16px;
    --ota-radius-full: 9999px;

    /* 阴影 */
    --ota-shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --ota-shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --ota-shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --ota-shadow-hover: 0 12px 36px rgba(0,0,0,0.15);

    /* 过渡 */
    --ota-transition: all 0.3s ease;
    --ota-transition-fast: all 0.15s ease;
}

/* ------ Bootstrap Primary 色覆盖 ------ */
:root {
    --bs-primary: #f97316;
    --bs-primary-rgb: 249, 115, 22;
    --bs-link-color: #f97316;
    --bs-link-hover-color: #ea580c;
    --bs-link-color-rgb: 249, 115, 22;
    --bs-link-hover-color-rgb: 234, 88, 12;
}
.btn-primary {
    --bs-btn-bg: #f97316;
    --bs-btn-border-color: #f97316;
    --bs-btn-hover-bg: #ea580c;
    --bs-btn-hover-border-color: #ea580c;
    --bs-btn-active-bg: #c2410c;
    --bs-btn-active-border-color: #c2410c;
    --bs-btn-disabled-bg: #f97316;
    --bs-btn-disabled-border-color: #f97316;
    --bs-btn-focus-shadow-rgb: 249, 115, 22;
}
.btn-outline-primary {
    --bs-btn-color: #f97316;
    --bs-btn-border-color: #f97316;
    --bs-btn-hover-bg: #f97316;
    --bs-btn-hover-border-color: #f97316;
    --bs-btn-active-bg: #f97316;
    --bs-btn-active-border-color: #f97316;
    --bs-btn-focus-shadow-rgb: 249, 115, 22;
}
.bg-primary {
    background-color: #f97316 !important;
}
.text-primary {
    color: #f97316 !important;
}
.border-primary {
    border-color: #f97316 !important;
}
.list-group-item.active {
    background-color: #f97316;
    border-color: #f97316;
}
.nav-pills .nav-link.active {
    background-color: #f97316;
}
.page-link.active, .active > .page-link {
    background-color: #f97316;
    border-color: #f97316;
}
.form-check-input:checked {
    background-color: #f97316;
    border-color: #f97316;
}
.form-control:focus, .form-select:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 0.25rem rgba(249, 115, 22, 0.25);
}

/* ------ 基础重置 ------ */
body {
    font-family: var(--ota-font-family);
    color: var(--ota-gray-700);
    line-height: 1.6;
    background: var(--ota-white);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--ota-primary);
    text-decoration: none;
    transition: var(--ota-transition-fast);
}
a:hover {
    color: var(--ota-primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================================
   导航头部
   ============================================================ */
.ota-header {
    background: var(--ota-white);
    border-bottom: 1px solid var(--ota-gray-200);
    transition: box-shadow 0.3s ease;
    z-index: 1030;
}
.ota-header--scrolled {
    box-shadow: var(--ota-shadow-md);
    border-bottom-color: transparent;
}

.ota-logo {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--ota-primary) !important;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.ota-logo i {
    font-size: 1.3rem;
}
.ota-logo:hover {
    color: var(--ota-primary-dark) !important;
}

.ota-nav-link {
    color: var(--ota-gray-700) !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0.85rem !important;
    border-radius: var(--ota-radius-sm);
    transition: var(--ota-transition-fast);
    position: relative;
}
.ota-nav-link:hover {
    color: var(--ota-primary) !important;
    background: var(--ota-primary-lighter);
}
.ota-nav-link.active {
    color: var(--ota-primary) !important;
    background: var(--ota-primary-light);
    font-weight: 600;
}

/* 头部搜索栏 */
.ota-header-search {
    position: relative;
    max-width: 280px;
}
.ota-header-search .form-control {
    border-radius: var(--ota-radius-full);
    border: 1.5px solid var(--ota-gray-300);
    padding: 0.4rem 2.5rem 0.4rem 1rem;
    font-size: 0.875rem;
    background: var(--ota-gray-50);
    transition: var(--ota-transition);
    height: 38px;
}
.ota-header-search .form-control:focus {
    border-color: var(--ota-primary);
    box-shadow: 0 0 0 3px rgba(249,115,22,0.1);
    background: var(--ota-white);
}
.ota-header-search .btn-search {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    color: var(--ota-gray-500);
    padding: 0.25rem 0.5rem;
    cursor: pointer;
}
.ota-header-search .btn-search:hover {
    color: var(--ota-primary);
}

/* 移动端搜索 */
.ota-mobile-search {
    background: var(--ota-white);
    border-top: 1px solid var(--ota-gray-200);
    padding: 0.75rem 0;
}
.ota-mobile-search .form-control {
    border-radius: var(--ota-radius-full);
    border: 1.5px solid var(--ota-gray-300);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}
.ota-mobile-search .btn {
    border-radius: var(--ota-radius-full);
}

/* 用户操作区 */
.ota-header-user .btn {
    font-size: 0.875rem;
    border-radius: var(--ota-radius-full);
    padding: 0.35rem 1rem;
}

/* ============================================================
   Hero 区域
   ============================================================ */
.ota-hero {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* 静态Hero（无轮播时） */
.ota-hero--static {
    background: linear-gradient(135deg, #9a3412 0%, #f97316 50%, #fb923c 100%);
    color: var(--ota-white);
    text-align: center;
    padding: 4rem 1rem;
}
.ota-hero--static h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.ota-hero--static p {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    letter-spacing: 2px;
}

/* 轮播Hero */
.ota-hero--carousel {
    min-height: 420px;
}
.ota-hero--carousel .carousel-item img {
    width: 100%;
    min-height: 420px;
    object-fit: cover;
}
.ota-hero--carousel .ota-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem 0 2.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 100%);
    z-index: 10;
    display: flex;
    justify-content: center;
}

/* Hero搜索栏（大号） */
.ota-search-bar {
    background: var(--ota-white);
    border-radius: var(--ota-radius-full);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    max-width: 600px;
    width: 100%;
    overflow: hidden;
}
.ota-search-bar input {
    border: none;
    outline: none;
    padding: 0.9rem 1.25rem;
    font-size: 1rem;
    flex: 1;
    background: transparent;
    min-width: 0;
}
.ota-search-bar input::placeholder {
    color: var(--ota-gray-400);
}
.ota-search-bar button {
    background: var(--ota-accent);
    color: var(--ota-white);
    border: none;
    padding: 0.7rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    margin: 5px;
    border-radius: var(--ota-radius-full);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: var(--ota-transition-fast);
    white-space: nowrap;
}
.ota-search-bar button:hover {
    background: var(--ota-accent-dark);
}

/* ============================================================
   分类导航
   ============================================================ */
.ota-category-section {
    padding: 2.5rem 0 1rem;
}
.ota-category-grid {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.ota-category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none !important;
    color: var(--ota-gray-700);
    padding: 1rem 1.5rem;
    border-radius: var(--ota-radius-md);
    transition: var(--ota-transition);
    min-width: 100px;
}
.ota-category-card:hover {
    background: var(--ota-primary-lighter);
    color: var(--ota-primary);
    transform: translateY(-2px);
}
.ota-category-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--ota-primary-light);
    color: var(--ota-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    transition: var(--ota-transition);
}
.ota-category-card:hover .ota-category-icon {
    background: var(--ota-primary);
    color: var(--ota-white);
}
.ota-category-label {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

/* 手机端横向滚动 */
@media (max-width: 575.98px) {
    .ota-category-grid {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .ota-category-grid::-webkit-scrollbar {
        display: none;
    }
    .ota-category-card {
        min-width: 80px;
        padding: 0.75rem 1rem;
    }
    .ota-category-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
}

/* ============================================================
   区块标题
   ============================================================ */
.ota-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.ota-section-title {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--ota-gray-900);
    padding-left: 14px;
    border-left: 4px solid var(--ota-primary);
    margin-bottom: 0;
    line-height: 1.3;
}
.ota-section-more {
    font-size: 0.9rem;
    color: var(--ota-gray-500);
    font-weight: 500;
}
.ota-section-more:hover {
    color: var(--ota-primary);
}

/* ============================================================
   产品区域
   ============================================================ */
.ota-product-section {
    padding: 3rem 0;
}
.ota-product-section--alt {
    background: var(--ota-gray-50);
}

/* ============================================================
   产品卡片（新版 + 向后兼容旧版 .product-card）
   ============================================================ */
.ota-product-card,
.product-card {
    border: none;
    border-radius: var(--ota-radius-md);
    overflow: hidden;
    box-shadow: var(--ota-shadow-sm);
    transition: var(--ota-transition);
    background: var(--ota-white);
}
.ota-product-card:hover,
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--ota-shadow-hover);
}

/* 卡片图片 */
.ota-product-card .ota-card-img,
.product-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.ota-product-card .ota-card-img-wrap {
    overflow: hidden;
    position: relative;
}
.ota-product-card:hover .ota-card-img {
    transform: scale(1.05);
}

/* 产品徽章 */
.ota-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 0.2rem 0.65rem;
    border-radius: var(--ota-radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ota-white);
    z-index: 2;
}
.ota-card-badge--hot {
    background: var(--ota-accent);
}
.ota-card-badge--recommend {
    background: var(--ota-primary);
}

/* 卡片内容 */
.ota-product-card .ota-card-body {
    padding: 1rem;
}
.ota-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ota-gray-900);
    margin-bottom: 0.35rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}
.ota-card-subtitle {
    font-size: 0.8rem;
    color: var(--ota-gray-500);
    margin-bottom: 0.6rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ota-card-price {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
}
.ota-card-price .price-current,
.product-card .price {
    color: var(--ota-danger);
    font-weight: 700;
    font-size: 1.15rem;
}
.ota-card-price .price-suffix {
    font-size: 0.75rem;
    color: var(--ota-gray-500);
}
.ota-card-price .price-original,
.product-card .original-price {
    color: var(--ota-gray-400);
    text-decoration: line-through;
    font-size: 0.8rem;
}

/* 向后兼容旧版卡片图片 */
.product-card img {
    height: 200px;
    object-fit: cover;
}

/* ============================================================
   信赖板块
   ============================================================ */
.ota-trust-section {
    padding: 3.5rem 0;
    background: var(--ota-white);
    border-top: 1px solid var(--ota-gray-200);
}
.ota-trust-item {
    text-align: center;
    padding: 1.5rem 1rem;
}
.ota-trust-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--ota-primary-light);
    color: var(--ota-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin: 0 auto 0.85rem;
}
.ota-trust-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ota-gray-900);
    margin-bottom: 0.35rem;
}
.ota-trust-desc {
    font-size: 0.85rem;
    color: var(--ota-gray-500);
    line-height: 1.5;
}

/* ============================================================
   底部 Footer
   ============================================================ */
.ota-footer {
    background: var(--ota-dark);
    color: rgba(255,255,255,0.7);
    padding: 3.5rem 0 0;
}
.ota-footer a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    transition: var(--ota-transition-fast);
}
.ota-footer a:hover {
    color: var(--ota-white);
}
.ota-footer-brand {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--ota-white) !important;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}
.ota-footer h6 {
    color: var(--ota-white);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 1rem;
}
.ota-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.ota-footer-links li {
    margin-bottom: 0.55rem;
}
.ota-footer-links li i {
    width: 18px;
    margin-right: 0.35rem;
    opacity: 0.7;
}
.ota-footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 2.5rem;
    padding: 1.25rem 0;
    font-size: 0.85rem;
}

/* ============================================================
   固定底部导航栏（移动端 Tab Bar）
   ============================================================ */
.ota-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    display: flex;
    background: var(--ota-white);
    border-top: 1px solid var(--ota-gray-200);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
    padding: 0.4rem 0 env(safe-area-inset-bottom, 0.2rem);
}
.ota-bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0;
    color: var(--ota-gray-500);
    text-decoration: none;
    font-size: 0.65rem;
    transition: var(--ota-transition-fast);
    gap: 0.15rem;
}
.ota-bottom-nav-item i {
    font-size: 1.25rem;
}
.ota-bottom-nav-item.active,
.ota-bottom-nav-item:hover {
    color: var(--ota-primary);
}
.ota-bottom-nav-item.active i {
    font-weight: 700;
}
/* 底部导航栏占位，防止内容被遮挡 */
body {
    padding-bottom: 3.8rem;
}

/* 桌面端隐藏底部导航栏 */
@media (min-width: 768px) {
    .ota-bottom-nav {
        display: none;
    }
    body {
        padding-bottom: 0;
    }
}

/* 向后兼容旧版 footer 元素选择器样式 */
footer {
    background: var(--ota-dark);
    color: rgba(255,255,255,0.7);
}
footer a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
}

/* ============================================================
   旧版兼容：section-title, category-nav, hero-banner
   ============================================================ */
.section-title {
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-left: 12px;
    border-left: 4px solid var(--ota-primary);
}
.category-nav .nav-link {
    color: var(--ota-gray-700);
    border-radius: 20px;
    padding: 0.4rem 1rem;
    margin: 0.2rem;
    transition: var(--ota-transition-fast);
}
.category-nav .nav-link:hover,
.category-nav .nav-link.active {
    background: var(--ota-primary);
    color: var(--ota-white);
}
.hero-banner {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    padding: 3rem 0;
}

/* ============================================================
   分页美化
   ============================================================ */
.pagination .page-link {
    border-radius: var(--ota-radius-sm);
    border: 1px solid var(--ota-gray-300);
    color: var(--ota-gray-700);
    margin: 0 2px;
    font-size: 0.9rem;
    transition: var(--ota-transition-fast);
}
.pagination .page-link:hover {
    background: var(--ota-primary-light);
    color: var(--ota-primary);
    border-color: var(--ota-primary-light);
}
.pagination .page-item.active .page-link {
    background: var(--ota-primary);
    border-color: var(--ota-primary);
    color: var(--ota-white);
}

/* ============================================================
   响应式适配
   ============================================================ */
@media (max-width: 767.98px) {
    .ota-hero--static {
        min-height: 300px;
        padding: 3rem 1rem;
    }
    .ota-hero--static h1 {
        font-size: 1.75rem;
    }
    .ota-hero--static p {
        font-size: 0.95rem;
    }
    .ota-hero--carousel .carousel-item img {
        min-height: 280px;
    }
    .ota-search-bar {
        max-width: 100%;
    }
    .ota-search-bar input {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    .ota-search-bar button {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    .ota-section-title {
        font-size: 1.25rem;
    }
    .ota-product-section {
        padding: 2rem 0;
    }
    .ota-trust-section {
        padding: 2rem 0;
    }
    .ota-trust-icon {
        width: 52px;
        height: 52px;
        font-size: 1.3rem;
    }
    .ota-footer {
        padding: 2.5rem 0 0;
    }
    .ota-product-card .ota-card-img,
    .product-card .card-img-top,
    .product-card img {
        height: 150px;
    }
    .ota-card-title {
        font-size: 0.85rem;
    }
    .ota-card-price .price-current,
    .product-card .price {
        font-size: 1rem;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .ota-hero--static h1 {
        font-size: 2rem;
    }
    .ota-product-card .ota-card-img,
    .product-card .card-img-top,
    .product-card img {
        height: 180px;
    }
}
