/* =========================================
   ========================================= */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

:root {
  /* 1. Hệ thống màu chủ đạo (Primary Colors) */
  --blue-primary: #2a83e9;
  /* Xanh dương chủ đạo mới */
  --gold-primary: #ff9800;
  /* Cam nổi bật làm màu nhấn (Accent) */
  --primary-dark-color: #1544b7;
  /* 2. Các trạng thái của Nút bấm (Buttons) */
  /* Nút màu Xanh */
  --blue-hover: #1c73d6;
  /* Đậm hơn 10% */
  --blue-active: #1463c2;
  /* Đậm hơn 20% */
  --blue-disabled: #9ec6f2;
  /* Xanh nhạt vô hiệu hóa */
  /* Nút màu Cam nhấn */
  --gold-hover: #f57c00;
  --gold-active: #e65100;

  /* 3. Hệ thống màu bổ trợ & Trạng thái (Functional Colors) */
  --bg-main: #f5f5f7;
  /* Xám rất nhạt cho nền trang */
  --bg-secondary: #ffffff;
  /* Khối trắng */
  --bg-card: #ffffff;
  --border-color: #e0e0e0;
  /* Khung, input */
  --danger: #d0021b;
  /* Lỗi, Xóa */
  --success: #4caf50;
  /* Thành công */
  --bg-soft: #eaf3fc;
  /* Nền nhạt tone màu xanh (Soft Accent) */

  /* 4. Bảng phân cấp chữ (Typography) */
  --black-primary: #333333;
  /* Tiêu đề chính */
  --text-main: #666666;
  /* Mô tả, thông số */
  --text-muted: #999999;
  /* Chú thích, phụ */

  /* Typography */
  --font-body: "Inter", sans-serif;

  /* Effects */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --transition: all 0.2s ease-in-out;
  --radius-sm: 8px;
  --radius-md: 12px;
  --border-color-dark: rgb(181 184 199);
}

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

body {
  background-color: var(--bg-main);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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 {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* 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: 30px;
  right: 30px;
  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);
}