:root {
  --bg: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f5f3ff;
  --gold: #7c3aed;
  --gold-light: #8b5cf6;
  --gold-dark: #6d28d9;
  --gold-glow: rgba(124, 58, 237, 0.15);
  --gold-border: rgba(124, 58, 237, 0.22);
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;
  --line: rgba(124, 58, 237, 0.12);
  --line-gold: rgba(124, 58, 237, 0.35);
  --green: #10b981;
  --green-soft: rgba(16, 185, 129, 0.12);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow-card: 0 10px 30px rgba(124, 58, 237, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-gold: 0 8px 24px rgba(124, 58, 237, 0.28);
  --font-heading: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Be Vietnam Pro", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Background Cyber Grid effect */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 15% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(124, 58, 237, 0.07) 0%, transparent 45%),
    linear-gradient(rgba(124, 58, 237, 0.04) 1px, transparent 1px) 0 0/48px 48px,
    linear-gradient(90deg, rgba(124, 58, 237, 0.04) 1px, transparent 1px) 0 0/48px 48px;
  pointer-events: none;
  z-index: -1;
}

a {
  color: inherit;
  text-decoration: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

h1, h2, h3, h4, .font-heading {
  font-family: var(--font-heading);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.wrap {
  width: 90%;
  max-width: 90%;
  margin: 0 auto;
  padding: 0 10px;
}

/* Nút bấm (Buttons) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--bg-surface);
  color: var(--text-main);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn.gold {
  background: linear-gradient(135deg, var(--gold-light), #6d28d9);
  color: #ffffff !important;
  border: none;
  font-weight: 700;
  box-shadow: var(--shadow-gold);
}

.btn.gold:hover {
  filter: brightness(1.1);
  box-shadow: 0 8px 28px rgba(124, 58, 237, 0.4);
  transform: translateY(-2px);
  color: #ffffff !important;
}

.btn.outline-gold {
  border: 1.5px solid #7c3aed;
  color: #6d28d9;
  background: #f5f3ff;
  font-weight: 700;
}

.btn.outline-gold:hover {
  background: #7c3aed;
  color: #ffffff !important;
  border-color: #7c3aed;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.25);
}

.btn.sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.btn.block {
  width: 100%;
}

/* Topbar */
.topbar {
  background: linear-gradient(90deg, #6d28d9 0%, #7c3aed 50%, #9333ea 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 13px;
  text-align: center;
  padding: 8px 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.topbar strong {
  color: #fde047;
}

/* Header */
header.site {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(124, 58, 237, 0.15);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.06);
}

.hrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 1px;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand .gold-text {
  background: linear-gradient(135deg, #7c3aed, #9333ea);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-badge {
  font-size: 10px;
  font-family: var(--font-body);
  background: var(--gold-border);
  color: var(--gold-light);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Spotlight Search */
.search-box {
  flex: 1;
  max-width: 560px;
  position: relative;
}

.search-box input {
  width: 100%;
  height: 42px;
  background: #ffffff;
  border: 1.5px solid rgba(124, 58, 237, 0.22);
  border-radius: var(--radius-full);
  padding: 0 16px 0 42px;
  color: var(--text-main);
  font-size: 14px;
  transition: all 0.2s ease;
}

.search-box input:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 16px rgba(124, 58, 237, 0.2);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 16px;
  pointer-events: none;
}

nav.main-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

nav.main-nav .nav-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

nav.main-nav .nav-link:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.cat-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f5f3ff;
  border: 1.5px solid #7c3aed;
  color: #6d28d9;
  padding: 0 14px;
  height: 40px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.cat-nav-btn:hover {
  background: #7c3aed;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
  transform: translateY(-1px);
}

.cart-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1.5px solid var(--gold-border);
  padding: 0 16px;
  height: 40px;
  border-radius: var(--radius-full);
  color: #6d28d9;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cart-btn:hover {
  background: #f5f3ff;
  border-color: var(--gold);
  color: #6d28d9;
}

.cart-badge {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: #ffffff !important;
  font-size: 12px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(124, 58, 237, 0.35);
}

/* Bento Hero Section */
.hero-bento {
  padding: 40px 0 24px;
}

.bento-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: auto auto;
  gap: 20px;
}

.bento-card {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.bento-card.hero-main {
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1.5px solid rgba(124, 58, 237, 0.22);
  background: linear-gradient(135deg, #ffffff 0%, #f5f3ff 100%);
  box-shadow: 0 15px 35px rgba(124, 58, 237, 0.08);
}

.hero-main .tagline-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f5f3ff;
  border: 1px solid rgba(124, 58, 237, 0.25);
  color: #6d28d9;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
  width: fit-content;
}

.hero-main h1 {
  font-size: clamp(34px, 4.2vw, 54px);
  line-height: 1.05;
  margin-bottom: 16px;
  font-weight: 800;
  color: #0f172a;
}

.hero-main h1 span {
  background: linear-gradient(135deg, #7c3aed 20%, #9333ea 60%, #c026d3 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-main p.desc {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 24px;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.bento-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat-item {
  background: var(--bg-card);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  text-align: center;
}

.stat-num {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 800;
  color: var(--gold-light);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.bento-featured-preview {
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1.5px solid rgba(124, 58, 237, 0.2);
  background: linear-gradient(135deg, #ffffff 0%, #f5f3ff 100%);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.06);
}

.bento-featured-preview:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.15);
}

.featured-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.3);
}

.featured-content h4 {
  font-size: 17px;
  color: var(--text-main);
  margin-bottom: 4px;
}

.featured-content p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

.featured-cta {
  font-size: 12px;
  color: var(--gold-light);
  font-weight: 700;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Combos Section */
.section {
  padding: 40px 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 20px;
  flex-wrap: wrap;
}

.section-head h2 {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
}

.section-head h2 span {
  color: var(--gold-light);
}

.section-head p {
  color: var(--text-muted);
  font-size: 15px;
  margin-top: 4px;
}

.combos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 24px;
}

.combo-card {
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-card);
}

.combo-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-light);
  box-shadow: 0 14px 40px rgba(245, 158, 11, 0.18);
}

.combo-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #ffffff !important;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.combo-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.combo-code {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.combo-card h3 {
  font-size: 22px;
  margin-bottom: 10px;
  line-height: 1.2;
}

.combo-card p.desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 18px;
  flex-grow: 1;
}

/* Roadmap List inside Combo */
.roadmap-box {
  background: #f5f3ff;
  border: 1px solid rgba(124, 58, 237, 0.16);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 18px;
}

.roadmap-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #6d28d9;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.roadmap-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.roadmap-step:last-child {
  margin-bottom: 0;
}

.step-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: #7c3aed;
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.combo-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  margin-top: auto;
}

.price-box .price-current {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  color: var(--gold-light);
  line-height: 1;
}

.price-box .price-old {
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: line-through;
  margin-left: 6px;
}

/* Category Tabs */
.category-tabs-wrap {
  position: sticky;
  top: 64px;
  z-index: 90;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 30px;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.06);
}

.category-tabs-container {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6px 2px 8px;
  scroll-behavior: smooth;
  cursor: grab;
  user-select: none;
  flex: 1;
}

.category-tabs.dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

/* Thanh cuộn tím thanh mảnh */
.category-tabs::-webkit-scrollbar {
  height: 5px;
}

.category-tabs::-webkit-scrollbar-track {
  background: rgba(124, 58, 237, 0.05);
  border-radius: 4px;
}

.category-tabs::-webkit-scrollbar-thumb {
  background: var(--gold-border);
  border-radius: 4px;
}

.category-tabs::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

/* Nút trượt trái / phải */
.tab-arrow-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1.5px solid var(--gold-border);
  color: #6d28d9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.12);
  line-height: 1;
}

.tab-arrow-btn:hover {
  background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
  color: #ffffff !important;
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4);
}

.cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.cat-tab:hover {
  background: #f5f3ff;
  border-color: rgba(124, 58, 237, 0.35);
  color: #6d28d9;
}

.cat-tab.active {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: #ffffff !important;
  border-color: #8b5cf6;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
}

.cat-tab .tab-count {
  font-size: 11px;
  background: rgba(124, 58, 237, 0.12);
  color: #6d28d9;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 700;
}

.cat-tab.active .tab-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff !important;
}

/* Filter Controls Row */
.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-left {
  font-size: 14px;
  color: var(--text-muted);
}

.filter-left strong {
  color: var(--text-main);
}

.filter-chips {
  display: flex;
  gap: 8px;
}

.quick-filter-chip {
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.quick-filter-chip:hover, .quick-filter-chip.active {
  background: var(--bg-card-hover);
  border-color: var(--gold-border);
  color: var(--gold-light);
}

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* Digital Skill Card */
.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.skill-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 12px 30px rgba(124, 58, 237, 0.15);
  background: var(--bg-card-hover);
}

.skill-card.featured {
  border: 2px solid #8b5cf6;
  background: linear-gradient(135deg, #ffffff 0%, #f5f3ff 100%);
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.12);
}

/* Skill Card 9:16 Illustration Image */
.skill-card-img-wrap {
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 14px;
  background: #f8f6fc;
  border: 1px solid var(--line);
  cursor: pointer;
  position: relative;
  display: block;
}

.skill-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.skill-card:hover .skill-card-img-wrap img {
  transform: scale(1.03);
}

/* QuickPeek Modal 9:16 Illustration Image */
.peek-img-wrap {
  width: 100%;
  max-width: 260px;
  margin: 0 auto 18px auto;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(106, 27, 154, 0.12);
  background: #f8f6fc;
}

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

/* Gift Button Link (.btn-gift-link) */
.btn-gift-link {
  text-decoration: none !important;
  color: #ffffff !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.card-code {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 800;
  color: var(--gold-light);
  letter-spacing: 0.5px;
}

.card-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-weight: 600;
}

.card-tag.free {
  background: var(--green-soft);
  color: var(--green);
  border-color: rgba(16, 185, 129, 0.3);
}

.skill-card h4 {
  font-size: 18px;
  margin-bottom: 8px;
  line-height: 1.25;
  color: var(--text-main);
}

.skill-card h4 a:hover {
  color: var(--gold-light);
}

.card-output {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 14px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-output strong {
  color: var(--text-main);
  font-weight: 700;
}

.card-specs-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-dim);
  padding: 8px 0;
  border-top: 1px dashed var(--line);
  margin-bottom: 12px;
}

.spec-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.card-price {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
}

.card-price.free {
  color: var(--green);
}

.card-actions {
  display: flex;
  gap: 6px;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--line);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
}

.icon-btn:hover {
  background: var(--bg-card);
  border-color: var(--gold-border);
  color: var(--gold-light);
}

/* Modal Quick Peek */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--gold-border);
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(124, 58, 237, 0.18), 0 4px 16px rgba(15, 23, 42, 0.08);
  position: relative;
  transform: translateY(20px);
  transition: transform 0.25s ease;
}

.modal-overlay.open .modal-card {
  transform: translateY(0);
}

.modal-head {
  padding: 24px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--bg-surface);
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 24px;
}

.peek-section {
  margin-bottom: 20px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
}

.peek-section h5 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--gold-light);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.peek-section p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

.prompt-box {
  background: #f5f3ff;
  border: 1.5px solid #ddd6fe;
  border-radius: var(--radius-sm);
  padding: 14px;
  font-family: monospace;
  font-size: 13px;
  color: #4c1d95;
  font-weight: 600;
  line-height: 1.5;
  white-space: pre-wrap;
  position: relative;
}

.modal-foot {
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  position: sticky;
  bottom: 0;
}

/* Off-canvas Cart Drawer */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 1050;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 440px;
  background: var(--bg-surface);
  border-left: 1px solid var(--gold-border);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -10px 0 40px rgba(124, 58, 237, 0.15), -4px 0 12px rgba(15, 23, 42, 0.08);
}

.drawer-overlay.open .cart-drawer {
  transform: translateX(0);
}

.drawer-head {
  padding: 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-head h3 {
  font-size: 20px;
  color: var(--text-main);
}

.drawer-body {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px;
}

.cart-item {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.cart-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.cart-item-code {
  font-size: 11px;
  color: var(--gold-light);
  font-weight: 700;
}

.cart-item-price {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--gold-light);
  white-space: nowrap;
}

.cart-item-remove {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
}

.cart-item-remove:hover {
  color: #ef4444;
}

.drawer-foot {
  padding: 20px;
  border-top: 1px solid var(--line);
  background: var(--bg-surface);
}

.drawer-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.drawer-total span {
  font-size: 15px;
  color: var(--text-muted);
}

.drawer-total strong {
  font-family: var(--font-heading);
  font-size: 26px;
  color: var(--gold-light);
}

/* Toast Message */
.toast-msg {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #6d28d9;
  border: 1.5px solid #8b5cf6;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 12px 35px rgba(109, 40, 217, 0.35);
  z-index: 2000;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.toast-msg.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Floating Social Dock */
.floating-social-dock {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 999;
}

.fab-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.15);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  border: 2px solid rgba(255, 255, 255, 0.6);
  cursor: pointer;
}

.fab-btn:hover {
  transform: scale(1.15) translateY(-2px);
}

.fab-btn.fab-youtube {
  background: #ff0000;
  box-shadow: 0 6px 20px rgba(255, 0, 0, 0.45);
}

.fab-btn.fab-facebook {
  background: #1877f2;
  box-shadow: 0 6px 20px rgba(24, 119, 242, 0.45);
}

.fab-btn.fab-zalo-group {
  background: linear-gradient(135deg, #0284c7, #0068ff);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.45);
}

.fab-btn.fab-zalo {
  background: #0068ff;
  box-shadow: 0 6px 20px rgba(0, 104, 255, 0.45);
}

.fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #7c3aed;
  color: #ffffff !important;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 99px;
  letter-spacing: 0.3px;
  border: 2px solid #ffffff;
  line-height: 1.2;
}

/* Tooltip on hover */
.fab-tooltip {
  position: absolute;
  right: 60px;
  background: rgba(18, 20, 28, 0.95);
  border: 1px solid var(--gold-border);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.fab-btn:hover .fab-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* Social chips in Footer */
.social-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.social-chip.youtube {
  background: rgba(255, 0, 0, 0.18);
  border-color: rgba(255, 0, 0, 0.4);
  color: #ff4d4d;
}

.social-chip.youtube:hover {
  background: #ff0000;
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 0, 0, 0.4);
}

.social-chip.facebook {
  background: rgba(24, 119, 242, 0.18);
  border-color: rgba(24, 119, 242, 0.4);
  color: #58a6ff;
}

.social-chip.facebook:hover {
  background: #1877f2;
  color: #fff;
  box-shadow: 0 4px 12px rgba(24, 119, 242, 0.4);
}

.social-chip.zalo-group {
  background: rgba(2, 132, 199, 0.18);
  border-color: rgba(2, 132, 199, 0.4);
  color: #38bdf8;
}

.social-chip.zalo-group:hover {
  background: #0068ff;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 104, 255, 0.4);
}

/* Footer */
footer.site {
  border-top: 1px solid rgba(124, 58, 237, 0.15);
  background: #f1f5f9;
  padding: 50px 0 30px;
  margin-top: 60px;
}

.fgrid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 40px;
}

.fcol h4 {
  font-size: 16px;
  color: var(--text-main);
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.fcol a {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
  transition: color 0.2s;
}

.fcol a:hover {
  color: var(--gold-light);
}

.fcol p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.copy {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
}

/* Checkout Page Styles */
.checkout-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding: 40px 0;
}

.checkout-box {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.checkout-box.qr-box {
  border-color: var(--gold-border);
  text-align: center;
}

.qr-img {
  max-width: 260px;
  margin: 16px auto;
  border-radius: var(--radius-md);
  border: 2px solid var(--gold);
  background: #fff;
  padding: 8px;
}

.order-code-badge {
  display: inline-block;
  background: var(--bg-card);
  border: 1px dashed var(--gold);
  color: var(--gold-light);
  font-family: monospace;
  font-size: 18px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  margin: 10px 0;
  letter-spacing: 1px;
}

/* Admin Styles */
.admin-card {
  max-width: 720px;
  margin: 40px auto;
  background: var(--bg-surface);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-card);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-light);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  color: var(--text-main);
  font-size: 14px;
  transition: border-color 0.2s;
}

.form-control:focus {
  border-color: var(--gold);
  outline: none;
}

.form-hint {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* Responsive System */
@media (max-width: 960px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .bento-card.hero-main {
    grid-row: auto;
  }
  .fgrid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .checkout-wrap {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .topbar {
    font-size: 11px;
    padding: 6px 12px;
    line-height: 1.4;
  }

  header.site {
    padding: 8px 0;
  }

  .hrow {
    height: auto;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
  }

  .brand {
    font-size: 19px;
    white-space: nowrap;
    gap: 6px;
  }

  .brand-badge {
    font-size: 9px;
    padding: 1px 6px;
  }

  /* Ẩn các liên kết desktop trên mobile để giao diện siêu gọn */
  nav.main-nav .nav-link {
    display: none;
  }

  .cat-nav-btn {
    height: 36px;
    padding: 0 10px;
    font-size: 12px;
    gap: 4px;
    display: inline-flex !important;
  }

.cart-btn {
    height: 36px;
    padding: 0 12px;
    font-size: 13px;
    gap: 6px;
  }

  /* Thanh tìm kiếm rớt xuống hàng thứ 2, chiếm trọn 100% bề ngang */
  .search-box {
    order: 3;
    width: 100%;
    max-width: 100%;
    margin-top: 4px;
  }

  .search-box input {
    height: 38px;
    font-size: 13px;
    padding-left: 36px;
  }

  .search-icon {
    left: 12px;
    font-size: 15px;
  }

  /* Hero Bento trên Mobile */
  .hero-bento {
    padding: 16px 0 10px;
  }

  .bento-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .bento-card {
    padding: 18px 14px;
    border-radius: var(--radius-md);
  }

  .hero-main h1 {
    font-size: 24px !important;
    line-height: 1.2 !important;
    margin-bottom: 12px;
  }

  .hero-main p.desc {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 16px;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .stat-num {
    font-size: 24px;
  }

  .stat-label {
    font-size: 11px;
  }

  /* Thanh trượt Danh mục Category Tabs trên Mobile */
  .category-tabs-wrap {
    top: 104px;
    padding: 6px 0;
    margin-bottom: 16px;
  }

  /* Ẩn nút mũi tên trên màn hình cảm ứng điện thoại, cho phép vuốt tay tự nhiên */
  .tab-arrow-btn {
    display: none !important;
  }

  .category-tabs {
    padding: 4px 2px 6px;
  }

  .cat-tab {
    padding: 6px 12px;
    font-size: 12px;
  }

  /* Combos & Thẻ Kỹ Năng */
  .section {
    padding: 20px 0;
  }

  .section-head h2 {
    font-size: 22px;
  }

  .combos-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .combo-card {
    padding: 16px;
  }

  .combo-card h3 {
    font-size: 18px;
  }

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .skill-card {
    padding: 14px;
  }

  .card-output {
    font-size: 12px;
    -webkit-line-clamp: 2;
  }

  /* Giỏ hàng Drawer bung toàn màn hình mobile */
  .cart-drawer {
    max-width: 100%;
  }

  /* Nút mạng xã hội & Zalo nổi trên mobile */
  .floating-social-dock {
    bottom: 16px;
    right: 12px;
    gap: 8px;
  }

  .fab-btn {
    width: 42px;
    height: 42px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  }

  .fab-btn svg {
    width: 18px;
    height: 18px;
  }

  .fab-btn.fab-zalo {
    font-size: 11px;
  }

  .fab-tooltip {
    display: none !important;
  }
}

@media (max-width: 420px) {
  .brand {
    font-size: 17px;
  }
  .cart-btn span.cart-text {
    display: none;
  }
}

/* ===== TÍNH NĂNG MỚI: NÚT TẤT CẢ DANH MỤC & SEARCH SPOTLIGHT TO RÕ ===== */
.category-tabs-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.btn-all-cats {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1.5px solid #7c3aed;
  color: #6d28d9;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  justify-content: space-between;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.12);
}

.btn-all-cats:hover {
  background: #7c3aed;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-all-cats .cat-badge {
  background: rgba(124, 58, 237, 0.12);
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  color: #7c3aed;
}

.btn-all-cats:hover .cat-badge {
  background: #ffffff;
  color: #7c3aed;
}

/* Modal Danh Mục Category Sheet */
.cat-sheet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.cat-sheet-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.cat-sheet-item:hover, .cat-sheet-item.active {
  border-color: var(--gold);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 10px rgba(245, 158, 11, 0.15);
}

.cat-sheet-icon {
  font-size: 26px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cat-sheet-info h5 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 2px;
  color: var(--text-main);
}

.cat-sheet-info span {
  font-size: 12px;
  color: var(--gold-light);
}

/* Search Spotlight Modal (To & Rõ Chữ Lớn 18px) */
.search-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(10px);
  z-index: 1200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
}

.search-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.search-modal-box {
  width: 100%;
  max-width: 680px;
  background: #ffffff;
  border: 1.5px solid #7c3aed;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  max-height: 88vh;
  box-shadow: 0 25px 60px rgba(124, 58, 237, 0.25);
  transform: translateY(-15px);
  transition: transform 0.25s ease;
  overflow: hidden;
}

.search-modal-overlay.open .search-modal-box {
  width: 100%;
  max-width: 680px;
  background: #ffffff;
  border: 1.5px solid #7c3aed;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  max-height: 88vh;
  box-shadow: 0 25px 60px rgba(124, 58, 237, 0.25);
  transform: translateY(-15px);
  transition: transform 0.25s ease;
  overflow: hidden;
}

.search-modal-head {
  padding: 16px;
  border-bottom: 1px solid rgba(124, 58, 237, 0.15);
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
}

.search-modal-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-modal-icon {
  position: absolute;
  left: 14px;
  color: var(--gold-light);
  font-size: 22px;
  pointer-events: none;
}

.search-modal-input {
  width: 100%;
  height: 52px;
  background: #ffffff;
  border: 1.5px solid rgba(124, 58, 237, 0.35);
  border-radius: var(--radius-full);
  padding: 0 45px 0 48px;
  color: #0f172a !important;
  font-size: 18px !important;
  line-height: 1.3;
}

.search-modal-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 16px rgba(124, 58, 237, 0.35);
}

.search-modal-clear {
  position: absolute;
  right: 14px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
}

.search-modal-clear:hover {
  color: var(--gold);
}

.search-modal-close-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
}

.search-modal-close-btn:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

.search-modal-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
}

.search-popular-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.search-tag-chip {
  padding: 6px 14px;
  background: #f5f3ff;
  border: 1px solid rgba(124, 58, 237, 0.2);
  color: #6d28d9;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-tag-chip:hover {
  background: #7c3aed;
  color: #ffffff !important;
  border-color: #7c3aed;
}

.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-result-row:hover {
  border-color: var(--gold);
  background: var(--bg-card-hover);
  transform: translateX(4px);
}


/* ========================================================
   AI CHATBOT FLOATING DOCK & WINDOW (WHITE & PURPLE THEME)
   ======================================================== */

.fab-btn.fab-ai-bot {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: #ffffff !important;
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.5), 0 6px 20px rgba(124, 58, 237, 0.25);
  animation: pulse-glow-purple 2.5s infinite;
  border-color: #c4b5fd;
  z-index: 1000;
}

@keyframes pulse-glow-purple {
  0% {
    box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.6), 0 6px 20px rgba(124, 58, 237, 0.25);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(124, 58, 237, 0), 0 6px 20px rgba(124, 58, 237, 0.25);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(124, 58, 237, 0), 0 6px 20px rgba(124, 58, 237, 0.25);
  }
}

.ai-chat-window {
  position: fixed;
  bottom: 85px;
  right: 24px;
  width: 390px;
  max-width: calc(100vw - 32px);
  height: 580px;
  max-height: calc(100vh - 110px);
  background: #ffffff;
  border: 2px solid #7c3aed;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(124, 58, 237, 0.25);
  display: flex;
  flex-direction: column;
  z-index: 1100;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px) scale(0.96);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-chat-window.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.ai-chat-header {
  padding: 14px 16px;
  background: linear-gradient(135deg, #6d28d9, #7c3aed);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #ffffff;
}

.ai-chat-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a855f7, #6d28d9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
  position: relative;
  flex-shrink: 0;
}

.ai-chat-avatar::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background: #10b981;
  border-radius: 50%;
  border: 2px solid #ffffff;
}

.ai-chat-info h4 {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff !important;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-chat-info h4 span.bot-tag {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 1px 6px;
  border-radius: 99px;
  font-weight: 800;
}

.ai-chat-info p {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
  margin: 2px 0 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.ai-chat-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-chat-head-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 16px;
  padding: 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-chat-head-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
}

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chat-bubble-wrap {
  display: flex;
  flex-direction: column;
  max-width: 88%;
}

.chat-bubble-wrap.bot {
  align-self: flex-start;
}

.chat-bubble-wrap.user {
  align-self: flex-end;
}

.chat-bubble {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  line-height: 1.5;
  word-break: break-word;
}

.chat-bubble-wrap.bot .chat-bubble {
  background: #f5f3ff;
  color: #0f172a;
  border: 1px solid rgba(124, 58, 237, 0.16);
  border-top-left-radius: 4px;
}

.chat-bubble-wrap.user .chat-bubble {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: #ffffff !important;
  font-weight: 600;
  border-top-right-radius: 4px;
}

.chat-timestamp {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 4px;
}

.chat-bubble-wrap.user .chat-timestamp {
  text-align: right;
}

/* Action card inside bot message */
.chat-action-card {
  margin-top: 10px;
  background: #ffffff;
  border: 1.5px solid #7c3aed;
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.12);
}

.chat-action-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chat-action-code {
  font-size: 11px;
  font-weight: 800;
  color: #6d28d9;
  background: #f5f3ff;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #ddd6fe;
}

.chat-action-price {
  font-size: 13px;
  font-weight: 800;
  color: #7c3aed;
}

.chat-action-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a !important;
  line-height: 1.35;
}

.chat-action-btns {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.chat-action-btns .btn {
  font-size: 11px;
  padding: 6px 8px;
  flex: 1;
  text-align: center;
  justify-content: center;
}

/* Quick prompt chips */
.chat-quick-chips {
  padding: 0 16px 10px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.chat-quick-chips::-webkit-scrollbar {
  display: none;
}

.chat-chip {
  background: #f5f3ff;
  border: 1px solid rgba(124, 58, 237, 0.2);
  color: #6d28d9;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.chat-chip:hover {
  background: #7c3aed;
  color: #ffffff !important;
  border-color: #7c3aed;
}

/* Typing indicator */
.chat-typing {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
}

.chat-typing span {
  width: 6px;
  height: 6px;
  background: var(--gold-light);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out;
}

.chat-typing span:nth-child(1) { animation-delay: 0s; }
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1.1); opacity: 1; }
}

/* Chat Input Bar */
.ai-chat-input-bar {
  padding: 12px 14px;
  border-top: 1px solid rgba(124, 58, 237, 0.15);
  background: #f8fafc;
  display: flex;
  gap: 8px;
  align-items: center;
}

.ai-chat-input {
  flex: 1;
  height: 42px;
  background: #ffffff;
  border: 1.5px solid rgba(124, 58, 237, 0.25);
  border-radius: var(--radius-full);
  padding: 0 16px;
  color: #0f172a;
  font-size: 13.5px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ai-chat-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.25);
}

.ai-chat-send-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  border: none;
  color: #ffffff !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
}

.ai-chat-send-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.55);
  color: #ffffff !important;
}

.ai-chat-send-btn svg {
  stroke: #ffffff;
}

/* Mobile responsive for AI Chat Window */
@media (max-width: 768px) {
  .ai-chat-window {
    position: fixed;
    bottom: 85px;
    right: 16px;
    left: 16px;
    width: auto;
    max-width: none;
    height: 520px;
    max-height: calc(100vh - 100px);
    background: #ffffff;
    border: 2px solid #7c3aed;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(124, 58, 237, 0.25);
    display: flex;
    flex-direction: column;
    z-index: 1100;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.96);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
}

/* ==========================================================================
   HIGH-TECH AI PRELOADER OVERLAY (TRANSLUCENT PURPLE 0.7)
   ========================================================================== */
.app-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(46, 16, 101, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.5s ease;
  overflow: hidden;
}

.app-loading-overlay.loaded {
  opacity: 0;
  transform: scale(1.03);
  visibility: hidden;
  pointer-events: none;
}

.loader-container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 30px;
  max-width: 460px;
  width: 90%;
}

.loader-visual {
  position: relative;
  width: 104px;
  height: 104px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.loader-ring-pulse {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.5) 0%, transparent 70%);
  animation: loaderPulse 2s ease-in-out infinite;
}

.loader-ring-spin {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: #c084fc;
  border-right-color: #f472b6;
  animation: loaderSpin 1.3s linear infinite;
}

.loader-ring-spin-reverse {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px dashed rgba(216, 180, 254, 0.6);
  animation: loaderSpinReverse 7s linear infinite;
}

.loader-core {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: linear-gradient(135deg, #7c3aed 0%, #9333ea 50%, #ec4899 100%);
  box-shadow: 0 10px 35px rgba(147, 51, 234, 0.65), inset 0 1px 2px rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 3;
}

.loader-core-icon {
  font-family: var(--font-heading, "Barlow Condensed", sans-serif);
  font-size: 42px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.loader-brand-title {
  font-family: var(--font-heading, "Barlow Condensed", sans-serif);
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 3.5px;
  background: linear-gradient(135deg, #ffffff 40%, #e9d5ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-top: 4px;
  text-transform: uppercase;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

@keyframes loaderSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes loaderSpinReverse {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}

@keyframes loaderPulse {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.3); opacity: 0.8; }
}

