@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&display=swap');

/* ══════════════════════════════════════════════
   DESIGN TOKENS — Dark Gaming Theme
══════════════════════════════════════════════ */
:root {
  --bg:          #0d0f1a;
  --bg-2:        #13162a;
  --bg-card:     #181b2e;
  --bg-card-h:   #1f2340;
  --text:        #e8eaf0;
  --text-sub:    #8b90a8;
  --accent:      #7c6af5;
  --accent-h:    #6554e8;
  --accent-glow: rgba(124,106,245,0.25);
  --gold:        #f5a623;
  --gold-glow:   rgba(245,166,35,0.2);
  --price:       #00d4aa;
  --danger:      #ff4f6d;
  --border:      #252840;
  --border-h:    #3d4170;
  --radius:      12px;
  --radius-lg:   18px;
  --shadow:      0 4px 20px rgba(0,0,0,0.4);
  --shadow-card: 0 2px 12px rgba(0,0,0,0.35);
}

/* ══════ RESET ══════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  font-family: 'Outfit', sans-serif;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; transition: .2s; }
ul { list-style: none; }

/* ══════ SCROLLBAR ══════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--border-h); border-radius: 4px; }

/* ══════ HEADER ══════ */
.main-header {
  background: rgba(13,15,26,.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 0;
  position: sticky; top: 0; z-index: 1000;
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo-wrap { display: flex; align-items: center; gap: 10px; }
.logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  box-shadow: 0 0 16px var(--accent-glow);
}
.logo-text {
  font-weight: 800; font-size: 20px;
  background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}
.logo-sub { font-size: 10px; font-weight: 500; color: var(--text-sub); letter-spacing: 1px; text-transform: uppercase; margin-top: 2px; }

.btn-zalo-header {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-h));
  color: #fff;
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 700; font-size: 14px;
  border: none; cursor: pointer;
  box-shadow: 0 4px 16px var(--accent-glow);
  transition: .2s;
}
.btn-zalo-header:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--accent-glow);
  color: #fff;
}

/* ══════ HERO BANNER ══════ */
.hero-banner {
  background: linear-gradient(135deg, #1a1040 0%, #0d1535 50%, #0d1a25 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 32px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
  position: relative;
  overflow: hidden;
}
.hero-banner::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 10% 50%, var(--accent-glow), transparent);
  pointer-events: none;
}
.hero-banner::after {
  content: '';
  position: absolute; right: -40px; top: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, var(--gold-glow), transparent 70%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.hero-title { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.hero-title span { color: var(--gold); }
.hero-sub { color: var(--text-sub); font-size: 14px; }
.hero-cta {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gold);
  color: #0d0f1a;
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 800; font-size: 14px;
  white-space: nowrap;
  transition: .2s;
  box-shadow: 0 4px 16px var(--gold-glow);
}
.hero-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 24px var(--gold-glow); color: #0d0f1a; }

/* ══════ SEARCH ══════ */
.search-wrap { position: relative; max-width: 560px; margin: 0 auto 32px; }
.search-input {
  width: 100%;
  padding: 14px 56px 14px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  transition: .2s;
  outline: none;
}
.search-input::placeholder { color: var(--text-sub); }
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.search-btn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--accent), var(--accent-h));
  border: none; border-radius: 50%;
  color: #fff; font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: .2s;
}
.search-btn:hover { transform: translateY(-50%) scale(1.08); }

/* ══════ TOOLBAR ══════ */
.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.toolbar-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.section-title { font-weight: 800; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.section-title i { color: var(--accent); }
.count-badge {
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 20px;
}

/* TYPE TOGGLE — multi select */
.type-toggle { display: flex; gap: 6px; background: var(--bg-card); padding: 4px; border-radius: 10px; border: 1px solid var(--border); }
.type-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: 7px;
  font-weight: 700; font-size: 13px;
  color: var(--text-sub);
  cursor: pointer; transition: .2s;
  border: none; background: transparent;
  font-family: 'Outfit', sans-serif;
  user-select: none;
}
.type-btn:hover { color: var(--text); background: var(--border); }
.type-btn.active { background: var(--accent); color: #fff; box-shadow: 0 2px 12px var(--accent-glow); }

/* SORT DROPDOWN */
.sort-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 8px 14px;
  font-family: 'Outfit', sans-serif;
  font-size: 13px; font-weight: 600;
  cursor: pointer; outline: none;
  transition: .2s;
}
.sort-select:focus { border-color: var(--accent); }

/* ══════ FILTER PILLS ══════ */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filter-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-sub); font-weight: 600; font-size: 13px;
  cursor: pointer; transition: .2s;
  user-select: none;
}
.filter-pill:hover { border-color: var(--accent); color: var(--text); }
.filter-pill.active { background: rgba(124,106,245,0.15); border-color: var(--accent); color: var(--accent); font-weight: 700; }
.filter-pill.active::before { content: '✓ '; font-size: 10px; }

/* ══════ MOBILE TOOLS ══════ */
.mobile-tools { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.result-count { color: var(--text-sub); font-size: 13px; font-weight: 600; }

/* ══════ PRODUCT GRID ══════ */
.product-grid { display: flex; flex-wrap: wrap; margin: 0 -10px; }
.product-col { padding: 0 10px; margin-bottom: 20px; width: 100%; }
@media (min-width: 640px)  { .product-col { width: 50%; } }
@media (min-width: 1024px) { .product-col { width: 33.333%; } }

/* ══════ PRODUCT CARD ══════ */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: .25s;
  display: flex; flex-direction: column;
  height: 100%;
  position: relative;
}
.product-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(124,106,245,0.2);
}

.card-thumb {
  position: relative;
  background: var(--bg-2);
  overflow: hidden;
}
.card-thumb img { width: 100%; display: block; height: auto; transition: .3s; }
.product-card:hover .card-thumb img { transform: scale(1.03); }

.badge-hot {
  position: absolute; top: 10px; left: 10px;
  background: linear-gradient(135deg, var(--danger), #ff8c00);
  color: #fff;
  font-size: 10px; font-weight: 800;
  padding: 3px 10px; border-radius: 50px;
  display: flex; align-items: center; gap: 4px;
  z-index: 2;
  box-shadow: 0 2px 10px rgba(255,79,109,0.4);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-type-tag {
  position: absolute; top: 10px; right: 10px;
  font-size: 9px; font-weight: 700;
  padding: 3px 8px; border-radius: 4px; z-index: 2;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-shop { background: rgba(124,106,245,0.85); color: #fff; }
.badge-rent { background: rgba(245,166,35,0.85); color: #0d0f1a; }
.badge-treo { background: rgba(0,212,170,0.85); color: #0d0f1a; }

.card-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.card-name {
  font-weight: 700; font-size: 14px;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 6px;
}
.card-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-sub); margin-bottom: 10px; }
.card-meta span { display: flex; align-items: center; gap: 4px; }

.card-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); padding-top: 10px; margin-top: auto; }
.card-price { font-weight: 800; font-size: 18px; color: var(--price); }
.card-price .label { font-size: 12px; font-weight: 400; color: var(--text-sub); margin-right: 2px; }
.btn-detail {
  background: var(--bg-2);
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 6px 14px; font-size: 12px; font-weight: 700;
  cursor: pointer; transition: .2s;
  font-family: 'Outfit', sans-serif;
  white-space: nowrap;
}
.btn-detail:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.btn-copy {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(124,106,245,0.12);
  color: var(--accent); border: none; border-radius: 6px;
  padding: 3px 9px; font-size: 11px; font-weight: 700;
  cursor: pointer; transition: .2s;
  font-family: 'Outfit', sans-serif; flex-shrink: 0;
}
.btn-copy:hover { background: rgba(124,106,245,0.25); }

/* ══════ EMPTY STATE ══════ */
.empty-state {
  width: 100%;
  text-align: center;
  padding: 80px 20px;
  color: var(--text-sub);
}
.empty-state i { font-size: 56px; display: block; margin-bottom: 16px; opacity: .4; }
.empty-state h5 { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 8px; }

/* ══════ SKELETON ══════ */
.skeleton-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.skel { background: var(--bg-2); border-radius: 6px; position: relative; overflow: hidden; }
.skel::after {
  content: ''; position: absolute; inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
  animation: shimmer 1.4s ease infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }
.skel-img { height: 180px; border-radius: 0; }
.skel-p { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.skel-line { height: 14px; border-radius: 4px; }
.skel-sm { width: 55%; }
.skel-lg { width: 85%; }
.skel-price { height: 22px; width: 45%; margin-top: 4px; }

/* ══════ PAGINATION ══════ */
.pagi-wrap {
  display: flex; justify-content: center; align-items: center; gap: 10px;
  margin: 40px 0; position: relative; z-index: 10;
}
.pagi-btn {
  width: 42px; height: 42px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text-sub);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; cursor: pointer; transition: .2s;
}
.pagi-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.pagi-btn.disabled { opacity: .3; pointer-events: none; }

.pagi-center { position: relative; }
.pagi-main {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; height: 42px; padding: 0 18px;
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 14px;
  cursor: pointer; transition: .2s; min-width: 140px; justify-content: center;
  font-family: 'Outfit', sans-serif; color: var(--text);
}
.pagi-main:hover { border-color: var(--accent); }
.pagi-main.open { border-color: var(--accent); background: var(--bg-card-h); }

.pagi-drop {
  position: absolute; bottom: calc(100% + 10px); left: 50%;
  transform: translateX(-50%) scale(0.92) translateY(8px);
  width: 280px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
  opacity: 0; visibility: hidden;
  transition: .2s cubic-bezier(.34,1.56,.64,1);
  z-index: 100;
}
.pagi-drop.show { opacity: 1; visibility: visible; transform: translateX(-50%) scale(1) translateY(0); }
.pagi-drop::after {
  content: ''; position: absolute;
  bottom: -6px; left: 50%; transform: translateX(-50%) rotate(45deg);
  width: 12px; height: 12px;
  background: var(--bg-card); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.pagi-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 6px; max-height: 220px; overflow-y: auto; }
.pagi-num {
  height: 34px; display: flex; align-items: center; justify-content: center;
  border-radius: 7px; font-weight: 700; font-size: 13px;
  color: var(--text-sub); background: var(--bg-2); cursor: pointer; transition: .15s;
}
.pagi-num:hover { background: var(--border); color: var(--text); }
.pagi-num.active { background: var(--accent); color: #fff; box-shadow: 0 2px 10px var(--accent-glow); }

/* ══════ FLOATING MENU ══════ */
.floating-menu {
  position: fixed; z-index: 9999;
  background: rgba(24,27,46,.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  display: flex; justify-content: space-around; align-items: center;
  transition: .3s;
}
.float-item {
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer; transition: .2s; position: relative;
  text-decoration: none; color: var(--text-sub);
}
.float-icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; transition: .2s; }
.float-icon img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,.3)); }
.float-item.active .float-icon { filter: drop-shadow(0 0 8px var(--accent)); transform: scale(1.15); }
.float-item.active .float-label { color: var(--accent); font-weight: 800; }

@media (max-width: 1023px) {
  .floating-menu { bottom: 16px; left: 16px; right: 16px; height: 68px; border-radius: 18px; padding: 0 8px; }
  .float-label { font-size: 10px; font-weight: 600; margin-top: 3px; }
  .float-item:active { transform: scale(0.9); }
}
@media (min-width: 1024px) {
  .floating-menu {
    flex-direction: column; top: 50%; right: 18px; transform: translateY(-50%);
    width: 66px; height: auto; padding: 18px 0; border-radius: 30px; gap: 22px;
  }
  .float-label {
    position: absolute; right: 66px;
    background: var(--bg-card); color: var(--text);
    border: 1px solid var(--border);
    padding: 5px 12px; border-radius: 7px;
    font-size: 12px; font-weight: 700;
    white-space: nowrap;
    opacity: 0; visibility: hidden;
    transform: translateX(8px); transition: .25s;
    box-shadow: 0 4px 14px rgba(0,0,0,0.3);
  }
  .float-label::after {
    content: ''; position: absolute;
    top: 50%; right: -6px; transform: translateY(-50%) rotate(45deg);
    width: 12px; height: 12px;
    background: var(--bg-card); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  }
  .float-item:hover .float-label { opacity: 1; visibility: visible; transform: translateX(0); }
  .float-item:hover .float-icon { transform: scale(1.1); }
}

/* ══════ FOOTER ══════ */
footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 30px 0;
  text-align: center;
  color: var(--text-sub);
  font-size: 13px; font-weight: 500;
  margin-top: 60px;
}
footer strong { color: var(--accent); }
footer a { color: var(--gold); }
footer a:hover { color: var(--text); }

/* ══════ CONTAINER ══════ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.py-4 { padding-top: 28px; padding-bottom: 28px; }

/* ══════ DETAIL PAGE ══════ */
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-sub); font-weight: 600; font-size: 13px;
  padding: 8px 16px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px;
  margin-bottom: 24px; transition: .2s;
}
.back-link:hover { border-color: var(--accent); color: var(--accent); }

.detail-layout { display: flex; gap: 28px; flex-wrap: wrap; }
.detail-left { flex: 1; min-width: 280px; }
.detail-right { width: 360px; min-width: 280px; flex-shrink: 0; }
@media (max-width: 767px) { .detail-right { width: 100%; } }

.detail-main-img {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.detail-main-img img { width: 100%; display: block; }

.thumb-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.thumb-item {
  width: 68px; height: 68px;
  border-radius: 8px; overflow: hidden;
  border: 2px solid var(--border); cursor: pointer; transition: .2s;
}
.thumb-item img { width: 100%; height: 100%; object-fit: cover; }
.thumb-item:hover { border-color: var(--accent); }
.thumb-item.active { border-color: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }

.detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: sticky; top: 80px;
}
.detail-name { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.detail-price { font-size: 36px; font-weight: 900; color: var(--price); margin: 16px 0; letter-spacing: -1px; }
.detail-price small { font-size: 16px; font-weight: 400; color: var(--text-sub); }
.detail-deposit { font-size: 13px; color: var(--gold); font-weight: 600; margin-top: -10px; margin-bottom: 16px; }

.btn-buy {
  width: 100%; padding: 15px;
  background: linear-gradient(135deg, var(--accent), var(--accent-h));
  color: #fff; border: none; border-radius: 10px;
  font-family: 'Outfit', sans-serif; font-size: 16px; font-weight: 800;
  cursor: pointer; transition: .2s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  text-transform: uppercase; letter-spacing: 0.5px;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-buy:hover { transform: translateY(-2px); box-shadow: 0 6px 28px var(--accent-glow); }

.info-table { margin-top: 20px; }
.info-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px;
}
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--text-sub); font-weight: 600; min-width: 100px; display: flex; align-items: center; gap: 6px; }
.info-label i { color: var(--accent); font-size: 16px; }
.info-value { font-weight: 700; color: var(--text); }

.zalo-box {
  background: linear-gradient(135deg, rgba(124,106,245,.15), rgba(245,166,35,.08));
  border: 1px solid rgba(124,106,245,.3);
  border-radius: var(--radius); padding: 18px; text-align: center; margin-top: 16px;
}
.zalo-box p { color: var(--text-sub); font-size: 13px; margin-bottom: 12px; }
.btn-zalo-link {
  display: inline-flex; align-items: center; gap: 8px;
  background: #0068FF; color: #fff;
  padding: 11px 22px; border-radius: 8px;
  font-weight: 700; font-size: 15px; transition: .2s;
}
.btn-zalo-link:hover { background: #0058d0; color: #fff; }

.related-grid { display: flex; flex-wrap: wrap; margin: 0 -10px; }

/* ══════ LOADING ══════ */
.spinner-wrap { text-align: center; padding: 40px; display: none; }
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%; animation: spin .7s linear infinite; margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════ RESPONSIVE ══════ */
@media (max-width: 768px) {
  .hero-banner { flex-direction: column; text-align: center; }
  .toolbar { flex-direction: column; align-items: flex-start; }
  .detail-right { width: 100%; }
}

/* ══════ UTILITY ══════ */
.d-none { display: none; }
.d-lg-flex { display: none; }
.d-lg-none { display: flex; }
@media (min-width: 992px) {
  .d-lg-flex { display: flex !important; }
  .d-lg-none { display: none !important; }
}
