/* 
   T&D SUPERMARKET PTY LTD - Main Stylesheet
   Thiết kế hiện đại, sạch sẽ, tối ưu responsive và tốc độ tải trang.
   Ngôn ngữ comment: Tiếng Việt
*/

/* 1. ĐỊNH NGHĨA BIẾN & TOKEN THIẾT KẾ (DESIGN SYSTEM) */
:root {
  --primary-color: #1b4332;       /* Xanh lá cây đậm (Forest Green) - Màu chủ đạo */
  --primary-hover: #2d6a4f;       /* Xanh lá sáng hơn khi hover */
  --primary-light: #d8f3dc;       /* Xanh lá nhạt cho nền phụ */
  --accent-color: #f59e0b;        /* Vàng hổ phách (Amber/Gold) - Màu nhấn */
  --accent-hover: #d97706;        /* Vàng sẫm khi hover */
  --text-dark: #1f2937;           /* Chữ màu xám đậm gần đen */
  --text-muted: #6b7280;          /* Chữ màu xám nhạt cho mô tả phụ */
  --bg-light: #f9fafb;            /* Nền sáng nhẹ */
  --bg-white: #ffffff;            /* Nền trắng tinh */
  --border-color: #e5e7eb;        /* Viền xám nhạt */
  --font-sans: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --max-width: 1200px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --border-radius: 12px;
}

/* 2. THIẾT LẬP BAN ĐẦU (RESET & BASE STYLES) */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--text-dark);
  background-color: var(--bg-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

ul {
  list-style: none;
}

/* 3. BỐ CỤC CHUNG (LAYOUT UTILITIES) */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-bg {
  background-color: var(--bg-light);
}

.section-title-wrapper {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background-color: var(--accent-color);
  border-radius: 2px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* 4. NÚT & KÊU GỌI HÀNH ĐỘNG (BUTTONS) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.8rem;
  font-weight: 600;
  border-radius: var(--border-radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.95rem;
  text-align: center;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--bg-white);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-accent {
  background-color: var(--accent-color);
  color: var(--text-dark);
}

.btn-accent:hover {
  background-color: var(--accent-hover);
  color: var(--bg-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: var(--bg-white);
  transform: translateY(-2px);
}

.btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* 5. PHẦN ĐẦU TRANG (HEADER / NAVIGATION) */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  font-size: 1.8rem;
  color: var(--primary-color);
}

.logo-text {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-color);
  letter-spacing: -0.5px;
}

.logo-text span {
  color: var(--accent-color);
}

.nav-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  font-weight: 500;
  color: var(--text-dark);
  position: relative;
  padding: 0.5rem 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-color);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary-color);
  cursor: pointer;
}

/* 6. PHẦN NGƯỜI HÙNG (HERO SECTION) */
.hero {
  position: relative;
  background-color: var(--primary-color);
  color: var(--bg-white);
  padding: 8rem 0 6rem;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(27,67,50,0.95) 0%, rgba(45,106,79,0.7) 100%);
  z-index: 1;
}

.hero-pattern {
  position: absolute;
  top: 0;
  right: 0;
  opacity: 0.1;
  width: 50%;
  height: 100%;
  background-image: radial-gradient(var(--accent-color) 2px, transparent 2px);
  background-size: 30px 30px;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  max-width: 650px;
}

.hero-badge {
  display: inline-block;
  background-color: rgba(245, 158, 11, 0.2);
  color: var(--accent-color);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.hero h1 {
  font-size: 3.5rem;
  line-height: 1.15;
  font-weight: 800;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.hero h1 span {
  color: var(--accent-color);
}

.hero-desc {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2.5rem;
}

.hero-image-wrapper {
  position: relative;
}

/* 7. THIẾT KẾ PLACEHOLDER CHO HÌNH ẢNH THIẾU */
.placeholder-image {
  background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
  border-radius: var(--border-radius);
  aspect-ratio: 4/3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border: 2px dashed #9ca3af;
  padding: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.placeholder-image::before {
  content: 'TODO';
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #ef4444;
  color: white;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 4px;
}

.placeholder-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #9ca3af;
}

.placeholder-text {
  font-size: 0.85rem;
  font-weight: 500;
  color: #4b5563;
}

/* 8. CARDS & GRID COMPONENTS */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
  align-items: center;
}

/* Card sản phẩm nổi bật */
.product-card {
  background-color: var(--bg-white);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(27,67,50,0.2);
}

.product-image {
  position: relative;
}

.product-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background-color: var(--primary-color);
  color: white;
  padding: 0.3rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 50px;
  z-index: 10;
}

.product-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.product-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.product-footer {
  border-top: 1px solid var(--border-color);
  padding: 1rem 0 0;
  margin-top: auto;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-dark);
}

.product-meta span strong {
  color: var(--primary-color);
}

/* 9. THÔNG TIN PHÁP LÝ (INFO BLOCK) */
.info-block {
  background-color: var(--primary-light);
  border-left: 4px solid var(--primary-color);
  padding: 1.5rem;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  margin-bottom: 1.5rem;
}

.info-block-title {
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.info-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.info-item {
  font-size: 0.9rem;
}

.info-item strong {
  color: var(--primary-color);
}

/* 10. CHỨNG CHỈ VÀ THÔNG SỐ (METRIC COMPONENT) */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.metric-card {
  background-color: var(--bg-white);
  padding: 2.5rem 1.5rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.metric-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  line-height: 1;
}

.metric-label {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* 11. THIẾT KẾ CÁC KHỐI ĐẶC TRƯNG TRÊN CÁC TRANG CON */
/* Import & Wholesale Page */
.wholesale-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.feature-item {
  display: flex;
  gap: 1rem;
}

.feature-icon {
  font-size: 1.5rem;
  color: var(--accent-color);
  flex-shrink: 0;
}

.feature-text h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
}

.feature-text p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* 12. PHẦN LIÊN HỆ & BẢN ĐỒ (CONTACT AREA) */
.contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 4rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-info-item {
  display: flex;
  gap: 1rem;
}

.contact-info-icon {
  font-size: 1.5rem;
  color: var(--primary-color);
  background-color: var(--primary-light);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-info-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.contact-info-content p, .contact-info-content a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Form */
.contact-form {
  background-color: var(--bg-light);
  padding: 3rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: var(--transition);
  background-color: var(--bg-white);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(27, 67, 50, 0.1);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* Honeypot Spam Prevention */
.hidden-field {
  display: none !important;
  visibility: hidden !important;
}

/* 13. CHÂN TRANG (FOOTER) */
.footer {
  background-color: #0f261c;
  color: rgba(255, 255, 255, 0.8);
  padding: 5rem 0 2rem;
  font-size: 0.95rem;
  border-top: 4px solid var(--accent-color);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-brand h2 {
  color: var(--bg-white);
  margin-bottom: 1rem;
}

.footer-brand p {
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-title {
  color: var(--bg-white);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 30px;
  height: 2px;
  background-color: var(--accent-color);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a:hover {
  color: var(--accent-color);
  transform: translateX(3px);
}

.footer-legal-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.85rem;
  background-color: rgba(255, 255, 255, 0.05);
  padding: 1rem;
  border-radius: 8px;
}

.footer-legal-info span strong {
  color: var(--accent-color);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* 14. RESPONSIVE MEDIA QUERIES */

/* Màn hình nhỏ (Dưới 1024px - Tablets) */
@media (max-width: 1024px) {
  html {
    font-size: 15px;
  }
  
  .hero .container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .hero-image-wrapper {
    order: -1;
    max-width: 500px;
    margin: 0 auto;
  }
  
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .wholesale-features {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* Màn hình Mobile (Dưới 768px) */
@media (max-width: 768px) {
  .section {
    padding: 3.5rem 0;
  }
  
  .nav-toggle {
    display: block;
  }
  
  .nav-menu {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background-color: var(--bg-white);
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem;
    gap: 1.5rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    z-index: 99;
  }
  
  .nav-menu.open {
    left: 0;
  }
  
  .nav-link {
    width: 100%;
    font-size: 1.2rem;
  }
  
  .grid-3, .grid-2, .metric-grid, .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .contact-form {
    padding: 1.5rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}
