/* ========================================================
   AN THỊNH TECH - PREMIER VIETNAMESE TECH STOREFRONT
   Công ty CP Thương Mại & Dịch Vụ Thiết Bị Công Nghệ An Thịnh
   MST: 0319661269
   Typography System: Be Vietnam Pro + Plus Jakarta Sans
======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

:root {
  --font-base: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: 'Plus Jakarta Sans', 'Be Vietnam Pro', sans-serif;
  --font-numeric: 'Plus Jakarta Sans', tabular-nums, sans-serif;

  --color-slate-950: #020617;
  --color-slate-900: #0F172A;
  --color-slate-800: #1E293B;
  --color-slate-700: #334155;
  --color-slate-600: #475569;
  --color-slate-500: #64748B;
  --color-slate-400: #94A3B8;
  --color-slate-300: #CBD5E1;
  --color-slate-200: #E2E8F0;
  --color-slate-100: #F1F5F9;
  --color-slate-50:  #F8FAFC;

  --color-primary: #0F172A;
  --color-accent: #2563EB;
  --color-accent-hover: #1D4ED8;
  --color-sky-accent: #0284C7;
  
  --color-brand-dreame: #0284C7;
  --color-brand-hukan: #EA580C;
  --color-brand-dekton: #16A34A;
  --color-brand-software: #7C3AED;

  --shadow-subtle: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 1px 2px -1px rgba(0, 0, 0, 0.03);
  --shadow-card-hover: 0 16px 32px -8px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.03);
  --radius-card: 18px;
}

/* ========================================================
   GLOBAL TYPOGRAPHY & BASE RESET
======================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font-base);
  color: var(--color-slate-800);
  background-color: #F8FAFC;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.011em;
  line-height: 1.55;
}

/* Headings with Modern Geometric Precision */
h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: var(--font-heading);
  letter-spacing: -0.024em;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

/* Tabular & Proportional Numbers for Currency & Specs */
.font-numeric {
  font-family: var(--font-numeric);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #F1F5F9;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* ========================================================
   TECHNICAL BLUEPRINT BACKGROUND GRID & CURSOR SPOTLIGHT
======================================================== */
.bp {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.bp__mesh {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(14, 165, 233, 0.04) 1px, transparent 0),
    linear-gradient(90deg, rgba(14, 165, 233, 0.04) 1px, transparent 0);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.5) 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.5) 70%, transparent 100%);
}

.spotlight-glow {
  position: fixed;
  width: 550px;
  height: 550px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(56, 189, 248, 0.08) 0%, rgba(37, 99, 235, 0.03) 45%, transparent 70%);
  opacity: 0;
  transition: opacity 0.35s ease;
  will-change: left, top, opacity;
}

/* ========================================================
   BAMFLOW-INSPIRED MODERN TECH HERO & ATMOSPHERE
======================================================== */
.bam-header-bg {
  background: rgba(5, 11, 23, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bam-hero-bg {
  position: relative;
  min-height: calc(100vh - 64px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  background-color: #fff;
  background-image:
    linear-gradient(180deg,
      rgb(10 20 48) 0%,
      rgb(10 20 48 / 95%) 14%,
      rgb(10 20 48 / 68%) 32%,
      rgb(10 20 48 / 30%) 48%,
      rgb(10 20 48 / 8%) 58%,
      rgb(10 20 48 / 0%) 66%),
    radial-gradient(112% 128% at 50% -2%,
      rgb(13 36 96) 0%,
      rgb(16 53 140) 24%,
      rgb(23 73 184) 40%,
      rgb(33 102 214) 52%,
      rgb(47 122 224) 60%,
      rgb(79 143 226) 66%,
      rgb(127 176 236) 73%,
      rgb(170 205 244) 80%,
      rgb(207 226 249) 86%,
      rgb(233 242 252) 91%,
      rgb(248 251 254) 96%,
      rgb(255 255 255) 100%);
}

.bam-hero-bg canvas.hero-grid-canvas {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 1;
}

/* Glassmorphic Components with Spring Bounce ("Nẩy lên" khi rê chuột) */
.bam-glass-card {
  background: rgba(10, 18, 38, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              border-color 0.25s ease,
              background-color 0.25s ease;
  will-change: transform;
}

.bam-glass-card:hover {
  background: rgba(14, 25, 52, 0.8);
  border-color: rgba(255, 255, 255, 0.38);
  box-shadow: 0 20px 42px -10px rgba(37, 99, 235, 0.5), 0 0 25px rgba(59, 130, 246, 0.25);
  transform: translateY(-8px) scale(1.02);
}

/* General Spring Bounce Utility */
.bounce-hover {
  transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.32s cubic-bezier(0.34, 1.56, 0.64, 1),
              border-color 0.25s ease,
              background-color 0.25s ease;
  will-change: transform;
}

.bounce-hover:hover {
  transform: translateY(-6px) scale(1.025);
}

.bounce-pill {
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
}

.bounce-pill:hover {
  transform: translateY(-4px) scale(1.035);
}

/* Partner Logo Chip in Ribbon ("Đang Vận Hành Tại" chip nẩy lên) */
.partner-logo-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #CBD5E1;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.32s cubic-bezier(0.34, 1.56, 0.64, 1),
              background-color 0.25s ease,
              color 0.25s ease,
              border-color 0.25s ease;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.partner-logo-chip:hover {
  transform: translateY(-6px) scale(1.06);
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 14px 28px -6px rgba(37, 99, 235, 0.45), 0 0 20px rgba(59, 130, 246, 0.3);
}

/* Nav Link Underline Indicator */
.bam-nav-link {
  position: relative;
  transition: color 0.2s ease;
}

.bam-nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 2.5px;
  background-color: #FFFFFF;
  border-radius: 9999px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* ========================================================
   SPOTLIGHT LAYER (BAMFLOW CURSOR LIGHT FOLLOWER)
======================================================== */
.spotlight-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}

.spotlight-layer__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx, -999px) var(--my, -999px), rgba(37, 99, 235, 0.25), transparent 70%);
  pointer-events: none;
  transition: opacity 0.2s ease;
}

/* ========================================================
   INFINITE CLIENT / BRAND RUNNER TRACK (BAMFLOW STYLE)
======================================================== */
.clients__lead {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #475569;
  font-family: var(--font-heading);
}

.clients__track {
  overflow: hidden;
  display: flex;
  user-select: none;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  max-width: 100%;
}

.clients__row {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  animation: clients-run 36s linear infinite;
}

.clients__row li {
  padding: 0 32px;
  white-space: nowrap;
  font-size: 1.05rem;
  font-weight: 700;
  color: #334155;
  font-family: var(--font-heading);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease;
}

.clients__row li:hover {
  transform: translateY(-4px) scale(1.08);
  color: #2563EB;
}

.clients__row li + li {
  border-left: 1px solid #DBE3EE;
}

/* Light background chip variant */
#ecosystem .partner-logo-chip {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  color: #334155;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

#ecosystem .partner-logo-chip:hover {
  background: #F8FAFC;
  border-color: #94A3B8;
  color: #0F172A;
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px) scale(1.04);
}

.clients__track:hover .clients__row {
  animation-play-state: paused;
}

@keyframes clients-run {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* Floating Badges Bobbing Animation (Floating chips that breathe) */
@keyframes floatBobbing {
  0%, 100% { transform: translateY(0px) rotate(var(--rot, 0deg)); }
  50% { transform: translateY(-7px) rotate(var(--rot, 0deg)); }
}

.floating-chip-anim {
  animation: floatBobbing 5s ease-in-out infinite;
}

.floating-chip-anim:hover {
  animation-play-state: paused;
  transform: translateY(-10px) scale(1.08) rotate(0deg) !important;
}

/* ========================================================
   PRODUCT CARD (HUMAN-CRAFTED E-COMMERCE UX)
======================================================== */
.product-card {
  background: #FFFFFF;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 20px;
  transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.32s cubic-bezier(0.34, 1.56, 0.64, 1),
              border-color 0.25s ease;
  box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-6px) scale(1.015);
  border-color: #93C5FD;
  box-shadow: 0 20px 40px -12px rgba(37, 99, 235, 0.15), 0 4px 12px -2px rgba(15, 23, 42, 0.05);
}

.product-image-wrap {
  position: relative;
  background: radial-gradient(circle at 50% 45%, #F8FAFC 0%, #FFFFFF 100%);
  border-top-left-radius: 19px;
  border-top-right-radius: 19px;
  border-bottom: 1px solid rgba(241, 245, 249, 0.9);
  overflow: hidden;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image-wrap img {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
  filter: drop-shadow(0 6px 14px rgba(15, 23, 42, 0.06));
}

.product-card:hover .product-image-wrap img {
  transform: translateY(-4px) scale(1.06);
  filter: drop-shadow(0 14px 22px rgba(15, 23, 42, 0.1));
}

/* Category Filter Tabs */
.cat-pill {
  transition: all 0.24s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: var(--font-base);
}

.cat-pill:hover {
  transform: translateY(-2px);
}

.cat-pill:hover {
  transform: translateY(-1px);
}

/* Brand Capsule Tags */
.brand-capsule {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 6px;
}

/* Floating Hotline & Zalo Contact Widget */
.floating-contact {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-bubble {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 9999px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 12px;
  color: #FFFFFF;
  box-shadow: 0 8px 20px -3px rgba(15, 23, 42, 0.25);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.contact-bubble:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 25px -4px rgba(15, 23, 42, 0.35);
}

/* Modal Animations */
.modal-backdrop {
  animation: fadeIn 0.18s ease-out forwards;
}

.modal-content-anim {
  animation: modalScaleUp 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalScaleUp {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Toast System */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 14px;
  background: #0F172A;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 30px -4px rgba(0, 0, 0, 0.3);
  font-family: var(--font-base);
  font-size: 13px;
  font-weight: 500;
  animation: toastSlideIn 0.25s ease-out forwards;
  max-width: 420px;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Bottom Navigation */
@media (max-width: 768px) {
  .mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid #E2E8F0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    z-index: 40;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
  }
  
  .floating-contact {
    bottom: 74px;
    right: 14px;
  }
}

@media (min-width: 769px) {
  .mobile-bottom-nav {
    display: none;
  }
}

/* Print Invoice Styles */
@media print {
  body * {
    visibility: hidden;
  }
  #invoice-printable, #invoice-printable * {
    visibility: visible;
  }
  #invoice-printable {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }
}

/* ========================================================
   PREMIUM BESPOKE UI UTILITIES (BAMFLOW & LINEAR QUALITY)
======================================================== */
.hero-title-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(37, 99, 235, 0.28);
  border: 1px solid rgba(147, 197, 253, 0.45);
  color: #93C5FD;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 24px -6px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  vertical-align: middle;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .hero-title-chip {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }
}

/* Bespoke Ecosystem Cards (Section 01) */
.bespoke-card {
  position: relative;
  background: #FFFFFF;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 24px;
  padding: 30px 26px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              border-color 0.25s ease;
  box-shadow: 0 4px 20px -4px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  cursor: pointer;
}

.bespoke-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: #93C5FD;
  box-shadow: 0 24px 48px -12px rgba(37, 99, 235, 0.16), 0 0 24px rgba(59, 130, 246, 0.08);
}

.bespoke-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--card-accent, #2563EB);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.bespoke-card:hover::before {
  opacity: 1;
}

/* High-Tech Mockup Window (Software B2B Showcase) */
.mockup-window {
  background: rgba(11, 19, 43, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6), 0 0 50px rgba(37, 99, 235, 0.2);
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.mockup-winbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mockup-dots {
  display: flex;
  align-items: center;
  gap: 7px;
}

.mockup-dots span {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  display: inline-block;
}

