.focus-input.w-full.text-gray-800.placeholder-gray-400.px-4.py-2.text-sm {
  outline: none;
}

.uk-offcanvas-close {
  top: 22px !important;
  right: 13px !important;
}

.custom-options.absolute {
  top: 32px;
  right: 0;
}

.custom-select.border.cursor-pointer {
  width: max-content;
  padding-top: 6px;
  padding-bottom: 6px;
}

.accordion {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.4s ease-in-out,
    margin 0.4s ease-in-out,
    opacity 0.4s ease-in-out;
  margin-top: 0 !important;
  opacity: 0;
}

.accordion.open {
  max-height: 1500px;
  margin-top: 0.5rem !important;
  opacity: 1;
}

/* === Custom reset tooltip bubble === */
.reset-tooltip-wrap {
  position: relative;
}

.reset-tooltip-bubble {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) scale(0.85);
  background: #333;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: 999px;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
  z-index: 100;
}

/* mũi tên hướng xuống */
.reset-tooltip-bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #333;
}

.reset-tooltip-wrap:hover .reset-tooltip-bubble {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* === Filter item active states === */
.filter-item.active .text,
.filter-item.active .bullet {
  color: #eb1c24 !important;
  font-weight: 700;
}

.filter-item.active .bullet {
  background-color: #eb1c24;
  transform: scale(1.25);
}

.filter-item.active .count {
  color: #eb1c24 !important;
}

.filter-author.active .text {
  color: #eb1c24 !important;
  font-weight: 700;
}

.filter-author.active .count {
  color: #eb1c24 !important;
}

.hover-radio-button {
  border-radius: 8px;
  padding: 4px 8px;
}

/* === Book Rating Hover Effects === */
.filter-rating-label:hover svg {
  transform: scale(1.15);
}

.filter-rating-label:hover svg path[fill="#EB1C24"] {
  fill: #ff4b4b !important;
  stroke: #ff4b4b !important;
}

.filter-rating-label:hover svg path[fill="white"] {
  fill: #ffe1e1 !important;
}

/* === Cart Shopping Buttons === */
.btn-continue-shopping {
  display: inline-block;
  margin-top: 1rem;
  background-color: #eb1c24;
  color: #fff !important;
  padding: 8px 24px;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  text-decoration: none;
}

.btn-continue-shopping:hover {
  background-color: #c9171e;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  color: #fff !important;
}

.btn-continue-outline {
  display: inline-block;
  margin-top: 1rem;
  background-color: #ffffff;
  color: #eb1c24 !important;
  border: 1px solid #eb1c24;
  padding: 8px 24px;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-continue-outline:hover {
  background-color: #fef2f2;
  border-color: #c9171e;
  color: #c9171e !important;
  box-shadow: 0 2px 4px rgba(235, 28, 36, 0.1);
}

/* === Book Detail Specific Styles === */
.blink-effect {
  animation: blink-animation 0.8s ease-in-out;
}

/* Hiệu ứng nhấp nháy từ từ và đổi màu nổi bật */
@keyframes blink-animation {
  0% {
    color: inherit;
    opacity: 1;
  }
  30% {
    color: #eb1c24;
    opacity: 0.7;
    font-weight: 700;
  }
  70% {
    color: #eb1c24;
    opacity: 0.7;
    font-weight: 700;
  }
  100% {
    color: inherit;
    opacity: 1;
  }
}

.book-option {
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.book-option.active {
  border: 2px solid #eb1c24 !important;
  background-color: rgba(235, 28, 36, 0.05);
}

/* Đảm bảo chiều cao không bị nhảy khi click */
.quantity-wrapper {
  min-height: 40px;
  display: flex;
  align-items: center;
}

/* Tình trạng kho hàng */
.status-badge {
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  white-space: nowrap;
}

.status-instock {
  background-color: #28a745;
}

.status-outofstock {
  background-color: #a1a3a5;
}

/* Nút tăng giảm số lượng */
.qty-btn {
  cursor: pointer;
  user-select: none;
  transition: all 0.2s;
  font-weight: bold;
}
.qty-btn:hover {
  color: #eb1c24;
}

.quantity-number {
  font-weight: 600;
  min-width: 30px;
  text-align: center;
  display: inline-block;
}

.bg-28a745 {
  background-color: #28a745;
}

.btn-outline-success {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid #28a745;
  color: #28a745;
  background-color: transparent;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.3s ease;
}

/* === Bank Transfer Page Styles === */
.payment-main-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0455a4;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .payment-main-title {
    font-size: 1.375rem;
  }
}

@media (min-width: 1024px) {
  .payment-main-title {
    font-size: 1.5rem;
  }
}

.payment-info-card {
  padding: 1rem;
  border: 1px solid #dcdcdc;
  border-radius: 5px;
  background-color: #ffffff;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .payment-info-card {
    padding: 1.5rem;
  }
}

.qr-image-wrap {
  width: 170px;
  height: 170px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.transfer-code-display {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  background: #f9fafb;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px dashed #0455a4;
  font-family: monospace;
  font-weight: 700;
  color: #0455a4;
  letter-spacing: 2px;
}

.bank-transfer-details {
  width: 100%;
  margin-top: 2rem;
  border-collapse: collapse;
}

.bank-transfer-details tr td {
  padding: 0.75rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.bank-transfer-details .label-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #4b5563;
  width: 180px;
}

.bank-transfer-details .label-wrap img {
  width: 20px;
  height: 20px;
}

.copy-icon-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: opacity 0.2s;
}

.copy-icon-wrap:hover {
  opacity: 0.7;
}

.summary-card {
  background-color: #f6f6f6;
  border-radius: 5px;
  padding: 1rem;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .summary-card {
    width: 300px;
  }
}

.custom-border-bottom-DCDCDC {
  border-bottom: 1px solid #dcdcdc;
}

.text-075rem {
  font-size: 0.75rem;
}

.text-966412 {
  color: #966412;
}

/* === Cart Badge Styles === */
.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: #eb1c24; /* Red color matching the theme */
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  border: 2px solid #ffffff;
  z-index: 10;
}

.cart-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  transition: transform 0.2s ease;
  cursor: pointer;
}

.cart-icon-wrapper:hover {
  transform: scale(1.1);
}

.cart-icon {
  font-size: 24px;
  color: #eb1c24;
}

/* === Payment Buttons (Premium Design) === */
.btn-payment-main,
.btn-payment-secondary {
  width: 100%;
  height: 48px; /* Fixed height for perfect alignment */
  padding: 0 20px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 2px solid #eb1c24;
  box-sizing: border-box;
}

/* Primary Button: Solid Red */
.btn-payment-main {
  background-color: #eb1c24;
  color: #ffffff;
}

.btn-payment-main:hover {
  background-color: #d31920;
  border-color: #d31920;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(235, 28, 36, 0.3);
}

/* Secondary Button: Outline Red */
.btn-payment-secondary {
  background-color: transparent;
  color: #eb1c24;
}

.btn-payment-secondary:hover {
  background-color: #eb1c24;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(235, 28, 36, 0.2);
}

/* === Hover Highlights for Navigation/Links === */
.link-hover-effect {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  cursor: pointer;
}

.link-hover-effect:hover {
  transform: translateY(-1px);
}

.link-hover-effect:hover span,
.link-hover-effect:hover a,
.link-hover-effect:hover i {
  color: #eb1c24 !important;
}

/* Hitbox integration for breadcrumbs */
.relative:has(.hitbox):hover span {
  /* color: #EB1C24 !important; */
  transition: color 0.3s ease;
}

/* === News Index Layout Stability === */
@media (min-width: 768px) {
  .main-content-news {
    flex: 0 0 69% !important;
    max-width: 69% !important;
    width: 69% !important;
  }
  .sidebar-news {
    flex: 0 0 28% !important;
    max-width: 28% !important;
    width: 28% !important;
  }
}

/* === Gallery Media Page Styles === */
.gallery-page {
  background-color: #fff;
  min-height: 100vh;
}

.gallery-breadcrumb-area {
  background-color: #e7e6e0;
  padding: 12px 0;
}

.gallery-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

.gallery-section-padding {
  padding: 40px 0;
}

.gallery-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.gallery-main-title {
  font-size: 24px;
  font-weight: 700;
  color: #333;
  margin: 0;
  position: relative;
  padding-left: 15px;
}

.gallery-main-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background-color: #eb1c24;
}

.gallery-view-all {
  color: #eb1c24;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.gallery-view-all:hover {
  text-decoration: underline;
  opacity: 0.8;
}

/* Image Gallery Layout */
.image-layout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .image-layout-grid {
    grid-template-columns: repeat(10, 1fr);
  }
  .image-featured-col {
    grid-column: span 6 / span 6;
  }
  .image-thumbs-col {
    grid-column: span 4 / span 4;
  }
}

.image-thumbs-subgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Video Gallery Layout */
.video-layout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .video-layout-grid {
    grid-template-columns: repeat(10, 1fr);
  }
  .video-main-col {
    grid-column: span 7 / span 7;
  }
  .video-side-col {
    grid-column: span 3 / span 3;
  }
}

.video-side-stack {
  display: grid;
  grid-template-rows: repeat(2, 1fr);
  gap: 16px;
  height: 100%;
}

.video-bottom-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 16px;
  margin-top: 24px;
}

@media (min-width: 640px) {
  .video-bottom-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .video-bottom-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.media-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-box {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

/* Ảnh lớn */
.media-box-lg {
  aspect-ratio: 16/10;
}

/* Ảnh nhỏ */
.media-box-sm {
  aspect-ratio: 16/9;
}

.media-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-box {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.media-box-lg {
  aspect-ratio: 16/10;
}

.media-box-sm {
  aspect-ratio: 16/9;
}

.video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
  transition: 0.3s;
}

.group:hover .video-overlay {
  background: rgba(0, 0, 0, 0.45);
}

/* PLAY BUTTON */
.play-btn {
  width: 60px;
  height: 60px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.play-btn.small {
  width: 40px;
  height: 40px;
}

/* MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  width: 95%;
  max-width: 1000px;
  height: 60vh;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.absolute.top-2.right-3.text-white.text-2xl.z-10 {
  display: none;
}

.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

.aspect-square {
  aspect-ratio: 1 / 1;
}

/* === HomeEbook V3: Synchronized with danh-muc-sach (Gray Underline #00000080) === */

.home-ebook-item-v3 {
  cursor: pointer;
  display: block;
}

/* 1. Image Zoom (Smooth) */
.home-ebook-item-v3 .uk-transition-scale-up {
  transition: transform 0.4s ease !important;
}

.home-ebook-item-v3:hover .uk-transition-scale-up {
  transform: scale(1.1) !important;
}

/* 2. Title Container: Skewed -> Stand Straight */
.home-ebook-title-container-v3 {
  display: block;
  font-style: italic;
  position: relative;
  transform: skewX(-4deg);
  transition: transform 0.3s ease;
}

.home-ebook-item-v3:hover .home-ebook-title-container-v3 {
  transform: skewX(0deg) !important;
}

/* 3. Title Text: Gray Underline (#00000080) like danh-muc-sach */
.home-ebook-title-text-v3 {
  transition: color 0.3s;
  display: inline-block;
  position: relative;
  color: #161616;
}

.home-ebook-title-text-v3:before {
  content: "";
  transform-origin: 0;
  background-color: rgba(0, 0, 0, 0.5); /* #00000080 - 50% opacity black */
  width: 100%;
  height: 2px;
  transition: transform 0.3s ease;
  position: absolute;
  bottom: -4px;
  left: 0;
  transform: scaleX(0);
}

.home-ebook-item-v3:hover .home-ebook-title-text-v3 {
  color: #dc2626; /* Subtle red transition for title */
}

.home-ebook-item-v3:hover .home-ebook-title-text-v3:before {
  transform: scaleX(1);
}

/* Custom hover for Book All Item */
.book-all-item-wrapper {
  cursor: pointer;
}
.book-all-item-wrapper .book-all-item-title {
  transition: all 0.3s ease;
}
.book-all-item-wrapper:hover .book-all-item-title {
  color: #eb1c24 !important;
  transform: skewX(-5deg);
}

.mr-\[2px\] {
  margin-right: 2px !important;
}

/* === RIÊNG CHO BOOKHOTHOME: XỬ LÝ TIÊU ĐỀ (ISOLATED) === */

/* Vùng chứa tiêu đề: Đảm bảo cắt dòng tuyệt đối */
.book-hot-title-row {
  overflow: hidden !important;
  max-width: 100% !important;
  display: block !important;
}

/* Thẻ chứa chữ: Co giãn theo text, hỗ trợ gạch chân sát đáy */
.book-hot-title-text {
  display: inline-block !important;
  max-width: 100%;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  padding-bottom: 5px !important; /* Bảo vệ gạch chân khỏi overflow: hidden */
  transition: color 0.3s ease;
  line-height: 1.4;
}

/* Hiệu ứng Hover kích hoạt từ thẻ cha (book-hot-title-row) */
.book-hot-title-row:hover .book-hot-title-text {
  color: #dc2626 !important;
}

.book-hot-title-row:hover .book-hot-title-text:before,
.book-hot-title-row:hover .book-hot-title-text:after {
  transform: scaleX(1) !important;
}

/* Đẩy gạch chân lên phía trên (từ -4px lên 1px) để không bị overflow:hidden cắt mất */
.book-hot-title-text:before,
.book-hot-title-text:after {
  bottom: 0px !important;
  height: 2px !important;
}

.quantity-wrapper {
  border-color: #6b7280;
}

/* === Premium Footer Styles === */
.footer-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #161616;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
}

.footer-item-wrap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 6px 0;
  transition: all 0.3s ease;
  position: relative;
  cursor: pointer;
}

.footer-item-wrap:hover {
  transform: translateX(6px);
}

.footer-item-wrap:hover .footer-icon-box {
  background-color: #eb1c24;
  color: #ffffff;
  transform: scale(1.1);
}

.footer-item-wrap:hover .footer-item-text {
  color: #eb1c24 !important;
}

.footer-icon-box {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f3f4f6;
  color: #3d3d3d;
  border-radius: 8px;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.footer-item-text {
  font-size: 14px;
  color: #3d3d3d;
  line-height: 1.5;
  transition: color 0.3s ease;
  text-align: left;
  margin-top: 6px;
}

/* Override existing custom-hover-footer to match brand color */
.custom-hover-footer:hover {
  color: #eb1c24 !important;
}

.custom-hover-footer:hover img {
  filter: brightness(0) saturate(100%) invert(21%) sepia(92%) saturate(4644%)
    hue-rotate(352deg) brightness(97%) contrast(92%) !important;
}

/* === Testing Mode Popup Premium Styles === */
.testing-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.testing-overlay.active {
  opacity: 1;
  visibility: visible;
}

.testing-modal {
  background: rgba(255, 255, 255, 0.95);
  width: 90%;
  max-width: 450px;
  border-radius: 20px;
  padding: 32px;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: scale(0.9) translateY(20px);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(235, 28, 36, 0.1);
}

.testing-overlay.active .testing-modal {
  transform: scale(1) translateY(0);
}

.testing-icon {
  width: 64px;
  height: 64px;
  background: rgba(235, 28, 36, 0.1);
  color: #eb1c24;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 20px;
  animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
  0% { box-shadow: 0 0 0 0 rgba(235, 28, 36, 0.4); }
  70% { box-shadow: 0 0 0 15px rgba(235, 28, 36, 0); }
  100% { box-shadow: 0 0 0 0 rgba(235, 28, 36, 0); }
}

.testing-title {
  font-size: 20px;
  font-weight: 700;
  color: #161616;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.testing-message {
  font-size: 16px;
  color: #4b5563;
  line-height: 1.6;
  margin-bottom: 28px;
}

.btn-testing-close {
  background: #eb1c24;
  color: #ffffff !important;
  padding: 12px 32px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  display: inline-block;
  box-shadow: 0 4px 12px rgba(235, 28, 36, 0.3);
}

.btn-testing-close:hover {
  background: #d31920;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(235, 28, 36, 0.4);
}
