body#template-product {
  background-color: var(--body-background);
}
/* ===== ẢNH LỚN: luôn có border, card gọn gàng ===== */
.large-image .item > a {
  display: block;
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}
/* Ảnh lớn canh giữa, fit trong khung 1:1 đang dùng */
.large-image img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  object-fit: contain;
  max-width: 100%;
  max-height: 100%;
  border: 0 !important;
  /* luôn để border ở container, tránh ảnh có ảnh không */
}
.large-image .embed-responsive {
  display: block;
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}
@media (min-width: 768px) {
  .large-image .embed-responsive {
    height: 500px;
  }
}
@media (min-width: 768px) {
  .large-image .item > a {
    height: 100%;
  }
}

/* ===== Slick arrows chính (tuỳ chọn) ===== */
#gallery_1 .slick-arrow {
  background: #fff;
  border: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  display: none !important;
}
#gallery_1 .slick-prev {
  left: 5px;
}
#gallery_1 .slick-next {
  right: 5px;
}
#gallery_1 .slick-prev:before,
#gallery_1 .slick-next:before {
  font-size: 15px;
  color: #111;
  opacity: 1;
}
/* Hide arrows on mobile */
@media (max-width: 767.98px) {
  #gallery_1 .slick-arrow {
    display: none !important;
  }
}

/* ====== Thumbnail: DESKTOP ====== */
@media (min-width: 992px) {
  #gallery_02 .item.slick-slide {
    width: 100px;
    height: 100px;
    margin: 0 6px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
    background: #fff;
    position: relative;
  }
  #gallery_02 .item.slick-slide img {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
  }
  #gallery_02 .item.slick-current.slick-active {
    border-color: var(--primary-color, #4285f4);
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.15);
  }
}

/* ====== Thumbnail: TABLET (768px – 991.98px) ====== */
@media (min-width: 768px) and (max-width: 991.98px) {
  #gallery_02 .item.slick-slide {
    width: 90px;
    height: 90px;
    margin: 0 5px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
    background: #fff;
    position: relative;
  }
  #gallery_02 .item.slick-slide img {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
  }
  #gallery_02 .item.slick-current.slick-active {
    border-color: var(--primary-color, #4285f4);
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.15);
  }
}

/* ====== Thumbnail: MOBILE (<= 767.98px) ====== */
@media (max-width: 767.98px) {
  #gallery_02 .item.slick-slide {
    width: 80px;
    height: 80px;
    margin: 0 4px;
    /* GIẢM margin để dễ vuốt hơn */
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
    background: #fff;
    position: relative;
  }
  #gallery_02 .item.slick-slide img {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
    /* GIẢM padding cho mobile */
  }
  #gallery_02 .item.slick-current.slick-active {
    border-color: var(--primary-color, #4285f4);
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.15);
  }

  /* QUAN TRỌNG: Không override CSS của Slick trên mobile */
  #gallery_02 .slick-list {
    overflow: hidden;
    /* Đảm bảo swipe mượt */
  }
  #gallery_02 .slick-track {
  ;
  /* BỎ HẾT display: flex !important và các override khác */
  /* Để Slick tự quản lý */
};
/* BỎ HẾT float: none !important */
}

/* ====== Fallback khi CHƯA slick init ====== */
#gallery_02:not(.slick-slider) {
  display: flex;
  align-items: center;
  overflow: hidden;
  gap: 12px;
  justify-content: center;
}
#gallery_02:not(.slick-slider) .item {
  width: 100px;
  height: 100px;
  flex: 0 0 100px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  position: relative;
  overflow: hidden;
}
#gallery_02:not(.slick-slider) .item img {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}

/* Mobile fallback */
@media (max-width: 767.98px) {
  #gallery_02:not(.slick-slider) .item {
    width: 80px;
    height: 80px;
    flex: 0 0 80px;
  }
}

/* Các rule cũ của bạn (giữ nguyên) */
#gallery_1:not(.slick-slider) {
  display: flex;
  align-items: center;
  overflow: hidden;
}
#gallery_1:not(.slick-slider) .item {
  width: 100%;
  flex: 0 0 100%;
  text-align: center;
}
#gallery_1:not(.slick-slider) img {
  content-visibility: initial !important;
  text-align: center;
}
#gallery_1:not(.slick-slider) img.lazyload:not(.loaded) {
  display: none;
}
#gallery_1 .icon-button-play {
  width: 64px !important;
}
#gallery_02:not(.slick-slider) .icon-button-play {
  display: none;
}

/* CSS cho ảnh khi fullscreen */
#gallery-main-img:fullscreen {
  width: 100vw;
  height: 100vh;
  object-fit: contain;
  background: #000;
  border-radius: 0;
  box-shadow: none;
}

#gallery-main-img:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  object-fit: contain;
  background: #000;
  border-radius: 0;
  box-shadow: none;
}

#gallery-main-img:-moz-full-screen {
  width: 100vw;
  height: 100vh;
  object-fit: contain;
  background: #000;
  border-radius: 0;
  box-shadow: none;
}

#gallery-main-img:-ms-fullscreen {
  width: 100vw;
  height: 100vh;
  object-fit: contain;
  background: #000;
  border-radius: 0;
  box-shadow: none;
}

/* Ẩn modal trên mobile và tablet */
@media (max-width: 991.98px) {
  #product-gallery-modal {
    display: none !important;
  }
}

/* CHỈ HIỂN THỊ MODAL TRÊN DESKTOP/LAPTOP */
@media (min-width: 992px) {
  .gallery-modal {
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
  }

  /* CONTAINER CHÍNH - CHIỀU CAO CỐ ĐỊNH */
  .gallery-modal-content {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    
    /* SIZE CỐ ĐỊNH - KHÔNG THAY ĐỔI KHI CHUYỂN TAB */
    width: 85vw;
    max-width: 1200px;
    min-width: 800px;
    height: 85vh; /* CỐ ĐỊNH CHIỀU CAO THAY VÌ MAX-HEIGHT */
    
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    
    /* QUAN TRỌNG: OVERFLOW HIDDEN CHO MODAL CHÍNH */
    overflow: hidden;
    padding: 20px;
    
    /* ẨN HOÀN TOÀN SCROLLBAR - MỌI TRÌNH DUYỆT */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
  }

  /* ẨN SCROLLBAR CHO WEBKIT (Chrome, Safari, Opera) */
  .gallery-modal-content::-webkit-scrollbar {
    display: none;
  }

  /* ẨN SCROLLBAR CHO THUMBNAILS */
  .gallery-thumbs {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .gallery-thumbs::-webkit-scrollbar {
    display: none;
  }

  .gallery-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    z-index: 35;
    transition: color 0.2s ease;
  }
  .gallery-close:hover {
    color: #000;
  }

  /* Tab Navigation - CỐ ĐỊNH CHIỀU CAO */
  .gallery-tab-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    height: 50px; /* CỐ ĐỊNH CHIỀU CAO */
    flex-shrink: 0; /* KHÔNG CHO PHÉP THU NHỎ */
  }

  /* Container cho các tab buttons */
  .gallery-tab-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
  }

  .gallery-tab-btn {
    padding: 8px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #f8f9fa;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
  }
  .gallery-tab-btn:hover {
    background: #e9ecef;
    border-color: #94a3b8;
  }
  .gallery-tab-btn.active {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
  }

  /* TOOLBAR - HIỂN THỊ CHỈ KHI TAB IMAGES ACTIVE */
  .gallery-image-toolbar {
    position: static;
    bottom: auto;
    left: auto;
    transform: none;
    background: transparent;
    border-radius: 0;
    padding: 0;
    display: flex; /* HIỂN THỊ MẶC ĐỊNH */
    justify-content: flex-end;
    align-items: center;
    z-index: auto;
    backdrop-filter: none;
    box-shadow: none;
    width: auto;
    max-width: none;
    border: none;
    margin-left: auto;
    margin-right: 50px;
    opacity: 1; /* HIỂN THỊ FULL Ở TAB IMAGES */
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  /* ẨN TOOLBAR KHI TAB KHÁC ACTIVE */
  .gallery-tab-btn[data-tab="description"].active ~ .gallery-image-toolbar,
  .gallery-tab-btn[data-tab="specs"].active ~ .gallery-image-toolbar {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  /* HIỂN THỊ TOOLBAR KHI TAB IMAGES ACTIVE */
  .gallery-tab-btn[data-tab="images"].active ~ .gallery-image-toolbar {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: all !important;
  }

  .toolbar-left {
    display: flex;
    align-items: center;
    margin-right: 8px;
  }
  .toolbar-center {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 6px;
  }
  .toolbar-right {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
  }
  .image-counter {
    color: #333;
    font-size: 12px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.1);
    padding: 4px 8px;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    white-space: nowrap;
  }
  .toolbar-btn {
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    color: #333;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    user-select: none;
    flex-shrink: 0;
  }
  .toolbar-btn-primary {
    background: rgba(220, 53, 69, 0.9);
    border-color: rgba(220, 53, 69, 1);
    color: white;
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
  .toolbar-btn:hover {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }
  .toolbar-btn-primary:hover {
    background: rgba(220, 53, 69, 1);
    border-color: #dc3545;
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
  }
  .toolbar-btn:active {
    transform: translateY(0) scale(0.98);
  }

  /* Tab Content - CHIỀU CAO CỐ ĐỊNH CHO TẤT CẢ TAB */
  .gallery-tab-content {
    display: none;
    width: 100%;
    height: calc(100% - 80px); /* TRỪ ĐI CHIỀU CAO CỦA TAB NAV */
    position: relative;
    flex-grow: 1; /* CHIẾM HẾT KHÔNG GIAN CÒN LẠI */
  }
  .gallery-tab-content.active {
    display: flex;
    flex-direction: column;
  }

  /* TAB IMAGES - KHÔNG SCROLL, CỐ ĐỊNH HOÀN TOÀN */
  #gallery-tab-images {
    overflow: hidden !important; /* KHÔNG BAO GIỜ SCROLL */
  }

  /* TAB MÔ TẢ VÀ THÔNG SỐ - CÓ SCROLL */
  #gallery-tab-description,
  #gallery-tab-specs {
    overflow-y: auto !important; /* CHỈ CÁC TAB NÀY MỚI SCROLL */
  }

  /* Large Image Container - CỐ ĐỊNH HOÀN TOÀN KHÔNG SCROLL */
  .gallery-large-image {
    text-align: center;
    margin-bottom: 15px;
    width: 100%;
    position: relative;
    height: calc(100% - 100px); /* TRỪ ĐI THUMBNAILS */
    max-height: none;
    min-height: 300px; /* GIẢM MIN-HEIGHT */
    flex-shrink: 0;
    overflow: hidden; /* ẨN BẤT KỲ OVERFLOW NÀO */
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .gallery-large-image img {
    border-radius: 12px;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* ĐẢM BẢO ẢNH FIT HOÀN TOÀN */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    background: #f8f9fa;
    display: block; /* ĐẢM BẢO DISPLAY BLOCK */
  }

  /* Navigation buttons */
  .gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: #333;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 20;
    opacity: 0.8;
  }
  .gallery-nav-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  }
  .gallery-nav-btn:active {
    transform: translateY(-50%) scale(0.98);
  }
  .gallery-nav-prev {
    left: 15px;
  }
  .gallery-nav-next {
    right: 15px;
  }
  .gallery-nav-btn.hidden {
    display: none !important;
  }
  .gallery-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: rgba(200, 200, 200, 0.5);
  }
  .gallery-nav-btn:disabled:hover {
    transform: translateY(-50%);
    background: rgba(200, 200, 200, 0.5);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  }

  /* Thumbnails - CỐ ĐỊNH CHIỀU CAO */
  .gallery-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    max-width: 100%;
    overflow-x: auto;
    padding: 8px 0;
    height: 90px; /* CỐ ĐỊNH CHIỀU CAO */
    flex-shrink: 0;
  }
  .gallery-thumb {
    width: 70px;
    height: 70px;
    border-radius: 6px;
    border: 2px solid #e5e7eb;
    object-fit: contain;
    cursor: pointer;
    background: #fff;
    padding: 3px;
    transition: all 0.2s ease;
    flex-shrink: 0;
  }
  .gallery-thumb:hover {
    border-color: #94a3b8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
  .gallery-thumb.active {
    border-color: #4285f4;
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.15);
  }

  /* Content areas - CHỈ CÁC TAB MÔ TẢ/THÔNG SỐ MỚI CÓ SCROLL */
  .gallery-description-content,
  .gallery-specs-content {
    height: 100%; /* CHIẾM HẾT CHIỀU CAO */
    overflow-y: auto; /* CHO PHÉP SCROLL NỘI DUNG */
    padding: 15px 20px;
    width: 100%;
  }
  
  .modal-description-content {
    width: 100%;
    height: 100%;
  }
  .custom-modal-heading-bar {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #dc3545;
    flex-shrink: 0; /* KHÔNG CHO PHÉP THU NHỎ */
  }
  .custom-modal-heading-bar__title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
    text-transform: uppercase;
  }
  .modal-product-getcontent {
    line-height: 1.6;
    color: #555;
    font-size: 14px;
  }
  .modal-content-description {
    font-size: 14px;
  }
  .modal-content-description h1,
  .modal-content-description h2,
  .modal-content-description h3,
  .modal-content-description h4 {
    color: #333;
    margin-top: 15px;
    margin-bottom: 8px;
  }
  .modal-content-description p {
    margin-bottom: 12px;
  }
  .modal-content-description ul,
  .modal-content-description ol {
    margin-left: 20px;
    margin-bottom: 12px;
  }
  .modal-content-description img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 8px 0;
  }
  .gallery-specs-content,
  .gallery-specs-content .product_getcontent,
  .gallery-specs-content .product-specifications-modal .product_getcontent {
    max-height: none !important;
    overflow: visible !important;
    height: auto !important;
  }
  .gallery-specs-content .has-overflow {
    max-height: none !important;
  }
  .gallery-specs-content .product_getcontent {
    -webkit-line-clamp: unset !important;
    line-clamp: unset !important;
  }

  /* Smooth transitions */
  .gallery-modal {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  .gallery-modal[style*="flex"] {
    opacity: 1;
    visibility: visible;
  }
}

/* ẨN TẤT CẢ SCROLLBAR TRÊN TOÀN WEBSITE (OPTIONAL) */
* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
*::-webkit-scrollbar {
  display: none;
}

/* RESPONSIVE CHO LAPTOP NHỎ */
@media (min-width: 992px) and (max-width: 1439px) {
  .gallery-modal-content {
    width: 85vw;
    max-width: 950px;
    min-width: 750px;
    height: 88vh;
    max-height: 780px;
  }
  
  .gallery-large-image {
    min-height: 340px;
    height: calc(100% - 110px);
  }
  
  .gallery-thumbs {
    height: 80px;
    gap: 6px;
  }
  
  .gallery-thumb {
    width: 60px;
    height: 60px;
  }
  
  .toolbar-btn {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }
  
  .toolbar-btn-primary {
    width: 34px;
    height: 34px;
    font-size: 13px;
  }
  
  .image-counter {
    font-size: 11px;
    padding: 3px 7px;
  }
  
  .toolbar-center {
    gap: 4px;
  }
  
  .toolbar-right {
    gap: 4px;
  }
  
  .gallery-tab-btn {
    padding: 7px 12px;
    font-size: 13px;
  }
  
  .gallery-nav-btn {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }
}

/* DESKTOP LỚN */
@media (min-width: 1440px) {
  .gallery-modal-content {
    width: 85vw;
    max-width: 1400px;
    height: 85vh; /* CỐ ĐỊNH CHIỀU CAO */
  }
  .gallery-large-image {
    min-height: 350px; /* TĂNG MIN-HEIGHT CHO DESKTOP LỚN */
  }
  .toolbar-btn {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
  .toolbar-btn-primary {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  .gallery-modal-footer {
    margin-top: 20px; /* Thêm khoảng cách từ nội dung phía trên */
  }
}

/* Modal Footer - Thương hiệu (Style đơn giản như ảnh) */
.gallery-modal-footer {
  background-color: #ffffff;
  // margin-top: 20px; /* Thêm khoảng cách từ nội dung phía trên */
}

.modal-footer-brand-section {
  padding: 0;
  background: none;
  border: none;
}

.footer-brand-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 16px;
  font-family: inherit;
  color: #495057;
}

.footer-brand-label {
  font-weight: normal;
  color: #6c757d;
  display: flex;
  align-items: center;
  gap: 4px;
}

.footer-brand-label i {
  color: #007bff;
  font-size: 14px;
}

.footer-brand-value {
  font-weight: normal;
}

.footer-brand-link {
  color: #007bff;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: color 0.2s ease;
}

.footer-brand-link:hover {
  color: #0056b3;
  text-decoration: underline;
}

/* Đảm bảo modal content có flex layout */
.gallery-modal-content {
  display: flex;
  flex-direction: column;
  height: 90vh;
  max-height: 90vh;
}

.gallery-tab-content {
  flex: 1;
  overflow-y: auto;
}

/* Khung + shadow cho cột chi tiết sản phẩm */
.details-right {
  border: 2px solid #e5e7eb;
  /* giống border gallery */
  border-radius: 12px;
  /* bo tròn */
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  /* shadow nhẹ */
  background: #fff;
  /* nền trắng */
  padding: 16px;
  /* thêm padding cho cân */
  box-sizing: border-box;
}

@media (max-width: 575px) {
  .details-right {
    padding: 16px 16px 0;
  }
}

/* Giữ spacing hợp lý trên mobile */
@media (max-width: 767px) {
  .details-pro {
    margin-top: 16px;
    /* tách gallery với info */
    padding: 12px;
  }
}
/** product right **/
.product-policises {
  font-size: 14px;
  display: flex;
  flex-direction: column;
}
@media (max-width: 767px) {
  .product-policises {
    grid-template-columns: 1fr;
  }
}
// .product-policises-wrapper {
// margin-top: var(--block-spacing);
// padding: var(--block-spacing) 0;
// }
.product-policises .media > div:not(.media-body) {
  width: 24px;
  height: 24px;
}
.product-policises .media + * {
  margin-top: 10px;
  border-top: 1px dashed var(--border-color);
  padding-top: 10px;
}
#content {
  overflow: hidden;
  word-break: break-word;
}
#content img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

#content img:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.15);
}
#content iframe,
#content video {
  max-width: 100% !important;
}
.product_getcontent {
  max-height: 500px;
  overflow: hidden;
}

.ega-pro__seemore {
  position: relative;
}
.ega-pro__seemore.show:before {
  content: none;
}
// .ega-pro__seemore:before {
//   position: absolute;
//   content: "";
//   left: 0;
//   right: 0;
//   bottom: 100%;
//   height: 100px;
//   background: linear-gradient(180deg, rgba(255, 255, 255, 0) 17%, #fff 93.12%);
// }
/** Related pro **/

@media (max-width: 768px) {
  .product_related.row {
    flex-wrap: nowrap;
    overflow: auto;
  }
  .product_related.row::-webkit-scrollbar {
    display: none;
  }
  .product_related.row {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
  }
  .product_related.row .col-12 {
    padding: 5px;
  }
}
#cr-addon-pro,
.crbtn-modal.crbtn-modal---toast .crbtn-modal__body {
  font-size: 14px !important;
  line-height: 21px !important;
}
.crbtn-modal__header {
  font-size: 1rem !important;
  font-weight: 500 !important;
  line-height: 1.5 !important;
  color: var(--text-color) !important;
}
.crbtn-modal__left {
  border: none !important;
  border-radius: 0 !important;
}
.ega-cr-addon .ega-menu__item.disabled {
  opacity: 0.6 !important;
}
.bpr-products-module-heading {
  padding-top: 5px;
  border-bottom: 1px solid #eee;
}
@media (max-width: 991px) {
  #ega-sticky-addcart {
    display: none;
  }
}
#ega-sticky-addcart .productAnchor_horizonalNavs {
  align-items: center;
  background: #fff;
  top: 0 !important;
  transition: all 0.5s ease;
  z-index: 99;
  width: 100%;
  padding: 5px 0;
}
#ega-sticky-addcart .productAnchor_horizonalNav {
  display: flex;
  align-items: center;
}
#ega-sticky-addcart .product_info_image {
  width: 100px;
  height: 100px;
  margin-right: 10px;
  position: relative;
}
#ega-sticky-addcart .product_info_image img {
  width: auto;
  max-height: 100%;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;
}
#ega-sticky-addcart .product_info_name {
  line-height: 1.1;
  line-height: 1.4;
  color: #191919;
  margin-right: 20px;
  font-size: 16px;
  font-weight: 500;
  margin-top: 0;
  margin-bottom: 4px;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  white-space: initial;
  overflow: hidden;
  padding: 2px 0;
}
#ega-sticky-addcart .product-price {
  font-weight: bold;
  color: var(--price-color);
}
/* ===== Grid layout cho sticky add-to-cart ===== */
#ega-sticky-addcart .product_info_buttons {
  display: grid;
  margin-left: auto;
  align-items: center;
  grid-template-columns: 1fr auto auto;
  /* tự động điều chỉnh */
  grid-gap: 20px;
}

#ega-sticky-addcart .product_info_content {
  max-width: 500px;
}

/* ===== Sticky variables ===== */
#ega-sticky-addcart {
  --sticky-control-h: 45px;
  /* chiều cao đồng bộ */
  --sticky-font: 14px;
  /* font size */
  --sticky-btn-pad-x: 16px;
  /* padding ngang button */
  --sticky-num-btn-w: 36px;
  /* width nút +/- */
}

/* ===== Phần số lượng - gọn gàng hơn ===== */
#ega-sticky-addcart .soluong {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

#ega-sticky-addcart .soluong label {
  font-size: var(--sticky-font);
  color: #666;
  margin: 0;
  font-weight: 500;
}

#ega-sticky-addcart .input_number_product {
  margin: 0;
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  width: 120px;
  /* chiều rộng cố định */
}

/* ===== Input và buttons trong số lượng ===== */
#ega-sticky-addcart .input_number_product input,
#ega-sticky-addcart .input_number_product .btn_num {
  height: var(--sticky-control-h) !important;
  line-height: var(--sticky-control-h) !important;
  padding: 0 !important;
  box-sizing: border-box;
  font-size: var(--sticky-font) !important;
  border: none;
  background: white;
}

#ega-sticky-addcart .input_number_product input {
  flex: 1;
  text-align: center;
  border-left: 1px solid #ddd;
  border-right: 1px solid #ddd;
  width: 48px;
}

#ega-sticky-addcart .input_number_product .btn_num {
  width: var(--sticky-num-btn-w) !important;
  background: #f8f9fa;
  color: #666;
  transition: all 0.2s ease;
}

#ega-sticky-addcart .input_number_product .btn_num:hover {
  background: #e9ecef;
  color: #333;
}

/* ===== Button thêm vào giỏ - nhỏ gọn ===== */
#ega-sticky-addcart .form-product {
  grid-column: 3;
}

#ega-sticky-addcart .button_actions {
  grid-template-columns: 1fr !important;
}

#ega-sticky-addcart .btn_add_cart {
  height: var(--sticky-control-h);
  padding: 0 var(--sticky-btn-pad-x);
  font-size: var(--sticky-font);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  min-width: 130px;
  /* width tối thiểu */
  font-weight: 500;
}

/* ===== Responsive ===== */
@media (max-width: 1199.98px) {
  #ega-sticky-addcart .product_info_buttons {
    grid-gap: 15px;
  }

  #ega-sticky-addcart .input_number_product {
    width: 110px;
  }

  #ega-sticky-addcart .btn_add_cart {
    min-width: 120px;
    padding: 0 12px;
  }
}

/* ===== Selector cụ thể hơn ===== */
section #ega-sticky-addcart .product_info_buttons .form-product .btn_add_cart.btn {
  height: 40px;
  min-height: 36px;
  padding: 0 16px;
  font-size: 14px;
  min-width: 140px;
  /* tăng từ 110px lên 140px */
  max-width: 140px;
  line-height: 34px;
  /* điều chỉnh theo height */
  border-radius: 6px;
}

/* ===== Input number với selector mạnh ===== */
section #ega-sticky-addcart .soluong .input_number_product {
  width: 110px;
  /* tăng từ 100px lên 110px */
  height: 36px;
}

section #ega-sticky-addcart .soluong .input_number_product input,
section #ega-sticky-addcart .soluong .input_number_product .btn_num {
  height: 36px;
  line-height: 34px;
  /* điều chỉnh theo height */
  font-size: 14px;
}

section #ega-sticky-addcart .soluong .input_number_product .btn_num {
  width: 34px;
  /* nút +/- cũng to hơn một chút */
}

/* Nhãn “Số lượng:” gọn */
#ega-sticky-addcart .soluong > label {
  margin-right: 6px;
  font-size: var(--sticky-font);
  white-space: nowrap;
}

/* ================== VARIANTS – xếp 1 cột ================== */
#ega-sticky-addcart .box-variant {
  display: flex;
  flex-direction: column;
  /* 1 cột */
  align-items: flex-start;
  /* căn trái gọn */
  row-gap: 6px;
  /* khoảng cách mỗi dòng */
  column-gap: 0;
  margin-right: 8px;
  /* tách cụm variants với số lượng */
}

/* Mỗi cặp label + select gọn trên 1 dòng */
#ega-sticky-addcart .box-variant .variant-item,
#ega-sticky-addcart .box-variant .selector-wrapper,
#ega-sticky-addcart .box-variant > label + select {
  /* fallback khi không có wrapper */
  display: inline-flex;
  align-items: center;
  gap: 6px;
  /* khoảng cách label ↔ select */
}

/* Label nhỏ gọn */
#ega-sticky-addcart .box-variant label {
  margin: 0;
  font-size: var(--sticky-font);
  font-weight: 600;
  color: #222;
  white-space: nowrap;
}

/* Select gọn, đồng chiều cao với các control khác */
#ega-sticky-addcart .box-variant select {
  height: var(--sticky-control-h);
  line-height: var(--sticky-control-h);
  font-size: var(--sticky-font);
  padding: 0 22px 0 8px;
  /* chừa chỗ caret */
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  min-width: 130px;
  /* gọn – có thể tăng nếu cần */
  max-width: 200px;
  /* tránh choáng chỗ */
}
#ega-sticky-addcart .box-variant select:focus {
  outline: none;
  border-color: #d0d7ff;
  box-shadow: 0 0 0 2px rgba(34, 102, 234, 0.08);
}
#ega-sticky-addcart .box-variant select::-ms-expand {
  display: none;
}

/* ================== Mobile ================== */
@media (max-width: 575.98px) {
  #ega-sticky-addcart {
    --sticky-control-h: 32px;
    --sticky-font: 12px;
  }
  /* Cho mỗi dòng thuộc tính full-width nếu cần */
  #ega-sticky-addcart .box-variant .variant-item,
  #ega-sticky-addcart .box-variant .selector-wrapper {
    width: 100%;
  }
  #ega-sticky-addcart .box-variant select {
    min-width: 0;
    max-width: 100%;
    padding: 0 18px 0 8px;
  }
}

/* Nút THÊM VÀO GIỎ – match height + căn giữa dọc (nhỏ gọn) */
#ega-sticky-addcart button.btn.btn_base.btn_add_cart.btn-cart.add_to_cart {
  height: var(--sticky-control-h) !important;
  padding: 0 var(--sticky-btn-pad-x) !important;
  /* không đội height */
  border-radius: 8px !important;

  background: #ff1a00 !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: none !important;
  text-shadow: none !important;

  display: inline-flex !important;
  align-items: center !important;
  /* căn giữa theo chiều dọc */
  justify-content: center !important;
  gap: 8px;
  font-weight: 600;
  font-size: var(--sticky-font) !important;
  line-height: 1 !important;
}

/* đảm bảo mọi phần tử con trong nút đều trắng */
#ega-sticky-addcart button.btn.btn_base.btn_add_cart.btn-cart.add_to_cart * {
  color: #fff !important;
}

/* hover/active */
#ega-sticky-addcart button.btn.btn_base.btn_add_cart.btn-cart.add_to_cart:hover {
  filter: brightness(1.06);
}
#ega-sticky-addcart button.btn.btn_base.btn_add_cart.btn-cart.add_to_cart:active {
  transform: translateY(1px);
}

/* disabled */
#ega-sticky-addcart button.btn.btn_base.btn_add_cart.btn-cart.add_to_cart[disabled] {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
  filter:none;
}

.coupon_item {
  padding: 7px !important;
}
.coupon_item .coupon_body .coupon_title {
  font-size: 14px !important;
}
.coupon_item .coupon_body {
  padding: 5px 5px 5px 10px !important;
}
.coupon_item .coupon_body button span {
  line-height: 22px !important;
  height: 22px !important;
}
.coupon_item .coupon_body .coupon_desc {
  padding-bottom: 10px !important;
}
.flashsale__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.details-product .flashsale {
  padding: 0;
  border-radius: 4px;
  margin-top: 20px;
}
.details-product .flashsale__title h5 {
  font-size: 14px;
  font-weight: 700;
}
.details-product .flashsale__countdown-label {
  font-size: 14px;
}
.flashsale__header,
.flashsale__product {
  padding: 5px 8px;
}
.details-product .flashsale__bottom {
  padding: 0
}
.flashsale__product {
  background: #FFF6DD;
  border-radius: 0 0 4px 4px;
}
.details-product .ega-badge-ctd__item + span {
  display: none;
}
.details-product .ega-badge-ctd__item {
  font-size: 13px;
}
.details-product .ega-badge-ctd > div:not(.ega-badge-ctd__colon) {
  width: 22px;
  height: 21px;
}
@media (max-width: 575px) {
  .details-product .flashsale__title {
    text-align: center;
    margin-top: 0;
    margin-bottom: 0;
  }
  .details-product .flashsale__countdown-wrapper {
    flex-direction: row;
  }
  .details-product .flashsale__countdown-label {
    display: block !important;
  }
}
@media (max-width: 1024px) {
  .product-sidebar-title {
    display: flex;
    overflow: auto;
  }
  .item_product_main.product--media {
    margin-bottom: 0.75rem;
    flex: 0 0 40%;
  }
}
@media (max-width: 767px) {
  .product-sidebar-title {
    flex-wrap: wrap;
  }
  .item_product_main.product--media {
    flex: 0 0 100%;
  }
}
.filter-item-toggle {
  margin: auto;
  color: var(--primary-color);
}
@media (min-width: 768px) {
  .overflow-item:not(.show) {
    display: none;
  }
}
.filter-item-toggle .fas {
  transitions: all 0.3s ease-out;
}
.filter-item-toggle.show {
  display: inline-block;
}
.filter-item-toggle.show .fas {
  transform: rotate(180deg);
}
.pp_gallery {
  display: none !important;
}
#stock-notify-form {
  max-width: 400px;
}
#stock-notify-form .btn {
  font-size: 14px;
}
.stock-notify-title {
  color: var(--primary-color);
  font-weight: 500;
  font-size: 18px;
  margin-bottom: 8px;
  display: block;
}
div#stock-notify {
  padding: 15px 20px;
  background: #eef2f8;
  border-radius: 4px;
  margin-bottom: 20px;
}
.product-trustbadge .title-menu {
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 10px;
}
.details-main .heading-bar {
  padding-top: 0;
}
.heading-bar__title {
  font-size: 20px;
}
.product-right > div:not(:first-of-type) {
  margin-top: 15px;
}


/*
   =========================================================
   PRODUCT ACTION BUTTONS – GRID + STYLE + MOBILE RULES
   (giữ nguyên hành vi: PC hiển thị 4 nút; Mobile chỉ còn MUA NGAY)
   =========================================================
*/

/* ---------- GRID 2 NÚT / HÀNG ---------- */.button_actions .btn-row {
  /* mỗi hàng 2 nút */
  display: flex;
  gap: 10px;
  width: 100%;
}
.button_actions .btn-row > * {
  /* các nút co giãn đều */
  flex: 1 1 0 !important;
  width: auto !important;
  margin: 0 !important;
}
.button_actions .btn-cart,
.button_actions .btn-installment,
.buynow {
  /* vô hiệu width/margin cũ từ theme */
  width: auto !important;
  margin-top: 0 !important;
}

/* ---------- BASE BUTTON ---------- */
.button_actions .btn,
.button_actions button {
  min-height: 56px;
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 700;
  line-height: 1.25;
  transition: transform 0.25s
  , background 0.25s
  , color 0.25s
  , border-color 0.25s;
}
.button_actions .btn:hover {
  transform: translateY(-2px);
}
.button_actions .btn .text-wrap {
  display: flex;
  flex-direction: column;
  gap: 7px;
  line-height: 1.25;
}
.button_actions .btn .btn-title {
  font-size: 16px;
  font-weight: 600;
}
.button_actions .btn .btn-subtitle {
  font-size: 12px;
  font-weight: 600;
  opacity: .95;
}

/* ---------- VARIANTS (HÀNG 1) ---------- */
.buynow {
  /* MUA NGAY */
  background: #ff7a00;
  border: 2px solid #ff7a00;
  color: #fff !important;
}
.buynow .btn-title,
.buynow .btn-subtitle {
  color: #fff;
}

.btn-cart {
  /* THÊM VÀO GIỎ */
  background: #DFEDE1;
  border: 2px solid #ff7a00 !important;
  color: #1849D6 !important;
}
.btn-cart .btn-title {
  color: #1849D6;
}
.btn-cart .btn-subtitle {
  color: #1d1d1d;
}

/* ---------- VARIANTS (HÀNG 2) ---------- */
.btn-call,
.btn-zalo {
  /* layout chung cho 2 nút */
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px;
  line-height: 1.3;
  font-weight: 700;
  background: #fff;
  border-radius: 8px;
  padding: 14px 20px;
  transition: all 0.25s ease;
}
/* GỌI MUA HÀNG */
.btn-call {
  color: #ff7a00 !important;
  border: 2px solid #ff7a00;
}
.btn-call:hover {
  background: #ff7a00;
  color: #fff !important;
}
/* CHAT ZALO */
.btn-zalo {
  color: #0068ff !important;
  border: 2px solid #0068ff;
}
.btn-zalo:hover {
  background: #0068ff;
  color: #fff !important;
}

/* ---------- ICONS ---------- */
.btn-call img,
.btn-zalo img {
  /* icon chuẩn */
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  object-fit: contain;
  display: inline-block;
  background: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}
/* badge tròn trắng + hover nổi */
.button_actions .btn-call img,
.button_actions .btn-zalo img {
  width: 40px;
  height: 40px;
  margin-right: 0 !important;
  background: #fff;
  border-radius: 999px;
  padding: 3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12)
  , inset 0 0 0 2px rgba(255, 255, 255, 0.6);
  transition: transform 0.18s
  , box-shadow 0.18s
  , filter 0.18s;
}
.button_actions .btn-call:hover img,
.button_actions .btn-zalo:hover img {
  transform: translateY(-1px) scale(1.06);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16)
  , inset 0 0 0 2px rgba(255, 255, 255, 0.8);
}


/*
   ---------- MOBILE (≤575px) ----------
   1) Ẩn THÊM GIỎ / GỌI MUA / ZALO vì có sticky bar
   2) Chỉ giữ MUA NGAY (full chiều ngang) 3) Đồng nhất kích thước, icon nhỏ gọn
   --------------------------------------
*/
@media (max-width: 575px) {
  /* ——— SẢN PHẨM CÓ GIÁ (không phải Liên hệ) ——— */
  .button_actions:not(.contact-only) .btn-cart,
  .button_actions:not(.contact-only) .btn-call,
  .button_actions:not(.contact-only) .btn-zalo {
    display: none !important;
  }

  /* Ẩn hẳn hàng 2 (call + zalo) */
  .button_actions:not(.contact-only) .btn-row:last-child {
    display: none !important;
  }

  /* Còn lại 1 nút → full width */
  .button_actions:not(.contact-only) .btn-row {
    flex-direction: column;
    gap: 0;
    margin-bottom: 0;
  }
  .button_actions:not(.contact-only) .btn-row > * {
    width: 100% !important;
  }

  /* Nút MUA NGAY 2 dòng: căn giữa dọc */
  .button_actions:not(.contact-only) .buynow {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* canh giữa dọc */
    min-height: 64px;
    /* thoáng cho 2 dòng */
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 15px;
  }

  /* Ổn định typography cho 2 dòng trong nút */
  .button_actions .btn-title,
  .button_actions .btn-subtitle {
    margin: 0;
    line-height: 1.2;
  }
  .button_actions .btn-subtitle {
    font-size: 12px;
    opacity: .9;
  }

  /* Icon gọn cho các nút có icon */
  .button_actions .btn-call img,
  .button_actions .btn-zalo img {
    width: 20px;
    height: 20px;
    padding: 2px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12)
    , inset 0 0 0 2px rgba(255, 255, 255, 0.6);
  }
}

/* Phòng hờ nếu theme có dùng .hidden */
.hidden {
  display: none !important;
}

/* Phòng hờ nếu theme chưa có */
.hidden {
  display: none !important;
}

/* ---------- SPACING GIỮA HAI HÀNG (PC) ---------- */
.button_actions .btn-row + .btn-row {
  margin-top: 8px;
}


/** =================================================================
 * PRODUCT BUTTONS & ACTIONS
 * ================================================================= */

.button_actions .btn_base {
  width: 100%;
}

.button_actions {
  display: flex;
  // margin-bottom: 10px;
  flex-wrap: wrap;
}

.button_actions .btn {
  transition: all 0.3s ease;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  flex-flow: column;
  justify-content: center;
  align-items: center;
  height: 55px;
  font-size: 14px;
  line-height: 20px;
  padding: 5px 10px;
}

.button_actions .btn span {
  font-weight: 600;
  font-size: 12px;
}

@media (min-width: 576px) and (max-width: 991px) {
  .button_actions .btn span {
    font-size: 10px;
  }
}

.buynow,
.quick-view-product .button_actions .btn-cart {
  grid-column: 1 / -1;
  background-color: var(--buynow-bg);
  color: var(--buynow-text-color);
}

.buynow:hover {
  color: var(--buynow-text-color);
  opacity: .8;
}

.button_actions .btn-cart,
.btn-installment {
  color: var(--buynow-bg);
  border: 1px solid var(--buynow-bg);
  margin-top: 10px;
  width: calc(50% - 5px);
}

.button_actions .btn-cart:hover,
.btn-installment:hover {
  background-color: var(--buynow-bg);
  color: #fff;
  filter: brightness(1.2);
}

.button_actions .btn-cart {
  margin-right: 5px;
}

.btn-installment {
  margin-left: 5px;
}

.button_actions .btn:only-child,
.button_actions .btn.is-full {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.button_actions .btn-cart strong {
  font-size: 16px;
}

/* ===== KHUYẾN MÃI & ƯU ĐÃI - VIỀN ĐẦY ĐỦ ===== */
.product-policises-wrapper {
  position: relative;
  margin: 30px 0 20px;
  padding: 0;
  border: 2px solid #e74c3c;
  border-radius: 14px;
  background: #fff;
}

/* Tiêu đề trong wrapper */
.product-policises-wrapper h5 {
  position: absolute;
  top: -14px;
  left: 16px;
  margin: 0 !important;
  padding: 0 12px !important;
  background: #fff;
  color: #e74c3c;
  font-size: 18px !important;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1;
  z-index: 2;
  border-radius: 4px;
  /* Hiệu ứng nhấp nháy nhẹ */
  animation: promoPulse 6s ease-in-out infinite;
}
/* Gạch sáng chạy ngang dưới tiêu đề */
.product-policises-wrapper h5::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -8px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg,transparent,#ff754c 35%,#ff3d2f,#ff754c 65%,transparent);
  background-size: 200% 100%;
  animation: underlineSweep 3.2s linear infinite;
  pointer-events: none;
}

/* List trong wrapper */
.product-policises {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  column-gap: 32px;
  row-gap: 12px;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 25px 22px 16px !important;
  /* chừa chỗ cho h5 */
  margin: 0 !important;
  list-style: none;
}

/* Item + nội dung */
.product-policises li.media {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  color: #222;
  font-weight: 500;
  line-height: 1.35;
  margin: 0;
  padding: 0;
  /* hiệu ứng vào + nhún nhẹ định kỳ */
  opacity: 0;
  transform: translateY(6px);
  animation: itemIn 0.5s ease forwards
  , itemFloat 8s ease-in-out 0.8s infinite;
  border: none !important;
  background: none !important;
}
.product-policises li.media:nth-child(1) {
  animation-delay: 0.05s
  , 1.4s;
}
.product-policises li.media:nth-child(2) {
  animation-delay: 0.15s
  , 1.6s;
}
.product-policises li.media:nth-child(3) {
  animation-delay: 0.25s
  , 1.8s;
}
.product-policises li.media:nth-child(4) {
  animation-delay: 0.35s
  , 2.0s;
}

.product-policises .mr-2 {
  margin: 1px 0 0 !important;
  flex-shrink: 0;
}

/* Icon – heartbeat nhẹ, so-le */
.product-policises img {
  width: 26px !important;
  height: 26px !important;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(39%) sepia(96%) saturate(1752%) hue-rotate(345deg) brightness(95%) contrast(94%);
  transition: transform 0.22s ease
  , filter 0.22s ease;
  /* để mượt nếu có thay đổi sau này */
  animation: iconBeat 2.6s ease-in-out infinite;
  transform-origin: center;
}
.product-policises li:nth-child(1) img {
  animation-delay: 0s;
}
.product-policises li:nth-child(2) img {
  animation-delay: 0.15s;
}
.product-policises li:nth-child(3) img {
  animation-delay: 0.30s;
}
.product-policises li:nth-child(4) img {
  animation-delay: 0.45s;
}

/* Bỏ hết hover (không đổi màu/di chuyển) */

/* Văn bản trong item */.product-policises .media-body {
  font-size: 16px;
  font-weight: 500;
  color: #222;
  margin: 0;
  line-height: 1.4;
}

/* ===== KEYFRAMES ===== */
@keyframes promoPulse {
  0,
  70%,
  100% {
    text-shadow: none;
    filter:none;
  }
  20% {
    text-shadow: 0 0 10px rgba(231, 76, 60, 0.45)
    , 0 0 18px rgba(231, 76, 60, 0.35);
  }
  25% {
    text-shadow: 0 0 6px rgba(231, 76, 60, 0.2);
  }
}
@keyframes underlineSweep {
  0% {
    background-position: 200% 0;
    opacity: .25;
  }
  20% {
    opacity: .85;
  }
  100% {
    background-position: -200% 0;
    opacity: .25;
  }
}
@keyframes iconBeat {
  0,
  100% {
    transform: scale(1);
  }
  15% {
    transform: scale(1.08);
  }
  30% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.05);
  }
  60% {
    transform: scale(1);
  }
}
@keyframes itemIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes itemFloat {
  0,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

/* Tôn trọng “giảm chuyển động” của hệ thống */
@media (prefers-reduced-motion: reduce) {
  .product-policises-wrapper h5,
  .product-policises-wrapper h5::after,
  .product-policises li.media,
  .product-policises img {
    animation: none !important;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .product-policises-wrapper h5 {
    font-size: 15px !important;
    padding: 0 8px !important;
    top: -11px;
    left: 12px;
  }
  .product-policises {
    grid-template-columns: 1fr !important;
    column-gap: 0;
    row-gap: 8px;
    padding: 18px 12px 10px !important;
  }
  .product-policises li.media {
    font-size: 14px;
    gap: 8px;
  }
  .product-policises .media-body {
    font-size: 14px;
  }
  .product-policises img {
    width: 20px !important;
    height: 20px !important;
  }
}
@media (max-width: 480px) {
  .product-policises {
    padding: 15px 8px 8px !important;
  }
  .product-policises li.media {
    font-size: 13px;
  }
  .product-policises .media-body {
    font-size: 13px;
  }
}

/* ====== MẶC ĐỊNH (desktop & tablet) ====== */
.pd-tabs {
  display: none !important;
} /* ẩn thanh tab */
#tab-desc,
#tab-spec {
  display: block !important;
} /* hiện cả 2 khối như cũ */
#tab-desc {
  border: 1px solid rgba(0, 0, 0, 0.125) !important;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(34, 102, 234, 0.08);
}

#tab-desc .content::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 96px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(255,255,255,0), #fff);
}

/* khi đã "mở rộng" */
#tab-desc.is-expanded .content {
  max-height: none;
}
#tab-desc.is-expanded .content::after {
  display: none;
}

/* Mặc định ẩn khối nút xem thêm, chỉ show khi thật sự dư nội dung (JS thêm class) */
#tab-desc + .js-seemore {
  display: none;
}
#tab-desc.has-overflow + .js-seemore {
  display: block;
}


/* ====== MOBILE CHỈ ≤ 768px ====== */
@media (max-width: 767.98px) {
  .pd-tabs {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
  }
  
  .pd-tab {
    display: block;
    text-align: center;
    padding: 12px 16px;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    color: #374151;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
  }

  /* Hiệu ứng hover/touch để người dùng biết có thể click */
  .pd-tab:active {
    transform: scale(0.98);
    background: #e5e7eb;
  }

  /* Tab active - Style nổi bật hơn */
  .pd-tab[aria-selected="true"] {
    background: linear-gradient(135deg, #ff6a00 0%, #ff8533 100%);
    color: #ffffff !important;
    border-color: #ff6a00;
    box-shadow: 0 4px 12px rgba(255, 106, 0, 0.3),
                0 -2px 8px rgba(255, 106, 0, 0.15);
    font-weight: 700;
  }

  /* Thêm icon mũi tên nhỏ cho tab active */
  .pd-tab[aria-selected="true"]::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #ff6a00;
  }

  /* Tab không active - làm nổi hơn bằng màu nhạt hơn */
  .pd-tab:not([aria-selected="true"]) {
    background: #ffffff;
    border: 2px solid #d1d5db;
    color: #6b7280;
  }

  /* Ẩn/hiện panel */
  #tab-desc,
  #tab-spec {
    display: none !important;
  }
  #tab-desc.is-visible,
  #tab-spec.is-visible {
    display: block !important;
  }
}
/* Bất kỳ .card nào có .custom-heading-bar bên trong -> bo viền + shadow */
.card.p-3:has(.custom-heading-bar) {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.125) !important;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(34, 102, 234, 0.08);
  padding: 16px !important;
  overflow: hidden;
  // margin-bottom:20px;
}
@media (max-width: 767.98px) {
  .card.p-3:has(.custom-heading-bar) {
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(34, 102, 234, 0.08);
    padding: 12px !important;
  }
}

/* ====== RELATED ARTICLES – full CSS (keep your shadow & border) ====== */

/* Biến khoảng cách mặc định (desktop) */#product-related-articles {
  --ra-gap-x: 8px;
  /* ngang giữa các cột */
  --ra-gap-y: 16px;
  /* dọc giữa các hàng */
}

/* ===== Heading: Title + Xem tất cả ===== */
#product-related-articles .custom-heading-bar {
  border: none;
  padding: 0;
}
#product-related-articles .custom-heading-bar__title {
  margin: 0;
  font-weight: 700;
  font-size: 20px;
}
#product-related-articles .ra-seeall-link {
  font-weight: 600;
  color: #0d6efd;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(13, 110, 253, 0.08);
  transition: background 0.2s
  , box-shadow 0.2s
  , transform 0.2s;
}
#product-related-articles .ra-seeall-link:hover {
  background: rgba(13, 110, 253, 0.14);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.12);
}
/* tắt gạch trang trí auto */
#product-related-articles .title_module_main::before,
#product-related-articles .title_module_main::after,
#product-related-articles .custom-heading-bar::before,
#product-related-articles .custom-heading-bar::after,
#product-related-articles .custom-heading-bar__title::before,
#product-related-articles .custom-heading-bar__title::after {
  content: none !important;
  display: none !important;
}

/* ===== Grid 4 card – không kéo/không scroll ===== */
#product-related-articles .js-ra-list {
  display: flex;
  flex-wrap: wrap;
  /* siết gutter: bù margin âm để padding cột tạo khoảng cách */
  margin-left: calc(var(--ra-gap-x) * -1);
  margin-right: calc(var(--ra-gap-x) * -1);
}
#product-related-articles .js-ra-list > [class^="col-"],
#product-related-articles .js-ra-list > [class*=" col-"] {
  padding-left: var(--ra-gap-x);
  padding-right: var(--ra-gap-x);
  margin-bottom: var(--ra-gap-y);
  flex: 0 0 25%;
  max-width: 25%;
  /* Desktop: 4 cột */
  box-sizing: border-box;
}

/* ===== Card look (GIỮ shadow + border của bạn) ===== */
#product-related-articles .blogwp {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.12)
  , 0 1px 0 rgba(16, 24, 40, 0.06);
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease
  , box-shadow 0.2s ease;
  /* không thêm margin để các card sát nhau hơn; khoảng cách do gutter quyết định */
}
#product-related-articles .blogwp:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.16)
  , 0 1px 0 rgba(16, 24, 40, 0.06);
}

/* Ảnh 16:9, cover */
#product-related-articles .image-blog {
  display: block;
  background: #f6f7f9;
}
#product-related-articles .image-blog .img_, /* tùy theme */
#product-related-articles .image-blog img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px 10px 0 0;
}

/* Nội dung */
#product-related-articles .content_blog {
  padding: 14px 16px !important;
}
#product-related-articles .content_blog h3 {
  font-size: 16px;
  line-height: 1.35;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
#product-related-articles .content_blog .text-muted {
  font-size: 12px;
  opacity: .9;
}
#product-related-articles .content_blog p {
  margin: 10px 0 0;
}
/* Nút "đọc tiếp" nếu có class này trong theme */
#product-related-articles .button_custome_35.link {
  display: inline-block;
  margin-left: 6px;
}

/* ===== Responsive ===== */

/* Tablet ≤ 991.98px: 2 cột + siết gutter + ẩn mô tả */@media (max-width: 991.98px) {
  /* 2 cột */
  #product-related-articles .js-ra-list > [class^="col-"],
  #product-related-articles .js-ra-list > [class*=" col-"] {
    flex: 0 0 50%;
    max-width: 50%;
  }

  /* Giảm khoảng cách ngang & dọc để thẻ gần nhau hơn */
  #product-related-articles {
    --ra-gap-x: 8px;
    --ra-gap-y: 12px;
  }

  /* Ẩn mô tả, giữ "Đọc tiếp" */
  #product-related-articles .content_blog .art-summary {
    display: none !important;
  }
  #product-related-articles .button_custome_35.link {
    display: inline-block !important;
    margin-left: 0;
    margin-top: 6px;
  }
  #product-related-articles .content_blog {
    padding: 10px 12px !important;
  }

  /* Nút "Xem tất cả" giữ ngang heading */
  #product-related-articles .ra-seeall-link {
    position: static !important;
    display: inline-flex !important;
    align-items: center;
  }
}

/* Mobile ≤ 767.98px: tiếp tục siết để giống ảnh 2 */
@media (max-width: 767.98px) {
  #product-related-articles {
    --ra-gap-x: 6px;
    --ra-gap-y: 10px;
  }

  #product-related-articles .ra-seeall-link {
    padding: 6px 8px !important;
    font-size: 12px !important;
  }
  .blogwp h3,
  .blogwp h3 a.link {
    font-size: 13px;
    font-weight: 600;
  }
  #product-related-articles .content_blog p {
    margin: 0 !important;
  }
  #product-related-articles .custom-heading-bar__title {
    font-size: 16px !important;
    margin-bottom: 0 !important;
  }
}

/* Màn rất nhỏ ≤ 419.98px: 1 cột, giữ gutter nhỏ gọn */
@media (max-width: 419.98px) {
  #product-related-articles .js-ra-list > [class^="col-"],
  #product-related-articles .js-ra-list > [class*=" col-"] {
    flex: 0 0 50%;
    max-width: 50%;
  }
  #product-related-articles {
    --ra-gap-x: 6px;
    --ra-gap-y: 10px;
  }
}

/* ===== Desktop ≥ 992px — LIST 2 CỘT (gọn như ảnh 2, bỏ nút Đọc tiếp) ===== */
@media (min-width: 992px) {
  #product-related-articles {
    --ra-gap-x: 8px;
    /* khoảng cách ngang */
    --ra-gap-y: 12px;
    /* khoảng cách dọc */
    --ra-thumb-w: 160px;
    /* chiều ngang ảnh nhỏ hơn */
    --ra-thumb-h: 96px;
    /* chiều cao ảnh */
  }

  /* 2 cột */
  #product-related-articles .js-ra-list {
    display: flex;
    flex-wrap: wrap;
    margin-left: calc(var(--ra-gap-x) * -1);
    margin-right: calc(var(--ra-gap-x) * -1);
  }
  #product-related-articles .js-ra-list > [class^="col-"],
  #product-related-articles .js-ra-list > [class*=" col-"] {
    flex: 0 0 50%;
    max-width: 50%;
    padding-left: var(--ra-gap-x);
    padding-right: var(--ra-gap-x);
    margin-bottom: var(--ra-gap-y);
    box-sizing: border-box;
  }

  /* Card kiểu list */
  #product-related-articles .blogwp {
    display: grid;
    grid-template-columns: var(--ra-thumb-w) 1fr;
    column-gap: 12px;
    align-items: center;
    height: auto;
    border: none;
    /* bỏ viền thừa */
    box-shadow: none;
    /* bỏ shadow thừa */
    padding: 0;
    /* gọn hẳn */
    background: transparent;
    /* gọn như ảnh 2 */
  }
  #product-related-articles .blogwp:hover {
    transform: none;
    box-shadow: none;
  }

  /* Ảnh trái */
  #product-related-articles .image-blog {
    width: var(--ra-thumb-w);
    height: var(--ra-thumb-h);
    border-radius: 6px;
    overflow: hidden;
  }
  #product-related-articles .image-blog img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  /* Nội dung */
  #product-related-articles .content_blog {
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  #product-related-articles .content_blog h3 {
    font-size: 15px;
    line-height: 1.4;
    margin: 0 0 3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  #product-related-articles .content_blog .text-muted {
    font-size: 12px;
    opacity: .85;
    margin-bottom: 2px;
  }
  #product-related-articles .content_blog p {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* Ẩn nút Đọc tiếp */
  #product-related-articles .button_custome_35.link {
    display: none !important;
  }
  #product-related-articles .blogwp {
    // display:grid;
    // grid-template-columns: var(--ra-thumb-w) 1fr;
    // column-gap: 12px;
    // align-items:center;
    // height:auto;
    border: 1px solid #e9edf4;
    /* border mảnh */
    box-shadow: 0 2px 6px rgba(16, 24, 40, 0.08);
    /* shadow nhẹ */
    border-radius: 8px;
    padding: 8px 10px;
    background: #fff;
    transition: box-shadow 0.2s;
  }
  #product-related-articles .blogwp:hover {
    box-shadow: 0 4px 12px rgba(16, 24, 40, 0.12);
    /* hover đậm hơn chút */
  }
}

/* ===== XEM THÊM/THU GỌN - CSS FIX ===== */
.js-content-wrapper {
  position: relative;
}

/* Trạng thái MẶC ĐỊNH: rút gọn */
.js-content-wrapper.has-overflow .product_getcontent {
  max-height: 500px !important;
  overflow: hidden !important;
  position: relative;
}

/* Trạng thái MỞ RỘNG */
.js-content-wrapper.is-expanded .product_getcontent {
  max-height: none !important;
  overflow: visible !important;
}

/* Fade effect ở cuối nội dung khi rút gọn */
.js-content-wrapper.has-overflow .product_getcontent::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(transparent, #fff);
  pointer-events: none;
}

/* Ẩn fade effect khi mở rộng */
.js-content-wrapper.is-expanded .product_getcontent::after {
  display: none !important;
}

/* QUAN TRỌNG: Luôn hiển thị nút, không ẩn khi expanded */
.js-seemore {
  display: block !important;
  transition: all 0.3s ease;
}

/* Animation cho content expansion */
.product_getcontent {
  transition: max-height 0.4s ease-in-out;
}