html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #ff6b35;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background-color: #f8f9fa;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Top Bar */
.top-bar {
  background-color: #2c3e50;
  padding: 8px 0;
  font-size: 12px;
  color: #fff;
  border-bottom: 1px solid #34495e;
}

.top-bar a {
  color: #fff;
  text-decoration: none;
}

.top-bar a:hover {
  color: #ff6b35;
}

/* Header */
.main-header {
  background: white;
  padding: 20px 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.navbar-brand {
  font-size: 28px;
  font-weight: 700;
  color: #ff6b35 !important;
}

.search-box {
  position: relative;
  display: flex;
}

.search-box input {
  border: 2px solid #ff6b35;
  border-radius: 25px 0 0 25px;
  padding: 12px 20px;
  font-size: 14px;
}

.search-box input:focus {
  border-color: #ff6b35;
  box-shadow: none;
}

.search-box .btn-search {
  background: #ff6b35;
  color: white;
  border: none;
  border-radius: 0 25px 25px 0;
  padding: 0 25px;
  font-size: 16px;
}

.search-box .btn-search:hover {
  background: #e55a2b;
}

.header-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background: #f8f9fa;
  border-radius: 50%;
  color: #333;
  font-size: 18px;
  transition: all 0.3s;
}

.header-icon:hover {
  background: #ff6b35;
  color: white;
}

.header-icon .badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff6b35;
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

/* Banner */
.banner {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  /* Tỉ lệ chính xác 1920x600px = 16:5 */
  aspect-ratio: 16 / 5;
  width: 100%;
}

.banner .carousel,
.banner .carousel-inner,
.banner .carousel-item {
  height: 100%;
}

.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* Carousel controls — nhỏ gọn, nằm sát cạnh */
.carousel-control-prev,
.carousel-control-next {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.3s ease, background 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Hiện nút khi hover vào banner */
.banner:hover .carousel-control-prev,
.banner:hover .carousel-control-next {
  opacity: 1;
}

.carousel-control-prev {
  left: 12px;
}

.carousel-control-next {
  right: 12px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  background: white;
  opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  width: 16px;
  height: 16px;
  filter: invert(45%) sepia(80%) saturate(600%) hue-rotate(340deg);
}

/* Dots indicator */
.banner .carousel-indicators {
  bottom: 10px;
  margin-bottom: 0;
}

.banner .carousel-indicators [data-bs-target] {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.6);
  border: none;
  transition: all 0.3s;
}

.banner .carousel-indicators .active {
  background-color: #ff6b35;
  width: 22px;
  border-radius: 4px;
}

/* Product Card */
.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: white;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  border-color: #ff6b35;
}


.product-card img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  padding: 15px;
  background: #fff;
  transition: transform 0.3s;
}

.product-card:hover img {
  transform: scale(1.05);
}

.product-card .card-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 15px;
  text-align: left;
}

.product-card .product-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  min-height: 42px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  color: #333;
}

.product-card .product-price {
  font-size: 18px;
  font-weight: 700;
  color: #ff6b35;
  margin-bottom: 10px;
}

.product-card .product-old-price {
  color: #999;
  text-decoration: line-through;
  font-size: 13px;
}

.product-card .btn-add-cart {
  margin-top: auto;
  background: linear-gradient(135deg, #ff6b35, #e55a2b);
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s;
  width: 100%;
}

.product-card .btn-add-cart:hover {
  background: linear-gradient(135deg, #e55a2b, #d44f1f);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255,107,53,0.4);
}

/* Navigation */
.navbar {
  padding: 0;
  background: linear-gradient(135deg, #ff6b35, #e55a2b) !important;
}

.navbar-nav {
  width: 100%;
  justify-content: space-between;
}

.navbar-nav .nav-item {
  flex: 1;
  text-align: center;
}

.navbar-nav .nav-link {
  padding: 15px 20px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s;
  color: white !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.navbar-nav .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.15);
  color: white !important;
}

.navbar-nav .nav-link.active {
  color: white !important;
  background-color: rgba(255, 255, 255, 0.25);
}

.dropdown-item {
  color: black !important;
}

/* Category Icons */
.category-section {
  background: white;
  padding: 30px 0;
  margin-bottom: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.category-item {
  text-align: center;
  padding: 20px 10px;
  transition: all 0.3s;
  cursor: pointer;
  border-radius: 10px;
}

.category-item:hover {
  background: #f8f9fa;
  transform: translateY(-5px);
}

.category-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, #ff6b35, #e55a2b);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  font-size: 28px;
  color: white;
  box-shadow: 0 4px 15px rgba(255,107,53,0.3);
}

.category-item:hover .category-icon {
  transform: scale(1.1);
}

.category-name {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

/* Section Title */
.section-title {
  font-size: 24px;
  font-weight: 700;
  color: #333;
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 15px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(135deg, #ff6b35, #e55a2b);
  border-radius: 2px;
}

/* Flash Sale Section */
.flash-sale-section {
  background: linear-gradient(135deg, #fff5f0, #ffe8dc);
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 30px;
}

.flash-sale-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.flash-sale-title {
  font-size: 28px;
  font-weight: 700;
  color: #ff6b35;
  display: flex;
  align-items: center;
  gap: 10px;
}

.countdown {
  display: flex;
  gap: 10px;
}

.countdown-item {
  background: #ff6b35;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 18px;
  min-width: 45px;
  text-align: center;
}

.countdown-label {
  font-size: 12px;
  font-weight: 500;
}

/* Features Section */
.features-section {
  background: white;
  padding: 40px 0;
  margin-top: 30px;
  border-radius: 12px;
}

.feature-item {
  text-align: center;
  padding: 20px;
}

.feature-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #ff6b35, #e55a2b);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
  font-size: 32px;
  color: white;
}

.feature-item h4 {
  font-size: 16px;
  font-weight: 700;
  color: #333;
  margin-bottom: 8px;
}

.feature-item p {
  font-size: 14px;
  color: #666;
  margin: 0;
}

/* Footer */
.main-footer {
  background: #2c3e50;
  color: white;
  padding: 50px 0 20px;
  margin-top: 50px;
}

.main-footer h4 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #ff6b35;
}

.main-footer p {
  color: #bdc3c7;
  font-size: 14px;
  line-height: 1.6;
}

.main-footer ul {
  list-style: none;
  padding: 0;
}

.main-footer ul li {
  margin-bottom: 10px;
}

.main-footer ul li a {
  color: #bdc3c7;
  text-decoration: none;
  transition: color 0.3s;
}

.main-footer ul li a:hover {
  color: #ff6b35;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-links a {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all 0.3s;
}

.social-links a:hover {
  background: #ff6b35;
  transform: translateY(-3px);
}

/* Price Range Filter */
.price-ranges {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding: 5px 0;
}

.price-ranges .form-check {
  margin-bottom: 0;
}

.price-ranges .form-check-input {
  cursor: pointer;
  accent-color: #ff6b35;
}

.price-ranges .form-check-label {
  cursor: pointer;
  font-size: 13px;
  color: #333;
  transition: color 0.3s;
}

.price-ranges .form-check-label:hover {
  color: #ff6b35;
}

.price-ranges .form-check-input:checked + .form-check-label {
  color: #ff6b35;
  font-weight: 600;
}

/* Filter Section */
.filter-section {
  background: white;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
}

.filter-section label {
  font-size: 13px;
  color: #555;
}