/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #62442A;
  color: #1E293B;
  line-height: 1.4;
  overflow-x: hidden;
  user-select: none;
}

/* 弹出弹窗后阻止背景滚动与拖动 */
body.no-scroll {
  overflow: hidden;
  height: 100vh;
  touch-action: none;
}

body.no-scroll .product-list {
  overflow: hidden !important;
}

.shop-detail-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: #62442A;
  position: relative;
}

/* Header Gradient Area */
.header-bg {
  background: url("./shop-detail-bg.png") no-repeat center center;
  background-size: cover;
  padding-bottom: 40px;
  position: relative;
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 15px;
}

.nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: transparent;
  cursor: pointer;
}

/* Shop info top */
.shop-info-section {
  padding: 10px 15px 5px;
}

.shop-info-top {
  display: flex;
  align-items: flex-start;
  position: relative;
}

.avatar-wrap {
  margin-right: 10px;
}

.shop-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  object-fit: cover;
}

.shop-meta {
  flex: 1;
}

.shop-name-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.name-sales {
  display: flex;
  flex-direction: column;
}

.shop-name {
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 4px;
}

.shop-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 12px;
}

.stars {
  color: #F59E0B;
  font-size: 13px;
  letter-spacing: 0.5px;
}

.rate-num {
  color: #FF6505;
  font-weight: 600;
}

.divider {
  color: rgba(255, 255, 255, 0.4);
}

.follow-btn {
  background: linear-gradient(89deg, #ffd700 0%, #ff6505 100%);
  color: #fff;
  padding: 4px 12px;
  border-radius: 21px;
  font-size: 14px;
  border: none;
  cursor: pointer;
  box-shadow: none;
  font-weight: 500;
}

/* Shop Tags */
.shop-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 44px;
  margin-top: 16px;
  background: rgba(218, 182, 132, 0.1);
  border: 1px solid rgba(255, 251, 238, 0.2);
  border-radius: 12px;
  padding: 12px 10px;
  margin: 16px 10px 0;
}

.tag {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #ffe6cc;
}

.tag-icon {
  width: 28px;
  height: 28px;
  margin-right: 8px;
}

/* Content Area Overlapping */
.content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-top: -30px;
  position: relative;
  z-index: 2;
  overflow: hidden;
  background: url("./shop-detail-bg-2.png") no-repeat top center;
  background-size: 100% auto;
}

.guarantee-banner {
  border-radius: 8px 8px 0 0;
  padding: 8px 10px;
  display: flex;
  align-items: center;
}

.guarantee-icon {
  width: 16px;
  height: 16px;
  margin-right: 4px;
}

.guarantee-title {
  color: #FFF4E9;
  font-size: 16px;
  font-weight: bold;
  font-family: Alimama ShuHeiTi, sans-serif;
}

.guarantee-divider {
  color: #FFF4E9;
  margin: 0 8px;
  font-size: 10px;
}

.guarantee-desc {
  color: #FFF4E9;
  font-size: 14px;
}

/* Main Content tabs */
.main-content {
  flex: 1;
  background-color: #4C3623;
  border-radius: 12px 12px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 70px;
}

.tabs-container {
  display: flex;
  background: #FAFAFA;
  border-bottom: 1px solid #eee;
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  position: relative;
  cursor: pointer;
}

.tab-text {
  font-size: 16px;
  color: #999999;
  font-weight: bold;
}

.tab-item.active .tab-text {
  color: #141312;
}

.tab-line {
  position: absolute;
  bottom: 0;
  width: 24px;
  height: 2px;
  background: #FFD700;
  border-radius: 2px;
}

/* Product list (Scrollable) */
.product-list {
  flex: 1;
  background: linear-gradient(360deg, #FFFFFF 0%, #F3F3F3 100%);
  overflow-y: auto;
  padding: 10px 0;
}

.product-item {
  display: flex;
  background-color: #fff;
  padding: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid #F1F5F9;
}

.product-img {
  width: 96px;
  height: 100px;
  border-radius: 8px;
  margin-right: 8px;
  flex-shrink: 0;
  object-fit: cover;
}

.product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-title {
  font-size: 16px;
  color: #141312;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.product-sales {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 5px;
}

.sales-text {
  font-size: 12px;
  color: #FF6505;
}

.views-text {
  font-size: 12px;
  color: #999;
}

.product-price-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: auto;
}

.price-wrap {
  display: flex;
  align-items: baseline;
  color: #ED0800;
  font-weight: bold;
}

.price-symbol {
  font-size: 12px;
}

.price-value {
  font-size: 20px;
}

.cart-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.cart-icon {
  width: 28px;
  height: 28px;
}

/* Skeleton loader */
.skeleton-item {
  height: 120px;
  background-color: #E2E8F0;
  border-radius: 8px;
  margin: 10px;
  animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

/* Toast styling */
.wake-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background-color: rgba(15, 23, 42, 0.9);
  color: #fff;
  padding: 10px 24px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
}

.wake-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Dialog mask overlay styling */
.dialog-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 2000;
}

.dialog-overlay.show {
  opacity: 1;
  visibility: visible;
}

.dialog-box {
  background-color: #fff;
  width: 100%;
  max-width: 320px;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  transform: scale(0.9);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dialog-overlay.show .dialog-box {
  transform: scale(1);
}

.dialog-header h3 {
  font-size: 17px;
  font-weight: 700;
  color: #1E293B;
  text-align: center;
  margin-bottom: 12px;
}

.dialog-body p {
  font-size: 14px;
  color: #64748B;
  text-align: center;
  line-height: 1.5;
  margin-bottom: 24px;
}

.dialog-actions {
  display: flex;
  gap: 12px;
}

.btn {
  flex: 1;
  border: none;
  height: 42px;
  line-height: 42px;
  border-radius: 21px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}

.btn-cancel {
  background-color: #F1F5F9;
  color: #64748B;
}

.btn-confirm {
  background-color: #FF7F00;
  color: #fff;
  box-shadow: 0 4px 8px rgba(255, 127, 0, 0.2);
}

/* Bottom Bar with Customer Service Button */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #ffffff;
  border-top: 1px solid #eee;
  padding: 8px 16px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
  display: flex;
  justify-content: flex-end;
  align-items: center;
  z-index: 900;
}

.bottom-item {
  width: 146px;
  height: 40px;
  background: #FFD500;
  border: none;
  border-radius: 20px;
  color: #141312;
  font-size: 15px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(255, 213, 0, 0.15);
}

