* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: #faf8f6;
  color: #2d3436;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* 导航栏 */
nav {
  background: linear-gradient(135deg, #ff6b35, #f7931e);
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
  box-shadow: 0 1px 12px rgba(255, 107, 53, 0.3);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.2s;
  font-size: 14px;
}

.nav-links a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* 页脚 */
footer {
  text-align: center;
  padding: 24px 20px;
  margin-top: 48px;
  color: #b2bec3;
  font-size: 13px;
  border-top: 1px solid #e9ecef;
}

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

/* 卡片 */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
  margin-bottom: 20px;
  border: 1px solid #edf2f7;
}

h1,
h2 {
  margin-bottom: 20px;
  color: #2d2d3a;
  font-weight: 700;
}

h1 {
  font-size: 24px;
}

h2 {
  font-size: 20px;
}

/* 商品网格 */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.product-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid #edf2f7;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
}

.product-image-wrapper {
  width: 100%;
  position: relative;
  overflow: hidden;
  background: #f5f7fa;
}

.product-image {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}

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

.product-image-placeholder {
  width: 100%;
  height: 240px;
  background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b2bec3;
  font-size: 14px;
}

.product-info {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-title {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
  color: #2d3436;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-subtitle {
  font-size: 13px;
  color: #95a5a6;
  margin-bottom: 12px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price-section {
  margin-bottom: 10px;
}

.product-price {
  font-size: 28px;
  font-weight: 700;
  color: #e74c3c;
  line-height: 1;
  margin-bottom: 4px;
}

.product-price-label {
  font-size: 12px;
  color: #95a5a6;
}

.product-deduction {
  display: flex;
  gap: 6px;
  margin-top: auto;
  font-size: 11px;
  flex-wrap: wrap;
}

.product-deduction span {
  background: #fff3e0;
  color: #e67e22;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 500;
  white-space: nowrap;
}

.product-actions {
  padding: 12px 16px;
  background: #f8f9fa;
  border-top: 1px solid #edf2f7;
}

.product-actions .btn {
  width: 100%;
  margin: 0;
}

/* 表单 */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 13px;
  color: #636e72;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #dfe6e9;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s;
  background: #fff;
  color: #2d3436;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #ff6b35;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.12);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

/* 购买类型选择 */
.purchase-type-select {
  margin: 16px 0;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 10px;
  border: 1px solid #edf2f7;
}

.purchase-type-select>label:first-child {
  display: block;
  font-weight: 600;
  margin-bottom: 10px;
  color: #2d3436;
}

.radio-label {
  display: inline-block;
  padding: 10px 18px;
  margin-right: 12px;
  border: 2px solid #dfe6e9;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  font-weight: 500;
  color: #636e72;
}

.radio-label input {
  margin-right: 6px;
}

.radio-label.active {
  border-color: #ff6b35;
  background: #fff5f0;
  color: #ff6b35;
}

.total-price {
  text-align: right;
  font-size: 18px;
  padding: 16px 0;
  border-top: 1px solid #edf2f7;
  margin-top: 16px;
  color: #636e72;
}

.total-price span {
  font-size: 26px;
  font-weight: 700;
  color: #e74c3c;
}

/* 按钮 */
.btn {
  padding: 10px 22px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
  display: inline-block;
  text-decoration: none;
}

.btn-primary {
  background: #ff6b35;
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.25);
}

.btn-primary:hover {
  background: #e55a2b;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.35);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  background: #b2bec3;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.btn-success {
  background: #00b894;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 184, 148, 0.25);
}

.btn-success:hover {
  background: #00a381;
  box-shadow: 0 4px 12px rgba(0, 184, 148, 0.35);
}

.btn-danger {
  background: #e74c3c;
  color: #fff;
  box-shadow: 0 2px 8px rgba(231, 76, 60, 0.25);
}

.btn-danger:hover {
  background: #d63031;
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.35);
}

.btn-warning {
  background: #f7931e;
  color: #fff;
  box-shadow: 0 2px 8px rgba(230, 126, 34, 0.25);
}

.btn-warning:hover {
  background: #d35400;
  box-shadow: 0 4px 12px rgba(230, 126, 34, 0.35);
}

.btn-small {
  padding: 6px 14px;
  font-size: 12px;
  border-radius: 6px;
}

/* 提示 */
.alert {
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 500;
}

.alert-success {
  background-color: #eafaf1;
  border: 1px solid #a3d9b1;
  color: #00b894;
}

.alert-error {
  background-color: #fdf0ef;
  border: 1px solid #f5b7b1;
  color: #e74c3c;
}

/* 表格 */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 14px 10px;
  text-align: left;
  border-bottom: 1px solid #edf2f7;
}

th {
  background-color: #f8f9fa;
  font-weight: 600;
  white-space: nowrap;
  color: #636e72;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

tr:hover {
  background-color: #f8f9fa;
}

/* 状态标签 */
.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

/* 订单状态徽章样式 */
.status-submitted {
  background-color: #e3f2fd;
  color: #1976d2;
}

.status-awaiting-delivery {
  background-color: #fef9ef;
  color: #f7931e;
}

.status-awaiting-inspection {
  background-color: #fff4e6;
  color: #fb8c00;
}

.status-awaiting-return {
  background-color: #fff5f0;
  color: #ff6b35;
}

.status-completed {
  background-color: #eafaf1;
  color: #00b894;
}

.status-cancelled {
  background-color: #fdf0ef;
  color: #e74c3c;
}

/* Tab 栏 */
.tab-bar {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
  border: 1px solid #edf2f7;
}

.tab-btn {
  flex: 1;
  padding: 14px;
  border: none;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #636e72;
  transition: all 0.2s;
  text-align: center;
  text-decoration: none;
  position: relative;
}

.tab-btn.active {
  background: #ff6b35;
  color: #fff;
}

.tab-btn:hover:not(.active) {
  background: #f8f9fa;
  color: #2d3436;
}

/* 筛选栏 */
.filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
}

.filter-bar select {
  padding: 8px 14px;
  border: 1.5px solid #dfe6e9;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  color: #2d3436;
}

/* 登录/注册弹窗优化 */
/* 登录/注册弹窗优化 - Ultra Premium */
.auth-modal-content {
  max-width: 420px;
  padding: 40px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.12),
    0 12px 24px rgba(0, 0, 0, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  border: none;
  position: relative;
  overflow: hidden;
}

/* 装饰性背景光晕 */
.auth-modal-content::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(255, 107, 53, 0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.auth-modal-content>* {
  position: relative;
  z-index: 1;
}

.auth-tabs {
  display: flex;
  margin-bottom: 32px;
  border-bottom: none;
  background: rgba(241, 242, 246, 0.6);
  padding: 4px;
  border-radius: 12px;
  position: relative;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  color: #636e72;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 8px;
  position: relative;
  z-index: 2;
}

.auth-tab.active {
  color: #ff6b35;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.auth-tab:hover:not(.active) {
  color: #2d3436;
  background: rgba(255, 255, 255, 0.5);
}

/* 移动端适配 */
@media (max-width: 768px) {
  .auth-modal-content {
    width: 90%;
    margin: 20px auto;
    max-width: 360px;
    padding: 24px;
  }
}

/* 输入框优化 */
.form-group input {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(223, 230, 233, 0.8);
  background: rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
  font-size: 15px;
}

.form-group input:focus {
  background: #fff;
  border-color: #ff6b35;
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
  transform: translateY(-1px);
}

/* 按钮优化 */
.btn-block {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
  border: none;
  box-shadow: 0 8px 20px rgba(255, 107, 53, 0.3);
  transition: all 0.3s ease;
}

.btn-block:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(255, 107, 53, 0.4);
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
}

/* 移动端适配 */
@media (max-width: 768px) {
  .auth-modal-content {
    width: 90%;
    margin: 20px auto;
    max-width: 360px;
    padding: 24px;
  }
}

/* 登录表单 */
.login-form {
  max-width: 420px;
  margin: 80px auto;
}

/* 订单成功 */
.order-success {
  text-align: center;
  padding: 48px 24px;
}

.order-success h2 {
  color: #00b894;
  font-size: 24px;
}

.order-id {
  font-size: 32px;
  font-weight: 700;
  color: #ff6b35;
  margin: 20px 0;
}

.actions {
  display: flex;
  gap: 6px;
}

/* 商品表单 */
.product-form {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  border: 1px solid #edf2f7;
}

.product-form h3 {
  margin-bottom: 16px;
  color: #2d3436;
}

/* 表格容器 - 移动端横向滚动 */
.table-responsive {
  overflow-x: auto;
  border-radius: 8px;
}

/* 公告栏 - 顶部通知风格 */
.announcement-bar {
  background-color: #444;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  position: relative;
  width: 100%;
}

.announcement-content-box {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.announcement-text {
  flex: 1;
  margin-right: 16px;
  text-align: left;
  /* Optional: Center text if preferred, reference has complex layout */
}

/* Close Button Style */
.announcement-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background 0.2s;
}

.announcement-close:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* 公告图片区域 */
.announcement-image-section {
  text-align: center;
  background: #f0f0f0;
  padding: 0;
  cursor: pointer;
  border-bottom: 1px solid #ddd;
}

.announcement-image-section img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  display: block;
}

/* 分类筛选栏 */
.category-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  padding: 12px 0;
}

.category-filter-bar .cat-btn {
  padding: 8px 20px;
  border: 1.5px solid #dfe6e9;
  border-radius: 20px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #636e72;
  transition: all 0.2s;
}

.category-filter-bar .cat-btn:hover {
  border-color: #ff6b35;
  color: #ff6b35;
  background: #fff5f0;
}

.category-filter-bar .cat-btn.active {
  background: #ff6b35;
  color: #fff;
  border-color: #ff6b35;
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.25);
}

/* 商品详情弹窗 */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  justify-content: center;
  align-items: flex-start;
  overflow-y: auto;
  padding: 40px 0;
}

.modal-overlay.show {
  display: flex;
}

.modal-content {
  background: #fff;
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  margin: auto;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.2s;
}

.notice-modal-close:hover {
  transform: scale(1.1);
  background: #f1f1f1;
}

/* ========== Notice Manager System ========== */
.notice-bar {
  background: linear-gradient(90deg, #2d2d3a 0%, #1a1a2e 100%);
  color: #fff;
  padding: 12px 20px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.notice-bar.notice-visible {
  transform: translateY(0);
}

.notice-bar.notice-hiding {
  transform: translateY(-100%);
}

.notice-content {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  max-width: 800px;
}

.notice-icon {
  font-size: 16px;
  animation: pulse 2s infinite;
}

.notice-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 20px;
  transition: all 0.2s;
  font-size: 16px;
  line-height: 1;
}

.notice-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* Modal Notice */
.notice-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.notice-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.notice-modal-content {
  position: relative;
  max-width: 80vw;
  max-height: 80vh;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.notice-modal-overlay.active .notice-modal-content {
  transform: scale(1);
}

.notice-modal-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  display: block;
}

.notice-modal-close {
  position: absolute;
  top: -15px;
  right: -15px;
  width: 36px;
  height: 36px;
  background: #fff;
  color: #2d3436;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: transform 0.2s;
}

.notice-modal-close:hover {
  transform: scale(1.1);
  background: #f1f1f1;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
  }
}

/* 图片轮播 */
.carousel-container {
  position: relative;
  width: 100%;
  height: 350px;
  background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
  overflow: hidden;
}

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

.carousel-container .no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b2bec3;
  font-size: 16px;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: #2d3436;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s;
}

.carousel-btn:hover {
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.carousel-btn.prev {
  left: 12px;
}

.carousel-btn.next {
  right: 12px;
}

.carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.carousel-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.2s;
}

.carousel-dots .dot.active {
  background: #fff;
  transform: scale(1.2);
}

.modal-body {
  padding: 24px;
}

.modal-body h2 {
  margin-bottom: 12px;
  font-size: 20px;
}

.modal-body .product-description {
  margin: 12px 0;
  padding: 14px;
  background: #f8f9fa;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.8;
  color: #636e72;
  word-break: break-word;
  border: 1px solid #edf2f7;
}

.modal-body .product-description:empty {
  display: none;
}

.modal-body .modal-price {
  font-size: 24px;
  font-weight: 700;
  color: #e74c3c;
  margin: 8px 0;
}

.modal-body .modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #edf2f7;
}

/* 多图输入区域 */
.image-list-inputs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.image-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.image-input-row input {
  flex: 1;
  padding: 8px 12px;
  border: 1.5px solid #dfe6e9;
  border-radius: 8px;
  font-size: 14px;
}

.image-input-row input:focus {
  outline: none;
  border-color: #ff6b35;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.12);
}

.image-input-row .btn-remove-img {
  padding: 6px 12px;
  border: none;
  background: #e74c3c;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
  transition: background 0.2s;
}

.image-input-row .btn-remove-img:hover {
  background: #d63031;
}

.btn-add-img {
  padding: 8px 16px;
  border: 1.5px dashed #b2bec3;
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #ff6b35;
  align-self: flex-start;
  margin-top: 4px;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-add-img:hover {
  border-color: #ff6b35;
  background: #fff5f0;
}

/* 分类管理区域 */
.category-manage-section {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
  border: 1px solid #edf2f7;
}

.category-manage-section h3 {
  margin-bottom: 12px;
  cursor: pointer;
  user-select: none;
  color: #2d3436;
}

.category-manage-section h3::before {
  content: '▶ ';
  font-size: 12px;
  transition: transform 0.2s;
  display: inline-block;
}

.category-manage-section h3.expanded::before {
  content: '▼ ';
}

.category-list-table {
  margin-top: 12px;
}

.category-form-inline {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
  flex-wrap: wrap;
}

.category-form-inline input {
  padding: 8px 12px;
  border: 1.5px solid #dfe6e9;
  border-radius: 8px;
  font-size: 14px;
}

.category-form-inline input[type="text"] {
  flex: 1;
  min-width: 120px;
}

.category-form-inline input[type="number"] {
  width: 80px;
}

/* 响应式 */
@media (max-width: 768px) {
  nav {
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
    height: auto;
  }

  .nav-brand {
    font-size: 18px;
  }

  .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
  }

  .nav-links a {
    padding: 6px 10px;
    font-size: 13px;
  }

  .container {
    padding: 12px;
  }

  h1 {
    font-size: 20px;
  }

  h2 {
    font-size: 17px;
  }

  .card {
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 10px;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .product-image {
    height: 150px;
  }

  .product-info {
    padding: 10px;
  }

  .product-info h3 {
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .product-price {
    font-size: 16px;
  }

  .product-stock {
    font-size: 12px;
  }

  .product-deduction {
    flex-wrap: wrap;
    gap: 4px;
    font-size: 11px;
  }

  .product-info .btn {
    width: 100%;
    padding: 8px;
    font-size: 13px;
  }

  table {
    font-size: 12px;
  }

  th,
  td {
    padding: 10px 6px;
  }

  .tab-bar {
    border-radius: 10px;
  }

  .tab-btn {
    padding: 10px 4px;
    font-size: 13px;
  }

  .filter-bar {
    flex-wrap: wrap;
    width: 100%;
  }

  .filter-bar select {
    font-size: 12px;
    padding: 6px 10px;
  }

  .category-filter-bar {
    gap: 6px;
  }

  .category-filter-bar .cat-btn {
    padding: 6px 14px;
    font-size: 12px;
  }

  .modal-overlay {
    padding: 20px 0;
  }

  .modal-content {
    width: 95%;
    margin: 10px auto;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px;
  }

  .carousel-container {
    height: 250px;
  }

  .modal-body h2 {
    font-size: 18px;
  }

  .modal-body .modal-price {
    font-size: 20px;
  }

  .modal-body {
    padding: 16px;
  }

  .carousel-btn {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .image-input-row {
    flex-wrap: wrap;
  }

  .category-form-inline {
    flex-direction: column;
    align-items: stretch;
  }

  .category-form-inline input[type="number"] {
    width: 100%;
  }

  .login-form {
    margin: 40px auto;
  }

  .purchase-type-select {
    padding: 12px;
  }

  .radio-label {
    display: block;
    margin-right: 0;
    margin-bottom: 8px;
    text-align: center;
    font-size: 13px;
  }

  .total-price {
    font-size: 16px;
    text-align: center;
  }

  .total-price span {
    font-size: 22px;
  }

  .order-success {
    padding: 24px 16px;
  }

  .order-id {
    font-size: 24px;
  }

  .actions {
    flex-wrap: wrap;
  }

  .btn-small {
    padding: 5px 10px;
    font-size: 11px;
  }

  /* 公告图片移动端 */
  .announcement-image-section img {
    max-height: 200px;
  }

  footer {
    margin-top: 24px;
    padding: 16px;
    font-size: 12px;
  }
}

/* Further Mobile Optimizations */
@media (max-width: 480px) {
  .nav-links a {
    padding: 5px 8px;
    font-size: 13px;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 16px;
  }
}

/* Ensure tables scroll on mobile */
.table-responsive {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Tweaks for Admin Panel on Mobile */
@media (max-width: 768px) {
  .tab-bar {
    flex-wrap: wrap;
  }

  .tab-btn {
    flex: 1 0 50%;
  }

  /* 2 per row */
}

/* Auth Modal Styles */
.auth-tabs {
  display: flex;
  border-bottom: 1px solid #eee;
  margin-bottom: 20px;
}

.auth-tab {
  flex: 1;
  padding: 12px;
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: #666;
  border-bottom: 2px solid transparent;
}

.auth-tab.active {
  color: #ff6b35;
  border-bottom-color: #ff6b35;
  font-weight: 600;
}

.form-control {
  width: 100%;
  padding: 10px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 14px;
  margin-bottom: 10px;
}

.btn-block {
  width: 100%;
  padding: 12px;
  font-size: 16px;
}

/* ========== 公告区域 ========== */
.announcement-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 16px 20px;
  box-shadow: 0 2px 12px rgba(102, 126, 234, 0.2);
  position: relative;
  overflow: hidden;
}

/* 装饰性背景光晕 */
.announcement-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.announcement-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  position: relative;
  z-index: 1;
}

.announcement-icon {
  font-size: 20px;
  animation: announcementPulse 2s infinite;
}

.announcement-content {
  flex: 1;
  font-size: 14px;
  line-height: 1.6;
}

.announcement-content p {
  margin: 0;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

@keyframes announcementPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.15);
  }
}

/* 公告多图画廊 */
.announcement-images {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.announcement-images img {
  max-width: 200px;
  max-height: 150px;
  border-radius: 4px;
  cursor: pointer;
  object-fit: contain;
  flex-shrink: 0;
}