/* CSS Variables for consistent styling */
:root {
  --font-family-primary: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Inter', 'Noto Sans SC', sans-serif;
  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --color-text: #232323;
  --color-text-light: #3c3c3c;
  --color-background: #ffffff;
  --color-background-light: #f8f8f8;
  --color-accent: #051c42;
  --color-accent-hover: #234bbb;
  --spacing-section: 80px;
  --spacing-large: 60px;
  --spacing-medium: 40px;
  --spacing-small: 24px;
  --container-max-width: 1400px;
  --container-padding: 40px;
}

body {
  margin: 0;
  font-family: var(--font-family-primary);
  background: var(--color-background);
  color: var(--color-text);
  font-weight: var(--font-weight-regular);
  line-height: 1.6;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px var(--container-padding);
  background: rgba(255,255,255,.95);
  backdrop-filter: saturate(180%) blur(10px);
  position: sticky;
  top: 0;
  border-bottom: 1px solid #e6e6e6;
  z-index: 100;
  position: relative; /* Add relative positioning for mobile tagline */
}

.topbar .left {
  display: flex;
  align-items: center;
  gap: 36px;
  flex: 1;
}

.tagline-script {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  margin-top: -2px;
  margin-left: 8px;
  cursor: default;
}

.script-line1,
.script-line2 {
  font-family: 'Dancing Script', 'Brush Script MT', cursive;
  color: var(--color-accent);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.4px;
  text-shadow: 0 1px 3px rgba(5,28,66,0.15);
  transition: all 0.3s ease;
}

.script-line1 {
  margin-bottom: -4px;
  transform: rotate(-1.5deg);
}

.script-line2 {
  margin-left: 12px;
  transform: rotate(1.2deg);
}

.tagline-script:hover .script-line1,
.tagline-script:hover .script-line2 {
  transform: rotate(0deg);
  color: var(--color-accent-hover);
  text-shadow: 0 2px 6px rgba(35,75,187,0.2);
}

.logo {
  width: 160px;
  height: 66px;
  transition: all .3s ease;
  filter: drop-shadow(0 2px 8px rgba(139,146,153,.15));
}

.logo:hover {
  transform: translateY(-1px);
  filter: drop-shadow(0 4px 12px rgba(139,146,153,.25));
}

/* Original tagline-bar styles - no longer used as tagline is now inline in topbar
.tagline-bar {
  background: var(--color-background-light);
  border-bottom: 1px solid #e6e6e6;
}

.tagline {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 16px var(--container-padding);
  color: var(--color-text-light);
  font-weight: 500;
  text-align: center;
  font-size: 16px;
}
*/

main.page {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.breadcrumb {
  max-width: var(--container-max-width);
  margin: 12px auto 0;
  padding: 0 var(--container-padding);
  color: #999999;
  font-size: 14px;
}

.breadcrumb a {
  color: var(--color-accent);
  text-decoration: none;
}

.breadcrumb .sep {
  margin: 0 8px;
  color: #d3d3d3;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav a {
  margin: 0;
  color: var(--color-text);
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 30px;
  transition: all .3s ease;
  font-weight: var(--font-weight-medium);
  font-size: 16px;
  letter-spacing: 0.02em;
  white-space: nowrap; /* keep nav labels in one line */
}

.main-nav a:hover {
  background: var(--color-background-light);
  color: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(15,23,42,.08);
}

.main-nav a.active {
  background: var(--color-accent);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(5,28,66,.15);
}

.main-nav a.active:hover {
  background: var(--color-accent-hover);
  color: #fff;
}

.right {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
  justify-content: flex-end;
}

/* Search Styles */
.search-container {
  position: relative;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 180px;
  padding: 10px 16px 10px 44px;
  border: 1px solid #e6e6e6;
  border-radius: 24px;
  font-size: 14px;
  font-family: var(--font-family-primary);
  background: #fafafa;
  transition: all 0.3s ease;
  outline: none;
}

.search-input:focus {
  width: 220px;
  border-color: var(--color-accent);
  background: #fff;
  box-shadow: 0 4px 12px rgba(5,28,66,0.1);
}

.search-input::placeholder {
  color: #9ca3af;
  font-weight: var(--font-weight-regular);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  pointer-events: none;
  z-index: 2;
}

.search-input:focus ~ .search-icon {
  color: var(--color-accent);
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  margin-top: 4px;
}

.search-results.show {
  display: block;
}

.search-result-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background-color 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover,
.search-result-item.highlighted {
  background: #f8fafc;
}

.search-result-image {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  margin-right: 12px;
  background: #f1f5f9;
}

.search-result-content {
  flex: 1;
}

.search-result-name {
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  margin: 0 0 4px 0;
}

.search-result-desc {
  font-size: 12px;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
}

.search-result-tags {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}

.search-result-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
}

.search-result-tag.tag-new {
  background: #dcfce7;
  color: #166534;
}

.search-result-tag.tag-hot {
  background: #fef3c7;
  color: #92400e;
}

.search-result-tag.tag-featured {
  background: #dbeafe;
  color: #1e40af;
}

.search-no-results {
  padding: 20px;
  text-align: center;
  color: #64748b;
  font-size: 14px;
}

/* Language Selector Styles */
.language-selector {
  position: relative;
  display: inline-block;
}

.language-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  transition: all 0.3s ease;
  min-width: 80px;
  justify-content: space-between;
}

.language-toggle:hover {
  border-color: var(--color-accent);
  background: rgba(5, 28, 66, 0.02);
}

.language-toggle:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(5, 28, 66, 0.1);
}

.current-lang {
  font-weight: var(--font-weight-semibold);
}

.dropdown-icon {
  transition: transform 0.3s ease;
  color: var(--color-text-light);
}

.language-selector:hover .dropdown-icon {
  transform: rotate(180deg);
}

.language-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: white;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.3s ease;
  z-index: 1000;
  min-width: 160px;
}

.language-selector:hover .language-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--color-text);
  transition: all 0.2s ease;
  border-bottom: 1px solid #f5f5f5;
}

.lang-option:last-child {
  border-bottom: none;
}

.lang-option:hover {
  background: var(--color-background-light);
  color: var(--color-accent);
}

.lang-option.active {
  background: #3b82f6;
  color: white;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.lang-code {
  font-weight: 600;
  font-size: 14px;
  min-width: 30px;
}

.lang-name {
  font-size: 14px;
  font-weight: 500;
}

.lang-option.active .lang-code,
.lang-option.active .lang-name {
  color: white;
  font-weight: 700;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 101;
}

.mobile-menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Navigation */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: saturate(180%) blur(10px);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-nav-header {
  position: absolute;
  top: 0;
  right: 0;
  padding: 20px;
  z-index: 102;
}

.mobile-nav-close {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  color: var(--color-text);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--color-accent);
}

.mobile-nav.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile topbar tagline styles - shown in center of topbar on mobile */
.mobile-topbar-tagline {
  display: none; /* Hidden by default, shown only on mobile */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
  cursor: default;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.mobile-topbar-script-line1,
.mobile-topbar-script-line2 {
  font-family: 'Dancing Script', 'Brush Script MT', cursive;
  color: var(--color-accent);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.4px;
  text-shadow: 0 1px 3px rgba(5,28,66,0.15);
  transition: all 0.3s ease;
  text-align: center;
}

.mobile-topbar-script-line1 {
  margin-bottom: -2px;
  transform: rotate(-1.5deg);
}

.mobile-topbar-script-line2 {
  margin-left: 8px;
  transform: rotate(1.2deg);
}

.mobile-topbar-tagline:hover .mobile-topbar-script-line1,
.mobile-topbar-tagline:hover .mobile-topbar-script-line2 {
  transform: rotate(0deg);
  color: var(--color-accent-hover);
  text-shadow: 0 2px 6px rgba(35,75,187,0.2);
}

.mobile-nav-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  height: 100%;
  padding: 100px 20px 40px;
  overflow-y: auto;
  max-height: 100vh;
  box-sizing: border-box;
}

.mobile-nav-content a {
  color: var(--color-text);
  text-decoration: none;
  font-size: 20px;
  font-weight: var(--font-weight-medium);
  padding: 12px 0;
  margin: 6px 0;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
  text-align: center;
  width: 100%;
  max-width: 300px;
}

.mobile-nav-content a:hover {
  color: var(--color-accent-hover);
  border-bottom-color: var(--color-accent-hover);
}

.mobile-nav-content a.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.mobile-lang-switcher {
  margin-top: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-language-selector {
  width: 100%;
  max-width: 300px;
}

.mobile-lang-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-lang-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--color-text);
  transition: all 0.2s ease;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
}

.mobile-lang-option:hover {
  background: var(--color-background-light);
  border-color: var(--color-accent-hover);
  color: var(--color-accent-hover);
}

.mobile-lang-option.active {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.mobile-lang-code {
  font-weight: 600;
  font-size: 14px;
  min-width: 35px;
}

.mobile-lang-name {
  font-size: 14px;
  font-weight: 500;
}

.mobile-lang-option.active .mobile-lang-code,
.mobile-lang-option.active .mobile-lang-name {
  color: white;
  font-weight: 700;
}

.mobile-lang-switcher .divider {
  color: #d3d3d3;
  font-weight: 300;
}

.right .divider {
  color: #d3d3d3;
  margin: 0 4px;
}
/* Hero Section */
.hero {
  margin: 0;
  position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
}

.hero .carousel {
  position: relative;
  height: 800px;
  overflow: hidden;
}

.hero .slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  overflow: hidden;
  margin: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.3), rgba(0,0,0,.1));
  box-shadow: none;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.hero .slide.active {
  opacity: 1;
}

.hero .slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(5,28,66,.2) 0%, rgba(0,0,0,.4) 100%);
  z-index: 1;
}

.hero .slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero .slide .overlay {
  position: absolute;
  left: var(--container-padding);
  bottom: 80px;
  right: var(--container-padding);
  color: #fff;
  text-shadow: 0 4px 12px rgba(0,0,0,.6);
  max-width: 600px;
  z-index: 2;
}

.hero .slide .overlay h2 {
  font-size: 48px;
  font-weight: var(--font-weight-bold);
  margin: 0 0 16px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero .slide .overlay p {
  font-size: 20px;
  font-weight: var(--font-weight-regular);
  margin: 0 0 32px;
  opacity: 0.95;
  line-height: 1.5;
}

.hero .slide .overlay .btn {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 24px;
}

/* Carousel Indicators */
.hero .carousel-indicators {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
}

.hero .carousel-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.3s ease;
}

.hero .carousel-indicator.active {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 1);
  transform: scale(1.2);
}

.hero .carousel-indicator:hover {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.9);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 16px 32px;
  border-radius: 30px;
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
  font-weight: var(--font-weight-semibold);
  font-size: 16px;
  letter-spacing: 0.02em;
  transition: all .3s ease;
  border: 2px solid var(--color-accent);
}

.btn:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(5,28,66,.20);
}
/* Section Headers */
.section-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 var(--spacing-medium);
  padding: 0;
  flex-direction: column;
  gap: var(--spacing-small);
}

.section-title {
  font-size: 30px;
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin: 0;
  text-align: center;
}

.section-action a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 700;
  font-size: 30px;
  padding: 8px 16px;
  border-radius: 20px;
  border-bottom: 2px solid var(--color-accent);
  transition: all .3s ease;
}

.section-action a:hover {
  background: var(--color-background-light);
  color: var(--color-accent-hover);
  border-bottom: 2px solid var(--color-accent-hover);
}

/* 为"Learn More"和"View All"按钮添加较小样式 */
.section-action a.small-btn {
  font-size: 14px;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 600;
}

.section-subtitle {
  font-size: 18px;
  color: var(--color-text-light);
  margin: 0;
  max-width: 600px;
  text-align: center;
  line-height: 1.6;
}
/* About Us Section */
.about-us-section {
  padding: var(--spacing-section) 0 var(--spacing-small) 0;
  background: var(--color-background);
}

.about-us-section .about-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.about-us-section .about-content p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--color-text-light);
  margin: 0 0 20px 0;
}

.about-us-section .about-content p:last-child {
  margin-bottom: 0;
}

/* Categories Section */
.categories {
  padding: var(--spacing-section) 0;
  background: var(--color-background);
}

.categories .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 200px));
  gap: var(--spacing-medium);
  justify-content: center;
  justify-items: center;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-background) 0%, var(--color-background-light) 100%);
  text-decoration: none;
  color: var(--color-text);
  box-shadow: 0 8px 25px rgba(15,23,42,.08), 0 2px 10px rgba(15,23,42,.04);
  transition: all .4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(35,35,35,0.02) 0%, rgba(60,60,60,0.04) 100%);
  opacity: 0;
  transition: opacity .3s ease;
  border-radius: 50%;
}

.category-card:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 20px 40px rgba(15,23,42,.15), 0 8px 20px rgba(15,23,42,.08);
  border-color: rgba(5,28,66,0.1);
}

.category-card:hover::before {
  opacity: 1;
}

.category-card .avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(15,23,42,.1);
  background: var(--color-background);
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.9);
  transition: all .3s ease;
  position: relative;
  z-index: 2;
}

.category-card:hover .avatar {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(15,23,42,.15);
  border-color: rgba(255,255,255,1);
}

.category-card .name {
  margin-top: 8px;
  font-weight: var(--font-weight-bold);
  font-size: 15px;
  text-align: center;
  color: var(--color-text);
  position: relative;
  z-index: 2;
  transition: all .3s ease;
}

.category-card:hover .name {
  color: var(--color-accent);
  transform: translateY(-2px);
}

/* 特定分类的主题色彩 - 简约灰色调 */
.category-card[href*="cat=dog"] {
  background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 50%, #eeeeee 100%);
}

.category-card[href*="cat=dog"]::before {
  background: linear-gradient(135deg, rgba(60, 60, 60, 0.04) 0%, rgba(96, 96, 96, 0.06) 100%);
}

.category-card[href*="cat=dog"]:hover {
  box-shadow: 0 20px 40px rgba(96, 96, 96, 0.12), 0 8px 20px rgba(96, 96, 96, 0.08);
}

.category-card[href*="cat=cat"] {
  background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f4 50%, #e8eaed 100%);
}

.category-card[href*="cat=cat"]::before {
  background: linear-gradient(135deg, rgba(5, 28, 66, 0.03) 0%, rgba(35, 75, 187, 0.05) 100%);
}

.category-card[href*="cat=cat"]:hover {
  box-shadow: 0 20px 40px rgba(5, 28, 66, 0.1), 0 8px 20px rgba(5, 28, 66, 0.06);
}
/* Product List Section */
.product-list {
  padding: var(--spacing-medium) 0 var(--spacing-section) 0;
  background: var(--color-background-light);
}

.product-list h3 {
  font-size: 30px;
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin: 0 0 var(--spacing-medium);
  text-align: center;
}

.product-list .grid,
.testimonials .grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-medium);
}

/* Product Card Styles */
.product-card {
  display: block;
  padding: var(--spacing-small);
  border-radius: 20px;
  background: var(--color-background);
  box-shadow: 0 12px 30px rgba(15,23,42,.08);
  color: var(--color-text);
  text-decoration: none;
  transition: all .3s ease;
  border: 1px solid #f0f0f0;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(15,23,42,.12);
  border-color: #e0e0e0;
}

.product-card .image-container {
  position: relative;
  width: 100%;
  height: 220px;
  border-radius: 16px;
  overflow: hidden;
}

.product-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s ease, transform .3s ease;
}

.product-card .hover-image {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.product-card:hover .cover-image {
  transform: scale(1.03);
}

.product-card:hover .hover-image {
  opacity: 1;
  transform: scale(1.03);
}

.product-card .product-info {
  padding: 16px 0;
}

.product-card h4,
.product-card .product-info h4 {
  margin: 16px 0 8px;
  font-size: 18px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  line-height: 1.4;
}

.product-card p,
.product-card .product-info p {
  margin: 0 0 12px;
  color: var(--color-text-light);
  font-size: 14px;
  line-height: 1.5;
}

/* Product Card Price */
.product-card .product-price {
  margin: 12px 0 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1.2;
}

.product-card .product-price .price-prefix {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-light);
  margin-right: 4px;
}

.product-card .tags {
  margin-top: 12px;
}

.product-card .tag {
  display: inline-block;
  margin-right: 8px;
  margin-top: 8px;
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--color-background-light);
  color: var(--color-text-light);
  font-size: 12px;
  font-weight: var(--font-weight-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-card .tag-featured {
  background: var(--color-accent);
  color: #fff;
}

.product-card .tag-hot {
  background: #ff4757;
  color: #fff;
}

.product-card .tag-new {
  background: #2ed573;
  color: #fff;
}
/* Stories Section */
.stories {
  padding: var(--spacing-section) 0 !important;
  background: var(--color-background-light);
}

.stories h3 {
  font-size: 30px;
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin: 0 0 var(--spacing-medium);
  text-align: center;
}

.story-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--spacing-medium);
}

/* Testimonials Section */
.testimonials {
  padding: var(--spacing-section) 0 !important;
  background: var(--color-background);
}

.testimonials h3 {
  font-size: 30px;
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin: 0 0 var(--spacing-medium);
  text-align: center;
}

.testimonials .product-card {
  padding: var(--spacing-medium);
}

.testimonials .product-card p {
  font-style: italic;
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 16px;
  color: var(--color-text-light);
}

/* Product Detail */
.product-detail {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: var(--spacing-large);
  padding: var(--spacing-section) 0;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

/* Button reset for product options */
.product-options button {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  cursor: pointer;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Gallery Styles */
.product-detail .gallery {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.main-image-container {
  position: relative;
  width: 100%;
  max-width: 500px; /* 限制最大宽度 */
  height: 500px; /* 固定高度 */
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(15,23,42,.08);
  background: #f8f9fa;
}

.main-image {
  width: 100%;
  height: 100%; /* 填满容器高度 */
  object-fit: cover; /* 保持比例，裁剪以填满容器 */
  display: block;
  transition: transform 0.3s ease, opacity 0.4s ease;
}

.cover-image {
  position: relative;
  z-index: 1;
}

.hover-image {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  z-index: 2;
  transition: opacity 0.4s ease;
}

.main-image-container:hover .cover-image {
  transform: scale(1.02);
}

.main-image-container:hover .hover-image {
  opacity: 1;
  transform: scale(1.02);
}

/* 选择变体后禁用hover效果 */
.main-image-container.variant-selected:hover .hover-image {
  opacity: 0 !important;
  transform: none !important;
}

.thumbnail-gallery {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
  max-width: 100%;
  overflow-x: auto;
  padding: 5px 0;
}

.thumbnail {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 12px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  opacity: 0.7;
  flex-shrink: 0;
}

.thumbnail:hover {
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15,23,42,.15);
}

.thumbnail.active {
  border-color: var(--color-accent);
  opacity: 1;
  box-shadow: 0 8px 20px rgba(15,23,42,.15);
}

/* Product Info Styles */
.product-info {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.product-header {
  padding-bottom: 20px;
}

.product-title {
  font-size: 28px;
  font-weight: var(--font-weight-semibold);
  color: #0F2A43;
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.product-description {
  font-size: 16px;
  color: #475569;
  margin: 0 0 16px 0;
  line-height: 1.6;
}

.product-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.product-tags .tag {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-tags .tag-featured {
  background: var(--color-accent);
  color: #fff;
}

.product-tags .tag-hot {
  background: #ff4757;
  color: #fff;
}

.product-tags .tag-new {
  background: #2ed573;
  color: #fff;
}

/* Product Options */
.product-options {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.option-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-title {
  font-size: 16px;
  font-weight: 600;
  color: #334155;
  margin: 0;
}

/* Size Options */
.size-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.product-options .size-option {
  padding: 16px 24px !important;
  border: 2px solid #e2e8f0 !important;
  border-radius: 12px !important;
  background: white !important;
  color: #374151 !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  font-size: 16px !important;
  min-width: 120px !important;
  text-align: center !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
  position: relative !important;
  outline: none !important;
}

.product-options .size-option:hover {
  border-color: #9ca3af !important;
  background: #f9fafb !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1) !important;
}

.product-options .size-option.selected {
  border-color: #1f2937 !important;
  background: #1f2937 !important;
  color: white !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(31,41,55,0.3) !important;
}

.product-options .size-option.disabled,
.product-options .size-option:disabled {
  border-color: #d1d5db !important;
  background: #f3f4f6 !important;
  color: #9ca3af !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Color Options */
.color-options {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.product-options .color-option {
  width: 50px !important;
  height: 50px !important;
  border-radius: 50% !important;
  border: 3px solid #e5e7eb !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #6b7280 !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
  outline: none !important;
}

.product-options .color-option:hover {
  transform: scale(1.05) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
  border-color: #9ca3af !important;
}

.product-options .color-option.selected {
  border-color: #1f2937 !important;
  box-shadow: 0 0 0 2px white, 0 0 0 4px #1f2937 !important;
  transform: scale(1.05) !important;
}

.product-options .color-option.disabled,
.product-options .color-option:disabled {
  border-color: #d1d5db !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  opacity: 0.5 !important;
  transform: none !important;
  filter: grayscale(0.2);
}

/* Product Details Tabs */
.product-details {
  border-top: 1px solid #e2e8f0;
  padding-top: 30px;
}

.detail-tabs {
  display: flex;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 24px;
}

.tab-button {
  padding: 12px 24px;
  border: none;
  background: none;
  color: #64748b;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
  font-size: 14px;
}

.tab-button:hover {
  color: #334155;
}

.tab-button.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.tab-content {
  min-height: 200px;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.rich-content {
  color: #475569;
  line-height: 1.7;
}

.rich-content p {
  margin-bottom: 16px;
}

.rich-content h3, .rich-content h4 {
  color: #334155;
  margin: 24px 0 12px 0;
}

/* Specifications */
.specifications-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.spec-section h4 {
  font-size: 16px;
  font-weight: 600;
  color: #334155;
  margin: 0 0 16px 0;
}

.spec-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
}

.spec-item:last-child {
  border-bottom: none;
}

.spec-key {
  font-weight: 500;
  color: #64748b;
  flex: 0 0 40%;
}

.spec-value {
  color: #334155;
  text-align: right;
  flex: 1;
}

/* Flash Messages */
.flash-area {
  position: fixed;
  top: 90px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 999;
}

.flash {
  background: #e6ffef;
  color: #147d3f;
  border: 1px solid #b7f0cc;
  padding: 16px 24px;
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(15,23,42,.08);
  font-weight: 500;
}

/* Footer */
.footer {
  padding: var(--spacing-large) var(--container-padding);
  color: var(--color-text-light);
  text-align: center;
  background: var(--color-background-light);
  border-top: 1px solid #e6e6e6;
  font-size: 14px;
}

/* Responsive Design */

/* Tablet and small desktop */
@media (max-width: 1024px) {
  :root {
    --container-padding: 30px;
    --spacing-section: 70px;
    --spacing-large: 50px;
    --spacing-medium: 35px;
  }

  .hero .carousel {
    height: 600px;
  }

  .hero .slide .overlay h2 {
    font-size: 40px;
  }

  .hero .slide .overlay p {
    font-size: 18px;
  }

  .categories .grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 180px));
    gap: 20px;
  }

  .product-list .grid,
  .testimonials .grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
  }

  .category-card {
    width: 160px;
    height: 160px;
    padding: 20px;
  }

  .category-card .avatar {
    width: 90px;
    height: 90px;
  }

  .category-card .name {
    font-size: 14px;
    margin-top: 6px;
  }

  /* Adjust tagline font size for tablets */
  .script-line1,
  .script-line2 {
    font-size: 16px;
  }

  .topbar .left {
    gap: 20px;
  }
}

/* Mobile landscape and small tablets */
@media (max-width: 768px) {
  :root {
    --container-padding: 20px;
    --spacing-section: 60px;
    --spacing-large: 40px;
    --spacing-medium: 30px;
  }

  /* Show mobile menu toggle, hide desktop nav */
  .mobile-menu-toggle {
    display: flex;
  }

  .right .main-nav {
    display: none;
  }

  .right .search-container {
    display: none;
  }

  .right .language-selector {
    display: none;
  }

  .mobile-nav {
    display: block;
  }

  /* Hide desktop tagline on mobile to save space */
  .tagline-script {
    display: none;
  }

  /* Show mobile tagline in center of topbar */
  .mobile-topbar-tagline {
    display: flex;
  }

  /* Adjust topbar for mobile */
  .topbar {
    padding: 15px var(--container-padding);
  }

  .logo {
    width: 128px;
    height: 53px;
  }

  .product-detail {
    grid-template-columns: 1fr;
    gap: var(--spacing-medium);
  }

  .thumbnail-gallery {
    justify-content: center;
  }

  .thumbnail {
    width: 70px;
    height: 70px;
  }

  /* Product Card Price - Mobile */
  .product-card .product-price {
    font-size: 18px;
  }

  .product-title {
    font-size: 24px;
  }

  .size-options {
    justify-content: center;
  }

  .color-options {
    justify-content: center;
  }

  .hero .carousel {
    height: 500px;
  }

  .hero .slide .overlay {
    left: var(--container-padding);
    bottom: 60px;
    right: var(--container-padding);
  }

  .hero .slide .overlay h2 {
    font-size: 32px;
    line-height: 1.2;
  }

  .hero .slide .overlay p {
    font-size: 16px;
    margin-bottom: 24px;
  }

  .section-header {
    text-align: center !important;
    margin-bottom: 30px;
    gap: 16px;
    padding: 0 !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .section-title {
    font-size: 28px !important;
    text-align: center !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    width: 100%;
  }

  .section-action {
    width: 100% !important;
    text-align: center !important;
    margin: 0 !important;
    display: flex;
    justify-content: center;
  }

  .section-action a {
    font-size: 28px;
    display: inline-block;
  }

  .section-action a.small-btn {
    font-size: 14px !important;
    padding: 6px 14px !important;
  }
  
  /* 确保 About Us 和 Products 章节标题居中 */
  .about-us-section .section-header,
  .categories .section-header {
    text-align: center !important;
  }
  
  .about-us-section .section-title,
  .categories .section-title {
    text-align: center !important;
  }

  .categories .grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 150px));
    gap: 16px;
  }

  .product-list .grid,
  .testimonials .grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
  }

  .category-card {
    width: 140px;
    height: 140px;
    padding: 16px;
  }

  .category-card .avatar {
    width: 80px;
    height: 80px;
  }

  .category-card .name {
    font-size: 13px;
    margin-top: 6px;
  }

  /* Product Detail Mobile */
  .main-image-container {
    max-width: 100%;
    height: 350px; /* 移动端较小的固定高度 */
  }

  .product-info {
    gap: 20px;
  }

  .product-options {
    gap: 16px;
  }

  .option-title {
    font-size: 14px;
  }

  .product-options .size-option {
    padding: 10px 16px !important;
    font-size: 13px !important;
    min-width: 70px !important;
  }

  .product-options .color-option {
    width: 35px !important;
    height: 35px !important;
  }

  .detail-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tab-button {
    padding: 10px 16px;
    font-size: 13px;
    white-space: nowrap;
  }

  .spec-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .spec-key {
    flex: none;
  }

  .spec-value {
    text-align: left;
  }
}

/* Mobile portrait */
@media (max-width: 480px) {
  :root {
    --container-padding: 16px;
    --spacing-section: 50px;
    --spacing-large: 32px;
    --spacing-medium: 24px;
  }

  .topbar {
    padding: 12px var(--container-padding);
  }

  .logo {
    width: 112px;
    height: 46px;
  }

  .hero .carousel {
    height: 400px;
  }

  .hero .slide .overlay {
    left: var(--container-padding);
    bottom: 40px;
    right: var(--container-padding);
  }

  .hero .slide .overlay h2 {
    font-size: 28px;
    line-height: 1.2;
    margin-bottom: 12px;
  }

  .hero .slide .overlay p {
    font-size: 16px;
    margin-bottom: 20px;
  }

  .section-header {
    text-align: center !important;
    margin-bottom: 24px;
    gap: 12px;
    padding: 0 !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .section-title {
    font-size: 24px !important;
    text-align: center !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    width: 100%;
  }

  .section-action {
    width: 100% !important;
    text-align: center !important;
    margin: 0 !important;
    display: flex;
    justify-content: center;
  }

  .section-action a {
    font-size: 24px;
    display: inline-block;
  }

  .section-action a.small-btn {
    font-size: 13px !important;
    padding: 6px 12px !important;
  }
  
  /* 确保 About Us 和 Products 章节标题居中 */
  .about-us-section .section-header,
  .categories .section-header {
    text-align: center !important;
  }
  
  .about-us-section .section-title,
  .categories .section-title {
    text-align: center !important;
  }

  .categories .grid,
  .product-list .grid,
  .testimonials .grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .mobile-nav-content a {
    font-size: 16px;
    padding: 8px 0;
  }

  .mobile-nav-content {
    padding: 80px 16px 30px;
  }

  /* Adjust mobile topbar tagline for small screens */
  .mobile-topbar-script-line1,
  .mobile-topbar-script-line2 {
    font-size: 16px;
  }

  .mobile-lang-option {
    padding: 10px 12px;
  }

  .mobile-lang-code,
  .mobile-lang-name {
    font-size: 13px;
  }

  .mobile-lang-switcher {
    margin-top: 20px;
  }

  .tagline {
    font-size: 14px;
    padding: 12px var(--container-padding);
  }

  /* Product Detail Mobile Portrait */
  .thumbnail {
    width: 60px !important;
    height: 60px !important;
  }

  .product-title {
    font-size: 20px !important;
  }

  .product-options .size-option {
    padding: 8px 12px !important;
    font-size: 12px !important;
    min-width: 60px !important;
  }

  .product-options .color-option {
    width: 30px !important;
    height: 30px !important;
    font-size: 10px !important;
  }
}

/* Contact Page Styles */
.contact {
  padding: var(--spacing-section) 0;
}

.contact .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.contact .section-header {
  text-align: center;
  margin-bottom: var(--spacing-large);
}

.contact .section-title {
  font-size: 36px;
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin: 0 0 16px;
  line-height: 1.2;
}

.contact .section-subtitle {
  font-size: 18px;
  color: var(--color-text-light);
  margin: 0;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--spacing-large);
  align-items: start;
}

.contact-info {
  background: var(--color-background-light);
  border-radius: 20px;
  padding: var(--spacing-medium);
  box-shadow: 0 10px 24px rgba(15,23,42,.06);
}

.contact-info h3 {
  font-size: 24px;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 24px;
}

.info-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}

.info-value {
  font-size: 16px;
  color: var(--color-text);
  font-weight: 500;
  line-height: 1.4;
}

.contact-form-wrapper {
  background: #fff;
  border-radius: 20px;
  padding: var(--spacing-medium);
  box-shadow: 0 10px 24px rgba(15,23,42,.06);
  border: 1px solid #e6e6e6;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  margin: 0;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid #e6e6e6;
  border-radius: 12px;
  font-size: 16px;
  font-family: var(--font-family-primary);
  color: var(--color-text);
  background: #fff;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(5, 28, 66, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #999;
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.form-error {
  color: #dc2626;
  font-size: 14px;
  margin-top: 4px;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  border: none;
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: all 0.3s ease;
  align-self: flex-start;
  min-width: 160px;
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(5, 28, 66, 0.2);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Contact Page Responsive */
@media (max-width: 768px) {
  .contact .section-title {
    font-size: 28px;
  }

  .contact .section-subtitle {
    font-size: 16px;
  }

  .contact-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-medium);
  }

  .contact-info,
  .contact-form-wrapper {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .contact .section-title {
    font-size: 24px;
  }

  .contact-info,
  .contact-form-wrapper {
    padding: 20px;
  }

  .form-input,
  .form-textarea {
    padding: 14px 16px;
  }

  .btn-primary {
    width: 100%;
    padding: 16px;
  }
}

/* Reseller Section */
.reseller-section {
  padding: var(--spacing-section) 0;
  background: var(--color-background);
  margin-top: var(--spacing-large);
}

.reseller-content {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 500px;
  margin: 0 auto;
}

.reseller-form {
  width: 100%;
}

.reseller-form .form-group {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: center;
}

.reseller-form .form-input {
  flex: 1;
  max-width: 350px;
  margin: 0;
  display: block;
}

.reseller-form .btn {
  white-space: nowrap;
  margin: 0;
}

/* Reseller Section Responsive */
@media (max-width: 768px) {
  .reseller-section {
    margin-top: var(--spacing-medium);
  }
  
  .reseller-form .form-group {
    flex-direction: column;
    gap: 16px;
  }
  
  .reseller-form .form-input {
    max-width: 100%;
  }
  
  .reseller-form .btn {
    width: 100%;
  }
}



/* Footer */
.footer {
  background: var(--color-background-light);
  border-top: 1px solid #e6e6e6;
  padding: var(--spacing-large) 0 var(--spacing-medium);
}

.footer-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  gap: var(--spacing-large);
  margin-bottom: var(--spacing-medium);
  align-items: start;
}

.footer-column h3 {
  font-size: 18px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  margin: 0 0 20px;
}

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

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--color-text-light);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--color-accent);
}



/* Footer Company Column */
.footer-company {
  text-align: left;
}

/* Footer Newsletter Column */
.footer-newsletter {
  text-align: center;
}

.newsletter-section {
  max-width: 400px;
  margin: 0 auto;
}

.newsletter-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 12px;
  line-height: 1.2;
}

.newsletter-subtitle {
  font-size: 14px;
  color: var(--color-text-light);
  margin: 0 0 24px;
  line-height: 1.4;
}

.newsletter-form {
  margin-bottom: 16px;
}

.newsletter-input-group {
  display: flex;
  gap: 12px;
  align-items: center;
}

.newsletter-input {
  flex: 1;
  padding: 14px 20px;
  border: 2px solid #e5e7eb;
  border-radius: 50px;
  font-size: 14px;
  color: var(--color-text);
  background: #fff;
  transition: all 0.3s ease;
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.newsletter-input::placeholder {
  color: #9ca3af;
}

.newsletter-btn {
  padding: 14px 32px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.newsletter-btn:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

.newsletter-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
}

.newsletter-message {
  min-height: 20px;
  font-size: 14px;
}

.success-message {
  color: #059669;
  font-weight: 500;
}

.error-message {
  color: #dc2626;
  font-weight: 500;
}



.company-name {
  font-size: 20px;
  font-weight: var(--font-weight-bold);
  color: var(--color-accent);
  margin-bottom: 12px;
}

.company-address {
  font-size: 14px;
  color: var(--color-text-light);
  line-height: 1.5;
}

/* Footer Navigation Column */
.footer-nav {
  text-align: right;
}

.footer-nav .footer-links {
  text-align: right;
}

.footer-nav .footer-links a {
  font-size: 16px;
  font-weight: 500;
}

.contact-info {
  margin-bottom: 24px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--color-text-light);
  line-height: 1.5;
}

.contact-icon {
  font-size: 16px;
  margin-top: 2px;
}

.social-icons {
  display: flex;
  gap: 12px;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--color-accent);
  color: #fff;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--spacing-medium);
  border-top: 1px solid #e6e6e6;
}

.copyright {
  font-size: 14px;
  color: var(--color-text-light);
  font-weight: var(--font-weight-light);
}

.icp-info {
  font-size: 14px;
  color: var(--color-text-light);
  font-weight: 500;
}

.icp-info a {
  color: var(--color-text-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

.icp-info a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}



/* Footer Responsive */
@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-medium);
  }

  .footer-company {
    order: 1;
    text-align: center;
  }

  .footer-newsletter {
    order: 2;
  }

  .newsletter-input-group {
    flex-direction: column;
    gap: 16px;
  }

  .newsletter-input {
    width: 100%;
  }

  .newsletter-btn {
    width: 100%;
    padding: 16px 32px;
  }

  .footer-nav {
    order: 3;
    text-align: center;
  }

  .footer-nav .footer-links {
    text-align: center;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .icp-info {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .social-icons {
    gap: 8px;
  }

  .social-icon {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
}

/* Product List Page */
.product-list {
  padding: var(--spacing-large) 0;
}

.product-header {
  margin-bottom: var(--spacing-large);
}

.product-header h3 {
  margin: 0 0 var(--spacing-medium);
  font-size: 32px;
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  text-align: center;
}

/* Category Filter */
.category-filter {
  display: flex;
  justify-content: center;
  margin-bottom: var(--spacing-medium);
}

.filter-tabs {
  display: flex;
  gap: 8px;
  background: #f8fafc;
  padding: 6px;
  border-radius: 50px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.filter-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 50px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-light);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.filter-tab:hover {
  color: var(--color-accent);
  background: rgba(59, 130, 246, 0.1);
}

.filter-tab.active {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.category-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* Category Info */
.category-info {
  text-align: center;
  margin-bottom: var(--spacing-medium);
}

.category-info h4 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 600;
  color: var(--color-text);
}

.category-count {
  margin: 0;
  font-size: 14px;
  color: var(--color-text-light);
}

/* Products Grid */
.products-grid {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.no-products {
  text-align: center;
  padding: var(--spacing-large);
  color: var(--color-text-light);
}

.no-products p {
  font-size: 16px;
  margin: 0;
}

/* Removed duplicate product card styles - consolidated above */

/* Responsive Design */
@media (max-width: 768px) {
  .filter-tabs {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    padding: 8px;
  }

  .filter-tab {
    padding: 10px 16px;
    font-size: 13px;
  }

  .category-icon {
    width: 16px;
    height: 16px;
  }

  .product-header h3 {
    font-size: 28px;
  }

  .category-info h4 {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .filter-tabs {
    padding: 6px;
  }

  .filter-tab {
    padding: 8px 12px;
    font-size: 12px;
  }

  .product-header h3 {
    font-size: 24px;
  }

  .product-info {
    padding: 16px;
  }

  .product-info h4 {
    font-size: 16px;
  }
}

/* About Page Styles */
.about-content {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--spacing-large) var(--container-padding);
  line-height: 1.6;
}

.about-content h2 {
  font-size: 32px;
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin: 0 0 var(--spacing-medium);
  text-align: center;
}

.about-content h3 {
  font-size: 24px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  margin: var(--spacing-large) 0 var(--spacing-medium);
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: 8px;
}

.about-content p {
  font-size: 16px;
  color: var(--color-text-light);
  margin: 0 0 var(--spacing-medium);
  text-align: justify;
}

.about-content ul {
  margin: 0 0 var(--spacing-medium);
  padding-left: 0;
  list-style: none;
}

.about-content li {
  font-size: 16px;
  color: var(--color-text-light);
  margin: 0 0 var(--spacing-small);
  padding-left: 24px;
  position: relative;
}

.about-content li:before {
  content: "•";
  color: var(--color-accent);
  font-weight: bold;
  position: absolute;
  left: 0;
}

.about-content strong {
  color: var(--color-text);
  font-weight: 600;
}

.about-content a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
}

.about-content a:hover {
  text-decoration: underline;
}

.company-intro {
  text-align: center;
  margin-bottom: var(--spacing-large);
  padding: var(--spacing-large);
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 16px;
}

.company-intro p {
  font-size: 18px;
  font-weight: 500;
  color: var(--color-text);
  margin: 0;
}

.our-mission,
.our-values,
.contact-info {
  margin-bottom: var(--spacing-large);
}

/* Responsive Design for About Page */
@media (max-width: 768px) {
  .about-content {
    padding: var(--spacing-medium) var(--container-padding);
  }

  .about-content h2 {
    font-size: 28px;
  }

  .about-content h3 {
    font-size: 20px;
  }

  .about-content p,
  .about-content li {
    font-size: 15px;
  }

  .company-intro {
    padding: var(--spacing-medium);
  }

  .company-intro p {
    font-size: 16px;
  }
}

/* 懒加载图片样式 */
.lazy-image-container {
  position: relative;
  overflow: hidden;
}

.lazy-image {
  transition: opacity 0.3s ease, filter 0.3s ease;
  width: 100%;
  height: auto;
}

.lazy-image.loading {
  opacity: 0.7;
  filter: blur(2px);
}

.lazy-image.loaded {
  opacity: 1;
  filter: none;
}

.lazy-image.error {
  opacity: 0.5;
  filter: grayscale(100%);
}

.image-placeholder {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 14px;
  min-height: 200px;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* 响应式图片 */
.responsive-image {
  max-width: 100%;
  height: auto;
}

/* 产品图片优化 */
.product-image {
  transition: transform 0.3s ease;
}

.product-image:hover {
  transform: scale(1.05);
}

/* 轮播图优化 */
.carousel-image {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

/* ==================== User and Cart Actions ==================== */
.user-cart-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: 20px;
  flex-shrink: 0;
}

.icon-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.icon-btn:hover {
  background: var(--color-background-light);
  color: var(--color-accent);
}

/* 购物车按钮特殊样式 */
.cart-btn {
  background: var(--color-background-light);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.cart-btn:hover {
  background: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(15, 42, 67, 0.15);
}

.cart-btn svg {
  width: 22px;
  height: 22px;
}

.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #ff4757;
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(255, 71, 87, 0.4);
  line-height: 1;
  pointer-events: none;
  z-index: 1;
}

/* 移除脉动动画，避免过于吸引注意力 */

/* ==================== Modal Styles ==================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: white;
  border-radius: 16px;
  position: relative;
  animation: slideUp 0.3s ease;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-modal {
  width: 90%;
  max-width: 460px;
  border-radius: 16px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.auth-header {
  padding: 40px 40px 24px 40px;
  flex-shrink: 0;
}

.auth-form {
  padding: 0 40px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1 1 auto;
  scrollbar-width: thin;
  scrollbar-color: #c4c4c6 transparent;
}

/* Custom scrollbar for auth form */
.auth-form::-webkit-scrollbar {
  width: 8px;
}

.auth-form::-webkit-scrollbar-track {
  background: transparent;
}

.auth-form::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

.auth-form::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

.auth-footer {
  padding: 20px 40px 40px 40px;
  flex-shrink: 0;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #999;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: var(--color-background-light);
  color: var(--color-text);
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header h2 {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: var(--color-text);
}

.auth-header p {
  font-size: 15px;
  color: #666;
  margin: 0;
}

.auth-form {
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--color-text);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #e1e4e8;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  transition: all 0.2s ease;
  box-sizing: border-box;
  background-color: white;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(5, 28, 66, 0.1);
}

.checkbox-group label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 400;
}

.checkbox-group label a {
  color: var(--color-accent);
  text-decoration: none;
}

.checkbox-group label a:hover {
  text-decoration: underline;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  cursor: pointer;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 0;
}

.required {
  color: #ff4757;
  font-weight: 600;
}

.btn-primary {
  width: 100%;
  padding: 14px 24px;
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(5, 28, 66, 0.2);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-block {
  width: 100%;
  margin-top: 8px;
}

.error-message {
  padding: 12px 16px;
  background: #fff5f5;
  border: 1px solid #fc8181;
  border-radius: 8px;
  color: #c53030;
  font-size: 14px;
  margin-bottom: 16px;
}

.auth-footer {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #e1e4e8;
}

.auth-footer p {
  font-size: 14px;
  color: #666;
  margin: 0;
}

.auth-footer a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.auth-footer a:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

/* ==================== User Dropdown ==================== */
.user-dropdown {
  position: fixed;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  width: 280px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 10001;
}

.user-dropdown.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.user-dropdown-header {
  padding: 20px;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
  color: white;
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  color: var(--color-accent);
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  font-size: 13px;
  opacity: 0.9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-dropdown-menu {
  padding: 8px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--color-text);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  font-size: 15px;
  font-family: inherit;
}

.menu-item:hover {
  background: var(--color-background-light);
}

.menu-item:focus {
  outline: none;
  background: var(--color-background-light);
}

.menu-item.logout-btn {
  color: #dc2626;
}

.menu-item.logout-btn:hover {
  background: #fee2e2;
}

/* ==================== Message Container ==================== */
.message-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 10002;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 300px;
  opacity: 0;
  transform: translateX(100px);
  transition: all 0.3s ease;
}

.message.show {
  opacity: 1;
  transform: translateX(0);
}

.message-icon {
  flex-shrink: 0;
}

.message-success {
  border-left: 4px solid #10b981;
}

.message-success .message-icon {
  color: #10b981;
}

.message-error {
  border-left: 4px solid #ef4444;
}

.message-error .message-icon {
  color: #ef4444;
}

.message-info {
  border-left: 4px solid #3b82f6;
}

.message-info .message-icon {
  color: #3b82f6;
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
  .user-cart-actions {
    margin-left: 12px;
    gap: 12px;
  }
  
  .icon-btn {
    width: 40px;
    height: 40px;
  }

  .cart-btn svg {
    width: 20px;
    height: 20px;
  }

  .cart-badge {
    top: 3px;
    right: 3px;
    min-width: 14px;
    height: 14px;
    border-radius: 7px;
    font-size: 9px;
    padding: 0 3px;
    border-width: 1.5px;
  }

  .auth-modal {
    max-width: 95%;
  }
  
  .auth-header {
    padding: 32px 24px 20px 24px;
  }
  
  .auth-form {
    padding: 0 24px;
  }
  
  .auth-footer {
    padding: 16px 24px 32px 24px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .message-container {
    left: 20px;
    right: 20px;
  }
  
  .message {
    min-width: auto;
  }
  
  .user-dropdown {
    width: calc(100% - 40px);
    left: 20px !important;
    right: 20px !important;
  }
}

/* ==================== Enhanced User Interface ==================== */

/* User button styles */
.user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 20px;
  transition: all 0.2s ease;
  min-height: 40px;
  border: none;
  max-width: 200px;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
}

.user-btn svg {
  stroke: currentColor;
  flex-shrink: 0;
}

.user-btn:hover {
  background-color: rgba(0, 0, 0, 0.06);
}

.user-btn.logged-in {
  background-color: rgba(0, 0, 0, 0.04);
  padding: 4px 12px 4px 4px;
}

.user-btn.logged-in:hover {
  background-color: rgba(0, 0, 0, 0.08);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.user-avatar .avatar-initial {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 14px;
}

.user-name-display {
  color: var(--color-text);
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

/* 未登录状态的用户按钮 */
.user-btn:not(.logged-in) {
  padding: 8px 16px;
  border-radius: 8px;
}

.user-btn:not(.logged-in):hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.user-btn:not(.logged-in) svg {
  width: 20px;
  height: 20px;
  stroke: var(--color-text);
}

.user-btn:not(.logged-in) .user-name-display {
  font-size: 14px;
  font-weight: 500;
}

/* Enhanced user dropdown */
.user-avatar-large {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-avatar-large .avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-avatar-large .avatar-initial {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 24px;
}

.guest-dropdown-header {
  padding: 20px;
  border-bottom: 1px solid #f0f0f0;
  text-align: center;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
  color: white;
}

.guest-message {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 4px;
}

.guest-subtitle {
  font-size: 14px;
  opacity: 0.9;
}

.menu-divider {
  height: 1px;
  background-color: #f0f0f0;
  margin: 8px 0;
}

/* Account modal styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}

.account-modal .modal-content {
  max-width: 900px;
  width: 90vw;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  border-bottom: 1px solid #e6e6e6;
}

.modal-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: var(--color-text);
}

.modal-close {
  background: none;
  border: none;
  font-size: 32px;
  line-height: 1;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: #f0f0f0;
  color: var(--color-text);
}

.account-sections {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.account-content-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 32px;
  -webkit-overflow-scrolling: touch; /* iOS 平滑滚动 */
}

/* 滚动条样式 */
.account-content-area::-webkit-scrollbar {
  width: 8px;
}

.account-content-area::-webkit-scrollbar-track {
  background: transparent;
}

.account-content-area::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

.account-content-area::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

.account-section {
  display: none;
}

.account-section.active {
  display: block;
}

.account-section h3 {
  margin: 0 0 24px 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text);
}

.profile-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.profile-form .form-group,
.password-form .form-group {
  margin-bottom: 16px;
}

.profile-form label,
.password-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--color-text);
}

.profile-form input,
.profile-form select,
.password-form input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.profile-form input:focus,
.profile-form select:focus,
.password-form input:focus {
  outline: none;
  border-color: var(--color-accent);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 400 !important;
  margin: 0;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  margin: 0;
  accent-color: var(--color-accent);
}

.checkbox-label span {
  user-select: none;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.account-nav {
  width: 250px;
  background-color: #f8f9fa;
  padding: 20px 0;
  border-right: 1px solid #e9ecef;
}

.account-nav .nav-item {
  display: block;
  width: 100%;
  padding: 12px 20px;
  text-align: left;
  border: none;
  background: none;
  color: #666;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.account-nav .nav-item:hover {
  background-color: #e9ecef;
  color: #333;
}

.account-nav .nav-item.active {
  background-color: var(--color-accent);
  color: white;
}

.account-content-area {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
}

.account-section {
  display: none;
}

.account-section.active {
  display: block;
}

.account-section h3 {
  margin-bottom: 20px;
  color: #333;
  font-size: 20px;
}

.profile-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.profile-form .form-group {
  margin-bottom: 20px;
}

.profile-form label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #333;
}

.profile-form input,
.profile-form select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.profile-form input:focus,
.profile-form select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), 0.1);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-header h3 {
  margin: 0;
}

.address-list {
  display: grid;
  gap: 20px;
}

.address-card {
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
  background: white;
}

.address-card.default-address {
  border-color: var(--color-accent);
  background-color: rgba(var(--color-accent-rgb), 0.05);
}

.address-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.address-header h4 {
  margin: 0;
  color: #333;
}

.default-badge {
  background-color: var(--color-accent);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.address-details p {
  margin: 5px 0;
  color: #666;
  font-size: 14px;
}

.address-actions {
  margin-top: 15px;
  display: flex;
  gap: 10px;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #666;
}

.empty-state p {
  margin-bottom: 20px;
}

.order-info {
  text-align: center;
  padding: 40px 20px;
  color: #666;
  background-color: #f8f9fa;
  border-radius: 8px;
}

.password-form .form-group {
  margin-bottom: 20px;
}

.password-form label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #333;
}

.password-form input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.password-form input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), 0.1);
}

@media (max-width: 768px) {
  .account-modal .modal-content {
    width: 95vw;
    max-height: 95vh;
    margin: 0;
  }
  
  .modal-header {
    padding: 20px 16px;
  }
  
  .modal-header h2 {
    font-size: 22px;
  }
  
  .account-sections {
    flex-direction: column;
  }
  
  .account-nav {
    width: 100%;
    display: flex;
    overflow-x: auto;
    padding: 0;
    border-right: none;
    border-bottom: 1px solid #e9ecef;
    background: white;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  
  .account-nav::-webkit-scrollbar {
    display: none;
  }
  
  .account-nav .nav-item {
    white-space: nowrap;
    padding: 12px 20px;
    font-size: 13px;
    border-bottom: 3px solid transparent;
    background: transparent;
    flex-shrink: 0;
  }
  
  .account-nav .nav-item.active {
    border-bottom-color: var(--color-accent);
    background: transparent;
    color: var(--color-accent);
  }
  
  .account-nav .nav-item:hover {
    background: #f8f9fa;
  }
  
  .account-content-area {
    padding: 20px 16px;
  }
  
  .profile-form .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
  }
  
  .section-header .section-action {
    width: 100%;
    text-align: center;
  }
  
  .user-name-display {
    display: none;
  }
  
  /* 表单优化 */
  .profile-form .form-group {
    margin-bottom: 16px;
  }
  
  .profile-form input,
  .profile-form select {
    font-size: 16px; /* 防止iOS缩放 */
  }
}

/* ==================== Order History Styles ==================== */

.order-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.loading-orders,
.no-orders {
  text-align: center;
  padding: 60px 20px;
  color: #86868b;
}

.no-orders svg {
  margin: 0 auto 16px;
}

.no-orders p {
  font-size: 16px;
  margin: 8px 0;
}

.no-orders .error-hint {
  font-size: 14px;
  color: #999;
  margin-top: 8px;
}

.order-card {
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 20px;
  background: white;
  transition: all 0.2s ease;
  cursor: pointer;
}

.order-card:hover {
  border-color: #0F2A43;
  box-shadow: 0 4px 12px rgba(15, 42, 67, 0.1);
  transform: translateY(-2px);
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
}

.order-number {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.order-number strong {
  font-size: 16px;
  font-weight: 600;
  color: #1d1d1f;
}

.order-date {
  font-size: 14px;
  color: #86868b;
}

.order-status {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-transform: capitalize;
}

.order-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.order-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.order-info-row .label {
  color: #86868b;
}

.order-info-row .value {
  color: #1d1d1f;
  font-weight: 500;
}

.order-info-row .total-price {
  font-size: 16px;
  font-weight: 600;
  color: #0F2A43;
}

.order-info-row .tracking {
  font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
  font-size: 13px;
  background: #f5f5f7;
  padding: 4px 8px;
  border-radius: 4px;
}

.order-actions {
  display: flex;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
}

@media (max-width: 640px) {
  /* 章节标题移动端优化 */
  .section-header {
    text-align: center !important;
    margin-bottom: 24px;
    gap: 12px;
    padding: 0 !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .section-title {
    font-size: 24px !important;
    text-align: center !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    width: 100%;
  }

  .section-action {
    width: 100% !important;
    text-align: center !important;
    margin: 0 !important;
    display: flex;
    justify-content: center;
  }

  .section-action a {
    font-size: 24px;
    display: inline-block;
  }

  .section-action a.small-btn {
    font-size: 13px !important;
    padding: 6px 12px !important;
  }
  
  /* 确保 About Us 和 Products 章节标题居中 */
  .about-us-section .section-header,
  .categories .section-header {
    text-align: center !important;
  }
  
  .about-us-section .section-title,
  .categories .section-title {
    text-align: center !important;
  }

  /* 移动端弹窗优化 */
  .auth-modal {
    max-width: 100%;
    width: 95%;
  }
  
  .auth-header {
    padding: 24px 16px 16px 16px;
  }
  
  .auth-header h2 {
    font-size: 24px;
  }
  
  .auth-header p {
    font-size: 14px;
  }
  
  .auth-form {
    padding: 0 16px;
  }
  
  .auth-footer {
    padding: 16px 16px 24px 16px;
  }
  
  .form-group label {
    font-size: 13px;
  }
  
  .form-group input[type="text"],
  .form-group input[type="email"],
  .form-group input[type="password"],
  .form-group input[type="tel"],
  .form-group select {
    padding: 10px 14px;
    font-size: 14px;
  }
  
  .btn-primary {
    padding: 12px 20px;
    font-size: 14px;
  }
  
  .modal-close {
    width: 28px;
    height: 28px;
    font-size: 24px;
  }
  
  /* Account modal 移动端优化 */
  .account-modal .modal-content {
    width: 100%;
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
    margin: 0;
  }
  
  .modal-header {
    padding: 16px 12px;
  }
  
  .modal-header h2 {
    font-size: 18px;
  }
  
  .modal-close {
    width: 32px;
    height: 32px;
    top: 12px;
    right: 12px;
  }
  
  .account-nav {
    padding: 0;
  }
  
  .account-nav .nav-item {
    padding: 10px 16px;
    font-size: 12px;
    min-width: auto;
  }
  
  .account-content-area {
    padding: 16px 12px;
  }
  
  .account-section h3 {
    font-size: 18px;
    margin-bottom: 16px;
  }
  
  /* 表单字段 */
  .profile-form .form-group label {
    font-size: 13px;
  }
  
  .profile-form input,
  .profile-form select {
    padding: 10px 12px;
    font-size: 15px;
  }
  
  .profile-form button {
    width: 100%;
    padding: 12px;
    font-size: 15px;
  }
  
  /* 地址列表 */
  .address-list {
    gap: 12px;
  }
  
  .address-card {
    padding: 12px;
  }
  
  .address-card .name {
    font-size: 15px;
  }
  
  .address-card .address-info {
    font-size: 13px;
  }
  
  /* 订单列表 */
  .order-card {
    padding: 12px;
  }
  
  .order-number {
    font-size: 14px;
  }
  
  .order-status {
    font-size: 12px;
    padding: 4px 8px;
  }
  
  /* Address form 移动端优化 */
  .address-form-modal .modal-content {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }
  
  /* Order 相关 */
  .order-header {
    flex-direction: column;
    gap: 12px;
  }

  .order-status {
    align-self: flex-start;
  }

  .order-actions {
    flex-direction: column;
  }

  .order-actions button {
    width: 100%;
  }
}

/* 极小屏幕优化（如 iPhone SE） */
@media (max-width: 375px) {
  .auth-header {
    padding: 20px 12px 12px 12px;
  }
  
  .auth-form {
    padding: 0 12px;
  }
  
  .auth-footer {
    padding: 12px 12px 20px 12px;
  }
  
  .auth-header h2 {
    font-size: 22px;
  }
  
  .form-group {
    margin-bottom: 16px;
  }
  
  .form-group input[type="text"],
  .form-group input[type="email"],
  .form-group input[type="password"],
  .form-group input[type="tel"],
  .form-group select {
    padding: 10px 12px;
    font-size: 13px;
  }
  
  .checkbox-group label {
    font-size: 12px;
  }
  
  /* 密码表单 */
  .password-form .form-group label {
    font-size: 13px;
  }
  
  .password-form input {
    padding: 10px 12px;
    font-size: 15px;
  }
  
  .password-form button {
    width: 100%;
    padding: 12px;
    font-size: 15px;
  }
  
  /* 地址卡片操作按钮 */
  .address-card .address-actions {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .address-card .address-actions button {
    flex: 1 1 auto;
    min-width: 80px;
    padding: 8px 12px;
    font-size: 13px;
  }
  
  /* 订单操作 */
  .order-card .order-actions {
    margin-top: 12px;
  }
  
  .order-card .order-actions button {
    font-size: 13px;
    padding: 6px 12px;
  }
  
  /* 提升触控体验 */
  .account-nav .nav-item,
  .profile-form button,
  .address-card .address-actions button,
  .section-action {
    min-height: 44px; /* iOS 推荐的最小触控区域 */
  }
  
  /* 按钮移动端优化 */
  .btn-primary,
  .btn-secondary,
  .btn-danger {
    padding: 12px 20px;
    font-size: 14px;
  }
  
  .btn-text {
    padding: 8px 12px;
    font-size: 13px;
  }
}

/* ==================== Address Management Styles ==================== */

.address-card {
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
  position: relative;
  transition: all 0.2s ease;
}

.address-card:hover {
  border-color: #007bff;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.address-card.default {
  border-color: #28a745;
  background: #f8fff9;
}

.default-badge {
  position: absolute;
  top: -1px;
  right: -1px;
  background: #28a745;
  color: white;
  padding: 4px 12px;
  border-radius: 0 8px 0 8px;
  font-size: 12px;
  font-weight: 500;
}

.address-info .name {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 4px;
}

.address-info .company {
  color: #666;
  margin-bottom: 8px;
}

.address-info .address-lines {
  color: #333;
  line-height: 1.5;
  margin-bottom: 8px;
}

.address-info .phone {
  color: #666;
  font-size: 14px;
}

.address-actions {
  display: flex;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
  margin-top: 16px;
}

/* ==================== 统一按钮样式系统 ==================== */

/* 主要按钮 */
.btn-primary,
button.btn-primary {
  background: linear-gradient(135deg, var(--color-accent) 0%, #1a4d7a 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(5, 28, 66, 0.15);
  font-family: inherit;
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #0d2338 0%, #153d63 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(5, 28, 66, 0.25);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(5, 28, 66, 0.2);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* 次要按钮 */
.btn-secondary,
button.btn-secondary {
  background: white;
  color: var(--color-accent);
  border: 2px solid #e1e4e8;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  font-family: inherit;
}

.btn-secondary:hover:not(:disabled) {
  background: #f8f9fa;
  border-color: var(--color-accent);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-secondary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* 危险按钮 */
.btn-danger,
button.btn-danger {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.2);
  font-family: inherit;
}

.btn-danger:hover:not(:disabled) {
  background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(220, 53, 69, 0.3);
}

.btn-danger:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(220, 53, 69, 0.2);
}

.btn-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* 文本按钮 */
.btn-text {
  background: none !important; /* 强制透明背景 */
  border: none;
  color: var(--color-accent);
  font-size: 14px;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-weight: 500;
  font-family: inherit;
  box-shadow: none !important; /* 移除阴影 */
  transform: none !important; /* 移除变形 */
}

.btn-text:hover:not(:disabled) {
  background: rgba(5, 28, 66, 0.05) !important;
  color: var(--color-accent-hover);
  transform: none !important;
  box-shadow: none !important;
}

.btn-text.btn-danger {
  color: #dc3545 !important;
  background: none !important;
}

.btn-text.btn-danger:hover:not(:disabled) {
  background: rgba(220, 53, 69, 0.08) !important;
  color: #c82333 !important;
  transform: none !important;
  box-shadow: none !important;
}

.btn-text:disabled {
  color: #ccc !important;
  cursor: not-allowed;
  opacity: 0.5;
  background: none !important;
}

.btn-text:disabled:hover {
  background: none !important;
  transform: none !important;
}

.no-addresses {
  text-align: center;
  padding: 40px 20px;
  background: #fafafa;
  border-radius: 8px;
  border: 2px dashed #ddd;
}

.no-addresses p {
  margin: 0 0 16px;
  color: #6b7280;
  font-size: 16px;
}

.no-addresses .error-hint {
  font-size: 14px;
  color: #9ca3af;
  margin-bottom: 20px;
}

.address-form-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.address-form-modal .modal-content {
  background: white;
  border-radius: 16px;
  max-width: 520px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  position: relative;
  display: flex;
  flex-direction: column;
}

.address-form-modal .modal-header {
  padding: 24px 24px 0;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.address-form-modal .modal-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
}

.address-form-modal .modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s ease;
  line-height: 1;
}

.address-form-modal .modal-close:hover {
  background: #f5f5f5;
  color: #333;
}

.address-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.address-form {
  padding: 0 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.address-form .form-group {
  margin-bottom: 20px;
}

.address-form .form-group label {
  display: block;
  font-weight: 500;
  color: #374151;
  margin-bottom: 8px;
  font-size: 14px;
}

.address-form .form-group input,
.address-form .form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s ease;
  box-sizing: border-box;
  background: #fff;
}

.address-form .form-group input:focus,
.address-form .form-group select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.address-form .form-group input::placeholder {
  color: #9ca3af;
}

.address-form .checkbox-group {
  margin: 24px 0;
}

.address-form .checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: normal;
  margin-bottom: 0;
}

.address-form .checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 12px;
  cursor: pointer;
}

.address-form .form-content {
  flex: 1;
  overflow-y: auto;
  padding-right: 8px;
}

.address-form .form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 24px 0 0;
  border-top: 1px solid #e5e7eb;
  margin-top: 8px;
  flex-shrink: 0;
  background: white;
}

.address-form-modal .address-form .btn-secondary {
  background: #fff !important;
  color: #6b7280 !important;
  border: 1px solid #d1d5db !important;
  padding: 12px 24px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  min-width: auto !important;
  transform: none !important;
  box-shadow: none !important;
}

.address-form-modal .address-form .btn-secondary:hover {
  background: #f9fafb !important;
  border-color: #9ca3af !important;
  transform: none !important;
  box-shadow: none !important;
}

.address-form-modal .address-form .btn-primary {
  background: #3b82f6 !important;
  color: white !important;
  border: none !important;
  padding: 12px 24px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  min-width: auto !important;
  transform: none !important;
  box-shadow: none !important;
}

.address-form-modal .address-form .btn-primary:hover:not(:disabled) {
  background: #2563eb !important;
  transform: none !important;
  box-shadow: none !important;
}

.address-form-modal .address-form .btn-primary:disabled {
  background: #9ca3af !important;
  cursor: not-allowed !important;
}

@media (max-width: 768px) {
  .address-form .form-row {
    grid-template-columns: 1fr;
  }
  
  .address-form .form-actions {
    flex-direction: column-reverse;
  }
  
  .address-form .form-actions button {
    width: 100%;
  }
  
  /* Address cards 移动端优化 */
  .address-card {
    padding: 16px;
  }
  
  .address-card .address-info {
    font-size: 14px;
  }
  
  .address-card .name {
    font-size: 16px;
  }
  
  .address-card .address-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-top: 12px;
  }
  
  .address-card .address-actions button {
    width: 100%;
    text-align: center;
  }
}

/* ==================== Product Price & Purchase ==================== */
.product-price {
  margin: 20px 0;
  padding: 16px 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.product-price .price {
  font-size: 28px;
  font-weight: var(--font-weight-bold);
  color: var(--color-accent);
  line-height: 1;
}

.product-price .stock-info {
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  padding: 4px 12px;
  border-radius: 4px;
}

.product-price .stock-info.in-stock {
  color: #28a745;
  background-color: #d4edda;
}

.product-price .stock-info.out-of-stock {
  color: #dc3545;
  background-color: #f8d7da;
}

/* Product Purchase Section */
.product-purchase {
  margin: 32px 0;
  display: flex;
  gap: 16px;
  align-items: stretch;
}

.quantity-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quantity-selector label {
  font-size: 13px;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.quantity-controls {
  display: flex;
  align-items: center;
  border: 2px solid #e6e6e6;
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.quantity-controls .qty-btn {
  width: 44px;
  height: 48px;
  border: none;
  background: white;
  color: var(--color-text);
  font-size: 20px;
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantity-controls .qty-btn:hover {
  background: var(--color-background-light);
  color: var(--color-accent);
}

.quantity-controls #quantity {
  width: 60px;
  height: 48px;
  border: none;
  border-left: 2px solid #e6e6e6;
  border-right: 2px solid #e6e6e6;
  text-align: center;
  font-size: 16px;
  font-weight: var(--font-weight-semibold);
  background: white;
}

#add-to-cart-btn {
  flex: 1;
  max-width: 320px;
  align-self: flex-end;
  height: 52px;
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(5, 28, 66, 0.15);
}

#add-to-cart-btn:hover:not(:disabled) {
  background: var(--color-accent-hover);
  box-shadow: 0 4px 12px rgba(5, 28, 66, 0.25);
  transform: translateY(-1px);
}

#add-to-cart-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(5, 28, 66, 0.2);
}

#add-to-cart-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

/* Notifications */
.notification {
  position: fixed;
  top: 90px;
  right: 20px;
  background: white;
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  transform: translateX(400px);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9999;
  max-width: 400px;
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  display: flex;
  align-items: center;
  gap: 12px;
}

.notification.show {
  transform: translateX(0);
}

.notification-success {
  border-left: 4px solid #28a745;
  color: #1e7e34;
}

.notification-error {
  border-left: 4px solid #dc3545;
  color: #bd2130;
}

.notification-info {
  border-left: 4px solid #17a2b8;
  color: #117a8b;
}

.notification::before {
  content: '';
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
}

.notification-success::before {
  background: #28a745;
}

.notification-error::before {
  background: #dc3545;
}

.notification-info::before {
  background: #17a2b8;
}

/* Shopping Cart Drawer */
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10000;
}

.cart-drawer.open {
  pointer-events: all;
}

.cart-drawer-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cart-drawer.open .cart-drawer-overlay {
  opacity: 1;
}

.cart-drawer-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 480px;
  height: 100%;
  background: white;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.cart-drawer.open .cart-drawer-content {
  transform: translateX(0);
}

.cart-drawer-header {
  padding: 24px;
  border-bottom: 1px solid #e6e6e6;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-drawer-header h2 {
  font-size: 24px;
  font-weight: var(--font-weight-bold);
  margin: 0;
  color: var(--color-text);
}

.cart-drawer-close {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text-light);
  transition: color 0.2s;
}

.cart-drawer-close:hover {
  color: var(--color-text);
}

.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.empty-cart {
  text-align: center;
  padding: 60px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 400px;
  max-width: 100%;
  box-sizing: border-box;
}

.empty-cart::before {
  content: "";
  display: block;
  width: 100px;
  height: 100px;
  margin: 0 auto 24px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cbd5e1' stroke-width='1.5'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.4;
}

.empty-cart p {
  font-size: 18px;
  color: #64748b;
  margin: 0 0 28px 0;
  font-weight: 500;
  line-height: 1.5;
}

.empty-cart .btn {
  width: calc(100% - 60px);
  max-width: 300px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px;
  background: #0f172a;
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  box-sizing: border-box;
}

.empty-cart .btn:hover {
  background: #1e293b;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
}

.cart-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  background: white;
}

.cart-item-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.cart-item-details {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: 15px;
  font-weight: var(--font-weight-semibold);
  margin: 0 0 4px 0;
  color: var(--color-text);
}

.cart-item-variant {
  font-size: 13px;
  color: var(--color-text-light);
  margin: 0 0 8px 0;
}

.cart-item-price {
  font-size: 16px;
  font-weight: var(--font-weight-bold);
  color: var(--color-accent);
  margin: 0;
}

.cart-item-price-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.cart-item-price-row .unit-price {
  font-size: 16px;
  font-weight: var(--font-weight-bold);
  color: var(--color-accent);
}

.cart-item-price-row .item-subtotal {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e6e6e6;
  border-radius: 6px;
  padding: 4px;
}

.cart-item-quantity button {
  width: 28px;
  height: 28px;
  border: none;
  background: white;
  font-size: 16px;
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: background 0.2s;
  border-radius: 4px;
}

.cart-item-quantity button:hover:not(:disabled) {
  background: var(--color-background-light);
}

.cart-item-quantity button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.cart-item-quantity span {
  min-width: 24px;
  text-align: center;
  font-weight: var(--font-weight-medium);
}

.cart-item-remove {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: #dc3545;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: opacity 0.2s;
}

.cart-item-remove:hover {
  opacity: 0.7;
}

.cart-drawer-footer {
  border-top: 1px solid #e6e6e6;
  padding: 20px;
  background: var(--color-background-light);
}

.cart-summary {
  margin-bottom: 20px;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 15px;
}

.cart-summary-row.shipping-note {
  justify-content: center;
  padding: 4px 0;
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

.cart-summary-divider {
  height: 2px;
  background: #e6e6e6;
  margin: 12px 0;
}

.cart-summary-row.total {
  padding-top: 4px;
  font-size: 18px;
  font-weight: var(--font-weight-bold);
}

.cart-summary-row.total span:last-child {
  color: var(--color-accent);
}

.cart-actions {
  display: flex;
  gap: 12px;
}

.cart-actions .btn {
  flex: 1;
  padding: 14px;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  font-weight: var(--font-weight-semibold);
  transition: all 0.3s;
}

.cart-actions .btn-secondary {
  background: white;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
}

.cart-actions .btn-secondary:hover {
  background: var(--color-accent);
  color: white;
}

.cart-actions .btn-primary {
  background: var(--color-accent);
  color: white;
  border: 2px solid var(--color-accent);
}

.cart-actions .btn-primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .product-purchase {
    flex-direction: column;
    align-items: stretch;
  }

  #add-to-cart-btn {
    max-width: none;
  }

  .notification {
    left: 20px;
    right: 20px;
    max-width: none;
    transform: translateY(-200px);
  }

  .notification.show {
    transform: translateY(0);
  }
  
  .cart-drawer-content {
    max-width: 100%;
  }
}

/* ==================== Order Detail Modal ==================== */
.order-detail-modal {
  max-width: 800px;
  width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.order-detail-modal .modal-header {
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
  border-bottom: 1px solid #e6e6e6;
}

.order-detail-modal .modal-body {
  padding: 24px 32px;
}

.order-detail-modal .modal-footer {
  position: sticky;
  bottom: 0;
  background: white;
  padding: 20px 32px;
  border-top: 1px solid #e6e6e6;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.order-detail-section {
  margin-bottom: 32px;
}

.order-detail-section:last-child {
  margin-bottom: 0;
}

.order-detail-section h3 {
  font-size: 24px;
  font-weight: 600;
  color: #0F2A43;
  margin: 0 0 8px 0;
}

.order-detail-section h4 {
  font-size: 16px;
  font-weight: 600;
  color: #0F2A43;
  margin: 0 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid #0F2A43;
}

.order-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.order-date {
  color: #86868b;
  font-size: 14px;
  margin: 4px 0 0 0;
}

.order-status-badge {
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}

.address-info {
  background: #f5f5f7;
  padding: 16px;
  border-radius: 8px;
  line-height: 1.6;
}

.address-info p {
  margin: 4px 0;
  color: #1d1d1f;
}

.address-info strong {
  color: #0F2A43;
}

.order-items-list {
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  overflow: hidden;
}

.order-item-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid #e5e5e5;
  align-items: center;
}

.order-item-row:last-child {
  border-bottom: none;
}

.item-info {
  min-width: 0;
}

.item-name {
  font-weight: 600;
  color: #0F2A43;
  margin: 0 0 4px 0;
}

.item-variant {
  font-size: 14px;
  color: #86868b;
  margin: 0;
}

.item-quantity {
  color: #86868b;
  font-size: 14px;
  text-align: center;
  min-width: 40px;
}

.item-price {
  color: #1d1d1f;
  font-weight: 500;
  text-align: right;
  min-width: 80px;
}

.item-subtotal {
  color: #0F2A43;
  font-weight: 600;
  text-align: right;
  min-width: 100px;
}

.price-breakdown {
  background: #f5f5f7;
  padding: 20px;
  border-radius: 8px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  color: #1d1d1f;
}

.price-row.total {
  border-top: 2px solid #0F2A43;
  margin-top: 8px;
  padding-top: 16px;
  font-size: 18px;
  color: #0F2A43;
}

.order-note {
  background: #f5f5f7;
  padding: 16px;
  border-radius: 8px;
  color: #1d1d1f;
  line-height: 1.6;
  margin: 0;
}

.tracking-number {
  background: #f5f5f7;
  padding: 16px;
  border-radius: 8px;
  color: #0F2A43;
  font-weight: 600;
  font-family: 'Courier New', monospace;
  margin: 0;
}

/* Responsive styles for order detail modal */
@media (max-width: 768px) {
  .order-detail-modal {
    width: 95vw;
    max-height: 95vh;
  }

  .order-detail-modal .modal-body {
    padding: 20px 16px;
  }

  .order-detail-modal .modal-footer {
    padding: 16px;
    flex-direction: column-reverse;
  }

  .order-detail-modal .modal-footer button {
    width: 100%;
  }

  .order-detail-header {
    flex-direction: column;
    gap: 12px;
  }

  .order-status-badge {
    align-self: flex-start;
  }

  .order-item-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .item-quantity,
  .item-price,
  .item-subtotal {
    text-align: left;
  }

  .item-quantity::before {
    content: 'Quantity: ';
    font-weight: 600;
  }

  .item-price::before {
    content: 'Unit Price: ';
    font-weight: 600;
  }

  .item-subtotal::before {
    content: 'Subtotal: ';
    font-weight: 600;
  }
}
