* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Roboto", sans-serif;
  }

body {
    width: 100%;
    min-height: 100vh;
    background-color: #ffffff;
  }
  
  .container {
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
    align-items: center;
  }
  
  .header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 0;
    background-color: #ffffff;
    width: 100%;
    position: sticky;
    z-index: 1000;
    top: 0;
  }
  
  .hamburger {
      display: none;
      cursor: pointer;
  }
  
  
  .logo {
    font-family: "Pacifico", serif;
    font-size: 1.8rem;
    color: #4a7c59;
    text-decoration: none;
    display: flex;
    align-items: center;
  }
  
  .imglogo {
    width: 50px;
    height: 50px;
    margin-right: 0.5rem;
    border-radius: 100%;
  }
  
  .nav {
    display: flex;
    list-style: none;
  }
  
  .nav.show-menu {
      display: flex; /* Khi có class show-menu, thì hiện menu ra */
      flex-direction: column;
      background-color: white;
      position: absolute;
      top: 60px;
      left: 0;
      width: 100%;
      z-index: 100;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
  .nav-item {
    margin: 0 1rem;
  }
  
  .nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
  }
  
  .nav-link:hover {
    color: #4a7c59;
  }
  
  .nav-link:after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    background-color: #4a7c59;
    bottom: 0;
    left: 0;
    transition: width 0.3s;
  }
  
  .nav-link:hover:after {
    width: 100%;
  }
  
  .search-cart {
    display: flex;
    align-items: center;
  }
  
  .search-form {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    margin-right: 1rem;
  }
  
  .search-input {
    border: none;
    padding: 0.5rem;
    outline: none;
    width: 180px;
  }
  
  .search-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .cart-btn {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    margin-right: 1rem;
  }
  
  .user-account {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  /* Nền mờ toàn màn hình */
.popup-form {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.5);
  z-index: 999;
  justify-content: center;
  align-items: center;
}

/* Nội dung popup */
.popup-content {
  display: flex;
  width: 700px;
  background: #fff;
  box-shadow: 0 0 15px rgba(0,0,0,0.3);
  border-radius: 8px;
  overflow: hidden;
}

/* Bên trái - đăng ký */
.popup-left {
  width: 50%;
  background: #7c8ca1;
  color: white;
  padding: 30px;
  text-align: center;
}

.popup-left h2 {
  margin-bottom: 10px;
}
.popup-left p {
  margin-bottom: 20px;
}
.btn-register {
  padding: 10px 20px;
  border: 1px solid white;
  background: transparent;
  color: white;
  cursor: pointer;
}

/* Bên phải - login */
.popup-right {
  width: 50%;
  padding: 30px;
}

.popup-right form {
  display: flex;
  flex-direction: column;
}

.popup-right input[type="text"],
.popup-right input[type="password"] {
  margin-bottom: 15px;
  padding: 10px;
  border: 1px solid #ccc;
}

.checkbox {
  margin-bottom: 15px;
}

.btn-login {
  padding: 10px;
  background-color: #153d2e;
  color: white;
  border: none;
  cursor: pointer;
}

.hero {
  position: relative;
  width: 100%;
  height: 190px;
  margin-bottom: 18px;
  overflow: hidden;
}
.hero-bg {
  width: 100vw;
  height: 190px;
  object-fit: cover;
  display: block;
  filter: brightness(.76);
}
.hero-overlay {
  position: absolute;
  left: 0;top:0;right:0;bottom:0;
  display: flex;flex-direction:column;align-items:center;justify-content:center;
  color: #fff;
  text-shadow: 0 3px 12px #0007;
  background: linear-gradient(0deg,rgba(53,80,50,.13),rgba(53,80,50,.13));
}
.hero-title {
  font-size: 2.04rem;
  font-weight: bold;
  margin-bottom: 9px;
  letter-spacing: 1px;
}
.breadcrumbs {
  margin-left: 50px;
  font-size: 1.01rem;
  font-weight: 500;
  color: #497770;
  margin-bottom: 6px;
}
.breadcrumbs a {
  color: #355032;
  text-decoration: none;
}
.breadcrumbs span {
  margin: 0 4px;
  color: #929690;
}
.main-section {
  display: flex;
  width: 100%;
  max-width: 1270px;
  margin: 0 auto 32px;
  min-height: 550px;
  gap: 36px;
  flex: 1;
}
.sidebar {
  min-width: 220px;
  background: #fff;
  border-radius: 10px;
  padding: 20px 25px;
  box-shadow: 0 2.5px 14px #b0bfa410;
  margin-top: 6px;
  font-size: 1.01rem;
}
.sidebar-title {
  font-size: 1.09rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: .02em;
  color: #355032;
  border-bottom: 1px solid #e5e5e5;
  padding-bottom: 4px;
}
.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-list li {
  margin-bottom: 11px;
}
.sidebar-list a {
  display: block;
  color: #444;
  text-decoration: none;
  border-left: 3px solid transparent;
  padding-left: 10px;
  padding-top: 3px;
  padding-bottom: 3px;
  border-radius: 2px;
  font-weight: 500;
  transition: color .16s, border-color .14s;
}
.sidebar-list a:hover {
  color: #355032;
  border-left: 3px solid #5fbb72;
  background: #f3faf4;
}
.grid-wrap {
  background: #fff;
  flex: 1;
  border-radius: 12px;
  padding: 19px 19px 32px 19px;
  box-shadow: 0 2.5px 14px #b0bfa410;
  margin-top: 6px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.grid-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.grid-header span {
  font-size: 1.04rem;
  color: #497770;
}
.sort-wrap {
  font-size: 0.96rem;
  color: #355032;
  font-weight: 500;
  margin-left: 10px;
}
.sort-wrap select {
  margin-left: 7px;
  border-radius: 4px;
  border: 1px solid #eee;
  padding: 2.5px 11px;
  font-family: inherit;
  font-size: 1em;
  color: #355032;
  background: #f7f7f7;
  outline: none;
  transition: border .13s;
}
.sort-wrap select:focus {
  border: 1px solid #5fbb72;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px 23px;
  align-items: stretch;
}
.product-card-link {
  text-decoration: none;
  color: inherit;
  display: inline-block;
}

.product-card {
  background: #fff;
  border-radius: 11px;
  box-shadow: 0 2.5px 14px #b0bfa410;
  padding: 8px 10px 15px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  min-height: 307px;
  height: 100%;
  transition: box-shadow 0.21s, transform 0.19s;
  justify-content: space-between;
}
.product-card:hover {
  box-shadow: 0 6px 22px #68a35524;
  transform: translateY(-2.5px) scale(1.012);
  z-index: 3;
}
.product-img-wrap {
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 9px;
  background: #fafaf8;
  border-radius: 8px;
}
.product-img-wrap img {
  width: 95%;
  height: 200px;
  object-fit: contain;
  border-radius: 9px;
  background: #fafaf8;
}
.sale-badge {
  position: absolute;
  top: 9px;
  left: 9px;
  background: #985d50;
  color: #fff;
  font-size: 0.93rem;
  font-weight: bold;
  padding: 3px 10px;
  border-radius: 6px;
  z-index: 2;
}
.prod-content {
  display: flex;
  flex-grow: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 2px 2px 0 2px;
  width: 100%;
  min-height: 76px;
  gap: 3px;
}
.prod-name {
  font-size: 1.06rem;
  font-weight: 600;
  color: #355032;
  margin-bottom: 1.5px;
  overflow: hidden;
  min-height: 39px;
  line-height: 1.2;
}
.prod-desc {
  font-size: 0.96rem;
  color: #6b6b6b;
  margin-bottom: 6px;
  min-height: 33px;
  overflow: hidden;
  line-height: 1.23;
}
.prod-price {
  font-size: 1.07rem;
  font-weight: 700;
  color: #399328;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.price-strike {
  text-decoration: line-through;
  color: #a6a6a6;
  font-size: .99em;
  margin-right: 5px;
}
.add-cart-btn {
  background: #5fbb72;
  color: #fff;
  border-radius: 6px;
  border: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 15px 5px 13px;
  font-size: 0.98rem;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.14s;
  margin-top: 0px;
  margin-right: auto;
}
.add-cart-btn img {
  width: 18px;
  height: 18px;
}
.add-cart-btn:hover {
  background: #399328;
}
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  margin-top: 33px;
}
.pag-btn {
  border: none;
  padding: 5px 13px;
  font-size: 1.04rem;
  background: #f3f2f0;
  color: #355032;
  border-radius: 7px;
  margin: 0 1px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.15s, color 0.16s;
}
.pag-btn:disabled {
  background: #ececec;
  color: #bbb;
  cursor: not-allowed;
}
.pag-btn:not(:disabled):hover {
  background: #399328;
  color: #fff;
}
.active-page {
  background: #355032;
  color: #fff;
  border-radius: 7px;
  font-weight: 700;
}
.footer {
    background-color: #4a7c59;
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
  }
  
  .footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  
  .footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 1.5rem;
    justify-items: center;
  }
  
  .footer-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
  }
  
  .footer-title:after {
    content: "";
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: white;
    bottom: 0;
    left: 0;
  }
  
  .footer-logo {
    font-family: "Pacifico", serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }
  
  .footer-desc {
    font-size: 0.9rem;
    margin: 0 27px ;
  }
  
  .signup-form {
    display: flex;
    margin-bottom: 1rem;
  }
  
  .signup-input {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: 4px 0 0 4px;
    outline: none;
  }
  
  .signup-btn {
    padding: 0.5rem 1rem;
    background-color: #5cb85c;
    border: none;
    border-radius: 0 4px 4px 0;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
  }
  
  .signup-btn:hover {
    background-color: #4cae4c;
  }
  
  .contact-info {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }
  
  .contact-info i {
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
  }
  
  .footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
  }
  .social-icons{
        text-align: center;
        padding: 0;
    }
    .social-icons li{
        display: inline-block;
        text-align: center;
        padding: 5px;
    }
    .social-icons i{
        color: white;
        font-size: 25px;
    }
@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .main-section { flex-direction: column; gap: 0; max-width: 100vw; }
  .sidebar { margin-bottom: 19px; min-width: unset; width: 100%; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .product-card{height: auto;}  
  .nav {
        display: none; /* Ẩn menu trên màn hình nhỏ */
        flex-direction: column;
        position: absolute;
        top: 60px; /* Đặt vị trí menu */
        left: 0;
        background-color: white;
        width: 100%;
        z-index: 1000;
    }

    .nav.active {
        display: flex; /* Hiện menu khi có class active */
    }
    .logo{
      display: none;
    }  
    .search-input{
      width: 80px;
    }
    .hamburger {
      position: absolute;
      left: 0px;
      width: 50px;
      height: 50px;
      z-index: 1000;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;    }
    .nav-item {
        padding: 10px 20px; /* Thêm khoảng cách cho các mục menu */
    }
    .nav-link {
        text-decoration: none;
        color: #333;
        font-weight: 500;
    }
}
