/* ==================== Reset và cơ bản ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: sans-serif;
  background: #f4f4f8;
  color: #333;
  line-height: 1.5;
}
a {
  text-decoration: none;
  color: inherit;
}
button {
  cursor: pointer;
}

/* ==================== Header ==================== */
header {
  background: linear-gradient(90deg, #ff7f50, #ff4500);
  color: white;
}
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  flex-wrap: wrap;
}
.header-top h1 {
  margin: 0;
}
.header-contact {
  padding: 5px 20px;
  font-size: 14px;
  background: rgba(0,0,0,0.1);
}

/* ==================== User box ==================== */
.user-box a,
.user-box button {
  margin-left: 10px;
  padding: 6px 12px;
  border: none;
  border-radius: 5px;
  background: rgba(0,0,0,0.2);
  color: white;
  font-weight: bold;
  transition: 0.3s;
}
.user-box a:hover,
.user-box button:hover {
  background: rgba(0,0,0,0.4);
}

/* ==================== Slider ==================== */
.slider {
  position: relative;
  max-width: 1000px;
  margin: 20px auto;
  overflow: hidden;
  border-radius: 10px;
}
.slide {
  display: none;
  width: 100%;
  height: 300px;
  object-fit: cover;
}
.slide.active {
  display: block;
}
.prev, .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.4);
  color: white;
  border: none;
  font-size: 24px;
  padding: 10px 15px;
  border-radius: 50%;
  cursor: pointer;
  transition: 0.3s;
}
.prev:hover, .next:hover {
  background: rgba(0,0,0,0.7);
}
.prev { left: 10px; }
.next { right: 10px; }

/* ==================== Main products ==================== */
main {
  padding: 20px;
}
.products {
  margin-bottom: 40px;
}
.products h2 {
  color: #ff4500;
  margin-bottom: 15px;
}
.product-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}
.product {
  background: white;
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: 0.3s;
}
.product:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}
.product img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 5px;
}
.product h3 {
  margin: 10px 0 5px;
}
.product p {
  color: #ff4500;
  font-weight: bold;
}
.product button {
  background: #ff4500;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 5px;
  transition: 0.3s;
}
.product button:hover {
  background: #ff7f50;
}

/* ==================== Giỏ hàng popup ==================== */
.cart-popup {
  display: none;
  position: fixed;
  top: 50px;
  right: 20px;
  width: 250px;
  background: white;
  border: 1px solid #ccc;
  border-radius: 10px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  padding: 15px;
  z-index: 100;
}
.cart-popup ul {
  list-style: none;
  padding-left: 0;
  max-height: 200px;
  overflow-y: auto;
}
.cart-popup button {
  margin-top: 10px;
  background: #ff4500;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 5px;
}

/* ==================== Footer ==================== */
footer {
  background: linear-gradient(90deg, #ff7f50, #ff4500);
  color: white;
  text-align: center;
  padding: 15px;
  font-weight: bold;
}

/* ==================== Card login/signup ==================== */
.auth-card {
  width: 300px;
  margin: 50px auto;
  background: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  text-align: center;
}
.auth-card input {
  width: 90%;
  padding: 8px;
  margin-bottom: 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
}
.auth-card button {
  width: 95%;
  padding: 8px;
  border: none;
  border-radius: 5px;
  background: #ff4500;
  color: white;
  font-weight: bold;
  transition: 0.3s;
}
.auth-card button:hover {
  background: #ff7f50;
}