/* theme-fix-home.css: đợt 1a trang chủ (Tùng duyệt 2026-10-16). Chỉ nạp ở templates/index.liquid.
   Gỡ: xóa dòng nạp file này ở đầu index.liquid. Nguồn: design/homepage/PROPOSAL.md mục 10. */

/* 1) Chống nhảy bố cục: Owl v1 để .owl-carousel display:none tới khi JS khởi tạo xong.
      Trước khi khởi tạo (chưa có .owl-wrapper-outer), hiện sẵn đúng bố cục sẽ có sau đó. */
.template-index .owl-carousel:not(:has(> .owl-wrapper-outer)) {
  display: block;
  overflow: hidden;
}
.template-index #slider-carousel:not(:has(> .owl-wrapper-outer)) > .slider_element:not(:first-child) {
  display: none;
}
.template-index #slider-carousel picture img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1920 / 600;
  object-fit: cover;
}
@media (max-width: 767px) {
  .template-index #slider-carousel picture img { aspect-ratio: 1000 / 650; }
}
.template-index .home-products.owl-carousel:not(:has(> .owl-wrapper-outer)) {
  display: flex;
}
.template-index .home-products.owl-carousel:not(:has(> .owl-wrapper-outer)) > .product-container {
  flex: 0 0 calc(100% / 6);
  min-width: 0;
}
@media (max-width: 768px) {
  .template-index .home-products.owl-carousel:not(:has(> .owl-wrapper-outer)) > .product-container {
    flex-basis: 40%;
  }
}
/* Banner: giữ khung theo kích thước ảnh trước khi ảnh tải xong. */
.template-index .site_custom_top img,
.template-index .site_custom_bottom img {
  display: block;
  width: 100%;
  height: auto;
}

/* 2) Chấm chuyển slide hero: vùng bấm ≥ 44px, giữ nguyên hình dáng chấm. */
.template-index #slider-carousel .owl-page {
  position: relative;
}
.template-index #slider-carousel .owl-page::after {
  content: "";
  position: absolute;
  inset: -14px -6px;
}

/* 3) Cảm ứng hoặc màn hẹp: bỏ nút phủ "MUA NGAY" che giữa banner (cả banner vẫn là link).
      Thêm max-width vì một số máy cảm ứng báo sai (hover: hover). */
@media (hover: none), (max-width: 767px) {
  .template-index .custom-top .gid-btn,
  .template-index .custom-bottom .gid-btn {
    display: none;
  }
}

/* 4) Tiêu đề YouTube: line-clamp đặt trên phần tử có padding làm lộ dòng thứ 3. Chuyển clamp vào span. */
.template-index .item-youtube .title {
  display: block;
  -webkit-line-clamp: unset;
}
.template-index .item-youtube .title span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* 5) Giá gạch ngang ở nền sáng: #8a949e (3,1:1) → #66727d (đạt AA). Dark mode giữ màu của codex-polish. */
html:not([data-mobile-theme="dark"]) .template-index .product-container .sale-price {
  color: #66727d;
}
