/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Helvetica Neue", Arial, sans-serif;
}

body {
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.5;
  margin: 0;
  padding: 0;
  width: 100vw; /* Full viewport width */
  height: 100vh; /* Full viewport height */
  overflow-x: hidden; /* Prevent horizontal scrollbar */
}

a {
  text-decoration: none;
  color: inherit;
}

/* Container */
.container {
  max-width: 100%;
  margin: 0 auto;
  background: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header Styles */
.header {
  position: sticky;
  top: 0;
  height: 70px;
  background-color: #c0f0ab;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  z-index: 100;
}

.header-title {
  font-size: 22px;
  font-weight: bold;
}

.header-nav {
  display: flex;
  align-items: center;
}

.header-nav a {
  color: white;
  margin-left: 25px;
  font-size: 16px;
  transition: opacity 0.3s;
}

.header-nav a:hover {
  opacity: 0.8;
}

.header-cart {
  font-size: 22px;
  margin-left: 25px;
  cursor: pointer;
}

/* Search Bar */
.search-bar {
  padding: 20px;
  background-color: #c0f0ab;
}

.search-box {
  max-width: 700px;
  margin: 0 auto;
  background-color: white;
  border-radius: 30px;
  height: 45px;
  display: flex;
  align-items: center;
  padding: 0 20px;
}

.search-box i {
  color: #999;
  margin-right: 10px;
}

.search-box input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 16px;
}

/* Main Content */
.main-content {
  display: flex;
  flex: 1;
}

/* Sidebar */
.sidebar {
  width: 220px;
  background: white;
  padding: 25px 0;
  border-right: 1px solid #eee;
}

.sidebar-item {
  padding: 12px 25px;
  cursor: pointer;
  transition: all 0.3s;
}

.sidebar-item:hover {
  color: #c0f0ab;
  background-color: #f0f9eb;
}

.sidebar-item.active {
  color: #c0f0ab;
  background-color: #f0f9eb;
  border-left: 3px solid #c0f0ab;
}

/* Content Area */
.content-area {
  flex: 1;
  padding: 25px;
}

/* Banner */
.banner {
  height: 350px;
  background-color: #eee;
  overflow: hidden;
  position: relative;
  margin-bottom: 25px;
  border-radius: 10px;
}

.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Category Navigation */
.category-nav {
  display: flex;
  padding: 20px 0;
  background: white;
  flex-wrap: wrap;
  justify-content: center;
}

.category-item {
  width: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 15px;
  cursor: pointer;
  transition: transform 0.3s;
}

.category-item:hover {
  transform: translateY(-5px);
}

.category-icon {
  width: 70px;
  height: 70px;
  background-color: #c0f0ab;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-bottom: 10px;
  font-size: 28px;
}

.category-name {
  font-size: 16px;
  color: #666;
  text-align: center;
}

/* Section Titles */
.section-title {
  padding: 20px 0;
  font-size: 20px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  margin-top: 15px;
}

.section-more {
  font-size: 16px;
  color: #999;
  font-weight: normal;
  cursor: pointer;
  transition: color 0.3s;
}

.section-more:hover {
  color: #c0f0ab;
}

/* Store List */
.store-list {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 30px;
  justify-content: space-between;
}

.store-item {
  background: white;
  margin-bottom: 25px;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  width: calc(25% - 20px);
  cursor: pointer;
  transition: all 0.3s;
}

.store-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.12);
}

.store-img {
  width: 100%;
  height: 180px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 15px;
}

.store-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.store-info {
  flex: 1;
}

.store-name {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
}

.store-distance {
  font-size: 14px;
  color: #999;
  font-weight: normal;
}

.store-rating {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.store-stars {
  color: #ffb800;
  margin-right: 8px;
}

.store-score {
  font-size: 14px;
  color: #666;
  margin-right: 15px;
}

.store-sales {
  font-size: 14px;
  color: #666;
}

.store-price {
  font-size: 16px;
  color: #ff6b00;
  margin-bottom: 10px;
  font-weight: bold;
}

.store-tags {
  display: flex;
  flex-wrap: wrap;
}

.store-tag {
  font-size: 14px;
  color: #c0f0ab;
  border: 1px solid #c0f0ab;
  border-radius: 4px;
  padding: 4px 8px;
  margin-right: 8px;
  margin-bottom: 8px;
}

/* Modal Styles */
.recommend-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  display: none;
}

.modal-content {
  background: white;
  width: 90%;
  max-width: 500px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-header {
  padding: 20px;
  text-align: center;
  font-weight: bold;
  font-size: 20px;
  border-bottom: 1px solid #eee;
}

.modal-body {
  padding: 20px;
}

.goal-item {
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.goal-item:hover {
  background-color: #f5f5f5;
}

.goal-item span:last-child {
  color: #999;
}

.modal-footer {
  padding: 20px;
  display: flex;
  justify-content: flex-end;
}

.modal-btn {
  padding: 10px 20px;
  border-radius: 6px;
  border: none;
  font-size: 16px;
  cursor: pointer;
  margin-left: 15px;
  transition: opacity 0.3s;
}

.modal-btn:hover {
  opacity: 0.9;
}

.btn-cancel {
  background: #f5f5f5;
  color: #666;
}

.btn-confirm {
  background: #c0f0ab;
  color: white;
}

/* Supply Chain Styles */
.supply-chain-section {
  background: white;
  padding: 25px;
  border-radius: 10px;
  margin-bottom: 30px;
}

.supply-map {
  width: 100%;
  height: 400px;
  margin: 20px 0;
  border-radius: 8px;
  overflow: hidden;
}

.supply-map img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.supply-items {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin: 30px 0;
}

.supply-item {
  flex: 1;
  min-width: 300px;
}

.certifications {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 20px 0;
}

.certification {
  width: 150px;
  text-align: center;
}

.certification img {
  width: 100%;
  height: 150px;
  object-fit: contain;
  margin-bottom: 10px;
}

.kitchen-info img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 15px;
}

/* Recipe Styles */
.recipe-categories {
  display: flex;
  gap: 10px;
  margin: 20px 0;
}

.category-tab {
  padding: 8px 15px;
  background: #f5f5f5;
  border-radius: 20px;
  cursor: pointer;
}

.category-tab.active {
  background: #c0f0ab;
  color: white;
}

.recipe-list {
  margin-bottom: 30px;
}

.recipe-item {
  background: white;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.recipe-header {
  margin-bottom: 15px;
}

.recipe-meta {
  display: flex;
  gap: 15px;
  color: #666;
  font-size: 14px;
  margin-top: 5px;
}

.recipe-content {
  display: flex;
  gap: 30px;
}

.recipe-video {
  flex: 1;
  min-width: 300px;
}

.recipe-details {
  flex: 1;
}

.recipe-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.recipe-tag {
  background: #f0f9eb;
  color: #5a8f3d;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 14px;
}

/* Community Styles */
.community-section {
  background: white;
  padding: 25px;
  border-radius: 10px;
}

.community-intro {
  margin-bottom: 30px;
}

.community-benefits {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
}

.community-join {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin: 30px 0;
}

.qr-code {
  text-align: center;
  flex: 1;
  min-width: 200px;
}

.qr-code img {
  width: 200px;
  height: 200px;
  margin-bottom: 10px;
}

.community-testimonials {
  flex: 2;
  min-width: 300px;
}

.testimonial {
  background: #f9f9f9;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
}

.testimonial-author {
  font-style: italic;
  color: #666;
  margin-top: 5px;
}

.community-events {
  margin-top: 30px;
}

.event {
  background: #f5f5f5;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
}

.event-rsvp {
  background: #c0f0ab;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 10px;
}

@media (max-width: 768px) {
  .recipe-content {
    flex-direction: column;
  }

  .recipe-video {
    min-width: 100%;
  }
}

/* 确保可点击元素有正确指针 */
.sidebar-item, .section-more, .store-item {
  cursor: pointer;
  user-select: none;
}

/* 防止快速双击误操作 */
button, [data-navigate] {
  transition: transform 0.1s;
}
button:active, [data-navigate]:active {
  transform: scale(0.98);
}


/* counter css*/
.counter-container {
  display: inline-block;
  padding: 10px 20px;
  background: linear-gradient(135deg, #6e8efb, #a777e3);
  color: white;
  border-radius: 10px;
  font-family: 'Arial', sans-serif;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
  margin: 20px 0;
}

.counter-label {
  font-size: 18px;
  margin-bottom: 5px;
}

.counter-number {
  font-size: 24px;
  font-weight: bold;
}
