/* ===================================================
   MAMANGGS - HOME PAGE STYLES
   =================================================== */

/* --- 1. BANNER CAROUSEL --- */
.banner-section {
  width: 100%;
  max-width: 1240px;
  margin: 24px auto 0;
  padding: 0 20px;
}

.carousel-container {
  position: relative;
  width: 100%;
  height: 220px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--navy-base);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  background-size: cover;
  background-position: center;
}

.carousel-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

/* Desain Warna Slide */
.slide-promo-1 {
  background: linear-gradient(135deg, #2a080c 0%, #0c182b 60%, #111e33 100%);
  border-left: 6px solid var(--accent-red);
}

.slide-promo-2 {
  background: linear-gradient(135deg, #082618 0%, #0c182b 60%, #111e33 100%);
  border-left: 6px solid #10b981;
}

.slide-promo-3 {
  background: linear-gradient(135deg, #0a1b38 0%, #0c182b 60%, #111e33 100%);
  border-left: 6px solid #3b82f6;
}

.carousel-text {
  max-width: 600px;
}

.carousel-text h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 8px 0 4px;
  color: #fff;
}

.carousel-text p {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.carousel-icon-box {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  flex-shrink: 0;
}

.carousel-dots {
  position: absolute;
  bottom: 14px;
  right: 24px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: var(--transition);
}

.dot.active {
  background: var(--accent-red);
  width: 24px;
  border-radius: 6px;
}

/* --- 2. FILTER TABS --- */
.tabs-section {
  width: 100%;
  max-width: 1240px;
  margin: 28px auto 0;
  padding: 0 20px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
}

.tab-btn {
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  background: var(--navy-base);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  transition: var(--transition);
  white-space: nowrap;
}

.tab-btn.active, .tab-btn:hover {
  background: var(--accent-red);
  color: #fff;
  border-color: var(--accent-red);
}

/* --- 3. KATALOG GAME GRID --- */
.catalog-section {
  width: 100%;
  max-width: 1240px;
  margin: 28px auto 60px;
  padding: 0 20px;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.section-label i {
  color: var(--accent-red);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  width: 100%;
}

.game-card {
  background: var(--navy-base);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: var(--transition);
}

.game-card:hover {
  transform: translateY(-6px);
  border-color: rgba(230, 57, 70, 0.5);
}

.card-img-wrapper {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
}

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

.badge-populer {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--accent-red);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
}

.badge-type {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(7, 13, 24, 0.85);
  backdrop-filter: blur(4px);
  border: 1px solid var(--border-color);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.game-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.game-title {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
}

.game-dev {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.btn-topup {
  width: 100%;
  padding: 8px;
  background: var(--accent-red);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  display: block;
}

/* --- 4. LIVE SALES TOAST --- */
.live-sales-toast {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background: rgba(12, 24, 43, 0.95);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-red);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  transform: translateY(120px);
  opacity: 0;
  transition: all 0.4s ease;
  z-index: 999;
}

.live-sales-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.live-sales-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(230, 57, 70, 0.15);
  color: var(--accent-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.live-sales-text h5 {
  font-size: 0.82rem;
  font-weight: 700;
}

.live-sales-text p {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Responsif Tablet & HP */
@media (max-width: 1024px) {
  .game-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .carousel-slide { padding: 16px; }
  .carousel-text h2 { font-size: 1.1rem; }
  .carousel-icon-box { display: none; }
  .game-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card-img-wrapper { height: 135px; }
}
/* ==========================================
   PENYESUAIAN KHUSUS LAYAR HP (MOBILE < 768px)
   ========================================== */
@media (max-width: 768px) {
  /* 1. Flash Sale Ticker di HP */
  .flash-promo-card {
    width: 210px !important;
    min-width: 210px !important;
    padding: 10px !important;
  }
  .flash-promo-card img {
    width: 36px !important;
    height: 36px !important;
  }

  /* 2. Populer Sekarang: Jadi 2 Kolom atau 1 Kolom Ramping di HP */
  .popular-grid-layout {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .popular-compact-card {
    padding: 10px 12px !important;
  }

  /* 3. Tab Filter Kategori di HP */
  .catalog-tab-pill {
    padding: 6px 14px !important;
    font-size: 0.75rem !important;
  }

  /* 4. Katalog Poster Game: Pas 2 Kolom di Layar HP */
  .catalog-poster-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }
  .catalog-poster-card img {
    height: 160px !important; /* Tinggi poster pas untuk HP */
  }
  .catalog-poster-card h4 {
    font-size: 0.78rem !important;
  }
  .catalog-poster-card p {
    font-size: 0.68rem !important;
  }

  /* 5. Banner Leaderboard Hall of Fame di HP */
  .home-section {
    padding: 0 12px !important;
    margin-bottom: 30px !important;
  }
}