/* Reset cơ bản */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #2c3e50;
  background: #f8fafc;
}



/* Header */
.main-header {
  background: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 12px 0;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo img {
  height: 90px;
  width: auto;
  object-fit: contain;
}

.main-nav > ul {
  display: flex;
  list-style: none;
  gap: 14px;
}

.main-nav li {
  position: relative;
}

.main-nav a {
  text-decoration: none;
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  background: #2ecc71;
  padding: 10px 14px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: 0.25s;
}

.main-nav a:hover {
  background: #ff69b4;
  color: white;
}

/* Dropdown */
.dropdown-content {
  display: none !important;
  position: absolute;
  top: 110%;
  left: 0;
  background: white;
  min-width: 220px;
  border-radius: 8px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
  padding: 10px 0;
  z-index: 20;
  flex-direction: column;
  list-style: none;
}

.dropdown:hover > .dropdown-content {
  display: flex !important;
}

.dropdown-content li a {
  background: white;
  color: #333;
  padding: 10px 16px;
  display: block;
  text-decoration: none;
}

.dropdown-content li a:hover {
  background: #ff69b4;
  color: white;
}

/* Icons */
.header-icons {
  display: flex;
  gap: 20px;
}

.header-icons .icon {
  color: #455a64;
  font-size: 1.3rem;
  transition: 0.25s;
}

.header-icons .icon:hover {
  color: #ef5350;
}

/* ================= CAROUSEL ================= */
.hero-carousel {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-height: 600px;
  margin: 0 !important;
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.carousel-container,
.carousel-track,
.carousel-slide {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

.carousel-track {
  display: flex;
  transition: transform 0.8s ease;
}

.slide-img {
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  object-position: center;
  display: block;
  margin: 0;
}

/* Nút prev/next - nằm sát cạnh, trong suốt nhẹ */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.4);
  color: white;
  border: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  font-size: 1.8rem;
  cursor: pointer;
  z-index: 10;
  transition: background 0.3s;
}

.carousel-btn.prev { left: 30px; }
.carousel-btn.next { right: 30px; }

.carousel-btn:hover {
  background: rgba(0,0,0,0.7);
}

/* Responsive - điều chỉnh chiều cao trên mobile */
@media (max-width: 992px) {
  .hero-carousel {
    height: 70vh;
    min-height: 500px;
  }
}

@media (max-width: 768px) {
  .hero-carousel {
    height: 60vh;
    min-height: 420px;
  }

  .carousel-btn {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }

  .carousel-btn.prev { left: 15px; }
  .carousel-btn.next { right: 15px; }
}

@media (max-width: 480px) {
  .hero-carousel {
    height: 50vh;
    min-height: 350px;
  }
}
/* ================= FOOTER ================= */
/* Footer chung - full width, nền xanh nhạt */
.site-footer {
  width: 100%;
  background: #e8f5e9;
  padding: 60px 0 40px;
  margin-top: 60px;
  color: #2e7d32;
}
.footer-full-bg {
  width: 100%;
}
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px;
  box-sizing: border-box;
}

/* 4 cột ngang đều: 3 cột chữ + bản đồ vuông nhỏ bên cạnh cột Hỗ trợ khách hàng */
.footer-columns-row {
  display: flex;
  flex-wrap: nowrap; /* Buộc nằm ngang, không xuống dòng */
  gap: 20px;
  margin-bottom: 40px;
}

.footer-column {
  flex: 1; /* 3 cột chữ chia đều */
  min-width: 0;
  text-align: left;
}

.footer-column h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: #2e7d32;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column ul li {
  margin: 8px 0;
}

.footer-column ul li a {
  color: #2e7d32;
  text-decoration: none;
}

.footer-column ul li a:hover {
  text-decoration: underline;
  color: #e91e63;
  transform: scale(1.15);

}

/* Cột bản đồ vuông nhỏ, nằm ngang bên cạnh cột Hỗ trợ khách hàng */
.footer-map-column {
  flex: 0 0 200px; /* cố định rộng 200px để vuông nhỏ */
}

.footer-map-small {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.footer-map-small iframe {
  width: 200px;
  height: 200px; /* vuông */
  border: none;
}

/* Icon mạng xã hội - to, chính giữa */
.footer-social .social-icons {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 0 auto 10px;
}

.footer-social .social-icons a {
  font-size: 2rem;
  color: #2e7d32;
  transition: color 0.3s, transform 0.3s;
}

.footer-social .social-icons a:hover {
  color: #e91e63;
  transform: scale(1.15);
}

/* Copyright nhỏ, chính giữa */
.footer-copyright {
  font-size: 0.85rem;
  color: #666;
  margin-top: 10px;
  text-align: center;
}

/* Responsive: trên mobile (dưới 992px) xếp dọc */
@media (max-width: 768px) {

  .footer-columns-row {
    flex-direction: column;
    text-align: center;
  }

  .footer-map-column {
    margin: 0 auto;
  }

  .footer-map-small iframe {
    width: 100%;
    height: 200px;
  }

  .footer-social .social-icons {
    gap: 40px;
  }
  .footer-social .social-icons a {
    font-size: 2.8rem;
  }
}


/* ================= AUTH MODAL ================= */
/* Custom Modal chuẩn mẫu */
/* Sửa modal để giống  */
.auth-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.9);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.auth-panel {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    max-width: 400px;
    text-align: center;
}

.auth-title {
    color: #8b4513;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.auth-subtitle {
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.recaptcha-note {
    font-size: 0.8rem;
    color: #666;
    margin: 10px 0;
}

.btn-submit {
    background: #8b4513;
    color: white;
    border: none;
    padding: 12px;
    width: 100%;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.forgot-pwd {
    display: block;
    margin: 10px 0;
    color: #8b4513;
    text-decoration: none;
}

.new-user {
    margin-top: 20px;
    font-size: 0.9rem;
}

.create-account {
    color: #8b4513;
    font-weight: bold;
}

/* Style cho trang đăng ký  */
.register-section {
    padding: 60px 0;
    background: #f8f8f8;
}

.register-methods {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.method-btn {
    background: #ddd;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
}

.method-btn.email {
    background: #8b4513;
    color: white;
}

.gender-options {
    display: flex;
    gap: 20px;
}

.existing-user {
    margin-top: 20px;
    text-align: center;
}

.auth-modal {
  display: none;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(0, 0, 0, 0.6) !important;
  z-index: 99999 !important;
  justify-content: center !important;
  align-items: center !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.auth-panel {
  background: white !important;
  padding: 40px !important;
  border-radius: 12px !important;
  max-width: 450px !important;
  width: 90% !important;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5) !important;
}

.auth-panel h2 {
  color: #2e7d32;
  margin-bottom: 10px;
}

.login-method {
  margin: 20px 0;
}

.login-method label {
  margin: 0 15px;
}

.auth-panel input {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.btn-submit {
  background: #2e7d32;
  color: white;
  border: none;
  padding: 14px;
  width: 100%;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  margin: 15px 0;
}

.auth-links p {
  margin: 10px 0;
}

.auth-links a {
  color: #2e7d32;
  text-decoration: none;
  font-weight: bold;
}

.recaptcha-note {
  font-size: 0.85rem;
  color: #666;
  margin: 15px 0;
}

/* Trang đăng ký */
.register-container {
  padding: 60px 20px;
  background: #f8fafc;
  min-height: 100vh;
}

.register-panel {
  background: white;
  padding: 40px;
  border-radius: 12px;
  max-width: 500px;
  margin: 0 auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.register-panel h2 {
  color: #368a80;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.social-divider {
  margin: 25px 0;
  text-align: center;
  position: relative;
}

.social-divider span {
  background: white;
  padding: 0 15px;
  color: #666;
}

.social-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-bottom: 25px;
}

.social-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: white;
}

.facebook { background: #3b5998; }
.google { background: #db4437; }

.auth-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.btn-back, .btn-home {
  padding: 12px 25px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-back { background: #368a80; color: white; border: none; }
.btn-home { background: white; color: #368a80; border: 1px solid #368a80; }
.auth-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 99999;
  justify-content: center;
  align-items: center;
}

.auth-panel {
  background: white;
  padding: 40px;
  border-radius: 12px;
  max-width: 450px;
  width: 90%;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  position: relative;
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
}

.form-group {
  margin-bottom: 15px;
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
}

.btn-submit {
  background: #2e7d32;
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  width: 100%;
  margin-top: 10px;
}
/* =============================================
   ICON GIỎ HÀNG + POPUP - SỐ LƯỢNG XANH LÁ, POPUP CHỈ KHI CLICK
   ============================================= */

.header-icons {
  display: flex;
  align-items: center;
  gap: 25px;
}

/* ICON GIỎ HÀNG & POPUP */
.cart-icon-wrapper {
  position: relative;
}

.cart-icon {
  font-size: 1.6rem;
  color: #333;
  position: relative;
}

.cart-count {
  position: absolute;
  top: -10px;
  right: -10px;
  background: #2e7d32;
  color: white;
  font-size: 0.75rem;
  font-weight: bold;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.cart-popup {
  position: absolute;
  top: 140%;
  right: 0;
  width: 380px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.cart-popup.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cart-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
  background: #f8f8f8;
}

.cart-popup-header h3 {
  margin: 0;
  font-size: 1.3rem;
}

.cart-close {
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #999;
}

.cart-close:hover {
  color: #e91e63;
}

.cart-popup-body {
  max-height: 300px;
  overflow-y: auto;
  padding: 15px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.cart-item-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
}

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-size: 1rem;
  margin: 0 0 5px;
}

.cart-item-price {
  font-size: 0.95rem;
  color: #e91e63;
  font-weight: 600;
}

.cart-item-remove {
  background: none;
  border: none;
  color: #999;
  font-size: 1.2rem;
  cursor: pointer;
}

.cart-item-remove:hover {
  color: #e91e63;
}

.empty-cart {
  text-align: center;
  color: #999;
  padding: 30px 0;
  margin: 0;
}

.cart-popup-footer {
  padding: 20px;
  border-top: 1px solid #eee;
  background: #f8f8f8;
}
.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: #d32f2f; /* Màu đỏ đậm */
}

.cart-total span:first-child {
  color: #333; /* Giữ chữ "TỔNG TIỀN:" màu tối */
}

.cart-total span:last-child {
  color: #d32f2f; /* Số tiền đỏ */
}

/* Nút THANH TOÁN */
.btn-checkout {
  display: block;
  width: 100%;
  padding: 14px;
  background: #2e7d32; /* Xanh lá ban đầu */
  color: white;
  text-align: center;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-checkout:hover,
.btn-checkout:active,
.btn-checkout:focus {
  background: #e91e63; /* Chuyển hồng khi hover/click */
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(233, 30, 99, 0.3);
}

/* Làm cho chỉ hình ảnh + tên sản phẩm mới là link chuyển trang */
.product-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Nút thêm giỏ hàng nằm ngoài thẻ <a> → click không chuyển trang */
.add-to-cart-btn {
  position: relative;
  z-index: 10; /* Đảm bảo nút ở trên cùng */
}
/* ================= MOBILE HEADER ================= */
@media (max-width: 768px) {

  .container {
    flex-wrap: nowrap;
  }

  .logo img {
    height: 60px;
  }

  /* Ẩn menu mặc định */
  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 260px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 20px rgba(0,0,0,0.2);
    transition: 0.3s;
    padding: 80px 20px;
    z-index: 9999;
  }

  .main-nav.active {
    right: 0;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 15px;
  }

  .main-nav a {
    background: none;
    color: #333;
    font-size: 1rem;
    padding: 10px;
  }

  /* Nút menu (hamburger) */
  .menu-toggle {
    font-size: 1.6rem;
    cursor: pointer;
    display: block;
  }

  .header-icons {
    gap: 15px;
  }
}
.search-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.search-modal-content {
    background: white;
    width: 90%;
    max-width: 700px;
    border-radius: 12px;
    padding: 25px;
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
}
.search-close {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 28px;
    background: none;
    border: none;
    cursor: pointer;
}
.product-grid-modal {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.no-result-modal {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}