/* ================================================================= */
/* 1. THIẾT LẬP CHUNG & ĐỊNH DẠNG NỀN VĂN BẢN                         */
/* ================================================================= */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 20px;
  background-color: #f4f4f4;
  color: #333;
  line-height: 1.5;
}

/* Khung giới hạn độ rộng nội dung hiển thị */
.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Tiêu đề chính của trang */
.page-title {
  text-align: center;
  color: #333;
  margin: 20px 0 30px 0;
  font-size: 26px;
  font-weight: bold;
  letter-spacing: 1px;
}

/* ================================================================= */
/* 2. THANH TIÊU ĐỀ (HEADER) & LOGO CỬA HÀNG                          */
/* ================================================================= */
.header-shop {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #ffffff;
  padding: 15px 25px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  margin-bottom: 20px;
}

.logo-box-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-icon {
  width: auto;
  height: 50px;
  object-fit: cover;
  border-radius: 10px;
}

.shop-logo {
  font-size: 30px;
  font-weight: 900;
  color: #ff4757;
  letter-spacing: 1.5px;
}

/* Vùng hiển thị Giỏ hàng */
.cart-box {
  background-color: #222;
  color: #fff;
  padding: 8px 18px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 14px;
}

#cartBadge {
  background-color: #ff4757;
  padding: 2px 8px;
  border-radius: 50%;
  margin-left: 5px;
}

/* ================================================================= */
/* 3. KHU VỰC BANNER QUẢNG CÁO                                       */
/* ================================================================= */
.shop-banner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 30px auto;
  display: flex;
  justify-content: center;
  padding: 0 10px;
  box-sizing: border-box;
}

.shop-banner img {
  width: 100%;
  height: auto;
  max-width: 1000px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.shop-banner img:hover {
  transform: scale(1.01);
}

/* ================================================================= */
/* 4. THANH BỘ LỌC TÌM KIẾM (FILTER BAR)                             */
/* ================================================================= */
.filter-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
  padding: 0 10px;
  box-sizing: border-box;
}

.filter-bar-center {
  background-color: #ffffff;
  padding: 12px 25px;
  border-radius: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-group-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-group-item label {
  font-weight: bold;
  font-size: 14px;
  color: #444;
}

.filter-group-item select {
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 20px;
  background-color: #fff;
  font-size: 14px;
  color: #333;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.filter-group-item select:focus {
  border-color: #ff4757;
}

/* ================================================================= */
/* 5. CẤU TRÚC LƯỚI & THẺ SẢN PHẨM (PRODUCT GRID & CARD)             */
/* ================================================================= */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.product-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.product-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid #eee;
}

.product-info {
  padding: 15px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-title {
  font-size: 16px;
  font-weight: bold;
  color: #222;
  margin: 0 0 10px 0;
  line-height: 1.4;
}

.product-desc {
  font-size: 13px;
  color: #666;
  margin-bottom: 15px;
  flex-grow: 1;
}

.specs-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 8px;
  margin: 0 0 10px 0;
  font-size: 13px;
}

.specs-list dt {
  font-weight: bold;
  color: #444;
}

.specs-list dd {
  margin: 0;
  color: #666;
}

.accessories {
  font-size: 12px;
  color: #777;
  border-top: 1px dashed #eee;
  padding-top: 8px;
  margin: 5px 0 0 0;
}

.product-price {
  font-size: 18px;
  color: #ff4757;
  font-weight: bold;
  margin-bottom: 15px;
  margin-top: auto;
}

button.btn-buy {
  width: 100%;
  border: none;
  cursor: pointer;
  font-size: 14px;
  background-color: #ff4757;
  color: #fff;
  padding: 10px;
  border-radius: 4px;
  font-weight: bold;
  transition: background 0.2s;
}

button.btn-buy:hover {
  background-color: #ee5253;
}

/* ================================================================= */
/* 6. GIAO DIỆN HỘP THOẠI POPUP (MODAL WINDOWS)                      */
/* ================================================================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: none; /* Mặc định ẩn, JS sẽ đổi thành flex khi bật */
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-box {
  background-color: #fff;
  padding: 30px;
  border-radius: 8px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
}

.modal-box h2 {
  margin: 0 0 5px 0;
  color: #222;
  font-size: 22px;
}

.modal-sub {
  font-size: 13px;
  color: #777;
  margin-bottom: 20px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 15px;
}

.input-group label {
  font-size: 13px;
  font-weight: bold;
  color: #444;
}

.input-group input {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  outline: none;
}

.input-group input:focus {
  border-color: #ff4757;
}

.modal-buttons {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn-submit {
  flex: 1;
  background-color: #2ed573;
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  font-size: 14px;
}

.btn-submit:hover {
  background-color: #26af5f;
}

.btn-close {
  background-color: #f1f2f6;
  color: #555;
  border: 1px solid #ccc;
  padding: 12px 20px;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  font-size: 14px;
}

.btn-close:hover {
  background-color: #dfe4ea;
}
