/* css/layout.css */

/* --- HEADER CHÍNH --- */
.header {
  background: rgba(255, 255, 255, 1); /* Màu trắng đục lúc đầu */
  position: fixed; /* Fixed để luôn nổi */
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
  height: var(--header-height);
  display: flex;
  align-items: center;
}

/* Hiệu ứng khi cuộn trang */
.header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  height: 70px; /* Thu nhỏ lại chút khi cuộn */
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 100%;
}

/* 1. Logo */
.logo {
  font-size: 2.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--primary-color);
  z-index: 1001; /* Luôn nổi trên menu mobile */
}

/* 2. Desktop Navigation */
.nav-list {
  display: flex;
  gap: 3.5rem;
}

.nav-link {
  font-size: 1.3rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  padding: 10px 0;
  color: var(--primary-color);
}

/* Hiệu ứng gạch chân khi hover (Đi từ trái sang phải) */
.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 5px;
  left: 0;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}
.nav-link:hover::after {
  width: 100%;
}

/* Dropdown Menu (Menu con) */
.nav-item {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  min-width: 200px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  padding: 1rem 0;
  border-top: 2px solid var(--primary-color);
}

.nav-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li a {
  display: block;
  padding: 1rem 2rem;
  font-size: 1.3rem;
  color: #555;
  transition: 0.2s;
}
.dropdown-menu li a:hover {
  background: #f5f5f5;
  color: var(--primary-color);
  padding-left: 2.5rem; /* Hiệu ứng đẩy chữ sang phải */
}

.dropdown-icon {
  font-size: 1rem;
  margin-left: 3px;
}

/* 3. Header Icons */
.header-icons {
  display: flex;
  gap: 2.5rem;
  font-size: 2rem;
}
.header-icons i {
  transition: 0.3s;
  color: var(--primary-color);
}
.header-icons i:hover {
  color: var(--text-light);
}

.cart-icon-wrap {
  position: relative;
}
.cart-count {
  position: absolute;
  top: -5px;
  right: -8px;
  background-color: var(--primary-color);
  color: #fff;
  font-size: 1rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* Các thành phần Mobile mặc định ẩn */
.mobile-menu-btn,
.mobile-menu-header,
.menu-overlay {
  display: none;
}

/* ------------------------------------------ */
/* --- FOOTER SECTION --- */
.footer {
  background-color: var(--primary-color); /* Nền đen từ base.css */
  color: #fff; /* Chữ trắng */
  padding-top: 6rem;
  padding-bottom: 2rem;
  margin-top: 5rem; /* Cách xa phần nội dung chính */
}

/* Phần trên: Chia 4 cột */
.footer-top {
  display: grid;
  /* Tạo 4 cột kích thước bằng nhau */
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
  margin-bottom: 4rem;
}

/* 1. Logo & Desc */
.footer-logo {
  font-size: 2.4rem;
  font-weight: 800;
  color: #fff;
  display: inline-block;
  margin-bottom: 1.5rem;
  letter-spacing: 2px;
}
.footer-desc {
  font-size: 1.4rem;
  color: #ccc; /* Màu xám nhạt cho dễ đọc */
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* 2. Social Icons */
.footer-socials {
  display: flex;
  gap: 1.5rem;
}
.footer-socials a {
  width: 35px;
  height: 35px;
  border: 1px solid #555;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: 0.3s;
}
.footer-socials a:hover {
  background: #fff;
  color: var(--primary-color);
  border-color: #fff;
}

/* 3. Tiêu đề cột & Links */
.footer-title {
  font-size: 1.6rem;
  color: #fff;
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: 1rem;
}
/* Đường gạch nhỏ dưới tiêu đề */
.footer-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 30px;
  height: 2px;
  background: #555;
}

.footer-links li {
  margin-bottom: 1rem;
}
.footer-links a {
  color: #ccc;
  font-size: 1.4rem;
  transition: 0.3s;
}
.footer-links a:hover {
  color: #fff;
  padding-left: 5px; /* Hiệu ứng đẩy nhẹ sang phải */
}

/* 4. Newsletter Form */
.footer-text {
  font-size: 1.4rem;
  color: #ccc;
  margin-bottom: 1.5rem;
}
.newsletter-form {
  display: flex;
  border-bottom: 1px solid #555;
}
.newsletter-form input {
  width: 100%;
  background: transparent;
  border: none;
  padding: 1rem 0;
  color: #fff;
  outline: none;
}
.newsletter-form button {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 1.2rem;
  transition: 0.3s;
}
.newsletter-form button:hover {
  color: var(--accent-color);
}

/* --- FOOTER BOTTOM --- */
.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.3rem;
  color: #888;
}
.payment-methods {
  font-size: 2rem;
  display: flex;
  gap: 1rem;
  color: #ccc;
}
