/* Pagination của promo-swiper */
/*sản phẩm nổi bật*/
.promo-swiper {
  padding-bottom: 50px;
  /* chừa khoảng trống ở dưới */
}

.promo-swiper .swiper-pagination {
  bottom: 10px !important;
  /* đẩy xuống thêm */
}

.promo-swiper .swiper-pagination-bullet {
  background: #dc3545;
  /* màu đỏ Bootstrap Danger */
  opacity: 0.6;
  transition: all 0.3s ease;
}

.promo-swiper .swiper-pagination-bullet-active {
  opacity: 1;
  transform: scale(1.2);
  /* chấm active to hơn */
}

/* Ảnh sản phẩm */
.fruite-img,
.promo-img-wrapper {
  width: 100%;
  height: 220px;
  /* cố định chiều cao */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 8px 8px 0 0;
  position: relative;
}

/* Ảnh bên trong */
.fruite-img img,
.promo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;

}

/* Hover effect cho ảnh */
.fruite-item:hover .fruite-img img,
.promo-card:hover .promo-img {
  transform: scale(1.1);

}

/* Card sản phẩm chung */
.fruite-item,
.promo-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.fruite-item:hover {
  transform: scale(1.03);
  box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.15);
}


.promo-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0px 12px 25px rgba(0, 0, 0, 0.15);

}

/* Nội dung trong card */
.fruite-item .p-4 {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  /* đẩy nút xuống cuối */
  flex-grow: 1;
}

/* Tên sản phẩm */
.fruite-item h4 {
  font-size: 18px;
  font-weight: 600;
  min-height: 46px;
  /* giữ 2 dòng đều nhau */
  line-height: 1.3;
  overflow: hidden;
}

/* Mô tả ngắn */
.fruite-item p {
  font-size: 14px;
  color: #555;
  min-height: 38px;
  overflow: hidden;
}

/* Giá */
.fruite-item .fs-5 {
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  width: 100%;
  min-height: 28px;
  margin-bottom: 8px;
}

/*------------------------------------------*/
/*Đớm lửa*/
.fire-title-wrapper {
  position: relative;
  display: inline-block;
  padding: 10px 20px;
}

.fire-title {
  font-size: 2.5rem;
  font-weight: bold;
  position: relative;
  z-index: 2;
  color: red;
}

.fire-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 180%;
  height: 200%;
  object-fit: cover;
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
  /* hoà vào chữ */
  opacity: 0.7;
  pointer-events: none;
  z-index: 1;
}

.fire-gif {
  width: 80px;
  height: 80px;
  vertical-align: middle;
  margin-bottom: 20px;
}



/*-----sản phẩm khuyến mãi*/
/* ===== PATCH: làm nhẹ mọi đổ bóng trong khu SẢN PHẨM KHUYẾN MÃI ===== */
.promo-zone {
  /* token bóng nhẹ */
  --ring: 1px solid #e9eef5;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow-2: 0 2px 8px rgba(16, 24, 40, .08), 0 8px 20px rgba(16, 24, 40, .06);
}

/* Tiêu đề: pill sáng, bóng rất nhẹ */
.promo-zone .fire-title-wrapper {}

/* Card: viền mảnh + bóng nhẹ; hover nhích 2px thôi */
.promo-zone .promo-card {
  border-radius: 14px;
  background: #fff;
  border: var(--ring);
  box-shadow: var(--shadow-1);
  transition: box-shadow .2s ease, transform .2s ease;
}

.promo-zone .promo-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}

/* Ngăn card có cảm giác “nặng đáy” */
.promo-zone .promo-img-wrapper {
  border-bottom: 1px solid #f1f4f8;
}

.promo-zone .promo-card:hover .promo-img {
  transform: scale(1.03);
}

/* giảm từ 1.05 */

/* Nút điều hướng: thu nhỏ + bóng nhẹ */
.promo-zone .swiper-button-prev,
.promo-zone .swiper-button-next {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  border: var(--ring);
  box-shadow: var(--shadow-1);
}

.promo-zone .swiper-button-prev:hover,
.promo-zone .swiper-button-next:hover {
  box-shadow: var(--shadow-2);
}

/* Chấm trang gọn hơn, không bóng */
.promo-zone .swiper-pagination-bullet {
  width: 7px;
  height: 7px;
  background: #cfd8e3;
  opacity: 1;
}

.promo-zone .swiper-pagination-bullet-active {
  background: #69C24F;
}

/* Nếu bạn có video nền cho section, giảm “độ đậm” để bóng nhìn càng nhẹ */
.promo-zone .promo-bg {
  filter: saturate(1) contrast(.95) brightness(.92);
}

.promo-zone .promo-overlay {
  background: linear-gradient(180deg, rgba(0, 0, 0, .18), rgba(0, 0, 0, .22));
}

/* ======================
   BRAND & BUTTON SYSTEM
   ====================== */
:root {
  /* Xanh thương hiệu – đổi nếu bạn có mã chuẩn */
  --brand: #63C047;
  --brand-600: #43a72f;
  /* hover */
  --brand-700: #2f8e22;
  /* active */
  --brand-soft: rgba(99, 192, 71, .12);
  --brand-border: rgba(99, 192, 71, .28);

  --gray-800: #1f2937;
  --ring: 0 0 0 .25rem rgba(99, 192, 71, .25);
  --radius-pill: 999px;
}

/* Kích thước & trọng số chung cho nút */
.btn {
  font-weight: 700;
  border-radius: var(--radius-pill);
  transition: all .18s ease;
  box-shadow: none !important;
}

/* ===== 1) Primary brand (dùng cho CTA chính: Mua ngay, Thêm giỏ hàng…) ===== */
.btn-primary,
.btn-success {
  /* override Bootstrap-success sang màu brand */
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.btn-primary:hover,
.btn-success:hover {
  background: var(--brand-600);
  border-color: var(--brand-600);
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(99, 192, 71, .25);
}

.btn-primary:active,
.btn-primary:focus,
.btn-success:active,
.btn-success:focus {
  background: var(--brand-700);
  border-color: var(--brand-700);
  box-shadow: var(--ring);
}

.btn-primary.disabled,
.btn-primary:disabled,
.btn-success.disabled,
.btn-success:disabled {
  background: #cfe9d2;
  border-color: #cfe9d2;
  color: #4c6b50;
}

/* ===== 2) Outline brand (nhẹ nhàng, nền trắng) ===== */
.btn-outline-success,
.btn-outline-primary {
  border-color: var(--brand);
  color: var(--brand-700);
  background: #fff;
}

.btn-outline-success:hover,
.btn-outline-primary:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(99, 192, 71, .22);
}

/* ===== 3) Ghost (nút phụ như “Xem khuyến mãi”) ===== */
.btn-ghost {
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
  color: var(--brand-700);
}

.btn-ghost:hover {
  background: rgba(99, 192, 71, .18);
  border-color: var(--brand);
}

/* ===== Icon trong nút ===== */
.btn i {
  margin-right: .45rem;
  transform: translateY(1px);
  transition: transform .18s ease;
}

.btn:hover i {
  transform: translateY(-1px);
}

/* ===== Nút “Thêm vào giỏ hàng” đang dùng class riêng ===== */
.btnAddToCartHomePage {
  @apply btn;
  /* nếu không dùng Tailwind thì bỏ dòng này */
  background: #fff;
  border: 2px solid var(--brand-border) !important;
  color: var(--brand-700) !important;
}

.btnAddToCartHomePage:hover {
  background: var(--brand) !important;
  color: #fff !important;
  border-color: var(--brand) !important;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(99, 192, 71, .28);
}

/* ===== Badge “Còn hàng” theo brand nhẹ ===== */
.badge.bg-primary {
  background: var(--brand-soft) !important;
  color: var(--brand-700) !important;
  border: 1px solid var(--brand-border);
  font-weight: 700;
  border-radius: 10px;
}

/* ===== Badge % khuyến mãi – gọn, hiện đại ===== */
.badge.bg-danger {
  background: linear-gradient(180deg, #ff5a5f 0%, #e60023 100%) !important;
  color: #fff;
  border: 1px solid rgba(230, 0, 35, .35);
  border-radius: var(--radius-pill);
  padding: .28rem .55rem;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(230, 0, 35, .28), inset 0 1px 0 rgba(255, 255, 255, .25);
}

/* ===== Pagination theo brand ===== */
.pagination .page-link {
  border-radius: var(--radius-pill);
  border: 1px solid var(--brand-border);
  color: var(--gray-800);
  font-weight: 700;
  padding: .5rem .9rem;
  transition: all .18s ease;
}

.pagination .page-link:hover {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand-700);
}

.pagination .page-link.active,
.pagination .page-item.active .page-link {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

/* ===== Swiper nav & bullets dưới slider khuyến mãi ===== */
.promo-swiper {
  padding-bottom: 48px;
}

.promo-swiper .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
  opacity: 1;
  transition: all .18s ease;
}

.promo-swiper .swiper-pagination-bullet-active {
  background: var(--brand);
  border-color: var(--brand);
  transform: scale(1.2);
  box-shadow: 0 6px 16px rgba(99, 192, 71, .35);
}

.promo-swiper .swiper-button-next,
.promo-swiper .swiper-button-prev {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-pill);
  background: #fff;
  border: 1px solid var(--brand-border);
  color: var(--brand-700);
  box-shadow: 0 8px 18px rgba(18, 38, 63, .08);
  transition: all .18s ease;
}

.promo-swiper .swiper-button-next:hover,
.promo-swiper .swiper-button-prev:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(99, 192, 71, .28);
}

.promo-swiper .swiper-button-next:after,
.promo-swiper .swiper-button-prev:after {
  font-size: 18px;
  font-weight: 800;
}

/* ===== Nav pill “Tất cả sản phẩm” ===== */
.nav-pills .btn.rounded-pill.active {
  background: var(--brand) !important;
  border-color: var(--brand) !important;
  box-shadow: 0 10px 22px rgba(99, 192, 71, .22);
  transform: translateY(-1px);
}

.btnAddToCartHomePage:hover {
  background-color: #afbbb2;
  /* Màu nền khi hover */
  color: #fff !important;
  /* Màu chữ khi hover */
  border-color: #a5a9a6 !important;
  /* Viền */
}

.btnAddToCartHomePage:hover i {
  color: #fff !important;
  /* Màu icon khi hover */
}

.recent-card {
  border: 1px solid #e3f3ce;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .04);
  transition: all .15s ease;
}

.recent-card:hover {
  border-color: #b9e68b;
  box-shadow: 0 16px 36px rgba(123, 220, 45, .18);
  transform: translateY(-1px);
}

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

/*animation*/
:root {
  --reveal-duration: 650ms;
  --reveal-ease: cubic-bezier(.2, .65, .3, 1);
}

/* trạng thái ẩn ban đầu */
[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition:
    transform var(--reveal-duration) var(--reveal-ease),
    opacity var(--reveal-duration) var(--reveal-ease);
  will-change: transform, opacity;
}

/* hiện */
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
  transition-delay: var(--reveal-delay, 0ms);
}

/* biến thể */
[data-reveal="fade-up"] {
  transform: translate3d(0, 24px, 0);
}

[data-reveal="fade-down"] {
  transform: translate3d(0, -24px, 0);
}

[data-reveal="fade-left"] {
  transform: translate3d(-24px, 0, 0);
}

[data-reveal="fade-right"] {
  transform: translate3d(24px, 0, 0);
}

[data-reveal="zoom-in"] {
  transform: scale(.96);
}

/* nếu người dùng chọn giảm chuyển động */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* biến dễ chỉnh */
:root {
  --sw-btn-size: 44px;
  --sw-btn-bg: rgba(0, 0, 0, 0.55);
  --sw-btn-color: #fff;
  --sw-btn-hover-bg: rgba(0, 0, 0, 0.75);
  --sw-bullet-size: 10px;
  --sw-bullet-active: #1a73e8;
  --sw-bullet-bg: rgba(255, 255, 255, 0.45);
  --sw-z: 50;
}

/* Container đảm bảo vị trí tương đối để nút có thể absolute */
.swiper {
  position: relative;
}

/* Nút next / prev chung */
.swiper-button-next,
.swiper-button-prev {
  width: var(--sw-btn-size);
  height: var(--sw-btn-size);
  border-radius: 50%;
  background: var(--sw-btn-bg);
  color: var(--sw-btn-color);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  transition: transform .16s ease, background .12s ease, opacity .12s ease;
  z-index: var(--sw-z);
  cursor: pointer;
  top: 50%;
  transform: translateY(-50%);
  position: absolute;
  opacity: 0.98;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  border: none;
  /* nếu swiper chèn button element */
}

/* vị trí trái/phải */
.swiper-button-prev {
  left: 10px;
}

.swiper-button-next {
  right: 10px;
}

/* icon mặc định ẩn nếu bạn dùng custom icon; Swiper có sẵn pseudo-element, giữ nó */
.swiper-button-next::after,
.swiper-button-prev::after {
  font-size: 18px;
  font-weight: 700;
  color: var(--sw-btn-color);
  opacity: 0.95;
}

/* hover / fokus */
.swiper-button-next:hover,
.swiper-button-prev:hover,
.swiper-button-next:focus,
.swiper-button-prev:focus {
  background: var(--sw-btn-hover-bg);
  transform: translateY(-50%) scale(1.06);
  outline: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
}

/* disabled state */
.swiper-button-disabled {
  opacity: 0.35;
  pointer-events: none;
  transform: translateY(-50%) scale(1);
}

/* Pagination bullets */
.swiper-pagination {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 12px;
  z-index: var(--sw-z);
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

/* bullet mặc định */
.swiper-pagination-bullet {
  width: var(--sw-bullet-size);
  height: var(--sw-bullet-size);
  border-radius: 50%;
  background: var(--sw-bullet-bg);
  opacity: 0.9;
  transition: transform .14s ease, background .14s ease, width .14s ease;
  cursor: pointer;
  border: 0;
}

/* active bullet */
.swiper-pagination-bullet-active {
  background: var(--sw-bullet-active);
  transform: scale(1.25);
  width: calc(var(--sw-bullet-size) * 1.6);
  height: var(--sw-bullet-size);
  border-radius: 999px;
  /* pill shape */
}

/* responsive: ẩn nút trên màn nhỏ, show pagination */
@media (max-width: 640px) {

  .swiper-button-next,
  .swiper-button-prev {
    display: none;
  }

  .swiper-pagination {
    bottom: 8px;
  }
}

/*rùa ai */
/* ... giữ nguyên toàn bộ CSS của bạn bên dưới ... */
.rating-stars {
  line-height: 1;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
}

.rating-stars i {
  color: #f59e0b;
}

.rating-stars .count {
  margin-left: .4rem;
  font-size: 12px;
  color: #6b7280;
}

/* === RÙA AI — widget === */
.ai-turtle {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1100;
}

.ai-turtle__btn {
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 30px rgba(22, 163, 74, .35);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}

.ai-turtle__btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 18px 38px rgba(22, 163, 74, .45);
}

.ai-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, .45);
  animation: pulse 2.2s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 18px rgba(34, 197, 94, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.ai-turtle__card {
  position: absolute;
  right: 0;
  bottom: 78px;
  width: min(360px, calc(100vw - 32px));
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(2, 6, 23, .06);
  box-shadow: 0 18px 46px rgba(2, 6, 23, .25);
  overflow: hidden;
  display: none;
}

.ai-enter {
  animation: aiIn .18s ease both;
}

@keyframes aiIn {
  from {
    opacity: 0;
    transform: translateY(6px) scale(.98)
  }

  to {
    opacity: 1;
    transform: none
  }
}

.ai-chat__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
}

.ai-chat__title {
  font-weight: 800;
  letter-spacing: .2px;
}

.ai-chat__close {
  margin-left: auto;
  background: rgba(255, 255, 255, .18);
  border: 0;
  color: #fff;
  border-radius: 8px;
  padding: 6px 8px;
  cursor: pointer;
}

.ai-chat__body {
  background: #f8fafc;
  max-height: 380px;
  overflow: auto;
  padding: 14px 12px;
}

.ai-msg {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.ai-msg__bubble {
  padding: 10px 12px;
  border-radius: 14px;
  max-width: 80%;
  box-shadow: 0 6px 16px rgba(2, 6, 23, .08);
  word-break: break-word;
  white-space: pre-wrap;
}

.ai-user {
  justify-content: flex-end;
}

.ai-user .ai-msg__bubble {
  background: #e8f5e9;
  color: #064e3b;
  border: 1px solid rgba(22, 163, 74, .2);
}

.ai-bot .ai-msg__bubble {
  background: #fff;
  border: 1px solid rgba(2, 6, 23, .06);
}

.ai-typing {
  font-size: 12px;
  color: #475569;
  padding: 0 4px 6px;
  display: none;
}

.ai-chat__footer {
  padding: 10px;
  background: #fff;
  border-top: 1px solid rgba(2, 6, 23, .06);
}

.ai-input {
  display: flex;
  gap: 8px;
  background: #f1f5f9;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.ai-input input {
  flex: 1;
  border: 0;
  background: transparent;
  outline: none;
}

.ai-input button {
  border: 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: #16a34a;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.ai-suggest {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 10px 0;
  background: #f8fafc;
}

.ai-chip {
  font-size: 12px;
  background: #eef2ff;
  color: #3730a3;
  border: 1px solid #e5e7eb;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.ai-kicker {
  font-size: 12px;
  color: #eafaf0
}

.ai-products {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 2px;
  margin-top: 6px;
}

.ai-products::-webkit-scrollbar {
  height: 8px;
}

.ai-products::-webkit-scrollbar-thumb {
  background: #e5e7eb;
  border-radius: 6px;
}

.ai-pcard {
  flex: 0 0 180px;
  text-decoration: none;
  color: inherit;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  transition: transform .15s ease, box-shadow .15s ease;
}

.ai-pcard:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
}

.ai-pimg {
  width: 100%;
  height: 120px;
  object-fit: cover;
  background: #f8fafc;
}

.ai-pbody {
  padding: 8px 10px;
}

.ai-ptitle {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  height: 34px;
  overflow: hidden;
}

.ai-pdesc {
  font-size: 12px;
  color: #64748b;
  height: 30px;
  overflow: hidden;
  margin-top: 4px;
}

.ai-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 6px 0;
}

.ai-sale {
  font-weight: 800;
  color: #dc2626;
}

.ai-base {
  color: #94a3b8;
  text-decoration: line-through;
  font-size: 12px;
}

.ai-badge {
  display: inline-block;
  font-size: 11px;
  background: #ef4444;
  color: #fff;
  padding: 2px 6px;
  border-radius: 999px;
}

.ai-pbtn {
  display: block;
  width: 100%;
  text-align: center;
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 7px 10px;
  font-weight: 600;
  font-size: 14px;
}

.ai-pbtn:hover {
  background: #15803d;
}

/*hướng dẫn mua laptop*/

#buying-guide .icon-pill {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eaf7e6;
  color: #2e7d32
}

#buying-guide .chip {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 999px;
  padding: .4rem .8rem;
  font-size: .9rem;
  line-height: 1;
  cursor: pointer
}

#buying-guide .chip:hover {
  background: #f5f7ff;
  border-color: #c7d2fe
}

#buying-guide .guide-card {
  background: #fff
}

#buying-guide .divider {
  opacity: .25
}

/* accordion tinh tế hơn */
#buying-guide .accordion-button {
  border-radius: 12px;
  background: #f8fafc
}

#buying-guide .accordion-button:not(.collapsed) {
  color: #1f2937;
  background: #eef6ff
}

#buying-guide .accordion-item {
  border: none;
  margin-bottom: .75rem
}

#buying-guide .accordion-body {
  background: #fff;
  border: 1px solid #eef2f7;
  border-top: none;
  border-radius: 0 0 12px 12px
}

/* ====== AI – LIST view giống ảnh bạn gửi ====== */
.ai-list {
  background: #e9f2ff;
  border: 1px solid #cfe0ff;
  border-radius: 12px;
  padding: 12px 14px;
}

.ai-li+.ai-li {
  border-top: 1px dashed #c7d7ff;
  margin-top: 10px;
  padding-top: 10px;
}

.ai-li__title {
  font-size: 15px;
  color: #0f172a;
  margin-bottom: 6px;
}

.ai-li__index {
  font-weight: 800;
  margin-right: 6px;
  color: #334155;
}

.ai-li__row {
  font-size: 14px;
  color: #1f2937;
  margin: 4px 0;
}

.ai-li__label {
  font-weight: 700;
  color: #0f172a;
}

.ai-li__cta {
  margin-top: 6px;
}

.ai-btn {
  display: inline-block;
  background: #2563eb;
  color: #fff !important;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.ai-btn:hover {
  background: #1d4ed8;
}

/**/
:root {
  --brand: #57B212;
  /* đổi theo brand của bạn */
  --ink: #0f172a;
  /* màu chữ chính */
  --muted: #64748b;
  /* chữ mờ */
  --surface: #ffffff;
  /* nền card */
  --soft: #f8fafc;
  /* nền nhạt */
  --border: #e5e7eb;
  /* viền */
  --radius: 14px;
  /* bo góc */
  --container: 1100px;
  /* max width */
}

*,
*::before,
*::after {
  box-sizing: border-box
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  color: var(--ink);
  background: #fff
}

img {
  max-width: 100%;
  height: auto;
  display: block
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding: 16px
}

/* Shell */
.toc-tabs {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px
}

@media (max-width: 980px) {
  .toc-tabs {
    grid-template-columns: 1fr
  }
}

/* Left – labels */
.labels {
  position: sticky;
  top: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden
}

.labels h3 {
  margin: 0;
  padding: 10px 12px;
  font-size: 14px;
  color: #111827;
  background: var(--soft);
  border-bottom: 1px solid var(--border)
}

.labels .list {
  max-height: 72vh;
  overflow: auto
}

.labels label {
  display: block;
  padding: 10px 12px;
  font-size: 14px;
  color: #111827;
  cursor: pointer;
  border-bottom: 1px dashed var(--border)
}

.labels label:last-child {
  border-bottom: none
}

.labels label .num {
  font-weight: 800;
  color: var(--brand);
  margin-right: 6px
}

.labels label small {
  display: block;
  color: var(--muted);
  font-size: 12px
}

/* Right – panels */
.panels {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px
}

.panel {
  display: none
}

.panel h2 {
  font-size: 22px;
  margin: 0 0 8px
}

.panel h3 {
  font-size: 18px;
  margin: 16px 0 6px
}

.panel p {
  margin: 8px 0
}

.panel ul {
  margin: 6px 0 0 18px
}

.spec {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px
}

.spec th,
.spec td {
  border: 1px solid var(--border);
  padding: 8px;
  vertical-align: top
}

.spec th {
  background: var(--soft);
  text-align: left;
  width: 200px
}

/* Subsections accordion (no JS) */
details.sub {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-top: 10px
}

details.sub>summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 12px;
  font-weight: 700
}

details.sub>summary::-webkit-details-marker {
  display: none
}

details.sub[open] {
  background: var(--soft)
}

details.sub .body {
  padding: 0 12px 12px;
  color: #334155
}

/* Tabs logic */
.toc-tabs input {
  display: none
}

#t1:checked~.labels .l1,
#t2:checked~.labels .l2,
#t3:checked~.labels .l3,
#t4:checked~.labels .l4,
#t5:checked~.labels .l5,
#t6:checked~.labels .l6,
#t7:checked~.labels .l7,
#t8:checked~.labels .l8,
#t9:checked~.labels .l9,
#t10:checked~.labels .l10 {
  background: var(--soft);
  border-left: 3px solid var(--brand)
}

#t1:checked~.panels #p1,
#t2:checked~.panels #p2,
#t3:checked~.panels #p3,
#t4:checked~.panels #p4,
#t5:checked~.panels #p5,
#t6:checked~.panels #p6,
#t7:checked~.panels #p7,
#t8:checked~.panels #p8,
#t9:checked~.panels #p9,
#t10:checked~.panels #p10 {
  display: block
}

/* Media helpers */
.hero {
  position: relative;
  aspect-ratio: 21/9;
  border-radius: 12px;
  overflow: hidden;
  background: #f1f5f9;
  margin: 8px 0
}

.ratio {
  position: relative;
  overflow: hidden;
  background: #f1f5f9;
  border-radius: 12px
}

.ratio-16x9 {
  aspect-ratio: 16/9
}

.ratio-1x1 {
  aspect-ratio: 1/1
}

.media-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 10px
}

@media (max-width:900px) {
  .media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }
}

/* Chips/Callouts */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-size: 12.5px
}

.callout {
  border: 1px solid var(--border);
  background: var(--soft);
  border-radius: 12px;
  padding: 10px 12px;
  margin: 10px 0;
  color: #334155
}

/* Pros/Cons */
.proscons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px
}

@media (max-width:780px) {
  .proscons {
    grid-template-columns: 1fr
  }
}

.pros,
.cons {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px
}

.pros h4,
.cons h4 {
  margin: 0 0 6px
}


/* === Compact media size (override) === */
.panels .hero {
  max-width: 720px;
  /* thu nhỏ hero */
  margin: 8px auto;
  /* canh giữa */
  aspect-ratio: 16/9;
  /* bớt cao hơn so với 21:9 */
}

.panels .media-grid {
  gap: 8px;
}

.panels .media-grid .ratio {
  max-width: 220px;
  /* thu nhỏ từng ảnh trong grid */
  margin: 0 auto;
  /* canh giữa mỗi ô */
}

.panels .media-grid .ratio img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Trên mobile giữ full width như cũ */
@media (max-width: 900px) {
  .panels .hero {
    max-width: 100%;
  }

  .panels .media-grid .ratio {
    max-width: none;
  }
}

/*cau hỏi thường gặp*/
:root {
  --brand: #57B212;
  /* đổi theo brand của bạn */
  --ink: #111827;
  /* màu chữ */
  --muted: #6b7280;
  /* chữ mờ */
  --bg: #ffffff;
  /* nền */
  --surface: #f8fafc;
  /* nền item mở */
  --border: #e5e7eb;
  /* viền */
  --radius: 14px;
  /* bo góc */
  --container: 980px;
  /* max width */
}

* {
  box-sizing: border-box
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: #fff;
  color: var(--ink);
  line-height: 1.65
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding: 16px
}

/* Title */
.faq-title {
  font-size: 22px;
  font-weight: 800;
  margin: 6px 0 12px
}

/* Accordion */
.faq {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden
}

.faq+.faq {
  margin-top: 10px
}

.faq[open] {
  background: var(--surface)
}

.faq>summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px
}

.faq>summary::-webkit-details-marker {
  display: none
}

.faq .q {
  font-weight: 700
}

.faq .caret {
  flex: 0 0 20px;
  height: 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  display: grid;
  place-items: center
}

.faq .caret::before {
  content: "\25BE";
  /* ▼ */
  font-size: 12px;
  line-height: 1
}

.faq[open] .caret {
  border-color: var(--brand);
  color: #fff;
  background: var(--brand)
}

.faq[open] .caret::before {
  content: "\2715";
  /* ✕ */
  font-size: 11px
}

.faq__body {
  padding: 0 16px 14px;
  color: #374151
}

.faq__body p {
  margin: 6px 0
}

.faq__body ul {
  margin: 6px 0 0 18px
}

/* Helper notice (optional) */
.note {
  color: var(--muted);
  font-size: 13px;
  margin: 8px 0 14px
}

/* Wrapper block like screenshot */
.wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  background: #fff
}

/*AI con rua*/
/* === Bảng so sánh đẹp, dễ đọc === */
.ai-compare {
  display: flex;
  gap: 12px;
  padding: 8px;
  overflow-x: auto;
  /* đủ chỗ thì full, thiếu chỗ thì kéo ngang */
}

.ai-c-col {
  flex: 0 0 280px;
  /* mỗi cột tối thiểu 280px */
  background: #f7f8fa;
  border: 1px solid #e6e8ef;
  border-radius: 12px;
  padding: 10px;
}

.ai-c-col--winner {
  border-color: #22c55e;
  /* tô viền máy được khuyên chọn */
  box-shadow: 0 0 0 2px rgba(34, 197, 94, .15);
}

.ai-c-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.ai-c-specs {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 6px;
}

.ai-c-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  /* Nhãn | Giá trị */
  align-items: start;
  gap: 6px;
  padding: 6px 8px;
  background: #fff;
  border-radius: 8px;
  border: 1px dashed #e5e7eb;
}

.ai-c-k {
  font-size: 12px;
  color: #64748b;
}

.ai-c-v {
  font-weight: 500;
  min-width: 0;
  /* tránh đẩy cột to ra */
  word-break: break-word;
  /* không bị xuống từng chữ */
  overflow-wrap: anywhere;
  white-space: normal;
}

.ai-c-vs {
  display: flex;
  align-items: center;
  font-weight: 700;
  padding: 0 4px;
  color: #475569;
}

.ai-c-concl {
  margin-top: 8px;
  padding: 10px 12px;
  background: #fff9e6;
  border: 1px solid #ffe299;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
}

.ai-c-concl ul {
  margin: 6px 0 0 16px;
}

/* === Compare Modal === */
/* === Compare Modal 1–4 items === */
#aiCompareBackdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, .6);
  display: none;
  z-index: 9999
}

#aiCompareBackdrop .ai-modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(1180px, 300vw);
  max-height: 92vh;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 22px 70px rgba(0, 0, 0, .35)
}

.ai-m-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #eef2f7;
  background: linear-gradient(180deg, #fafcff, #fff)
}

.ai-m-hd>div {
  font-weight: 800;
  font-size: 16px;
  color: #0f172a
}

.ai-m-close {
  border: 0;
  background: #f1f5f9;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
  line-height: 36px
}

.ai-m-close:hover {
  background: #e2e8f0
}

.ai-m-bd {
  padding: 10px 16px;
  max-height: calc(92vh - 176px);
  overflow: auto
}

/* Table-like grid: 1 cột nhãn + N cột sản phẩm */
.cmp-table {
  display: grid;
  row-gap: 8px;
  column-gap: 10px
}

.cmp-th {
  position: sticky;
  top: 0;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 10px 12px;
  font-weight: 800;
  color: #0f172a;
  z-index: 1
}

.cmp-th.prod {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 10px
}

.cmp-td {
  padding: 8px 10px;
  border-radius: 8px;
  background: #fafaf9;
  color: #0f172a
}

.cmp-td.lbl {
  background: #fff;
  color: #64748b;
  font-weight: 600
}

.cmp-td.val {
  background: #fcfcfd;
  border: 1px solid #eef2f7
}

.cmp-td.diff {
  background: #fff5e5;
  border-color: #fde68a
}

.cmp-row-sep {
  height: 6px
}

/* footer */
.ai-m-ft {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-top: 1px solid #eef2f7;
  background: #fcfcfd
}

.ai-conclusion {
  font-size: 14px;
  line-height: 1.55;
  color: #0f172a
}

.ai-btn {
  display: inline-block;
  border: 0;
  border-radius: 10px;
  background: #2563eb;
  color: #fff;
  padding: 10px 14px;
  font-weight: 700;
  text-decoration: none
}

.ai-btn:hover {
  filter: brightness(1.05)
}

.ai-btn.outline {
  background: #f1f5f9;
  color: #0f172a
}

@media (max-width:760px) {
  .cmp-label-col {
    width: 120px !important
  }
}

/* === Typing indicator (3 chấm nhảy) === */
.ai-typing {
  display: none;
  /* JS sẽ bật khi gửi request */
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #475569;
  padding: 0 4px 6px;
}

.ai-typing .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94a3b8;
  display: inline-block;
  animation: typingBlink 1s infinite;
}

.ai-typing .dot:nth-child(2) {
  animation-delay: .15s
}

.ai-typing .dot:nth-child(3) {
  animation-delay: .30s
}

@keyframes typingBlink {

  0%,
  80%,
  100% {
    opacity: .2;
    transform: translateY(0)
  }

  40% {
    opacity: 1;
    transform: translateY(-2px)
  }
}

/* tôn trọng người dùng giảm chuyển động */
@media (prefers-reduced-motion: reduce) {
  .ai-typing .dot {
    animation: none
  }
}

/* ===== RÙA AI — PRO THEME (paste at the end) ===== */

/* Tokens */
:root {
  --ai-brand: #16a34a;
  /* accent */
  --ai-ink: #0f172a;
  /* text */
  --ai-muted: #64748b;
  /* muted text */
  --ai-surface: #ffffff;
  /* surfaces */
  --ai-soft: #f6f7fb;
  /* soft bg */
  --ai-border: #e6e8ef;
  /* borders */
  --ai-ring: rgba(22, 163, 74, .22);
}

/* Widget button: tinh gọn + ring rõ khi focus */
.ai-turtle__btn {
  width: 68px;
  height: 68px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 16px 40px rgba(22, 163, 74, .35);
}

.ai-turtle__btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px #fff,
    0 0 0 7px var(--ai-ring),
    0 18px 44px rgba(22, 163, 74, .45);
}

/* Card: RỘNG HƠN + chuyên nghiệp */
.ai-turtle__card {
  right: 0;
  bottom: 86px;
  width: min(400px, calc(100vw - 32px));
  /* ⬅️ rộng hơn */
  background: var(--ai-surface);
  border: 1px solid var(--ai-border);
  border-radius: 18px;
  box-shadow:
    0 22px 70px rgba(2, 6, 23, .28),
    0 3px 0 rgba(255, 255, 255, .6) inset;
  overflow: hidden;
}

/* Header: thấp, chắc chắn, chữ rõ */
.ai-chat__header {
  min-height: 54px;
  gap: 12px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .18);
}

.ai-chat__title {
  font-weight: 800;
  letter-spacing: .2px;
}

.ai-chat__close {
  background: rgba(255, 255, 255, .18);
  padding: 8px 10px;
  border-radius: 10px;
}

.ai-chat__close:hover {
  background: rgba(255, 255, 255, .26);
}

/* Body: cao hơn, scrollbar mảnh */
.ai-chat__body {
  background: var(--ai-soft);
  max-height: min(68vh, 370px);
  /* ⬅️ cao hơn */
  padding: 16px 14px 8px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.ai-chat__body::-webkit-scrollbar {
  width: 8px;
}

.ai-chat__body::-webkit-scrollbar-thumb {
  background: #d7dbe4;
  border-radius: 8px;
}

/* Messages */
.ai-msg {
  align-items: flex-end;
  gap: 10px;
  margin: 0 0 12px;
}

.ai-msg__bubble {
  max-width: 80%;
  /* ⬅️ rộng hơn trong card rộng */
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(2, 6, 23, .06);
  box-shadow: 0 8px 22px rgba(2, 6, 23, .06);
  line-height: 1.6;
  color: var(--ai-ink);
}

.ai-user {
  justify-content: flex-end;
}

.ai-user .ai-msg__bubble {
  background: #f0fbf3;
  color: #065f46;
  border-color: rgba(22, 163, 74, .2);
}

.ai-bot .ai-msg__bubble {
  background: #fff;
}

/* Typing indicator: hiện rõ, nằm sát nội dung */
.ai-typing {
  display: none;
  /* JS sẽ bật */
  margin: -4px 0 10px 0;
  width: max-content;
  background: #eef2ff;
  color: #475569;
  border: 1px dashed #dbe2ff;
  border-radius: 12px;
  padding: 6px 10px;
  font-size: 12px;
}

.ai-typing::after {
  /* đuôi 3 chấm nhấp nháy (không cần sửa HTML) */
  content: " …";
  display: inline-block;
  animation: aiEllipsis 1.2s infinite steps(4, end);
}

@keyframes aiEllipsis {
  0% {
    content: " ";
  }

  25% {
    content: " .";
  }

  50% {
    content: " ..";
  }

  75% {
    content: " ...";
  }

  100% {
    content: " ";
  }
}

/* Footer + Input: chuyên nghiệp, focus ring chuẩn */
.ai-chat__footer {
  background: var(--ai-surface);
  border-top: 1px solid var(--ai-border);
  padding: 12px;
}

.ai-input {
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  background: #f3f5f9;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 10px rgba(15, 23, 42, .04) inset;
}

.ai-input:focus-within {
  border-color: var(--ai-brand);
  box-shadow:
    0 0 0 3px var(--ai-ring),
    0 2px 10px rgba(15, 23, 42, .04) inset;
}

.ai-input input {
  padding: 6px 4px;
  font-size: 14px;
}

.ai-input button {
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--ai-brand);
  font-weight: 700;
}

.ai-input button:hover {
  filter: brightness(1.06);
}

.ai-input button:active {
  transform: translateY(1px);
}

/* Chips: gọn, rõ, hover chuẩn */
.ai-suggest {
  background: transparent;
  padding: 8px 12px 0;
  gap: 10px;
}

.ai-chip {
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #0f172a;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  transition: border-color .12s ease, box-shadow .12s ease, transform .06s ease;
}

.ai-chip:hover {
  border-color: #c7d2fe;
  box-shadow: 0 6px 20px rgba(99, 102, 241, .10);
  transform: translateY(-1px);
}

/* Product cards: cân khối, chữ rõ, nút chắc chắn */
.ai-products {
  gap: 12px;
  padding: 6px 2px 2px;
}

.ai-pcard {
  flex: 0 0 200px;
  border: 1px solid #e6e8ef;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 26px rgba(2, 6, 23, .06);
}

.ai-pimg {
  height: 228px;
  object-fit: cover;
}

.ai-pbody {
  padding: 10px 12px;
}

.ai-ptitle {
  font-size: 14px;
  height: 36px;
}

.ai-pbtn {
  margin-top: 6px;
  border-radius: 10px;
  padding: 8px 10px;
  background: var(--ai-brand);
  font-weight: 700;
}

/* List view: sáng sủa, chữ đọc dễ hơn */
.ai-list {
  background: #f0f4ff;
  border: 1px solid #d8e3ff;
  border-radius: 14px;
  padding: 14px 16px;
}

.ai-li__title {
  font-size: 15.5px;
  margin-bottom: 8px;
}

.ai-li__row {
  font-size: 14px;
  margin: 5px 0;
}

.ai-li+.ai-li {
  margin-top: 12px;
  padding-top: 12px;
}

/* Compare modal: viền + khoảng cách tinh gọn */
.cmp-th {
  padding: 12px;
}

.cmp-td {
  padding: 10px;
}

.cmp-td.val {
  border: 1px solid #eef2f7;
}

.ai-m-ft {
  padding: 16px 20px;
}

/* Dark mode (auto) */
@media (prefers-color-scheme: dark) {
  :root {
    --ai-surface: #0b1220;
    --ai-soft: #0a0f1a;
    --ai-border: rgba(255, 255, 255, .08);
    --ai-ink: #e5e7eb;
    --ai-muted: #94a3b8;
  }

  .ai-turtle__card {
    box-shadow: 0 22px 70px rgba(0, 0, 0, .55);
  }

  .ai-chat__body {
    background: #0a0f1a;
  }

  .ai-bot .ai-msg__bubble {
    background: #0d1424;
    border-color: var(--ai-border);
    color: var(--ai-ink);
  }

  .ai-user .ai-msg__bubble {
    background: rgba(22, 163, 74, .16);
    color: #d1fae5;
    border-color: rgba(22, 163, 74, .35);
  }

  .ai-input {
    background: #0d1424;
    border-color: var(--ai-border);
  }

  .ai-chip {
    background: #0d1424;
    color: var(--ai-ink);
    border-color: var(--ai-border);
  }

  .ai-list {
    background: #0e1730;
    border-color: #1e2a54;
  }

  .ai-typing {
    background: rgba(99, 102, 241, .14);
    border-color: rgba(99, 102, 241, .28);
    color: #cbd5e1;
  }
}

/* Mobile tweak: vẫn rộng nhưng không tràn màn */
@media (max-width: 420px) {
  .ai-turtle__card {
    width: calc(100vw - 20px);
    right: 10px;
  }

  .ai-msg__bubble {
    max-width: 92%;
  }
}

/* === Home pagination: style giống hình 2 === */
:root {
  --pg-text: #0f766e;
  /* teal */
  --pg-border: rgba(15, 118, 110, .25);
  --pg-border-hover: rgba(15, 118, 110, .45);
  --pg-shadow: 0 2px 10px rgba(15, 118, 110, .06);
  --pg-shadow-hover: 0 6px 16px rgba(15, 118, 110, .12);
}

.pagination.home-pager {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.pagination.home-pager .page-item {
  display: inline-flex;
}

.pagination.home-pager .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  min-width: 40px;
  border-radius: 12px !important;
  background: #fff !important;
  /* nền trắng */
  border: 1px solid var(--pg-border) !important;
  /* viền xanh nhạt */
  color: var(--pg-text) !important;
  /* chữ teal */
  box-shadow: var(--pg-shadow);
  text-decoration: none;
}

/* Hover */
.pagination.home-pager .page-link:hover {
  background: #fff !important;
  border-color: var(--pg-border-hover) !important;
  box-shadow: var(--pg-shadow-hover);
}

/* Active – KHÔNG còn xanh dương */
.pagination.home-pager .page-item.active .page-link,
.pagination.home-pager .page-link.active {
  background: #fff !important;
  color: var(--pg-text) !important;
  border-color: var(--pg-border-hover) !important;
  font-weight: 700;
}

/* Disabled */
.pagination.home-pager .page-item.disabled .page-link {
  background: #fff !important;
  color: rgba(15, 118, 110, .45) !important;
  border-color: rgba(15, 118, 110, .20) !important;
  box-shadow: none;
  pointer-events: none;
}

/* Dấu “…” */
.pagination.home-pager .page-ellipsis {
  background: transparent !important;
  border: none !important;
  color: rgba(15, 118, 110, .65) !important;
  padding: 0 6px;
  min-width: 0;
}

/* Màu chủ đạo có thể đổi cho hợp brand */
:root {
  --pg-primary: #0f766e;
  /* teal */
  --pg-primary-hover: #0c5f59;
  /* đậm hơn khi hover */
  --pg-shadow-strong: 0 10px 24px rgba(15, 118, 110, .25);
}

/* Các nút mặc định */
.pagination.home-pager .page-link,
.pagination.pager .page-link {
  background: #fff !important;
  border: 1px solid rgba(15, 118, 110, .25) !important;
  color: #0f766e !important;
  border-radius: 12px !important;
  min-width: 40px;
  padding: 8px 12px;
  font-weight: 600;
  transition: .15s ease;
}

/* ======= ACTIVE : tô đậm, chữ trắng ======= */
.pagination.home-pager .page-item.active .page-link,
.pagination.pager .page-item.active .page-link {
  background: var(--pg-primary) !important;
  color: #fff !important;
  border-color: var(--pg-primary) !important;
  box-shadow: var(--pg-shadow-strong);
  transform: translateY(-1px);
}

/* Hover trên active */
.pagination.home-pager .page-item.active .page-link:hover,
.pagination.pager .page-item.active .page-link:hover {
  background: var(--pg-primary-hover) !important;
  border-color: var(--pg-primary-hover) !important;
}

/* Hover trên nút thường */
.pagination.home-pager .page-link:hover,
.pagination.pager .page-link:hover {
  border-color: rgba(15, 118, 110, .45) !important;
  box-shadow: 0 6px 16px rgba(15, 118, 110, .12);
}

/* Disabled */
.pagination.home-pager .page-item.disabled .page-link,
.pagination.pager .page-item.disabled .page-link {
  background: #fff !important;
  color: rgba(15, 118, 110, .45) !important;
  border-color: rgba(15, 118, 110, .20) !important;
  box-shadow: none;
  pointer-events: none;
}

/* Dấu “…” */
.pagination.home-pager .page-ellipsis,
.pagination.pager .page-ellipsis {
  background: transparent !important;
  border: none !important;
  color: rgba(15, 118, 110, .65) !important;
  padding: 0 6px;
  min-width: 0;
}

/* ===== STOCK BADGE – dùng cho Home & Filter ===== */
.js-stock-badge {
  /* layout */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  min-width: 88px;
  border-radius: 999px;

  /* text */
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .2px;
  line-height: 1;

  /* look */
  border: 1px solid rgba(0, 0, 0, .08);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .06);

  /* màu mặc định (sẽ bị override phía dưới) */
  --stock-bg: #0ea5e9;
  --stock-text: #ffffff;
  --stock-dot: currentColor;

  background: var(--stock-bg);
  color: var(--stock-text);
}

/* chấm trạng thái trước chữ */
.js-stock-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--stock-dot);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .4) inset;
}

/* IN-STOCK (đang dùng bg-primary) → chuyển sang tông xanh ngọc dễ nhìn */
.js-stock-badge.bg-primary {
  --stock-bg: #0f766e;
  /* teal-700 */
  --stock-text: #eafff8;
  /* minty text */
  --stock-dot: #34d399;
  /* green-400 */
}

/* HẾT HÀNG (bg-danger) → tông đỏ đậm + dot đỏ nhạt */
.js-stock-badge.bg-danger {
  --stock-bg: #991b1b;
  /* red-800 */
  --stock-text: #fff1f2;
  /* rose-50 */
  --stock-dot: #fecaca;
  /* red-200 */
}

/* ===== NÚT “THÊM VÀO GIỎ” khi hết hàng ===== */
.btnAddToCartHomePage:disabled {
  opacity: .55;
  cursor: not-allowed;
  background-color: #f8fafc !important;
  /* slate-50 */
  border-color: #e5e7eb !important;
  /* gray-200 */
  color: #6b7280 !important;
  /* gray-500 */
}

.btnAddToCartHomePage:disabled i {
  color: #9ca3af !important;
  /* gray-400 */
}

/* cảm giác bấm nút (khi còn hàng) */
.btnAddToCartHomePage:not(:disabled) {
  transition: transform .08s ease, box-shadow .2s ease;
}

.btnAddToCartHomePage:not(:disabled):active {
  transform: translateY(1px);
}

/* ===== Responsive nhỏ gọn hơn cho mobile ===== */
@media (max-width: 576px) {
  .js-stock-badge {
    font-size: 11px;
    padding: 4px 8px;
    min-width: 76px;
  }
}