/*
 * CSS thẻ tour của shortcode [ux_products_custom]:
 * - .vmt-mini-card (thẻ tour nhỏ mặc định)
 * - .vmt-x-card (thẻ tour kiểu "Khám phá", card="kham-pha")
 */

/* ===== Thẻ tour nhỏ: shortcode ux_products_custom, ngoài giao diện và trong preview UX Builder ===== */
.product-custom:has(> .col-inner > .vmt-mini-card) > .col-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.flickity-slider > .product-custom:has(> .col-inner > .vmt-mini-card) {
  min-height: 100%;
}
#wrapper .product-custom .box-product.vmt-mini-card.vmt-mini-card {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  height: 100%;
  border: 1px solid #e5e7eb;
  border-radius: var(--vmt-radius);
  background: #fff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  transition:
    box-shadow 0.3s var(--vmt-ease),
    border-color 0.3s var(--vmt-ease),
    transform 0.3s var(--vmt-ease);
}
#wrapper .product-custom .box-product.vmt-mini-card.vmt-mini-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 12px 28px -8px rgba(15, 23, 42, 0.11);
}
.vmt-mini-card .box-image {
  position: relative;
  overflow: hidden;
  background: var(--vmt-tint);
}
.vmt-mini-card .box-image > div:first-child:not(.image-cover) {
  aspect-ratio: 4 / 3;
}
.vmt-mini-card .box-image > div:first-child:not(.image-cover) > a,
.vmt-mini-card .box-image > div:first-child:not(.image-cover) img {
  display: block;
  width: 100%;
  height: 100%;
}
.vmt-mini-card .box-image > div:first-child:not(.image-cover) img {
  object-fit: cover;
}
.vmt-mini-card .box-image img {
  transition: transform 0.7s var(--vmt-ease);
}
.vmt-mini-card:hover .box-image img {
  transform: scale(1.04);
}
.vmt-mini-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  padding: 3px 9px;
  border: 1px solid rgba(190, 18, 60, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(4px);
  color: #be123c;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  pointer-events: none;
}
/* Nút Xem nhanh dạng viên nhỏ ở góc ảnh, ẩn hoàn toàn khi chưa di chuột */
.vmt-mini-card .box-image .image-tools.grid-tools.show-on-hover {
  top: auto;
  right: 10px;
  bottom: 10px;
  left: auto;
  z-index: 3;
  width: auto;
  margin: 0;
  padding: 0;
  background: none;
  opacity: 0 !important;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 0.22s var(--vmt-ease),
    transform 0.22s var(--vmt-ease);
}
.vmt-mini-card:hover .box-image .image-tools.grid-tools.show-on-hover {
  opacity: 1 !important;
  pointer-events: auto;
  transform: translateY(0);
}
#wrapper .product-custom .box-product.vmt-mini-card a.quick-view.quick-view {
  font-size: 12px;
}
#wrapper
  .product-custom
  .box-product.vmt-mini-card
  a.quick-view.quick-view:hover {
  background: var(--vmt-mini-accent, #0f766e);
}
#wrapper .product-custom .vmt-mini-card .box-text.box-text {
  display: flex;
  flex: 1 1 auto;
  padding: 14px 16px 15px;
  text-align: left;
}
.vmt-mini-card .box-text-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}
/* UX Builder thêm text-center vào box-text; margin auto của Flatsome làm các khối co vào giữa */
.vmt-mini-card .box-text-inner > * {
  width: 100%;
  margin-right: 0;
  margin-left: 0;
}
.vmt-mini-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.vmt-mini-cat {
  min-width: 0;
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vmt-mini-rate {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: none;
  color: #1e293b;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}
.vmt-mini-rate svg {
  flex: none;
  color: #f59e0b;
}
#wrapper .product-custom .vmt-mini-card .name.name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  /* Flatsome equalize_box="true" sets inline style="height: ..." on .name; !important is needed to collapse 1-line titles */
  height: auto !important;
  min-height: 0;
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.vmt-mini-card .name a {
  color: #1e293b;
  transition: color 0.2s;
}
.vmt-mini-card:hover .name a {
  color: var(--vmt-mini-accent, #0f766e);
}
.vmt-mini-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
#wrapper .product-custom .vmt-mini-card .box-text .thoi-diem {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
}
.vmt-mini-card .vmt-mini-meta-item,
.vmt-mini-card .thoi-diem > .flex {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 3px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  color: #475569;
}
.vmt-card-icon {
  flex: none;
  color: #64748b;
}
.vmt-mini-dates {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-size: 11.5px;
  line-height: 1.2;
}
.vmt-mini-dates-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.vmt-mini-date-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border: 1px solid #ccfbf1;
  border-color: color-mix(
    in srgb,
    var(--vmt-mini-accent, #0f766e) 18%,
    #e2e8f0
  );
  border-radius: 999px;
  background: #f0fdfa;
  background: color-mix(in srgb, var(--vmt-mini-accent, #0f766e) 8%, #ffffff);
  color: var(--vmt-mini-accent, #0f766e);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.vmt-mini-card .vmt-card-buy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}
.vmt-mini-card .vmt-card-price {
  min-width: 0;
  margin-bottom: 0;
  font-size: 17px;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.vmt-mini-card .vmt-card-price strong {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
#wrapper .product-custom .box-product.vmt-mini-card .vmt-card-price .amount {
  color: var(
    --vmt-price-color,
    #dc2626
  ); /* giá luôn đỏ, không theo màu nhấn của thẻ */
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
/* Giá khuyến mãi ở trên, giá gốc gạch ngang nhỏ ở dưới */
.vmt-mini-card .vmt-card-price del {
  order: 2;
}
#wrapper .product-custom .box-product.vmt-mini-card .vmt-card-price del {
  margin-right: 0;
  color: #64748b;
  font-size: 12px;
  text-decoration-color: rgba(100, 116, 139, 0.7);
}
#wrapper
  .product-custom
  .box-product.vmt-mini-card
  .vmt-card-price
  del
  .amount {
  color: #64748b;
  font-size: 12px;
  font-weight: 400;
}
.vmt-mini-card .vmt-card-price ins {
  background: none;
  text-decoration: none;
}
#wrapper
  .product-custom
  .box-product.vmt-mini-card
  .vmt-card-buy
  .vmt-mini-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: none;
  padding: 8px 13px;
  border: 1px solid #ccfbf1;
  border-color: color-mix(
    in srgb,
    var(--vmt-mini-accent, #0f766e) 22%,
    transparent
  );
  border-radius: 999px;
  background: #f0fdfa;
  background: color-mix(in srgb, var(--vmt-mini-accent, #0f766e) 10%, #ffffff);
  color: var(--vmt-mini-accent, #0f766e);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  transition:
    background-color 0.2s var(--vmt-ease),
    color 0.2s var(--vmt-ease),
    border-color 0.2s var(--vmt-ease);
}
.vmt-mini-cta-arrow {
  display: inline-block;
  transition: transform 0.2s var(--vmt-ease);
}
#wrapper
  .product-custom
  .box-product.vmt-mini-card
  .vmt-card-buy
  .vmt-mini-cta:hover {
  border-color: var(--vmt-mini-accent, #0f766e);
  background: var(--vmt-mini-accent, #0f766e);
  color: #fff;
}
#wrapper
  .product-custom
  .box-product.vmt-mini-card
  .vmt-card-buy
  .vmt-mini-cta:hover
  .vmt-mini-cta-arrow {
  transform: translateX(2px);
}
/* Thẻ hẹp (cột 4, slider): giá dài như 129,900,000đ không đủ chỗ cạnh nút → giá một dòng, nút xuống dưới rộng hết thẻ.
 * Đo theo bề rộng của chính thẻ (container query), không theo màn hình. */
.vmt-mini-card .box-text-inner {
  container-type: inline-size;
}
@container (max-width: 250px) {
  .vmt-mini-card .vmt-card-buy {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  #wrapper
    .product-custom
    .box-product.vmt-mini-card
    .vmt-card-buy
    .vmt-mini-cta {
    width: 100%;
    padding: 9px 13px;
  }
}
@media (max-width: 549px) {
  #wrapper .product-custom .vmt-mini-card .box-text.box-text {
    padding: 12px 13px 13px;
  }
  #wrapper .product-custom .vmt-mini-card .name.name {
    font-size: 14.5px;
  }
  .vmt-mini-card .vmt-mini-meta-item,
  .vmt-mini-card .thoi-diem > .flex {
    padding: 2px 6px;
    font-size: 11.5px;
  }
  #wrapper .product-custom .box-product.vmt-mini-card .vmt-card-price .amount {
    font-size: 16px;
  }
  #wrapper
    .product-custom
    .box-product.vmt-mini-card
    .vmt-card-buy
    .vmt-mini-cta {
    padding: 7px 11px;
    font-size: 12px;
  }
}

/* ===== Thẻ tour kiểu "Khám phá" ([ux_products_custom card="kham-pha"]), giống thẻ ở /cong-tac-vien =====
 * Màu nhấn: ô "Màu nhấn" trong UX Builder (--vmt-mini-accent), mặc định xanh dương. Giá: đỏ (--vmt-price-color). */
.vmt-x-card {
  --vmt-x: var(--vmt-mini-accent, #009030);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}
.vmt-x-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}
.vmt-x-thumb {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e2e8f0;
}
#wrapper .vmt-x-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}
.vmt-x-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}
.vmt-x-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
  color: color-mix(
    in srgb,
    var(--vmt-x) 90%,
    #000
  ); /* đủ tương phản cho chữ nhỏ */
  font-size: 13px;
  font-weight: 700;
}
#wrapper .vmt-x-title {
  display: -webkit-box;
  min-height: 2.76em;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--vmt-ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.38;
  text-transform: uppercase;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.vmt-x-title a {
  color: inherit;
}
.vmt-x-title a:hover {
  color: var(--vmt-x);
}
.vmt-x-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}
.vmt-x-price {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.vmt-x-price strong,
.vmt-x-price strong .amount {
  color: var(--vmt-price-color, #dc2626);
  font-family: var(--vmt-font-heading, inherit);
  font-size: 17px;
  font-weight: 800;
}
.vmt-x-price del,
.vmt-x-price del .amount {
  color: #6b7280; /* 4.8:1 trên nền trắng */
  font-size: 13px;
  font-weight: 400;
}
.vmt-x-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid var(--vmt-x);
  border-radius: 999px;
  color: color-mix(in srgb, var(--vmt-x) 90%, #000);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}
.vmt-x-btn:hover {
  background: var(--vmt-x);
  color: #fff;
}

/* Đồng đều chiều cao thẻ .vmt-x-card trong slider Flickity trên mọi trang */
.flickity-slider > .col:has(.vmt-x-card),
.flickity-slider > .product-small:has(.vmt-x-card) {
  display: flex;
  align-items: stretch;
}
.flickity-slider > .col:has(.vmt-x-card) > .col-inner,
.flickity-slider > .product-small:has(.vmt-x-card) > .col-inner,
.vmt-x-card {
  height: 100%;
  min-height: 372px;
}
