@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #f8fafc;
  color: #334155;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  background-color: #1e293b;
  color: white;
  padding: 15px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.logo img {
  height: 50px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  color: white;
  font-weight: bold;
  padding: 6px 10px;
  transition: background 0.3s, border-radius 0.3s;
}

nav a:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
}

/* Banner */
.banner {
  position: relative;
  height: 300px;
  overflow: hidden;
}

.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;     /* 其他风景横幅仍然铺满 */
}

.banner-text {
  position: absolute;
  bottom: 30px;
  left: 30px;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 20px 25px;
  color: white;
  border-radius: 8px;
  max-width: 60%;
}

.banner-text h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

/* Highlights Section */
.highlights {
  padding: 60px 20px;
  text-align: center;
  background-color: #ffffff;
}

.highlights h2 {
  margin-bottom: 40px;
  font-size: 2rem;
  color: #333;
}

.product-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
}

.product-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background-color: white;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.product-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.product-card h3 {
  margin: 0.5rem 0;
  text-align: center;
}

.product-card p {
  color: #2c3e50;
  font-weight: bold;
  margin: 0.5rem 0;
}

.product-card button {
  width: 100%;
  padding: 0.75rem;
  background-color: #f59e0b; /* Amber */
  color: white;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 1rem;
  transition: background-color 0.2s;
}

.product-card button:hover {
  background-color: #d97706;
}

/* Footer */
footer {
  background-color: #f8fafc;
  color: #334155;
  margin-top: 60px;
  border-top: 1px solid #e2e8f0;
}

main {
  flex: 1 0 auto;
}

.footer-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 50px 30px;
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
}

.footer-brand {
  flex: 1.5;
  min-width: 220px;
}

.footer-brand h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 14px;
  line-height: 1.4;
}

.footer-brand p {
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.7;
  margin-bottom: 10px;
}

.footer-col {
  flex: 1;
  min-width: 140px;
}

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  font-size: 0.88rem;
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-col ul li a:hover {
  color: #f59e0b;
}

.footer-bottom {
  border-top: 1px solid #e2e8f0;
  text-align: center;
  padding: 18px 30px;
  font-size: 0.82rem;
  color: #94a3b8;
}

footer a {
  color: #64748b;
  text-decoration: none;
}

footer a:hover {
  color: #f59e0b;
}

/* Responsive Design */
@media (max-width: 768px) {
  .banner-text {
    max-width: 90%;
    font-size: 1rem;
  }

  nav ul {
    flex-direction: column;
    align-items: flex-start;
  }

  header {
    flex-direction: column;
    align-items: flex-start;
  }

  .product-grid {
    flex-direction: column;
    align-items: center;
  }
}

/* Cart Styles */
.cart-section {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.cart-section h1 {
  text-align: center;
  margin-bottom: 2rem;
}

#cart-items {
  margin-bottom: 2rem;
}

.cart-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #ddd;
  gap: 1rem;
}

.cart-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
}

.cart-item-details {
  flex: 1;
}

.cart-item-price {
  font-weight: bold;
  color: #2c3e50;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-summary {
  background-color: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 2rem;
}

.cart-summary .total {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

#checkout-btn {
  width: 100%;
  padding: 1rem;
  background-color: #f59e0b;
  font-weight: 600;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  transition: background-color 0.2s;
}

#checkout-btn:hover {
  background-color: #d97706;
}

/* Quantity Selector Styles */
.quantity-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.quantity-btn {
  width: 30px;
  height: 30px;
  border: 1px solid #ddd;
  background-color: #f8f9fa;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantity-btn:hover {
  background-color: #e9ecef;
}

.quantity-selector input {
  width: 50px;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0.25rem;
}

.empty-cart {
    text-align: center;
    padding: 2rem;
    font-size: 1.2rem;
    color: #666;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin: 1rem 0;
}


.remove-btn, .cart-item button {
  background-color: #e74c3c;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.5rem 1.2rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
  margin-left: 0.5rem;
}
.remove-btn:hover, .cart-item button:hover {
  background-color: #c0392b;
  color: #fff;
}

/* Product Detail Page Styles */
.product-detail-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.product-image-container {
  flex: 1;
  min-width: 300px;
}

.product-image-container img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
  object-fit: cover;
}

.product-info-container {
  flex: 1;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.product-category-tag {
  color: #f59e0b;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.product-title {
  font-size: 2.5rem;
  color: #1e293b;
  margin-bottom: 15px;
}

.product-price {
  font-size: 2rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 20px;
}

.product-description {
  font-size: 1.1rem;
  color: #64748b;
  line-height: 1.8;
  margin-bottom: 30px;
}

.product-action {
  display: flex;
  gap: 20px;
  align-items: center;
}

.product-action .quantity-selector {
  margin: 0;
  padding: 5px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: white;
}

.product-action .quantity-btn {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  width: 35px;
  height: 35px;
  cursor: pointer;
  color: #334155;
}

.product-action .quantity-btn:hover {
  background: #f1f5f9;
  border-radius: 4px;
}

.product-action input {
  border: none;
  font-size: 1.1rem;
  font-weight: 600;
  width: 40px;
  background: transparent;
  color: #334155;
}

.add-to-cart-btn {
  flex: 1;
  padding: 15px 30px;
  background-color: #f59e0b;
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(245, 158, 11, 0.2);
}

.add-to-cart-btn:hover {
  background-color: #d97706;
  box-shadow: 0 6px 12px rgba(245, 158, 11, 0.3);
  transform: translateY(-2px);
}
