﻿:root {

  /* blue / navy scale (9 steps) */
  --blue-50: #eef4fd;
  /* tints cực nhạt — nền hover, badge */
  --blue-100: #d8e8fa;
  /* card highlight */
  --blue-200: #b0d0f5;
  /* border focus nhẹ */
  --blue-300: #7bb5ef;
  /* placeholder icon */
  --blue-400: #4f9aea;
  /* chip tag */
  --blue-500: #2a83e9;
  /* sky blue — giao diện chính */
  --blue-600: #1c73d6;
  /* hover state */
  --blue-700: #1463c2;
  /* active state */
  --blue-800: #1544b7;
  /* deep navy — authority */
  --blue-900: #0f2f7a;
  /* footer, sidebar đậm */

  /* accent / gold scale (cta, giá, badge) */
  --amber-50: #fff8ec;
  --amber-100: #ffecc8;
  --amber-200: #ffd88a;
  --amber-300: #ffc04d;
  --amber-400: #ffaa1a;
  --amber-500: #ff9800;
  /* gold-primary */
  --amber-600: #f57c00;
  /* gold-hover */
  --amber-700: #e65100;
  /* gold-active */
  --amber-800: #bf360c;
  --amber-900: #8c2700;

  /* neutral / gray scale (text, border, bg) */
  --gray-0: #ffffff;
  --gray-50: #f7f8fa;
  --gray-100: #f1f3f6;
  --gray-200: #e3e6ec;
  --gray-300: #cdd2db;
  --gray-400: #b0b8c4;
  --gray-500: #8a95a3;
  --gray-600: #667080;
  --gray-700: #4a5568;
  --gray-800: #2d3748;
  --gray-900: #1a202c;

  /* semantic: status colors */
  --success: #22c55e;
  --success-light: #dcfce7;
  --success-dark: #166534;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --danger-dark: #991b1b;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --warning-dark: #92400e;
  --info: var(--blue-500);
  --info-light: var(--blue-50);
  --info-dark: var(--blue-800);

  /* semantic tokens — ui elements map to scale tokens */

  /* primary interactive */
  --blue-primary: var(--blue-500);
  --blue-hover: var(--blue-600);
  --blue-active: var(--blue-700);
  --blue-disabled: var(--blue-200);

  /* primary dark (buttons, headers, sidebar) */
  --primary-dark-color: var(--blue-800);
  --primary-dark-hover: var(--blue-900);

  /* accent / cta */
  --gold-primary: var(--amber-500);
  --gold-hover: var(--amber-600);
  --gold-active: var(--amber-700);

  /* backgrounds */
  --bg-main: var(--gray-50);
  --bg-secondary: var(--gray-0);
  --bg-card: var(--gray-0);
  --bg-soft: var(--blue-50);
  --bg-input: var(--gray-100);
  --bg-overlay: rgba(21, 68, 183, 0.06);

  /* borders */
  --border-color: var(--gray-200);
  --border-color-dark: var(--gray-300);
  --border-focus: var(--blue-400);

  /* typography */
  --black-primary: var(--gray-900);
  --text-main: var(--gray-700);
  --text-secondary: var(--gray-500);
  --text-muted: var(--gray-400);
  --text-inverse: var(--gray-0);
  --text-link: var(--blue-primary);

  /* effects, spacing & typography */

  /* shadows — tinted navy để brand hơn */
  --shadow-xs: 0 1px 2px rgba(21, 68, 183, 0.04);
  --shadow-sm: 0 1px 4px rgba(21, 68, 183, 0.06);
  --shadow-md: 0 4px 12px rgba(21, 68, 183, 0.10);
  --shadow-lg: 0 8px 24px rgba(21, 68, 183, 0.12);
  --shadow-xl: 0 16px 48px rgba(21, 68, 183, 0.15);

  /* border radius */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* transitions */
  --transition: all 0.2s ease-in-out;
  --transition-slow: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);

  /* typography */
  --font-body: "Inter", sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-md: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
}


*, *::before, *::after {
  box-sizing: border-box;
}

html,
body {
  background-color: var(--bg-main);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
  border: none;
  outline: none;
}

.container {
  width: 100% !important;
  max-width: 1640px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
}

/* utilities */
.text-gold {
  color: var(--gold-primary);
}

.text-danger {
  color: var(--danger);
}

.text-success {
  color: var(--success);
}

.text-muted {
  color: var(--text-muted);
}

.text-white {
  color: #fff;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-gap {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}

/* nút bấm nhấn - kêu gọi hành động */
.btn-primary {
  background: var(--gold-primary);
  color: #ffffff;
  border: none;
}

.btn-primary:hover {
  background: var(--gold-hover);
  color: #ffffff;
}

.btn-primary:active {
  background: var(--gold-active);
  color: #ffffff;
}

/* nút outline */
.btn-outline {
  border: 1px solid var(--blue-primary);
  color: var(--blue-primary);
  background: transparent;
}

.btn-outline:hover {
  background: var(--blue-primary);
  color: #ffffff;
}

.btn-outline:active {
  background: var(--blue-active);
  border-color: var(--blue-active);
}

/* header (moved to css/header.css) */

/* hero section */
.hero {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
}

.hero-banner {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: linear-gradient(120deg, #fdfbfb 0%, #ebedee 100%);
}

.hero-banner-content {
  text-align: center;
}

.hero-banner-content h2 {
  font-size: 32px;
  color: var(--black-primary);
  margin-bottom: 15px;
}

.hero-right {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.promo-img {
  background: #fff;
  border-radius: var(--radius-md);
  flex: 1;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-primary);
  font-weight: 600;
  padding: 20px;
  text-align: center;
}

/* product cards */
.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--black-primary);
  margin: 40px 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.view-all {
  font-size: 14px;
  color: var(--blue-primary);
  font-weight: 500;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 15px;
}

.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 15px;
  position: relative;
  border: 1px solid var(--border-color);
  transition: var(--shadow-md);
  display: flex;
  flex-direction: column;
  background-color: var(--bg-secondary);
  /* xám bạc nhẹ cho khối bo góc */
}

.product-card:hover {
  box-shadow: var(--shadow-md);
}

.discount-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: var(--bg-soft);
  color: var(--gold-primary);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  z-index: 10;
}

.product-img {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
}

.product-img i {
  font-size: 80px;
  color: #ccc;
}

.product-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--black-primary);
  line-height: 1.4;
  margin-bottom: 8px;
  height: 40px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-title:hover {
  color: var(--gold-primary);
}

.product-specs {
  background: var(--bg-main);
  padding: 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-price {
  margin-top: auto;
  color: #ef4444;
}

.price-current {
  display: inline-block;
  background: var(--gold-primary);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 5px;
}

.price-old-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.price-old {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.discount-text {
  color: var(--success);
  font-size: 12px;
  font-weight: 600;
}

/* footer (moved to css/footer.css) */

/* responsive */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-right {
    display: none;
  }
}

@media (max-width: 768px) {
  .header-actions {
    display: none;
  }

  .category-menu-btn {
    display: none;
  }

  .nav-links {
    display: none;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.back-to-top {
  position: fixed;
  bottom: 100px;
  right: 40px;
  width: 45px;
  height: 45px;
  background-color: #1463c2;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 999;

  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.back-to-top:hover {
  background-color: #2a83e9;
  transform: translateY(-5px) scale(1.1);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}