/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */
 
.custom-image-flex-wrapper {
    display: flex;
    gap: 15px;
}

/* Cột Ảnh Lớn (Chiếm 50% chiều rộng) */
.main-image-column {
  flex: 1 1 50%;
  /* flex-grow: 1, flex-shrink: 1, basis: 50% */
}

/* Cột Lưới Ảnh Nhỏ (Chiếm 50% chiều rộng) */
.thumbnails-grid-column {
  flex: 1 1 50%;
}

/* Kỹ thuật Aspect Ratio (Giữ tỷ lệ khung hình) */
.image-aspect-ratio-box {
  position: relative;
  padding-top: 66.66%;
  /* Ví dụ: Giữ tỷ lệ 3:2. (2 / 3 * 100%) hoặc sử dụng 75% cho tỷ lệ 4:3 */
  height: 0;
  overflow: hidden;
}

/* Đảm bảo ảnh lớn lấp đầy hộp giữ tỷ lệ */
.main-image-box img,
.main-image-box .image-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Quan trọng: Đảm bảo ảnh lấp đầy mà không bị kéo dãn */
}

/* Lưới 2x2 cho ảnh nhỏ */
.grid-2x2-wrapper {
  display: grid;
  /* Grid 2 cột bằng nhau */
  grid-template-columns: repeat(2, 1fr);
  /* Chiều cao của lưới sẽ tự động khớp với chiều cao của .main-image-column */
  height: 100%;
  gap: 10px;
}

/* Hộp chứa ảnh nhỏ (mỗi hộp nhỏ bằng 1/2 chiều rộng và 1/2 chiều cao ảnh lớn) */
.grid-item-box {
  /* Đảm bảo chiều cao cho từng ô lưới con */
  position: relative;
  overflow: hidden;
}

.grid-item-box img {
  width: 100%;
  height: 100%;
  /* Lấp đầy ô grid item */
  object-fit: cover;
  /* Cần position: absolute nếu phần tử cha có padding-top */
  position: absolute;
  top: 0;
  left: 0;
}

/* Định dạng ô "Xem thêm" */
.view-more-box {
  position: absolute;
  right: 10%;
  bottom: 10%;
}

.view-more-btn {
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  line-height: 20px;
  letter-spacing: -0.23px;
  color: #222531;
  padding: 12px 40px;
  color: #333;
  display: block;
  background-color: #FFFFFF;
  border-radius:8px;
}

.custom-image-flex-wrapper img {
  max-height: 600px;
  width: 100% !important;
  object-fit: cover !important;
  border-radius: 12px;
}

.product-title-container .is-divider {
  display: none;
}

.tour-price-summary-wrapper {
    padding: 10px 0;
    border-bottom: 1px solid #f1f1f1;
    display: inline-block;
}

.tour-price-summary-wrapper .price-item {
    margin-bottom: 2px;
}

/* Hi ứng nhỏ cho giá Sale trên Mobile */
@media (max-width: 768px) {
    .tour-price-summary-wrapper .price-sale {
        font-size: 1.3em;
    }
}

.tour-price-table {
    font-size: 18px;
    margin-bottom: 20px;
}
.tour-price-table th {
    font-weight: 600;
    color: #333;
}
.tour-price-table tr:nth-child(even) {
    background-color: #f9f9f9;
}
.tour-price-table tr:hover {
    background-color: #fffde7;
}

@media screen and (max-width: 600px) {
    .tour-price-table {
        font-size: 14px;
    }
    .tour-price-table th, .tour-table td {
        padding: 8px 5px;
    }
}

@media (max-width: 768px) {
    .in-out-grid { flex-direction: column; }
}
.tour-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.85em;
}
#tour_type {
    width: 100%;
}
.tour-type-shortcode a {
    background: #f1f1f1;
    color: #003023;
    padding: 3px 10px;
    border-radius: 15px;
    text-decoration: none;
    font-size: 13px;
    margin-right: 5px;
    transition: all 0.3s;
    border: 1px solid #ddd;
}

.tour-type-shortcode a:hover {
    background: #003023;
    color: #fff;
    border-color: #003023;
}

.tour-type-shortcode .label {
    font-weight: bold;
    margin-right: 8px;
}
.tour-destination-shortcode a {
    background: #e3f2fd; /* Màu xanh nhạt cho điểm đến */
    color: #0d47a1;
    padding: 3px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    margin-right: 5px;
    border: 1px solid #bbdefb;
}

.tour-destination-shortcode a:hover {
    background: #0d47a1;
    color: #fff;
}
.included-list, .excluded-list { list-style: none; padding-left: 0; }
.included-list li::before { content: "✓"; color: #46b450; margin-right: 10px; font-weight: bold; }
.excluded-list li::before { content: "✕"; color: #d63638; margin-right: 10px; font-weight: bold; }
.tour-section-box { background: #f9f9f9; padding: 15px; border-radius: 5px; }

.tour-details-wrapper { margin-top: 30px; }

.itinerary-timeline {
    position: relative;
    padding-left: 30px;
    border-left: 2px solid #ececec;
    margin-left: 10px;
}
.itinerary-text p{
    margin-bottom: unset !important;
}
.timeline-item {
    position: relative;
    padding-bottom: 24px;
}
.timeline-content h4{
    font-size: 1em;
}

.timeline-dot {
    position: absolute;
    left: -39px;
    top: 5px;
    width: 16px;
    height: 16px;
    background: #d84315;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #d84315;
}

.timeline-time {
    font-weight: bold;
    color: #d84315;
    font-size: 0.9em;
    text-transform: uppercase;
    margin-bottom: 5px;
}


.dest-slider-outer-wrapper {
    width: 100%;
    overflow: hidden; /* Cắt phần tràn hai bên của Slider */
    padding: 8px 0; /* Tạo khoảng trống cho bóng đổ không bị cắt mất ở trên/dưới */
}
.dest-slider-container .dest-item {
    width: var(--pc-w) !important; 
    padding: 0 10px;
    flex: 0 0 auto;
}

@media (max-width: 849px) {
    .dest-slider-container .dest-item { width: var(--tab-w) !important; }
}

@media (max-width: 549px) {
    .dest-slider-container .dest-item { width: var(--mob-w) !important; }
}

.dest-slider-container {
    padding-left: 6px;
    padding-right: 6px;
}

.dest-slider-container .dest-image-box {
    position: relative;
    padding-top: 100%; /* Giữ tỉ lệ vuông */
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.dest-slider-container .dest-image-box img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
}

.dest-slider-container .dest-text-box .dest-name{
    font-weight: 600;
    font-size: 14px;
    margin-top: 12px;
}

.dest-slider-container .flickity-viewport {
    overflow: visible !important;
}

.tour-check-availability-container {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    max-width: 400px; /* Thường để ở Sidebar */
}

.tour-booking-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.tour-booking-form input[type="date"],
.tour-booking-form input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.check-availability-btn {
    background-color: #d84315 !important;
    color: #fff !important;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.check-availability-btn:hover {
    background-color: #bf360c !important;
}

.tour-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.tour-option-card {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: 0.3s;
    position: relative;
}

.tour-option-card.selected {
    border-color: #006432;
    background-color: #f0f7f3;
}

.tour-option-card h4 { margin: 0 0 10px 0; font-size: 18px; }

.tour-option-card .option-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.tour-option-card input[type="radio"] {
    transform: scale(1.5);
    accent-color: var(--primary-color);
}

.tour-option-card:hover {
    border-color: #003023 !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.tour-option-card input[type="radio"]:checked + .tour-option-card {
    border-color: #003023;
}
.tour-option-card .option-header h4{
    margin: 0 0 10px 0; font-size: 17px; color: #5C98F2;
}
.dashicons {
    vertical-align: middle;
}

/* Layout 2 cột cho trang Checkout */
@media (min-width: 992px) {
    .woocommerce-checkout {
        display: grid;
        grid-template-columns: 1fr 400px;
        gap: 30px;
        align-items: start;
    }

    /* Cột trái: Thông tin khách hàng */
    #customer_details {
        width: 100% !important;
        float: none !important;
    }

    /* Cột phải: Tóm tắt đơn hàng (Sticky) */
    #order_review_heading, 
    #order_review {
        grid-column: 2;
        position: sticky;
        top: 20px;
        background: #f8f8f8;
        padding: 20px;
        border-radius: 12px;
        border: 1px solid #eee;
    }
}

/* Ẩn các thành phần không cần thiết để khách tập trung thanh toán */
.checkout-tour-summary-custom {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #ccc;
}
.step-number{
    width: 40px; height: 40px; border-radius: 50%; background: var(--primary-color); color: #fff; line-height: 40px; margin: 0 auto; font-weight: bold; border: 2px solid var(--primary-color);
}

.full-width { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }
.btn-next-step, #btn-complete-booking { background: #d84315 ; color: #fff; border: none; padding: 12px 25px; border-radius: 25px; font-weight: bold; cursor: pointer; width: 100%; }
.booking-step.completed .step-header { background: #e8f5e9 !important; }
.booking-step.completed .step-header h3 { color: #2e7d32 !important; }
.booking-step.active .step-header { border-radius: 8px 8px 0 0 !important; background:  var(--primary-color) !important; color: #fff !important; }
.booking-step.active .step-header h3 { color: #fff !important; }

.booking-sidebar {
    position: relative;
}

.booking-sidebar > div {
    position: -webkit-sticky;
    position: sticky;
    top: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e0e0e0 !important;
    border-radius: 12px;
    overflow: hidden;
}

.booking-sidebar h3 {
    font-size: 20px;
    line-height: 1.4;
    color: #003023;
}

.booking-sidebar .summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.payment-option-label:has(input:checked) {
    border-color: #003023 !important;
    background-color: #f0f7f4;
}
.gateway-icon img {
    max-height: 30px;
    width: auto;
}
.price-wrapper{
    margin-top: 12px;
}
del span.amount {
    font-weight: 500 !important;
    opacity: 1 !important;
}
.price-wrapper .price .price-text{
    color: var(--fs-color-secondary) !important;
    font-size: 16px;
}

.box-text {
font-size: 1em !important;
}

.title-wrapper .product-title{
    font-weight: 600;
}
.title-wrapper .product-title a{
    color: var(--fs-color-base) !important;
}
ul.tour-meta-attributes {
    list-style: none;
    padding: 0px;
    padding-inline-start: 0px;
    margin-block-start: 0px;
}

ul.tour-meta-attributes li{
    margin-left: 0px !important;
}

.tour-info-section{
    margin-bottom: 1em;
}
.tour-meta-attributes {
    margin-top: 10px !important;
    margin-bottom: 5px !important;
}

.tour-meta-attributes .attr-item {
    padding: 3px 0px;
    transition: all 0.3s ease;
    width: 100%;
}

.tour-meta-attributes .attr-item i {
    color: #446084; /* Màu xanh đồng bộ Flatsome */
    width: 14px;
    text-align: center;
}

/* Hiệu ứng khi hover vào khung sản phẩm */
.product-box:hover .attr-item {
    background: #fff;
    border-color: #446084;
    color: #446084;
}

.product-small{
    border-radius: 12px;
    overflow: hidden;
    border-color: #e1e1e1;
}

.product-small .box-text{
    padding: 16px;
    background-color: #fff;
}



/* Đảm bảo chia cột cho chế độ Grid */
.row-grid .dest-item {
    width: var(--pc-w);
    float: left;
}

@media (max-width: 849px) {
    .row-grid .dest-item { width: var(--tab-w); }
}
@media (max-width: 549px) {
    .row-grid .dest-item { width: var(--mob-w); }
}
.row-grid:after { content: ""; display: table; clear: both; }

/* --- GIAO DIỆN CARD MỚI --- */
.dest-card-inner {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    height: 280px; /* Chiều cao cố định cho card */
    background-color: #333;
    margin-bottom: 10px;
}

.slider .dest-card-inner {
    height: 180px; 
}

.dest-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.dest-item:hover .dest-card-img {
    transform: scale(1.1);
}

/* Lớp phủ Overlay gradient từ dưới lên */
.dest-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 40%, rgba(0,0,0,0.8) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 15px;
    text-align: left; /* Chỉnh chữ sang trái cho đẹp */
}

/* Tên điểm đến màu trắng */
.dest-card-name {
    color: #ffffff !important;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    line-height: 1.2;
    text-align: center;
}

/* Badge số Tour ở phía trên bên phải */
.dest-card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: #5d97f5; /* Màu xanh của bạn */
    color: #fff;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
}

.tour-search-container {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
}
.tour-search-form{
    margin-bottom: 0px;
}
.search-field-wrapper {
    display: flex;
    align-items: center;
}

.search-input-group {
    flex: 1;
    padding: 10px 25px;
    border-right: 1px solid #eee;
}

.search-input-group:last-of-type {
    border-right: none;
}

.search-input-group label {
    display: block;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 5px;
    color: #333;
}

.search-input-group input, 
.search-input-group select {
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 15px;
    color: #888;
    box-shadow: none !important;
    height: auto !important;
}
.search-submit-group{
    background-color: #5d97f5;
    position: relative;
    cursor: pointer;
    flex-basis: 0%;
}
.search-submit-group button {
    display: flex;
    flex-direction: column; 
    justify-content: center; 
    align-items: center;
    white-space: nowrap; /* Quan trọng: Ngăn không cho chữ xuống dòng */
    gap: 4px; /* Tạo khoảng cách giữa icon và chữ */
    min-width: max-content; /* Đảm bảo nút rộng ít nhất bằng nội dung chữ */
    color: #fff;
    line-height: 1.2;
    padding: 12px;
    width: 100%;
}

.search-submit-group button i {
    font-size: 18px;
    margin-bottom: 5px;
}

.search-submit-group button span {
    font-weight: bold;
    font-size: 13px;
    text-transform: uppercase;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .search-field-wrapper { flex-direction: column; }
    .search-input-group { border-right: none; border-bottom: 1px solid #eee; width: 100%; }
    .search-submit-group button { border-radius: 0 0 15px 15px; width: 100%; margin: 10px 0 -10px 0; }
}

.results-header-bar{
    background-color: var(--primary-color);
    padding: 15px 25px; 
    border-radius: 8px 8px 0 0; 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
}
.reserve-now-btn{
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 12px 40px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    font-size: 16px;
}