/*
  File: style.css
  Mục đích: Bổ sung tuỳ chỉnh nhỏ cho Tailwind CSS nếu cần
  Font: Inter (ưu tiên), fallback Roboto
*/
body {
  font-family: 'Inter', 'Roboto', Arial, sans-serif;
}

/* Better text truncation on product card title (Tailwind line-clamp needs plugin) */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Ẩn thanh cuộn ngang trên menu danh mục khi tràn */
nav.bg-\[\#283593\]::-webkit-scrollbar {
  display: none;
}

/* Hero slider */
.hero-slider {
  position: relative;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}
.hero-slider.is-dragging { cursor: grabbing; }
.hero-slides {
  position: relative;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 600ms ease;
}
.hero-slide.is-active {
  opacity: 1;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}
.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,255,255,0.35);
  color: #0f1b5c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 40px rgba(0,0,0,0.18);
  z-index: 5;
}
.hero-nav:hover { background: white; transform: translateY(-50%) scale(1.03); }
.hero-prev { left: 12px; }
.hero-next { right: 12px; }
.hero-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 6;
}
.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.45);
  border: 1px solid rgba(255,255,255,0.5);
  transition: transform 200ms ease, background 200ms ease;
}
.hero-dot.is-active {
  background: rgba(255,255,255,0.95);
  transform: scale(1.2);
}

/* Responsive tối ưu cho search bar trên mobile */
@media (max-width: 768px) {
  #searchForm {
    margin: 0;
    max-width: 100%;
  }
}

/* Hiệu ứng hover cho nút action và card */
button, a {
  transition: background 0.3s, color 0.3s, box-shadow 0.3s, transform 0.2s;
}

/* Card hiện đại */
.card-modern {
  border-radius: 1.25rem;
  box-shadow: 0 4px 24px 0 rgba(30, 64, 175, 0.08);
  background: #fff;
  transition: box-shadow 0.3s, transform 0.2s;
}
.card-modern:hover {
  box-shadow: 0 8px 32px 0 rgba(30, 64, 175, 0.16);
  transform: translateY(-4px) scale(1.03);
}

/* Tùy chỉnh badge số lượng */
#cartCount, #wishlistCount {
  min-width: 1.5rem;
  text-align: center;
  font-weight: bold;
  box-shadow: 0 2px 8px 0 rgba(255,193,7,0.15);
}

/* Smooth toast animation */
#toastHost > div {
  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Responsive cho section mới */
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
}

@media (max-width: 640px) {
  .section-title {
    font-size: 1.2rem;
    margin-bottom: 1.2rem;
  }
}
