.home-banner-topup {
  display: flex;
  gap: 24px;
  margin: 24px 0;
  align-items: stretch;
}

.banner-slider {
  flex: 1 1 0%; 
  position: relative;
  height: 350px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.slider-images {
  position: relative;
  width: 100%;
  height: 100%;
}

.slider-images img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  opacity: 0;
  transition: opacity 1s ease;
  z-index: 0;
}

.slider-images img.active {
  opacity: 1;
  z-index: 1;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  border: none;
  padding: 12px 16px;
  font-size: 22px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  background: transparent;
  transition: background 0.3s;
}

.slider-btn:hover {
  background: rgba(0, 0, 0, 0.4);
}

.slider-btn.prev {
  left: 10px;
}

.slider-btn.next {
  right: 10px;
}

.topup-ranking {
  --primary: #e53935;
  flex: 0 0 280px;
  max-width: 280px;
  background: white;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  height: 350px;
  display: flex;
  flex-direction: column;
}

.ranking-title {
  display: flex;
  align-items: center;
  font-size: 18px;
  font-weight: bold;
  color: #333;
  margin: 0 0 12px;
  gap: 6px;
}

.icon-cup {
  width: 20px;
  height: 20px;
}

.topup-ranking .tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.topup-ranking .tabs button {
  padding: 6px 12px;
  border: 1px solid #e0e0e0;
  background: #f7f7f7;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  color: #333;
  font-size: 13px;
  transition: all 0.2s;
}

.topup-ranking .tabs button:hover {
  background: #e0e0e0;
}

.topup-ranking .tabs button.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.ranking-list {
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  flex: 1;
}

.ranking-list li {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  column-gap: 8px;
  padding: 8px 4px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
  transition: background 0.2s;
}

.ranking-list li:last-child {
  border-bottom: none;
}

.ranking-list li:hover {
  background: #fafafa;
}

.ranking-list .rank img {
  width: 24px;
  height: 24px;
  display: block;
}

.ranking-list .name {
  min-width: 0;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.btn-nap-the1 {
  display: block;
  text-align: center;
  background: var(--primary);
  color: white;
  font-weight: bold;
  padding: 8px;
  border-radius: 6px;
  text-decoration: none;
  margin-top: auto; /* đẩy xuống cuối khung */
  transition: background 0.2s;
}

.btn-nap-the1:hover {
  background: #c62828;
}

.ranking-list .amount {
  background: var(--primary);
  color: white;
  font-weight: bold;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 768px) {
  .home-banner-topup {
    flex-direction: column;
    gap: 16px;
  }

  .banner-slider {
    order: 1;
    width: 100%;
    height: auto;
    min-height: 150px;
  }

  .banner-slider .slider-images {
    height: 150px;
  }

  .topup-ranking {
    order: 2;
    width: 100%;
    max-width: 100%;
    min-height: auto;
  }

  .slider-images img {
    object-fit: cover;
  }
}
.nap-tien-wrapper {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin: 0; 
}

.btn-nap img {
  width: 402px; 
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.btn-nap img:hover {
  transform: scale(1.05);
}
@media (max-width: 768px) {
  .nap-tien-wrapper {
    flex-wrap: nowrap;         
    gap: 12px;
    padding-left: 16px;      
    overflow-x: auto;        
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    margin-top: 0;
  }

  .nap-tien-wrapper .btn-nap {
    flex: 0 0 70vw;       
    scroll-snap-align: start;  
  }

  .btn-nap img {
    width: 100%;  
    height: 100px;
  }

  .nap-tien-wrapper::-webkit-scrollbar { display: none; }
  .nap-tien-wrapper { scrollbar-width: none; }
}

.service-wrapper {
  margin: 32px 0;
    background: #fafafa; 
}
.service-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  color: #1a237e;
  padding: 10px 10px 0;
  text-transform: uppercase;
}

.service-heading i {
  font-size: 18px;
  color: #e53935;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(100px, 1fr));
  justify-items: center;
  padding: 8px;
  border: 1px solid #eee;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}
.service-item1 {
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    padding: 8px;
}

.service-item1 img {
    object-fit: cover;
    border-radius: 8px;
    width: 50px;
    height: 50px;
}

.service-item1 span {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
}

.service-item {
  text-decoration: none;
  color: #1a237e;
  background: #ffffff;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease;
  box-shadow: 0 0 0 transparent;
  border: 1px solid transparent;
}

.service-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #ddd;
}

.service-item img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.service-item span {
  text-align: center;
  font-size: 13px;
  line-height: 1.3;
  text-transform: uppercase;
  font-weight: 600;
  max-width: 110px;
  white-space: normal;
}

@media (max-width: 768px) {
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 8px;
  }
  .service-item img {
    width: 48px;
    height: 48px;
  }

  .service-item span {
    font-size: 12px;
    max-width: 100px;
  }
}
.product-section {
  background: #F5F5F5;
  border-radius: 10px;
}
.section-title {
  font-size: 20px;
  font-weight: bold;
  color: #d32f2f;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 10px 0;
}
.section-title i {
  color: red;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 0 10px 10px;
}

.product-card {
  background: white;
  border-radius: 12px;
  padding: 12px;
  text-align: left;
  text-decoration: none;
  color: #111;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.product-card img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 8px;
}

.product-card h3 {
  font-size: 15px;
  font-weight: bold;
  margin: 0 0 4px;
  color: #d32f2f;
  text-align: left !important;
}

.product-card p {
  font-size: 13px;
  color: #333;
  margin: 0;
}
.product-card span {
  margin-top: 20px;
}
.sale-label {
    display: inline-block;
    background: #ff3b30;
    color: #fff;
    font-weight: bold;
    font-size: 14px;
    padding: 6px 20px;
    clip-path: polygon(
        10px 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%,
        10px 100%, 0 50%
    );
}


/* Tạo viền răng cưa 2 bên */
.sale-label::before,
.sale-label::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 10px;
    background: repeating-linear-gradient(
        45deg,
        #fff 0,
        #fff 2px,
        transparent 2px,
        transparent 4px
    );
}

.sale-label::before {
    left: -10px;
}

.sale-label::after {
    right: -10px;
    transform: scaleX(-1);
}

.product-card span strong {
  color: #e53935;
}
.product-card .highlight {
  color: #e53935;
  font-weight: bold;
}

.label-sale {
  display: inline-block;
  background: #e53935;
  color: white;
  font-size: 11px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 3px;
  margin-top: 6px;
}

@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .product-card h3 {
    font-size: 14px;
  }

  .product-card p {
    font-size: 12px;
  }
}
.FF {
  margin-top: 30px;
}
.TM {
  margin-top: 30px;
}
.acc-count {
    font-size: 13px;
    color: #2c2c2c;
    margin-top: 4px;
    font-weight: bold;
    opacity: 0.8;
}
/* Tin tức mới nhất */
.news-section {
    margin: 20px 0;
    padding: 10px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.news-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 2px solid #1abc9c;
    color: #333;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.news-item {
    background: #f9f9f9;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 240px;
}

.news-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.news-item a {
    display: block;
    color: inherit;
    text-decoration: none;
}


.news-item h3 {
    padding: 10px;
    font-size: 15px;
    font-weight: bold;
    color: #333;
    line-height: 1.4;
}

.news-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* @media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .news-item img {
        height: 200px;
    }
} */
@media (max-width: 768px) {
    .news-grid.mobile-fade {
        position: relative;
        display: block !important; 
    }
    .news-grid.mobile-fade .news-item {
        position: absolute;
        top: 0;
        left: 0;
        width: 100% !important; 
        opacity: 0;
        transition: opacity 1s ease-in-out;
    }
    .news-grid.mobile-fade .news-item.active {
        opacity: 1;
        position: relative;/
    }
    .news-grid.mobile-fade img {
        width: 100% !important;
        height: auto;
        object-fit: cover;
        display: block;
    }
    .news-item {
      background: none;
    }
}

.news-pagination-wrapper {
    margin-top: 20px;
    text-align: center;
}

.news-pagination {
    display: inline-block;
}

.news-pagination a,
.news-pagination span {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 2px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
}

.news-pagination a:hover {
    background: #1abc9c;
    color: #fff;
    border-color: #1abc9c;
}

.news-pagination .news-current {
    background: #1abc9c;
    color: #fff;
    border-color: #1abc9c;
}

.news-pagination .news-disabled {
    color: #ccc;
    cursor: not-allowed;
}
