/* =========================================================
   Tech4U — Design System
   ========================================================= */
:root {
  --brand-700: #4338ca;
  --brand-600: #4f46e5;
  --brand-500: #6366f1;
  --brand-100: #eef2ff;
  --cyan-500: #06b6d4;
  --accent: #f97316;
  --accent-soft: #fff1e6;
  --ink: #0b1220;
  --ink-soft: #1e293b;
  --muted: #64748b;
  --line: #e6e9f2;
  --bg: #f5f6fb;
  --surface: #ffffff;
  --success: #10b981;
  --danger: #ef4444;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;
  --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.05);
  --shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 28px 60px rgba(15, 23, 42, 0.12);
  --gradient: linear-gradient(120deg, #4f46e5 0%, #6366f1 45%, #06b6d4 100%);
  --font: "Be Vietnam Pro", "Segoe UI", Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink-soft);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--brand-600);
}

img {
  max-width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.container {
  max-width: 1240px;
}

.site-main {
  min-height: 60vh;
  padding-bottom: 40px;
}

/* ===================== Top bar ===================== */
.topbar {
  background: var(--ink);
  color: #cbd5e1;
  font-size: 0.82rem;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 38px;
}

.topbar i {
  color: var(--cyan-500);
  margin-right: 6px;
}

.topbar-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.topbar-links a {
  color: #cbd5e1;
}

.topbar-links a:hover {
  color: #fff;
}

/* ===================== Header ===================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.header-main {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--gradient);
  color: #fff;
  font-size: 1.15rem;
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.35);
}

.brand span small {
  display: block;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
}

.header-search {
  flex: 1;
  max-width: 520px;
  position: relative;
}

.header-search input {
  width: 100%;
  border: 1px solid var(--line);
  background: #f8f9ff;
  border-radius: 999px;
  padding: 12px 52px 12px 20px;
  font-size: 0.92rem;
  outline: none;
  transition: all 0.2s ease;
}

.header-search input:focus {
  background: #fff;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.14);
}

.header-search button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  display: grid;
  place-items: center;
  transition: transform 0.2s ease;
}

.header-search button:hover {
  transform: translateY(-50%) scale(1.06);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.header-action {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 14px;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.88rem;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.header-action:hover {
  background: var(--brand-100);
  color: var(--brand-700);
}

.header-action .icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--brand-100);
  color: var(--brand-600);
  display: grid;
  place-items: center;
  font-size: 1rem;
  position: relative;
}

.header-action .label small {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.1;
}

.cart-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 1.1rem;
}

.nav-bar {
  border-top: 1px solid var(--line);
  background: #fff;
}

.nav-bar-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-bar-inner::-webkit-scrollbar {
  display: none;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.nav-pill i {
  color: var(--brand-600);
  font-size: 0.85rem;
}

.nav-pill:hover,
.nav-pill.active {
  color: var(--brand-700);
  border-bottom-color: var(--brand-600);
}

.nav-spacer {
  flex: 1;
}

.nav-hotline {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
  padding: 0 8px;
}

.nav-hotline strong {
  color: var(--brand-700);
}

.mobile-menu {
  display: none;
}

/* ===================== Buttons ===================== */
.btn {
  border-radius: 12px;
  font-weight: 600;
  padding: 10px 20px;
  font-size: 0.92rem;
  transition: all 0.2s ease;
}

.btn-lg {
  padding: 13px 26px;
  font-size: 1rem;
  border-radius: 14px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 10px;
}

.btn-primary {
  background: var(--gradient);
  border: 0;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.28);
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(120deg, #4338ca 0%, #4f46e5 45%, #0891b2 100%);
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(79, 70, 229, 0.35);
}

.btn-dark {
  background: var(--ink);
  border-color: var(--ink);
}

.btn-outline-primary {
  color: var(--brand-600);
  border-color: rgba(79, 70, 229, 0.35);
  background: #fff;
}

.btn-outline-primary:hover {
  background: var(--brand-600);
  border-color: var(--brand-600);
}

.btn-light {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
}

.btn-light:hover {
  border-color: var(--brand-500);
  color: var(--brand-700);
}

/* ===================== Alerts ===================== */
.site-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 0;
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}

.site-alert.alert-success {
  background: #ecfdf5;
  color: #065f46;
}

.site-alert.alert-danger {
  background: #fef2f2;
  color: #991b1b;
}

.site-alert.alert-info {
  background: #eff6ff;
  color: #1e40af;
}

.site-alert.alert-warning {
  background: #fffbeb;
  color: #92400e;
}

.site-alert i {
  margin-top: 2px;
}

.site-alert .btn-close {
  margin-left: auto;
  font-size: 0.7rem;
}

/* ===================== Section headings ===================== */
.section {
  padding: 56px 0;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-600);
  margin-bottom: 8px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--brand-600);
  border-radius: 2px;
}

.section-title {
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  margin: 0;
}

.section-sub {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 6px 0 0;
}

.section-link {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--brand-600);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.section-link i {
  transition: transform 0.2s ease;
}

.section-link:hover i {
  transform: translateX(4px);
}

/* ===================== Cards & forms ===================== */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  background: var(--surface);
  overflow: hidden;
}

.card-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 16px 20px;
  font-weight: 700;
}

.card-body {
  padding: 20px;
}

.form-control,
.form-select {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 0.92rem;
  background-color: #fbfbff;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
  background-color: #fff;
}

.form-label {
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.form-text {
  font-size: 0.78rem;
}

/* ===================== Footer ===================== */
.site-footer {
  margin-top: 40px;
  background: #0a1020;
  color: #94a3b8;
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -160px;
  right: -120px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.35), transparent 65%);
}

.footer-top {
  padding: 56px 0 40px;
  position: relative;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 36px;
}

.footer-brand .brand {
  color: #fff;
  margin-bottom: 14px;
}

.footer-brand p {
  font-size: 0.88rem;
  line-height: 1.7;
  max-width: 320px;
}

.footer-title {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  display: grid;
  gap: 10px;
  font-size: 0.88rem;
}

.footer-links a {
  color: #94a3b8;
}

.footer-links a:hover {
  color: #fff;
}

.footer-contact li {
  display: flex;
  gap: 10px;
  font-size: 0.88rem;
  margin-bottom: 12px;
  line-height: 1.5;
}

.footer-contact i {
  color: var(--cyan-500);
  margin-top: 4px;
}

.footer-newsletter {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.footer-newsletter input {
  flex: 1;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 0.85rem;
  outline: none;
}

.footer-newsletter input::placeholder {
  color: #7c8aa0;
}

.footer-newsletter input:focus {
  border-color: var(--brand-500);
}

.footer-newsletter button {
  border: 0;
  border-radius: 12px;
  padding: 0 16px;
  background: var(--gradient);
  color: #fff;
}

.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  color: #cbd5e1;
  font-size: 0.9rem;
}

.footer-social a:hover {
  background: var(--brand-600);
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.8rem;
  position: relative;
}

.payment-badges {
  display: flex;
  gap: 10px;
  font-size: 1.4rem;
  color: #cbd5e1;
}

/* ===================== Empty state ===================== */
.empty-state {
  text-align: center;
  padding: 70px 20px;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.empty-state .icon {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--brand-100);
  color: var(--brand-600);
  display: grid;
  place-items: center;
  font-size: 2rem;
  margin: 0 auto 20px;
}

.empty-state h3 {
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.empty-state p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

/* ===================== Breadcrumb ===================== */
.breadcrumb-modern {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 18px 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.breadcrumb-modern a {
  color: var(--muted);
}

.breadcrumb-modern a:hover {
  color: var(--brand-600);
}

.breadcrumb-modern li + li::before {
  content: "/";
  margin-right: 8px;
  color: #cbd5e1;
}

/* ===================== Tabs ===================== */
.nav-tabs {
  border-bottom: 1px solid var(--line);
  gap: 4px;
}

.nav-tabs .nav-link {
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px 16px;
  border-radius: 0;
}

.nav-tabs .nav-link:hover {
  color: var(--brand-600);
}

.nav-tabs .nav-link.active {
  color: var(--brand-700);
  background: transparent;
  border-bottom-color: var(--brand-600);
}

/* ===================== Tables ===================== */
.table {
  margin-bottom: 0;
}

.table > :not(caption) > * > * {
  padding: 14px 16px;
  border-bottom-color: var(--line);
  vertical-align: middle;
}

.table thead th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
  background: #fafbff;
}

/* ===================== Misc ===================== */
.text-price {
  color: var(--danger);
  font-weight: 800;
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--brand-100);
  color: var(--brand-700);
}

.badge-sale {
  background: var(--accent);
  color: #fff;
}

.page-hero {
  background: linear-gradient(135deg, #101a33 0%, #1e2a55 60%, #313a80 100%);
  color: #fff;
  padding: 46px 0;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.55;
  pointer-events: none;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 82% 20%, rgba(6, 182, 212, 0.3), transparent 45%);
  pointer-events: none;
}

.page-hero h1 {
  color: #fff;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  margin-bottom: 6px;
}

.page-hero p {
  color: #c7d2fe;
  margin: 0;
  font-size: 0.95rem;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

/* ===================== Responsive ===================== */
@media (max-width: 992px) {
  .header-search {
    display: none;
  }

  .header-action .label {
    display: none;
  }

  .header-action {
    padding: 4px;
  }

  .nav-toggle {
    display: grid;
    place-items: center;
    margin-left: auto;
  }

  .nav-bar {
    display: none;
  }

  .mobile-menu {
    display: block;
    padding: 12px 16px 18px;
    border-top: 1px solid var(--line);
    background: #fff;
  }

  .mobile-menu .header-search {
    display: block;
    max-width: 100%;
    margin-bottom: 12px;
  }

  .mobile-links {
    display: grid;
    gap: 2px;
  }

  .mobile-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 10px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.92rem;
  }

  .mobile-links a:hover {
    background: var(--brand-100);
    color: var(--brand-700);
  }

  .mobile-links i {
    width: 20px;
    color: var(--brand-600);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 576px) {
  .topbar-inner {
    justify-content: center;
    font-size: 0.72rem;
  }

  .topbar-links {
    display: none;
  }

  .header-main {
    gap: 12px;
    padding: 10px 8px;
  }

  .brand {
    font-size: 1.15rem;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .section {
    padding: 38px 0;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ===================== Scroll reveal ===================== */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
