/* Modern, professional styling for English template */
:root {
  --primary-color: #1d4ed8;          /* 更专业的深蓝色 */
  --primary-light: #2563eb;          /* 主色调浅色 */
  --primary-dark: #1e40af;           /* 主色调深色 */
  --secondary-color: #475569;        /* 专业的石墨色 */
  --accent-color: #0ea5e9;           /* 专业的天蓝色 */
  --accent-light: #7dd3fc;           /* 强调色浅色 */
  --background-color: #f1f5f9;       /* 浅灰蓝背景 */
  --surface-color: #ffffff;          /* 白色表面 */
  --text-primary: #1e293b;           /* 深灰蓝文字 */
  --text-secondary: #64748b;         /* 中等灰文字 */
  --border-color: #cbd5e1;           /* 灰蓝边框 */
  --success-color: #16a34a;          /* 专业绿色 */
  --warning-color: #f35309;          /* 专业黄色 */
  --error-color: #dc2626;            /* 专业红色 */
  --warning-light: #f59e0b;          /* 警告色浅色 */
  --error-light: #f8d7da;            /* 错误色浅色 */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --radius: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --transition: all 0.2s ease;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: var(--background-color);
  color: var(--text-primary);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
ul, ol {
    margin: 0;
    padding: 0;
    list-style: none;  /* 去掉小圆点/数字 */
}

li {
    list-style: none;
}
/* Space container with modern layout */
.space {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* 面包屑容器 - 固定宽度和位置 */
.breadcrumb-container {
  background-color: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 0;
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 90;
  width: 100%;
}

.breadcrumb {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

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

.breadcrumb a:hover {
  text-decoration: underline;
}

/* Header styles */
header {
  background: var(--surface-color);
  box-shadow: var(--shadow-sm);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo-container img {
  max-height: 60px;
  width: auto;
}

/* Navigation menu */
.navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.nav-link {
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  border-radius: var(--radius);
  transition: var(--transition);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
  background-color: #eff6ff;
}

/* Search section */
.search-section {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 250px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: var(--transition);
  background-color: var(--surface-color);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.search-btn {
  padding: 0.75rem 1.25rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}

.search-btn:hover {
  background-color: var(--primary-light);
  transform: translateY(-1px);
}

.advanced-search-btn {
  padding: 0.75rem 1.25rem;
  background-color: transparent;
  color: var(--primary-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}

.advanced-search-btn:hover {
  background-color: #eff6ff;
  border-color: var(--primary-color);
}

/* User actions */
.user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: flex-end;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.user-name {
  font-weight: 600;
  color: var(--primary-color);
}

.sign-in-links a {
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: var(--transition);
}

.sign-in-links a:hover {
  background-color: #f1f5f9;
}

.cart-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
  text-decoration: none;
}

.cart-btn:hover {
  background-color: var(--primary-light);
  transform: translateY(-1px);
}

.cart-count {
  background-color: var(--accent-color);
  color: white;
  border-radius: 50%;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
}

/* Content area */
.content {
  margin: 2rem auto;
  flex: 1;
  width: 100%;
}

/* Footer styles */
footer {
  /* margin-top: 3rem; */
  background-color: var(--text-primary);
  color: #cbd5e1;
  padding: 2rem 0;
  width: 100%;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: white;
}

.contact-info {
  text-align: center;
  color: #94a3b8;
  font-size: 0.9rem;
  margin-top: 1rem;
}

.copyright {
  text-align: center;
  color: #64748b;
  margin-top: 1.5rem;
  font-size: 0.85rem;
}

/* Table styles */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0;
  background-color: var(--surface-color);
  /* border-radius: var(--radius); */
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  /* border-bottom: 1px solid var(--border-color); */
}

th {
  background-color: #f8fafc;
  font-weight: 600;
  color: var(--text-primary);
}

tr:last-child td {
  border-bottom: none;
}
/* 
tr:hover {
  background-color: #f8fafc;
} */

/* Buttons */
.btn {
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-warning {
  background-color: var(--warning-color);
  color: white;
}

.btn-warning:hover {
  background-color: var(--warning-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-secondary {
  background-color: #f1f5f9;
  color: var(--text-primary);
}

.btn-secondary:hover {
  background-color: #e2e8f0;
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background-color: #eff6ff;
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: var(--transition);
  background-color: var(--surface-color);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* Cards */
.card {
  background-color: var(--surface-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

/* Utility classes */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.d-flex {
  display: flex;
}

.justify-between {
  justify-content: space-between;
}

.align-center {
  align-items: center;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.grid {
  display: grid;
}

/* Backward compatibility for old class names */
.head {
  padding: 1rem 0;
  background-color: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
}

.foot {
  background-color: #f1f5f9;
  padding: 1rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.guide {
  background-color: #f1f5f9;
  padding: 0.75rem;
  border-radius: var(--radius);
  margin: 1rem 0;
  border: 1px solid var(--border-color);
}

.navigation {
  color: var(--text-primary);
  font-weight: 500;
}

.menu {
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  border-radius: var(--radius);
  transition: var(--transition);
  white-space: nowrap;
  display: inline-block;
  margin: 0.25rem;
}

.menu:hover {
  color: var(--primary-color);
  background-color: #eff6ff;
}

.menu2 {
  /* padding: 0.5rem 1rem; */
  text-decoration: none;
  /* color: var(--text-secondary); */
  font-weight: 500;
  border-radius: var(--radius);
  transition: var(--transition);
  white-space: nowrap;
  display: inline-block;
  margin-bottom: 0.25rem; 
  white-space: break-spaces !important; /* 允许换行 */
}

.menu2:hover {
  color: var(--primary-color);
  background-color: #eff6ff;
}

.colhead {
  background-color: #f1f5f9;
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  text-align: center;
  font-weight: bold;
}

/* Table cell styles */
td {
  padding: 0.5rem;
}

/* Button styles */
button {
  padding: 0.5rem 1rem;
  background-color: #f1f5f9;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
  /* margin: 0.25rem; */
}

button:hover {
  background-color: #e2e8f0;
}

.Linker-button {
  padding: 0.75rem 1rem;
  background-color: #f1f5f9;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}

.Linker-button:hover {
  background-color: #e2e8f0;
}

/* Input styles */
input {
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: var(--transition);
}

input[type=text], input[type=password] {
  width: 100%;
  /* max-width: 300px; */
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: var(--transition);
}

input[type=text]:focus, input[type=password]:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* Special input fields */
.formInput {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: var(--transition);
}

.formInput:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* Text color styles */
.text-red, .Red-row, .Red-row a {
  color: var(--error-color);
  font-weight: 500;
}

.text-orange, .Yellow-row, .Yellow-row a {
  color: var(--warning-color);
  font-weight: 500;
}

.text-green, .Green-row, .Green-row a {
  color: var(--success-color);
  font-weight: 500;
}

.text-grey, .Grey-row, .Grey-row a {
  color: var(--border-color);
}

/* Grid row styles */
.Grid-head td {
  background-color: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  text-align: center;
  font-weight: 600;
  /* border-left: 1px solid var(--border-color); */
}

.Grid-row {
  cursor: pointer;
  transition: var(--transition);
}

.Grid-row td {
  padding: 0.75rem 1rem;
  /* border-bottom: 1px solid var(--border-color);
  border-left: 1px solid var(--border-color); */
}

.Grid-row.selected {
  background-color: #eff6ff;
}

.Grid-row:hover {
  background-color: #f1f5f9;
}

/* Announcement item */
.announcement-item {
  display: inline-block;
  margin: 0.5rem;
  padding: 0.25rem 0.5rem;
  background-color: #fffbeb;
  border: 1px solid #fef3c7;
  border-radius: var(--radius);
}

/* Welcome section */
.welcome-section {
  /* background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%); */
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

.quick-navigation {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.search-area {
  margin: 1.5rem 0;
}

.announcements {
  margin-top: 1.5rem;
}

/* Bar head style */
.bar-head {
  padding: 0.75rem;
  background-color: #f8fafc;
  /* border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color); */
  font-weight: 600;
  text-align: center;
}

/* Shopping cart table */
.shopping-cart {
  border-collapse: collapse;
  border: 1px solid var(--text-primary);
}

.shopping-cart td {
  border: 1px solid var(--text-primary);
  height: 30px;
  padding: 0.5rem;
}

.list td {
  height: 25px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .space {
    padding: 0 10px;
  }
  
  .breadcrumb-container {
    margin: 0 auto;
  }
  
  .header-container {
    flex-direction: column;
    align-items: stretch;
  }
  
  .navigation {
    justify-content: center;
  }
  
  .user-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-section {
    flex-direction: column;
  }
  
  td {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    border-bottom: 1px solid var(--border-color);
  }
  
  td:before {
    content: attr(data-label) ": ";
    font-weight: bold;
  }
}

/* Login/Register form specific */
.login-container, .register-container {
  max-width: 500px;
  margin: 2rem auto;
  width: 100%;
}

/* Product list styles */
.product-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
  background-color: var(--surface-color);
  transition: var(--transition);
}

.product-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

/* Checkout styles */
.checkout-container {
  max-width: 800px;
  margin: 2rem auto;
  width: 100%;
}

/* Order info styles */
.order-details {
  background-color: var(--surface-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

/* Invoice styles */
.invoice-container {
  background-color: var(--surface-color);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  margin: 1rem 0;
}

/* Alert messages */
.alert {
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.alert-success {
  background-color: #d1fae5;
  color: var(--success-color);
  border: 1px solid #a7f3d0;
}

.alert-error {
  background-color: #fee2e2;
  color: var(--error-color);
  border: 1px solid #fca5a5;
}

.alert-warning {
  background-color: #fef3c7;
  color: var(--warning-color);
  border: 1px solid #fde68a;
}

/* Pagination styles */
.pagination {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
  gap: 0.5rem;
}

.pagination a, .pagination span {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  text-decoration: none;
  border-radius: var(--radius);
  transition: var(--transition);
}

.pagination a:hover {
  background-color: #eff6ff;
  border-color: var(--primary-color);
}

.pagination .active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}
.border-none {
  border: none;
}