

/* 1. ĐỊNH NGHĨA BIẾN VÀ FONT MỚI */
:root {
  --pink-bg: #f5f5f4;      
  --black-main: #333333;    
  --white-card: #FFFFFF;   
  --gray-text: #666666;   
  --gray-border: #EAEAEA; 
  --container: 1200px;
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Roboto', sans-serif;
}

/* 2. THIẾT LẬP CƠ BẢN (BODY) */
* { box-sizing: border-box; margin: 0; padding: 0 }

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body); 
  color: var(--black-main);      
  line-height: 1.6; 
  letter-spacing: 0.2px; 
  min-height: 100vh;
  font-size: 16px; 
  background-color: #FFFCF8;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px }
a { color: inherit; text-decoration: none; }

/* 3. THIẾT KẾ HEADER */
.site-header {
  background: var(--white-card); 
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 0 }
.brand { display: flex; gap: 12px; align-items: center }
.logo { 
  height: 56px; 
  object-fit: contain;
  max-width: 300px;
}
.brand-text h1 {
  font-family: var(--font-heading);
  font-size: 28px;
  letter-spacing: 1px;
  color: var(--black-main); 
}
.brand-text .tag { color: var(--gray-text); font-size: 14px; font-family: var(--font-body); }

/* 4. THIẾT KẾ MENU (NAV) */
.main-nav { display: flex; gap: 18px; align-items: center }
.nav-link {
  font-size: 16px; 
  color: var(--black-main);
  font-weight: 500; 
  padding: 6px 8px;
  text-transform: none; 
  border-bottom: 3px solid transparent;
  transition: color 0.2s;
}
.nav-link.active,
.nav-link:hover {
  color: var(--black-main);
  border-bottom: 3px solid var(--black-main); 
}

/* 5. THANH TÌM KIẾM VÀ ICON  */
.header-right { 
  display: flex; 
  gap: 24px;
  align-items: center;
}
.icon-btn { background: transparent; border: 0; font-size: 20px; cursor: pointer; color: var(--black-main) }
.icon-btn:hover { color: #555; }
.search-form {
  display: flex;
  align-items: center;
  border: 1px solid var(--gray-border);
  border-radius: 6px; 
  overflow: hidden;
  background: var(--pink-bg); 
}

.widget {
  background: var(--white-card);
  padding: 16px; 
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); 
  margin-bottom: 16px;
}
.search-input {
  border: none;
  padding: 8px 12px;
  font-size: 15px; 
  outline: none;
  background: transparent;
  color: var(--black-main);
  font-family: var(--font-body);
  transition: width 0.3s;
}
.search-input:focus { width: 240px; }
.search-input::placeholder { color: var(--gray-text); }

.search-btn {
  background: var(--black-main); 
  color: var(--white-card);      
  border: none;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 15px; 
  font-family: var(--font-body); 
  font-weight: 500;
  text-transform: none; 
  transition: background 0.2s;
}
.search-btn:hover {
  background: #333; 
}

/* 6. HERO BANNER */
.hero {
  padding: 0;
  background: none;
}
#trang-chu {
  padding-top: 0;
}
.hero-right { 
  position: relative; 
  width: 100%;
  line-height: 0; 
}
.hero-image {
  width: 100%;
  height: auto; 
  object-fit: unset; 
  border: none;
  box-shadow: none;
  border-radius: 0;
}
.student-id {
  position: absolute;
  right: 20px; 
  bottom: 20px;
  background: rgba(255,255,255,0.7);
  color: var(--black-main);
  padding: 8px 12px;
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6; 
  z-index: 5;
}


/* 7. LAYOUT CHÍNH */
.main-layout { 
  display: flex; 
  gap: 28px; 
  padding: 36px 0; 
  align-items: flex-start; 
}
.content { 
  flex: 1; 
}
.sidebar { 
  width: 300px;
  position: sticky; 
  top: 126px;      
}


/* 8. CARD SẢN PHẨM */
.products-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px }
.card {
  background: var(--white-card);
  padding: 16px; 
  border-radius: 8px; 
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); 
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; 
  border: 1px solid transparent; 
}
.card img {
  width: 100%; 
  display: block;
  height: 250px; 
  object-fit: cover;
  border-radius: 6px; 
  margin-bottom: 12px; 
}
.price {
  color: var(--black-main);
  font-size: 18px; /
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1); 
  border-color: var(--black-main);
}

/* 9. WIDGET (SIDEBAR) */
.widget {
  background: var(--white-card);
  padding: 16px; 
  border-radius: 8px; 
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); 
  margin-bottom: 16px;
}
.widget p { color: var(--gray-text) }
.widget ul { list-style: none; }
.widget li { margin-bottom: 8px; }
.widget a {
  font-size: 16px; 
  transition: color 0.2s;
  color: var(--gray-text);
}
.widget a:hover { color: var(--black-main); }

/* 10. XỬ LÝ PADDING CHO STICKY HEADER */
section[id] {
  padding-top: 80px; 
}

/* 11. SECTION SẢN PHẨM (TRANG GỘP) */
#san-pham { padding: 36px 0 }
#san-pham > p { color: var(--gray-text); font-size: 16px; }
#san-pham > div:first-of-type {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  font-size: 16px;
}
#san-pham > div:first-of-type > div { color: var(--gray-text) }

/* Select box (Lưới/Danh sách) */
select {
  background: var(--white-card);
  color: var(--black-main);
  border: 1px solid var(--gray-border);
  padding: 8px;
  font-family: var(--font-body);
  font-size: 16px;
}
select:focus { outline: 1px solid var(--black-main); }

/* Chế độ xem danh sách */
#listView { display: none; margin-top: 18px }
#listView ol { padding-left: 18px }
#listView li { margin-bottom: 12px; font-size: 16px; }
#listView li small { color: var(--gray-text) }

/* 12. SECTION ĐĂNG KÝ */
#dang-ky { padding: 36px 0 }

/* Bố cục 2 cột */
.forms-container {
  display: flex;
  flex-wrap: wrap; 
  gap: 28px; 
  margin-bottom: 36px;
  align-items: stretch; 
}

.form-column {
  flex: 1; 
  min-width: 400px;
  display: flex;
  flex-direction: column;
}

.form-column h2 {
  font-size: 32px;
  margin-bottom: 16px;
}

.form-column form[method="post"],
.form-column h2 + div {
  flex: 1; 
  background: var(--white-card);
  border: 1px solid var(--gray-border);
  border-radius: 0;
}

/* --- Tinh chỉnh bên trong 2 "khung trắng" --- */

/* Cột 1: Bảng Đăng ký */
.form-column form[method="post"] {
  display: flex;
}
.form-column form[method="post"] table {
  width: 100%;
  height: 100%; 
}
.form-column form[method="post"] table td { padding: 12px; }
.form-column form[method="post"] table tr td:first-child {
  width: 160px;
  font-size: 16px;
  font-weight: 500;
}
.form-column form[method="post"] table textarea {
  min-height: 120px;
}


/* Cột 2: Form Bình luận */
.form-column h2 + div {
  padding: 12px;
  display: flex; 
  flex-direction: column;
}
.form-column h2 + div form {
  flex: 1; 
  display: flex;
  flex-direction: column;
}
.form-column h2 + div form label {
  display: block;
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 6px;
}
.form-column h2 + div form label:nth-of-type(2) { margin-top: 12px }
.form-column h2 + div form textarea {
  flex: 1; 
  min-height: 100px; 
}
.form-column h2 + div form div { margin-top: 10px } 


/* Style chung cho input/button */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--gray-border);
  border-radius: 6;
  background: var(--white-card);
  color: var(--black-main);
  font-family: var(--font-body);
  font-size: 16px;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--black-main);
}
button[type="submit"] {
  padding: 10px 16px;
  background: var(--black-main);
  color: var(--white-card);
  border-radius: 6;
  border: none;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  text-transform: none;
  cursor: pointer;
  transition: background 0.2s;
  align-self: flex-start;
}
button[type="submit"]:hover { background: #333; }

/* Bảng giỏ hàng */
#dang-ky > h3 { 
  margin-top: 24px; 
}
#dang-ky > h3 + table {
  width: 100%;
  max-width: 900px;
  border-collapse: collapse;
  background: var(--white-card);
  border: 1px solid var(--gray-border);
  border-radius: 0;
  overflow: hidden;
  font-size: 16px;
}
#dang-ky > h3 + table thead,
#dang-ky > h3 + table tfoot {
  background: #f9f9f9; 
}
#dang-ky > h3 + table th,
#dang-ky > h3 + table td {
  padding: 10px;
  text-align: left;
}
#dang-ky > h3 + table tfoot td { font-family: var(--font-body); font-weight: 500; }

/* 13. SECTION HOẠT ĐỘNG (VIDEO) */
#hoat-dong { padding: 36px 0 }
#hoat-dong > p:first-of-type { color: var(--gray-text); font-size: 16px; }
#hoat-dong > div:first-of-type  {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 8;
  margin-bottom: 18px;
  border: none;
}
#hoat-dong > div:first-of-type iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
#hoat-dong ul li a { font-size: 16px; color: var(--gray-text); }
#hoat-dong ul li a:hover { color: var(--black-main); }

/* 14. FOOTER */
.site-footer {
  background: var(--white-card);
  border-top: 2px solid var(--black-main);
  margin-top: 32px;
  padding-top: 36px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr 1.2fr;
  gap: 24px;
  padding-bottom: 24px;
}
.footer-column h4 {
  font-size: 18px;
  margin-bottom: 16px;
  font-weight: 700; 
  text-transform: uppercase; 
  color: var(--black-main);
  font-family: var(--font-body); 
  letter-spacing: 0.5px;
}
.footer-column ul { list-style: none; }
.footer-column li { margin-bottom: 10px; }
.footer-column a,
.footer-column p,
.footer-column small {
  color: var(--gray-text);
  font-size: 15px; 
  line-height: 1.6;
}
.footer-column p { margin-bottom: 10px; }
.footer-column a:hover { color: var(--black-main); text-decoration: none; }
.bocongthuong-img { 
  display: block; 
  max-width: 150px; 
  height: auto;
  margin-top: 12px;
}

/* Icon social ở footer */
.footer-social { display: flex; gap: 8px; }
.footer-social a {
  display: inline-block;
  width: 32px; 
  height: 32px; 
  line-height: 32px; 
  text-align: center; 
  font-size: 14px; 
  color: var(--white-card); 
  background: var(--black-main); 
  border: 1px solid var(--black-main);
  border-radius: 0;
  transition: all 0.2s ease; 
}
.footer-social a:hover {
  background: #333; 
  color: var(--white-card);
  border-color: #333;
}
.footer-column p i.fas {
  margin-right: 8px;
  width: 16px; 
  text-align: center;
  color: var(--black-main); 
}

/* Các đường gạch ngang */
hr.footer-divider {
  border: 0;
  border-top: 1px solid var(--gray-border);
  margin: 12px 0; 
}
.footer-business-info { text-align: center; padding: 24px 0 12px 0; color: var(--gray-text); font-size: 14px; line-height: 1.6; }
.footer-business-info p { margin-bottom: 6px; }
.footer-business-info a { color: var(--gray-text); }
.footer-business-info a:hover { color: var(--black-main); }

/* Đáy footer */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--gray-text);
  font-size: 14px;
  padding: 18px 0;
}

/* 15. RESPONSIVE */
@media (max-width: 1000px) {

  .products-grid { grid-template-columns: repeat(2, 1fr) }
  .sidebar { 
    position: static; 
    width: 100%; 
  }
  .main-layout { flex-direction: column }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 560px) {
  .main-nav { display: none } 
  .header-right { gap: 8px; } 
  .search-input { width: 120px; } 
  .search-input:focus { width: 150px; }
  
  .brand-text h1 { font-size: 24px }
  .products-grid { grid-template-columns: 1fr }
  .logo { height: 44px }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-column { text-align: center; }
  .footer-column p i.fas { width: auto; margin-right: 6px; }
  .footer-social { justify-content: center; }
  .footer-bottom { flex-direction: column; gap: 12px; padding-top: 12px; }
}