/**
 * ========================================================
 * TECHSTORE - MAIN STYLESHEET (MAIN.CSS)
 * Phong cách: Hiện đại, Glassmorphism, Animated Tech Grid
 * Tông màu chủ đạo: Xanh Cyan (#00b4d8), Xanh Dương (#0284c7)
 * Hiệu ứng: Typewriter, Laser Scanner, Floating 3D, Gradient Shift
 * ========================================================
 */

:root {
  --primary-color: #0284c7;
  --primary-hover: #0369a1;
  --primary-gradient: linear-gradient(135deg, #0ea5e9 0%, #0284c7 50%, #2563eb 100%);
  --accent-cyan: #06b6d4;
  --accent-glow: rgba(6, 182, 212, 0.35);
  --text-dark: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --bg-light: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.95);
  --border-color: #e2e8f0;
  --border-light: rgba(226, 232, 240, 0.8);
  --badge-bg: rgba(6, 182, 212, 0.1);
  --badge-text: #0284c7;
  --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 12px 30px -6px rgba(2, 132, 199, 0.15), 0 8px 12px -6px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 25px 50px -12px rgba(2, 132, 199, 0.22);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset CSS */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-body);
  background-color: var(--bg-light);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* Grid Pattern Background sống động */
.tech-grid-bg {
  background-color: #ffffff;
  background-image: 
    radial-gradient(circle at 50% 12%, rgba(14, 165, 233, 0.12) 0%, transparent 65%),
    radial-gradient(circle at 85% 35%, rgba(6, 182, 212, 0.08) 0%, transparent 45%),
    linear-gradient(#f1f5f9 1px, transparent 1px),
    linear-gradient(90deg, #f1f5f9 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 36px 36px, 36px 36px;
  position: relative;
  overflow: hidden;
}

/* Animated Ambient Glow Orbs phát sáng chuyển động phía sau */
.ambient-glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  animation: orbDrift 14s ease-in-out infinite alternate;
}

.ambient-orb-1 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.25) 0%, rgba(6, 182, 212, 0.05) 70%, transparent 100%);
  top: -100px;
  left: 20%;
}

.ambient-orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, rgba(14, 165, 233, 0.04) 70%, transparent 100%);
  top: 150px;
  right: 15%;
  animation-duration: 18s;
  animation-direction: alternate-reverse;
}

@keyframes orbDrift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 30px) scale(1.08); }
  100% { transform: translate(-30px, -20px) scale(0.95); }
}

/* Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
  position: relative;
  z-index: 1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-dark);
  font-weight: 700;
  line-height: 1.25;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ========================================================
   HEADER & NAVBAR
   ======================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}

.site-header.scrolled {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.95);
}

.site-header .container {
  max-width: 1380px;
  width: 100%;
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.5px;
  flex-shrink: 0;
  margin-right: 15px;
}

.nav-brand .brand-icon {
  width: 38px;
  height: 38px;
  background: var(--primary-gradient);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 17px;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
  transition: transform 0.3s ease;
}

.nav-brand:hover .brand-icon {
  transform: rotate(-8deg) scale(1.08);
}

.nav-brand span.highlight {
  color: var(--primary-color);
}

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 18px;
  flex-shrink: 0;
}

.nav-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-body);
  position: relative;
  padding: 6px 0;
  white-space: nowrap;
  word-break: keep-all;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-color);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary-gradient);
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cart-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dark);
  font-size: 17px;
  cursor: pointer;
  transition: var(--transition);
}

.cart-btn:hover {
  background: #e2e8f0;
  color: var(--primary-color);
  transform: translateY(-2px);
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid #fff;
}

.user-dropdown {
  position: relative;
}

.user-profile-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.user-profile-btn:hover {
  border-color: var(--primary-color);
}

.user-avatar-mini {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  background: #e2e8f0;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 220px;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  padding: 8px 0;
  display: none;
  z-index: 100;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-body);
}

.dropdown-item:hover {
  background: #f8fafc;
  color: var(--primary-color);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 6px 0;
}

.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-dark);
  cursor: pointer;
}

/* ========================================================
   BUTTONS (CÓ VỆT SÁNG QUÉT QUA & SHADOW NEON)
   ======================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  font-size: 14.5px;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: 0 4px 18px rgba(14, 165, 233, 0.4);
}

/* Hiệu ứng vệt sáng lướt qua nút bấm */
.btn-primary::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 50%;
  height: 200%;
  background: linear-gradient(
    60deg,
    rgba(255, 255, 255, 0) 20%,
    rgba(255, 255, 255, 0.35) 50%,
    rgba(255, 255, 255, 0) 80%
  );
  transform: rotate(25deg);
  transition: none;
  animation: buttonShine 4s infinite ease-in-out;
}

@keyframes buttonShine {
  0% { left: -70%; }
  30%, 100% { left: 140%; }
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(14, 165, 233, 0.55);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  color: var(--text-dark);
  border-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: #ffffff;
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 16px;
  border-radius: var(--radius-md);
}

/* ========================================================
   HERO SECTION (ANIMATED TECH GRID & FLOATING 3D ICONS)
   ======================================================== */
.hero-section {
  padding: 70px 0 90px 0;
  position: relative;
  text-align: center;
}

/* 4 Floating Corner Icons 3D lơ lửng bồng bềnh */
.floating-icon {
  position: absolute;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(14, 165, 233, 0.25);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 20px;
  box-shadow: 0 12px 28px rgba(2, 132, 199, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
  z-index: 2;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.floating-icon:hover {
  transform: scale(1.15) !important;
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  box-shadow: 0 15px 35px rgba(6, 182, 212, 0.3);
}

/* 4 Keyframes Float lơ lửng khác nhau tạo sự tự nhiên */
.icon-tl {
  top: 130px;
  left: 60px;
  animation: floatSlow1 4.5s ease-in-out infinite;
}

.icon-tr {
  top: 130px;
  right: 60px;
  animation: floatSlow2 5.2s ease-in-out 0.6s infinite;
}

.icon-bl {
  bottom: 120px;
  left: 60px;
  animation: floatSlow3 4.8s ease-in-out 1.2s infinite;
}

.icon-br {
  bottom: 120px;
  right: 60px;
  animation: floatSlow4 5.5s ease-in-out 1.8s infinite;
}

@keyframes floatSlow1 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(4deg); }
}

@keyframes floatSlow2 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(-4deg); }
}

@keyframes floatSlow3 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(12px) rotate(-3deg); }
}

@keyframes floatSlow4 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(3deg); }
}

/* Sub-badge phía trên với hiệu ứng radar lan tỏa */
.hero-badge-wrap {
  margin-bottom: 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.28);
  padding: 8px 20px;
  border-radius: 9999px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--primary-color);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.08);
  transition: transform 0.2s ease;
}

.hero-badge:hover {
  transform: translateY(-2px);
  border-color: var(--accent-cyan);
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  background: var(--accent-cyan);
  border-radius: 50%;
  position: relative;
}

.hero-badge .dot::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--accent-cyan);
  animation: radarWave 2s infinite ease-out;
}

@keyframes radarWave {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* Hero Typography Đẳng Cấp */
.hero-title {
  font-size: 54px;
  font-weight: 800;
  letter-spacing: -1.6px;
  color: #0f172a;
  line-height: 1.16;
  max-width: 950px;
  margin: 0 auto 22px auto;
}

/* Dòng chữ gradient chuyển động óng ánh */
.highlight-animated {
  background: linear-gradient(120deg, #0284c7 0%, #06b6d4 35%, #3b82f6 70%, #0284c7 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  animation: gradientFlow 5s linear infinite;
}

@keyframes gradientFlow {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* Con trỏ nhấp nháy Typewriter */
.typewriter-cursor {
  display: inline-block;
  font-weight: 300;
  color: var(--accent-cyan);
  -webkit-text-fill-color: var(--accent-cyan);
  animation: blinkCursor 0.8s step-end infinite;
  margin-left: 2px;
}

@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-desc {
  font-size: 17.5px;
  color: var(--text-muted);
  max-width: 780px;
  margin: 0 auto 34px auto;
  line-height: 1.65;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 38px;
}

/* Commitments Bar */
.commit-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 26px;
  margin-bottom: 54px;
}

.commit-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-body);
  transition: transform 0.2s ease;
}

.commit-item:hover {
  transform: translateY(-2px);
}

.commit-item i {
  color: #10b981;
}

.commit-item i.cyan { color: var(--accent-cyan); }
.commit-item i.blue { color: var(--primary-color); }
.commit-item i.yellow { color: #f59e0b; }

/* ========================================================
   LIVE VIETQR MOCKUP CARD (CÓ TIA LASER QUÉT & NÚT BẤM PRO)
   ======================================================== */
.mockup-card-wrapper {
  max-width: 860px;
  margin: 0 auto;
  position: relative;
}

.mockup-card {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px -15px rgba(15, 23, 42, 0.1), 0 0 40px rgba(14, 165, 233, 0.05);
  padding: 32px;
  text-align: left;
  transition: var(--transition);
  position: relative;
}

.mockup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
  flex-wrap: wrap;
  gap: 12px;
}

.mockup-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  padding: 6px 16px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

.mockup-live-badge .pulse-green {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 10px #10b981;
  animation: pulseGreen 1.5s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.mockup-api-badge {
  font-family: monospace;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  background: #f8fafc;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.mockup-step-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

/* Bank Grid */
.bank-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 26px;
}

.bank-item {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
  user-select: none;
}

.bank-item .bank-logo-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.bank-item:hover {
  border-color: var(--primary-color);
  background: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(2, 132, 199, 0.12);
}

.bank-item:hover .bank-logo-icon {
  transform: scale(1.1);
}

.bank-item.active {
  border-color: var(--primary-color);
  background: #f0f9ff;
  color: var(--primary-color);
  box-shadow: 0 6px 18px rgba(14, 165, 233, 0.2);
  transform: translateY(-2px);
}

/* Price Grid */
.price-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 26px;
}

.price-item {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 10px;
  text-align: center;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-dark);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}

.price-item:hover {
  border-color: var(--primary-color);
  background: #ffffff;
  transform: translateY(-2px);
}

.price-item.active {
  background: var(--primary-gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 18px rgba(14, 165, 233, 0.35);
  transform: translateY(-2px);
}

/* QR Result Box với Tia Laser Quét */
.qr-preview-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 26px;
  display: flex;
  align-items: center;
  gap: 30px;
  position: relative;
  overflow: hidden;
}

.qr-image-wrapper {
  background: #ffffff;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Tia Laser Quét QR thời gian thực */
.qr-laser-scanner {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #06b6d4, #38bdf8, #06b6d4, transparent);
  box-shadow: 0 0 12px #06b6d4, 0 0 6px #38bdf8;
  pointer-events: none;
  animation: laserScan 2.4s ease-in-out infinite alternate;
  z-index: 5;
}

@keyframes laserScan {
  0% { top: 12px; opacity: 0.4; }
  50% { opacity: 1; }
  100% { top: calc(100% - 32px); opacity: 0.4; }
}

.qr-image-wrapper img {
  width: 175px;
  height: 175px;
  object-fit: contain;
  transition: opacity 0.3s ease, transform 0.3s ease;
  position: relative;
  z-index: 1;
}

.qr-info-content {
  flex-grow: 1;
}

.qr-bank-name {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.qr-detail-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 9px;
  font-size: 14px;
}

.qr-detail-row .label {
  color: var(--text-muted);
}

.qr-detail-row .value {
  font-weight: 700;
  color: var(--text-dark);
}

.qr-detail-row .value.amount {
  color: var(--primary-color);
  font-size: 17px;
}

/* ========================================================
   SECTIONS & PRODUCT CARDS
   ======================================================== */
.section {
  padding: 70px 0;
}

.section-title-wrap {
  text-align: center;
  margin-bottom: 48px;
}

.section-subtitle {
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.section-title {
  font-size: 34px;
  font-weight: 800;
  color: var(--text-dark);
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.product-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: var(--shadow-sm);
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 35px -10px rgba(2, 132, 199, 0.18);
  border-color: #cbd5e1;
}

.product-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #0f172a;
  overflow: hidden;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-thumb img {
  transform: scale(1.08);
}

.product-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--primary-gradient);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.product-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-category {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary-color);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.product-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.4;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card:hover .product-name {
  color: var(--primary-color);
}

.product-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.tech-pill {
  background: #f1f5f9;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
}

.product-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-price-box {
  display: flex;
  flex-direction: column;
}

.price-current {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary-color);
}

.price-old {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: line-through;
}

/* ========================================================
   FOOTER
   ======================================================== */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 70px 0 30px 0;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 50px;
}

.footer-brand .brand-logo {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
}

.footer-desc {
  font-size: 14px;
  line-height: 1.6;
  color: #94a3b8;
  margin-bottom: 20px;
}

.footer-title {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #94a3b8;
  font-size: 14px;
}

.footer-links a:hover {
  color: #fff;
  padding-left: 4px;
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  color: #64748b;
  flex-wrap: wrap;
  gap: 12px;
}

/* Toast flash notification */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #fff;
  border-radius: 12px;
  padding: 14px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 4px solid var(--primary-color);
  animation: slideInRight 0.3s ease;
  min-width: 280px;
}

.toast.toast-success { border-left-color: #10b981; }
.toast.toast-error { border-left-color: #ef4444; }
.toast.toast-warning { border-left-color: #f59e0b; }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ========================================================
   GIAO DIỆN KHO MÃ NGUỒN & SOURCE CARDS (THEO ẢNH MẪU 2)
   ======================================================== */
.source-section-wrapper {
  background: #f8fafc;
  padding: 30px 0 60px 0;
  border-top: none;
}

.source-filter-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.tab-pill {
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: all 0.2s ease;
}

.tab-pill.active {
  background: #b91c1c;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(185, 28, 28, 0.25);
}

.tab-pill:not(.active) {
  background: #ffffff;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.tab-pill:not(.active):hover {
  background: #f1f5f9;
  color: #0f172a;
}

.source-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.source-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.source-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 25px -4px rgba(0, 0, 0, 0.09);
  border-color: #cbd5e1;
}

.source-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
}

.source-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.source-card:hover .source-card-thumb img {
  transform: scale(1.03);
}

.source-card-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.source-card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.45;
  margin-bottom: 14px;
  min-height: 42px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.source-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.source-card-title a:hover {
  color: #dc2626;
}

.source-card-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.seller-price-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.seller-avatar-mini {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #e2e8f0;
}

.price-tags {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.price-strikethrough {
  font-size: 12px;
  color: #94a3b8;
  text-decoration: line-through;
}

.price-sale-red {
  font-size: 15px;
  font-weight: 800;
  color: #dc2626;
}

.btn-detail-outline {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #475569;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-detail-outline:hover {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
}

.source-card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #64748b;
}

.meta-rating {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ========================================================
   GIAO DIỆN CHI TIẾT 1 SOURCE WEBSITE (THEO ẢNH MẪU 3 & 4)
   ======================================================== */
.source-detail-breadcrumb-bar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.breadcrumb-left-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: #64748b;
}

.btn-quick-menu {
  background: #0284c7;
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.btn-back-list {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-back-list:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.source-detail-grid-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: start;
}

.gallery-preview-container {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.main-slider-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  border-radius: 8px;
  overflow: hidden;
  background: #0f172a;
}

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

.slider-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1e293b;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 5;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.slider-nav-btn.prev { left: 12px; }
.slider-nav-btn.next { right: 12px; }

.slider-nav-btn:hover {
  background: #ffffff;
  transform: translateY(-50%) scale(1.1);
}

.btn-zoom-top {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  z-index: 5;
}

.gallery-page-indicator {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  z-index: 5;
}

.thumbnails-strip-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.thumb-item-btn {
  width: 76px;
  height: 52px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  background: none;
  transition: all 0.2s;
}

.thumb-item-btn.active {
  border-color: #ef4444;
  box-shadow: 0 0 0 1px #ef4444;
}

.thumb-item-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-card-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-bottom: 24px;
}

.detail-panel-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.highlight-blue-banner {
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
  border-radius: 6px;
  padding: 18px 20px;
  margin-bottom: 24px;
}

.highlight-blue-banner h4 {
  font-size: 15px;
  font-weight: 800;
  color: #1e3a8a;
  margin-bottom: 8px;
}

.highlight-blue-banner p {
  font-size: 13.5px;
  color: #334155;
  line-height: 1.6;
}

.features-2x2-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.feature-sub-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
}

.feature-sub-card h5 {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
}

.feature-sub-card p {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}

.admin-features-list {
  list-style: none;
  padding: 0;
  margin-bottom: 28px;
}

.admin-features-list li {
  font-size: 13.5px;
  color: #334155;
  margin-bottom: 8px;
  padding-left: 14px;
  position: relative;
  line-height: 1.6;
}

.admin-features-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #0f172a;
  font-weight: bold;
}

.tech-specs-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  font-size: 13px;
}

.tech-spec-item .spec-label {
  font-size: 11.5px;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
}

.tech-spec-item .spec-val {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  margin-top: 3px;
}

.sidebar-commit-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-bottom: 20px;
}

.commit-checklist {
  list-style: none;
  padding: 0;
  margin-bottom: 20px;
}

.commit-checklist li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: #334155;
  margin-bottom: 10px;
}

.commit-checklist li i {
  color: #0284c7;
  font-size: 15px;
}

.stats-two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.stat-metric-pill {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
  text-align: center;
  font-size: 12.5px;
  color: #64748b;
}

.stat-metric-pill i {
  font-size: 16px;
  margin-bottom: 4px;
  display: block;
}

.stat-metric-pill strong {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  display: block;
  margin-top: 2px;
}

.price-checkout-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-top: 14px;
  border-top: 1px dashed #e2e8f0;
}

.price-checkout-row .label {
  font-size: 14px;
  color: #64748b;
  font-weight: 600;
}

.price-checkout-row .value {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
}

.checkout-btn-group {
  display: flex;
  gap: 10px;
}

.btn-back-outline {
  flex: 1;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 11px 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-back-outline:hover {
  background: #f1f5f9;
}

.btn-checkout-primary {
  flex: 2;
  background: #0284c7;
  color: #ffffff;
  border: none;
  padding: 11px 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-checkout-primary:hover {
  background: #0369a1;
}

.seller-widget-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-bottom: 20px;
}

.seller-top-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.seller-avatar-large {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e2e8f0;
}

.seller-badge-admin {
  background: #fee2e2;
  color: #dc2626;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
}

.seller-stats-sub {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: #64748b;
  margin-bottom: 14px;
}

.btn-view-shop {
  display: block;
  width: 100%;
  background: #cbd5e1;
  color: #334155;
  padding: 8px 0;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.related-tags-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.tag-pill-item {
  display: inline-block;
  background: #f1f5f9;
  color: #475569;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  margin: 3px 2px;
  text-decoration: none;
}

.floating-zalo-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #0088ff;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 8px 20px rgba(0, 136, 255, 0.4);
  text-decoration: none;
  z-index: 99;
  transition: transform 0.2s;
}

.floating-zalo-fab:hover {
  transform: scale(1.1);
}

@media screen and (max-width: 992px) {
  .source-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .source-detail-grid-layout {
    grid-template-columns: 1fr;
  }
  .tech-specs-box {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 640px) {
  .source-cards-grid {
    grid-template-columns: 1fr;
  }
  .features-2x2-grid {
    grid-template-columns: 1fr;
  }
  .tech-specs-box {
    grid-template-columns: 1fr;
  }
}
