/* ========== HOMEPAGE SECTIONS ========== */

/* --- Search Bar (top) --- */
.home-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #ffffff;
}
.home-search input[type="search"] {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid #e0e4e8;
  border-radius: 12px;
  font-size: 14px;
  background: #f8f9fb;
  transition: border-color .2s;
}
.home-search input[type="search"]:focus {
  outline: none;
  border-color: #2ca652;
}
.home-search select {
  padding: 10px 12px;
  border: 1.5px solid #e0e4e8;
  border-radius: 12px;
  font-size: 14px;
  min-width: 110px;
  background: #f8f9fb;
}

/* --- Hero Banner --- */
.hero-banner {
  position: relative;
  margin: 0 14px 6px;
  border-radius: 16px;
  overflow: hidden;
  background: #e8f5ee;
}
.hero-banner-track {
  display: flex;
  transition: transform .45s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}
.hero-banner-slide {
  min-width: 100%;
  position: relative;
  cursor: pointer;
}
.hero-banner-slide img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}
@media (min-width: 768px) {
  .hero-banner-slide img {
    height: 260px;
  }
}
.hero-banner-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 18px;
  background: linear-gradient(transparent 0%, rgba(0,0,0,.55) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.hero-banner-text {
  flex: 1;
  min-width: 0;
}
.hero-banner-name {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
  text-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.hero-banner-price {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-banner-price-old {
  font-size: 13px;
  color: rgba(255,255,255,.7);
  text-decoration: line-through;
}
.hero-banner-price-new {
  font-size: 18px;
  font-weight: 800;
  color: #ffd644;
  text-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.hero-banner-btn {
  flex-shrink: 0;
  padding: 8px 18px;
  background: #2ca652;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s;
  white-space: nowrap;
}
.hero-banner-btn:hover {
  background: #249447;
}

/* Dots */
.hero-banner-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 5;
}
.hero-banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.45);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.hero-banner-dot.active {
  background: #ffffff;
  transform: scale(1.25);
}

/* Empty banner */
.hero-banner-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 160px;
  background: linear-gradient(135deg, #e8f5ee 0%, #d4edda 100%);
  border-radius: 16px;
  margin: 0 14px 6px;
}
.hero-banner-empty-text {
  text-align: center;
}
.hero-banner-empty-text h3 {
  font-size: 18px;
  font-weight: 700;
  color: #1f8c4c;
  margin: 0 0 6px;
}
.hero-banner-empty-text p {
  font-size: 14px;
  color: #5a7d65;
  margin: 0;
}

/* --- Section Header --- */
.home-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 8px;
}
.home-section-title {
  font-size: 17px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0;
}
.home-section-link {
  font-size: 13px;
  font-weight: 600;
  color: #2ca652;
  text-decoration: none;
  white-space: nowrap;
}
.home-section-link:hover {
  text-decoration: underline;
}

/* --- Category Section --- */
.home-categories-scroll {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 16px 12px;
  justify-content: center;
}
.home-cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 74px;
  flex: 0 0 auto;
  padding: 10px 8px;
  background: #ffffff;
  border-radius: 14px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s;
  text-decoration: none;
}
.home-cat-item:hover {
  transform: translateY(-2px);
}
.home-cat-item.active {
  border-color: #2ca652;
  background: #f0faf4;
}
.home-cat-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: #f0f8f4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.home-cat-item.active .home-cat-icon {
  background: #d4f0de;
}
.home-cat-name {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  text-align: center;
  line-height: 1.2;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-cat-item.active .home-cat-name {
  color: #1f8c4c;
}

/* --- Featured Products (horizontal scroll) --- */
.home-featured-scroll {
  display: flex;
  gap: 12px;
  padding: 0 16px 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.home-featured-scroll::-webkit-scrollbar {
  display: none;
}
.featured-card {
  flex: 0 0 150px;
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 6px 14px rgba(0,0,0,.05);
  transition: transform .2s, box-shadow .2s;
  cursor: pointer;
  position: relative;
}
.featured-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0,0,0,.1);
}
.featured-card-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: #d02f2f;
  color: #ffffff;
}
.featured-card-img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
  background: #f5f7fa;
}
.featured-card-body {
  padding: 8px 10px 10px;
}
.featured-card-name {
  font-size: 12px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.3;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  display: -webkit-box;
  margin-bottom: 6px;
  min-height: 31px;
}
.featured-card-price {
  font-size: 14px;
  font-weight: 700;
  color: #2ca652;
}
.featured-card-price-old {
  font-size: 11px;
  color: #999;
  text-decoration: line-through;
  margin-left: 4px;
  font-weight: 500;
}
.featured-card-btn {
  display: block;
  width: calc(100% - 20px);
  margin: 0 10px 10px;
  padding: 7px 0;
  background: #2ca652;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: background .18s;
}
.featured-card-btn:hover {
  background: #249447;
}

/* --- All Products Section Header --- */
.home-allproducts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 6px;
}
.home-allproducts-title {
  font-size: 17px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0;
}
.home-allproducts-count {
  font-size: 13px;
  color: #808b95;
  font-weight: 500;
}
