/* Card showroom: địa chỉ + nút Gọi / Bản đồ */
.showroom-card {
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border: 1px solid #cccccc73;
  border-radius: 12px;
  width: 280px;
}

/* .filter-wrapper {
  overflow: auto;
} */

.item-product .discount {
  display: flex !important;
  align-items: center !important;
  gap: 2px !important;
  text-transform: capitalize !important;
  font-size: 10px !important;
  padding: 6px 14px;
}
.item-product .discount span {
  display: inline-flex;
  font-size: 12px !important;
}

.info-product {
  padding: 0 !important;
}

.showroom-card__address {
  margin: 0 0 12px 0;
  font-size: 14px;
  line-height: 1.5;
  color: #000;
  font-weight: 400;
}

.showroom-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.showroom-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.showroom-card__btn:hover {
  opacity: 0.9;
}

.showroom-card__btn--call {
  background: #fee8e8;
  color: #e20000;
  border: none;
}

.showroom-card__btn--map {
  background: #fff;
  color: #000;
  border: 1px solid #ccc;
}

.showroom-card__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Nút prev/next carousel showroom */
.box-showroom__detail--nav {
  position: relative;
}

.showroom-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #ccc;
  background: #fff;
  color: #333;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.showroom-nav:hover {
  background: #f5f5f5;
  color: #000;
}

.showroom-nav--prev {
  left: 0;
}

.showroom-nav--next {
  right: 0;
}
.mobile-price-new {
  color: #c52927;
  font-size: 16px;
  font-weight: bold;
}
.mobile-price-old {
  color: #a1a1aa;
  font-size: 12px;
  font-weight: 400;
  text-decoration: line-through;
}
.mobile-price-label {
  color: #4a4a4a;
  font-weight: bold;
  font-size: 14px;
}
.h-mobile-product-detail {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  padding: 8px 12px;
  background-color: #fff;
  z-index: 999;
}
.mobile-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.mobile-action {
  display: flex;
  gap: 10px;
}
.mobile-action-call {
  width: 40px;
  flex: none;
  display: flex;
  justify-content: center;
  align-items: center;
}
.mobile-action-add-card {
  width: 40px;
  height: 40px;
  flex: none;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid #d70018;
  border-radius: 6px;
}
.mobile-action-buy-now {
  flex: 1;
  flex-basis: 100px;
  background-color: #d70018;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 6px;
}
.mobile-action-installment {
  flex: 1;
  flex-basis: 100px;
  background-color: #fff;
  border: 1px solid #3b82f6;
  color: #3b82f6;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 6px;
}

/* Input compact: cao 36px, chỉ placeholder, không label */
.ep-input-compact {
  display: block;
}

.ep-input-compact__input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
}

.ep-input-compact__input::placeholder {
  color: #999;
}

/* Textarea compact: giảm chiều cao */
.ep-textarea-compact {
  width: 100%;
  min-height: 72px;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
}

.ep-textarea-compact::placeholder {
  color: #999;
}

/* Select place compact: nút cao 36px */
.ep-select-compact__button {
  height: 36px;
  min-height: 36px;
  padding: 0 12px;
  font-size: 14px;
}
.fab-item-zalooo {
  background-color: #0068fe;
}

/* Phụ kiện mua cùng: 1 hàng carousel */
.ep-accessory-section {
  margin-top: 1.5rem;
  background: #f1f1f1;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.ep-accessory-section__title {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 1rem 0;
}

.ep-accessory-section__wrap {
  position: relative;
}

.ep-accessory-card {
  display: flex;
  align-items: stretch;
  gap: 12px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 12px;
  height: 100%;
  min-height: 140px;
}

.ep-accessory-card__left {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.ep-accessory-card__brand {
  font-size: 11px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.ep-accessory-card__img-wrap {
  display: block;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f5f5;
}

.ep-accessory-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ep-accessory-card__right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
}

.ep-accessory-card__name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
}

.ep-accessory-card__name a {
  color: #2c2a2a;
  text-decoration: none;
}

.ep-accessory-card__name a:hover {
  color: #e20000;
}

.ep-accessory-card__member-text {
  font-size: 12px;
  color: #888;
  margin: 0;
}

.ep-accessory-card__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.ep-accessory-card__price-new {
  font-size: 16px;
  font-weight: 700;
  color: #e20000;
}

.ep-accessory-card__price-old {
  font-size: 13px;
  color: #999;
  text-decoration: line-through;
}

.ep-accessory-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #e20000;
  background: #ffe8e8;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s;
}

.ep-accessory-card__btn:hover {
  background: #e20000;
  color: #fff;
}

.ep-accessory-section .owl-nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  pointer-events: none;
  margin: 0;
}

.ep-accessory-section .owl-nav button {
  pointer-events: auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #ccc;
  background: #fff;
  color: #333;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s,
    color 0.2s;
}

.ep-accessory-section .owl-nav button:hover {
  background: #f0f0f0;
  color: #000;
}

.ep-accessory-section .owl-nav .owl-prev {
  position: absolute;
  left: -8px;
}

.ep-accessory-section .owl-nav .owl-next {
  position: absolute;
  right: -8px;
}

.ep-accessory-section .owl-dots {
  margin-top: 12px;
  text-align: center;
}

.ep-accessory-section .owl-dots .owl-dot span {
  width: 24px;
  height: 3px;
  margin: 0 3px;
  background: #ddd;
  border-radius: 2px;
  display: block;
  transition: background 0.2s;
}

.ep-accessory-section .owl-dots .owl-dot.active span,
.ep-accessory-section .owl-dots .owl-dot:hover span {
  background: #e20000;
}

/* Owl carousel - Bài viết liên quan & Sản phẩm quan tâm (trang chi tiết bài viết) */
.owl-related-posts,
.owl-related-products {
  position: relative;
}
.owl-related-posts .owl-nav,
.owl-related-products .owl-nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  pointer-events: none;
  margin: 0;
}
.owl-related-posts .owl-nav button,
.owl-related-products .owl-nav button {
  pointer-events: auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s,
    color 0.2s;
}
.owl-related-posts .owl-nav button:hover,
.owl-related-products .owl-nav button:hover {
  background: #f0f0f0;
  color: #e20000;
}
.owl-related-posts .owl-nav .owl-prev,
.owl-related-products .owl-nav .owl-prev {
  position: absolute;
  left: -15px;
}
.owl-related-posts .owl-nav .owl-next,
.owl-related-products .owl-nav .owl-next {
  position: absolute;
  right: -15px;
}
.owl-related-posts .owl-dots,
.owl-related-products .owl-dots {
  margin-top: 15px;
  text-align: center;
}
.owl-related-posts .owl-dots .owl-dot span,
.owl-related-products .owl-dots .owl-dot span {
  width: 24px;
  height: 3px;
  margin: 0 3px;
  background: #ddd;
  border-radius: 2px;
  display: block;
  transition: background 0.2s;
}
.owl-related-posts .owl-dots .owl-dot.active span,
.owl-related-posts .owl-dots .owl-dot:hover span,
.owl-related-products .owl-dots .owl-dot.active span,
.owl-related-products .owl-dots .owl-dot:hover span {
  background: #e20000;
}
@media (max-width: 767px) {
  .owl-related-posts .owl-nav .owl-prev,
  .owl-related-products .owl-nav .owl-prev {
    left: 5px;
  }
  .owl-related-posts .owl-nav .owl-next,
  .owl-related-products .owl-nav .owl-next {
    right: 5px;
  }
}

/* ===== Header Mobile: 1 hàng - Hamburger | Logo | Search (icon phải) | Cart ===== */
.header-mobile__row {
  display: none;
}
@media (max-width: 767px) {
  .header-mobile__row {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
  }

  .header-mobile__hamburger {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    color: #fff;
    font-size: 1.5rem;
  }

  .header-mobile__logo {
    flex-shrink: 0;
    display: flex;
  }

  .header-mobile__search {
    flex: 1 1 0%;
    min-width: 0;
    overflow: hidden;
    border-radius: 50px;
    background: #fff;
    margin-right: 4px;
  }

  .header-mobile__search-inner {
    position: relative;
    height: 40px;
    overflow: hidden;
    border-radius: 50px;
    background: #fff;
  }

  .header-mobile__search input#keyword-res {
    padding-left: 14px;
    padding-right: 40px;
    height: 40px;
    border-radius: 50px;
    background: #fff;
    border: 0;
    box-sizing: border-box;
    width: 100%;
    outline: none;
    font-size: 14px;
    color: #333;
  }

  .header-mobile__search-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 12px;
    left: auto;
    z-index: 10;
    font-size: 14px;
    color: #999;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
  }

  .header-mobile__cart {
    flex-shrink: 0;
  }

  #js__fixed-menu-top.is-fixed .header-mobile__search {
    margin-top: 0;
  }
}

/* ===== REVIEW SẢN PHẨM - Video YouTube iframe 9:16 ===== */
.video-review-section {
  position: relative;
  padding: 20px 0;
}
@media (max-width: 768px) {
  .price-filter-group {
    flex-wrap: nowrap !important;
    overflow: auto;
  }
  .price-filter-item {
    white-space: nowrap;
  }
  .filter-sort-right {
    flex-direction: row-reverse;
  }
  .sort-item,
  .titleTN {
    white-space: nowrap;
  }
}

/* =====================================================
   THANH LỌC DANH MỤC: layout + popup tính năng
   ===================================================== */

/* --- Lưới nội dung popup: mặc định 1 cột --- */
.listTN--cat-feature {
  box-sizing: border-box;
  /* Neo bên dưới nút: position + top đặt trong CSS theo breakpoint */
  position: absolute;
  top: calc(100% + 6px);
  z-index: 50;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.13),
    0 4px 12px rgba(0, 0, 0, 0.07);
  padding: 12px 14px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.listTN--cat-feature__grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.listTN--cat-feature__col {
  width: 100%;
  min-width: 0;
}

.listTN--cat-feature__col .itemTN span {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* --- Desktop: 3 cột, neo phải nút (right: 0), rộng ~560px --- */
@media (min-width: 768px) {
  .listTN--cat-feature {
    right: 0;
    left: auto;
    width: min(560px, calc(100vw - 40px));
    max-height: min(72vh, 600px);
  }

  .listTN--cat-feature__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 14px;
    align-items: start;
  }
}

/* --- Mobile: full chiều ngang viewport, cuộn dọc --- */
@media (max-width: 767px) {
  .listTN--cat-feature {
    right: 0;
    left: auto;
    width: calc(100vw - 32px);
    max-height: min(65vh, 480px);
  }

  .form-search-filter,
  .form-search-filter .filter-wrapper {
    overflow: visible;
  }

  .form-search-filter .filter-wrapper {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .form-search-filter .price-filter-group {
    flex: 0 0 auto !important;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    gap: 8px;
    padding-bottom: 4px;
  }

  .form-search-filter .price-filter-item {
    flex-shrink: 0;
  }

  .form-search-filter .filter-sort-right--toolbar {
    width: 100%;
    min-width: 0;
    align-items: center;
  }
}

/* --- Sort root --- */
.sort-filter-root {
  min-width: 0;
}

.sort-filter-mobile {
  display: none;
}

.sort-filter-group-desktop {
  display: flex;
}

@media (max-width: 767px) {
  .sort-filter-root {
    flex: 1 1 0%;
    min-width: 0;
  }

  .sort-filter-group-desktop {
    display: none !important;
  }

  .sort-filter-mobile {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
  }

  .sort-filter-select {
    width: 100%;
    box-sizing: border-box;
    height: 34px;
    padding: 6px 28px 6px 14px;
    font-size: 13px;
    color: #111827;
    background-color: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
  }

  .sort-filter-select:hover { border-color: #9ca3af; }
  .sort-filter-select:focus {
    border-color: #cc2323;
    box-shadow: 0 0 0 2px rgba(204, 35, 35, 0.15);
  }
}

@media (min-width: 768px) {
  .video-review-section {
    padding: 40px 0;
  }
}

.video-review-card {
  margin: 0 10px;
}

.video-review-card__inner {
  position: relative;
  background: #fff;
  overflow: hidden;
  border-radius: 12px;
}

.video-review-card__video-wrap {
  position: relative;
  width: 100%;
  padding-top: calc(16 / 9 * 100%); /* 9:16 aspect ratio */
  overflow: hidden;
}

.video-review-card__video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-review-card__product {
  position: relative;
  padding: 15px;
  display: flex;
  gap: 12px;
}

.video-review-card__thumb {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
}

.video-review-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-review-card__info {
  flex: 1;
  min-width: 0;
}

.video-review-card__name {
  display: block;
  font-weight: 600;
  font-size: 12px;
  line-height: 1.4;
  color: #2c2a2a;
  margin-bottom: 4px;
  text-decoration: none;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  display: -webkit-box;
}

.video-review-card__name:hover {
  color: #e20000;
}

@media (min-width: 1024px) {
  .video-review-card__name {
    font-size: 14px;
  }
}

.video-review-card__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.video-review-card__price-new {
  font-size: 14px;
  font-weight: 700;
  color: #f00;
}

@media (min-width: 1024px) {
  .video-review-card__price-new {
    font-size: 16px;
  }
}

.video-review-card__price-old {
  font-size: 12px;
  color: #333;
  text-decoration: line-through;
}

/* Credit company selection - trả góp công ty tài chính */
.credit-company-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.credit-company-item {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  cursor: pointer;
  min-height: 60px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.credit-company-item:hover {
  border-color: #cc2323;
}

.credit-company-item.active {
  border: 2px solid #cc2323;
  box-shadow: 0 0 0 1px #cc2323;
}

.credit-company-item img {
  max-height: 50px;
  max-width: 100%;
  object-fit: contain;
}

/* Nút GỬI ĐƠN HÀNG - tab công ty tài chính (giống tab thẻ tín dụng) */
.form-info-tragop .btn-submit button {
  font-family: "Open Sans", sans-serif;
  display: table;
  margin: 24px auto 0;
  text-transform: uppercase;
  color: #fff;
  background: #fd6e1d;
  background: -webkit-gradient(
    linear,
    0% 0%,
    0% 100%,
    from(#fd6e1d),
    to(#f59000)
  );
  background: -webkit-linear-gradient(top, #f59000, #fd6e1d);
  background: -moz-linear-gradient(top, #f59000, #fd6e1d);
  background: -ms-linear-gradient(top, #f59000, #fd6e1d);
  background: -o-linear-gradient(top, #f59000, #fd6e1d);
  font-weight: bold;
  padding: 11px 45px;
  border-radius: 3px;
  font-size: 15px;
  border: none;
  cursor: pointer;
}

.form-info-tragop .btn-submit button:hover {
  opacity: 0.8;
  transition: 0.3s all;
}

/* Block voucher khuyến mãi - trang chi tiết sản phẩm */
.product-voucher-block {
  position: relative;
  border: 1px solid #cc2323;
  background: #cc2323;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}

.product-voucher-block__header {
  font-size: 16px;
  color: #ffd600;
  font-weight: bold;
  padding: 10px;
}

.product-voucher-block__header i {
  margin-right: 8px;
}

.product-voucher-block__inner {
  position: relative;
  padding: 10px;
}

.product-voucher-block__body {
  background: #fdf8e8;
  border-radius: 12px;
  overflow: hidden;
  padding: 20px;
}

.product-voucher-block__km-item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: normal;
  color: #333;
  background: url("../../assets/images/ic-km.png") no-repeat left center;
  padding-left: 30px;
  margin-bottom: 8px;
}

.product-voucher-block__km-item:last-of-type {
  margin-bottom: 12px;
}

.product-voucher-block__intro {
  font-size: 13px;
  font-weight: normal;
  color: #333;
  margin-bottom: 12px;
}

.product-voucher-block__item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.product-voucher-block__item:last-child {
  margin-bottom: 0;
}

.product-voucher-block__number {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #cc2323;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-voucher-block__name {
  font-size: 15px;
  font-weight: bold;
  color: #333;
}

/* Tab panel cố định khi scroll (dưới menu fixed 52px) */
.tab-panel-detail--sticky {
  position: sticky;
  top: 52px;
  z-index: 10;
}

@media (max-width: 767px) {
  .tab-panel-detail--sticky {
    top: 66px;
  }
}

/* Dropdown "Chọn tính năng": nút đóng cuối panel */
.listTN__close-btn {
  display: block;
  width: 100%;
  max-width: 200px;
  margin: 12px auto 4px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.listTN__close-btn:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  color: #111827;
}
