/*
Theme Name:     traveler-childtheme-chinatraveljoy.com
Description:    traveler-childtheme-chinatraveljoy.com
Theme URI:      https://travelerwp.com/
Author:         the ShineTheme
Author URI:     http://shinetheme.com
Version:        1.0
Template:       traveler
*/

/* 隐藏产品数量 */
.row.st-list-destination .normal-item .destination-item .desc {
    display: none !important;
}
/* 以下为网站目的地：Destination 版块部分
 * Destination 手机端：2列滑动 + Scroll Snap
 * ================================================= */
@media (max-width: 768px) {

  .st-list-destination {
    display: flex;
        align-items: stretch;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;

    scroll-snap-type: x mandatory;

    margin-left: 0;
    margin-right: 0;
    padding-bottom: 16px;
  }

  .st-list-destination::-webkit-scrollbar {
    display: none;
  }

  .st-list-destination .normal-item {
    flex: 0 0 50%;
    max-width: 50%;
    padding-left: 6px;
    padding-right: 6px;

    scroll-snap-align: start;
  }

  .st-list-destination img {
    width: 100%;
    height: auto;
    display: block;
  }
}

.st-destination-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0,0,0,.3);
}

.st-destination-dot.active {
  background: #000;
}
/* =========================================
 * Destination 手机端滑动提示（正确位置）
 * ========================================= */
@media (max-width: 768px) {

  /* Elementor widget 外层 */
  .elementor-widget-st_destination {
    position: relative;
  }

  /* 提示条 */
  .elementor-widget-st_destination::after {
    content: "←  Swipe to view more  →";
    display: block;
    text-align: center;
    font-size: 12px;
    color: #999;
    margin-top: 8px;
    letter-spacing: 1px;
  }
}

/* ==================================================
 * Mobile – Card Global Style (ALL MODULES)
 * ================================================== */
@media (max-width: 767px) {

  /* 标题：两行省略 */
  .services-item .title,
  .item-tour .title,
  .blog-item .title {
    font-size: 14px;
    line-height: 1.3;
    margin-bottom: 6px;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* 价格 */
  .price-wrapper .price {
    font-size: 14px;
  }

  /* 辅助文字 */
  .summary,
  .unit,
  .service-duration {
    font-size: 12px;
  }
}
/* ==================================================
 * Featured Products – Mobile
 * ================================================== */
@media (max-width: 767px) {

  .st-featured-products .swiper-slide {
    padding: 0 8px;              /* 间距稍大，看着稳 */
    box-sizing: border-box;
  }

  .st-featured-products .swiper-wrapper {
    align-items: stretch;
  }
}
/* ==================================================
 * Products / Services – Mobile (Swiper AUTO SAFE)
 * ================================================== */
@media (max-width: 767px) {

  /* ❌ 不再强行 50% */
  .st-list-service .swiper-slide {
    width: auto !important;
    max-width: calc(50% - 8px);   /* 👈 控制“视觉上的 2 个” */
    box-sizing: border-box;
    padding: 0 4px;               /* 👈 真实间距来源 */
  }

  /* 保证 Swiper 正常计算 */
  .st-list-service .swiper-wrapper {
    align-items: stretch;
  }

  /* 卡片高度统一 */
  .st-list-service .services-item,
  .st-list-service .services-item .item {
    height: 100%;
    display: flex;
        align-items: stretch;
    flex-direction: column;
  }

  .st-list-service .content-item {
    flex: 1;
    display: flex;
        align-items: stretch;
    flex-direction: column;
  }

  /* 隐藏 Featured 标签 */
  .st-list-service .feature_class.st_featured,
  .st-list-service .st-tag-feature-sale {
    display: none !important;
  }
}

/* ==================================================

/* ==================================================
 * Tour search results — Mobile (2 per row, hide duration)
 * ================================================== */
@media (max-width: 767px) {
  /* 2 columns */
  .service-tour > .col-12.item-service {
    flex: 0 0 50%;
    max-width: 50%;
  }

  /* 手机端隐藏天数 */
  .service-tour .price-wrapper-tour .unit {
    display: none;
  }

  /* 价格字体缩小 */
  .service-tour .price-wrapper-tour .price {
    font-size: 13px;
  }

  .service-tour .price-wrapper-tour .st-unit {
    font-size: 11px;
  }

  /* 收紧卡片间距 */
  .service-tour .services-item .content-item {
    padding: 8px 6px;
  }
}

/* ==================================================
 * Hide banner search form on mobile + tablet
 * ================================================== */
@media (max-width: 991px) {
  .search-result-page .banner {
    display: none;
  }
}



/* ── Destination: single item full width on mobile ── */
@media (max-width: 767px) {
    .st-list-destination .normal-item:only-of-type {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
    .st-list-destination .normal-item:only-of-type .destination-item {
        width: 100% !important;
    }
}

/* ── Hide Swipe to view more when ≤ 2 items on tablet/mobile ── */
@media (max-width: 1024px) {
    .elementor-widget-st_destination:not(:has(.normal-item:nth-child(3))):not(:has(.swiper-slide:nth-child(3)))::after {
        display: none !important;
    }
}


/* ── Blog list swipe hint on mobile/tablet (hide when ≤ 2 items) ── */
@media (max-width: 1024px) {
    .elementor-widget-st_blog_list {
        position: relative;
    }
    .elementor-widget-st_blog_list::after {
        content: "←  Swipe to view more  →";
        display: block;
        text-align: center;
        font-size: 12px;
        color: #999;
        margin-top: 8px;
        letter-spacing: 1px;
    }
    .elementor-widget-st_blog_list:not(:has(.swiper-slide:nth-child(3)))::after {
        display: none !important;
    }
}

/* ── Blog archive: 2 posts per row on mobile/tablet ── */
@media (max-width: 991px) {
    .blog-wrapper {
        display: flex;
        flex-wrap: wrap;
        gap: 16px;
    }
    .blog-wrapper .article-style3 {
        width: calc(50% - 8px);
        margin-bottom: 0;
    }

    /* Typography: smaller text on mobile */
    .blog-wrapper .article-style3 .post-title,
    .blog-wrapper .article-style3 .post-title a {
        font-size: 15px !important;
        line-height: 1.3;
    }
    .blog-wrapper .article-style3 .post-title {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .blog-wrapper .article-style3 .post-desciption,
    .blog-wrapper .article-style3 .post-description {
        font-size: 13px;
        line-height: 1.5;
        display: -webkit-box;
        -webkit-line-clamp: 6;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

}
