/* =============================================
   Manna Cake - 可爱蛋糕店主样式
   色系：马卡龙粉嫩风
   ============================================= */

/* ---- Google Fonts 可爱字体 ---- */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');

/* ---- CSS Variables ---- */
:root {
  --pink: #f5a3c7;
  --pink-light: #fff0f5;
  --pink-dark: #e88db5;
  --purple: #c9b1ff;
  --purple-light: #f8f0ff;
  --coral: #ffb3a6;
  --coral-light: #fff5f0;
  --cream: #fff8f5;
  --brown: #3d2c2e;
  --brown-light: #5a4547;
  --gray: #888;
  --gray-light: #f0ebe8;
  --white: #ffffff;
  --shadow: 0 4px 20px rgba(61,44,46,0.08);
  --shadow-hover: 0 8px 32px rgba(61,44,46,0.14);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-full: 50px;
  --font: 'Nunito', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--brown);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

/* ---- 布局容器 ---- */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.section { padding: 60px 0; }

.section-title {
  font-size: 1.8rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}
.section-title::after {
  content: '🧁';
  display: block;
  font-size: 1.2rem;
  margin-top: 6px;
}
.section-title span {
  display: inline-block;
  position: relative;
}

/* ---- 顶部公告栏 ---- */
.announcement-bar {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: var(--white);
  text-align: center;
  font-size: 0.82rem;
  padding: 10px 20px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* ---- 导航 ---- */
.header {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(245,163,199,0.2);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  font-size: 1.5rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 6px;
}
.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.logo-text { color: var(--brown); }
.logo span { color: var(--pink); }

/* Desktop Nav */
.nav { display: flex; gap: 24px; }
.nav a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brown-light);
  transition: color .2s;
  position: relative;
  padding: 4px 0;
}
.nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2.5px;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  border-radius: 2px;
  transition: width .25s ease;
}
.nav a:hover { color: var(--pink-dark); }
.nav a:hover::after { width: 100%; }

.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.header-actions .order-btn {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: var(--white);
  padding: 9px 20px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  transition: transform .2s, box-shadow .2s;
  border: none;
}
.header-actions .order-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(245,163,199,0.4);
}
.header-actions .admin-link {
  background: var(--brown);
  color: var(--white);
  padding: 7px 16px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  transition: background .2s;
}
.header-actions .admin-link:hover { background: var(--pink-dark); }

/* ---- Mobile Menu ---- */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--brown);
  padding: 4px;
  z-index: 200;
}
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background: var(--white);
  box-shadow: -4px 0 24px rgba(0,0,0,0.1);
  padding: 80px 24px 24px;
  z-index: 150;
  transition: right .3s ease;
}
.mobile-nav.open { right: 0; }
.mobile-nav a {
  display: block;
  padding: 14px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--brown);
  border-bottom: 1px solid var(--gray-light);
  transition: color .2s;
}
.mobile-nav a:hover { color: var(--pink-dark); }
.mobile-nav .order-nav-btn {
  display: block;
  margin-top: 20px;
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: var(--white);
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  border: none;
}
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 140;
}

/* ---- 轮播横幅 ---- */
.banner-section { overflow: hidden; position: relative; border-radius: 0; }
.banner-slider { display: flex; transition: transform .5s ease; }
.banner-slide {
  min-width: 100%;
  padding: 80px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.banner-slide::before {
  content: '🧁';
  position: absolute;
  font-size: 12rem;
  opacity: 0.06;
  right: -20px;
  bottom: -30px;
  transform: rotate(-15deg);
}
.banner-content { max-width: 560px; position: relative; z-index: 1; }
.banner-content h2 {
  font-size: 2.6rem;
  font-weight: 900;
  margin-bottom: 14px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.banner-content p {
  font-size: 1rem;
  color: var(--brown-light);
  margin-bottom: 28px;
  line-height: 1.7;
  opacity: 0.8;
}

.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: var(--white);
  padding: 14px 32px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 700;
  transition: transform .2s, box-shadow .2s;
  border: none;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245,163,199,0.35);
}

.banner-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 16px 0;
}
.banner-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(61,44,46,0.15);
  cursor: pointer;
  border: none;
  transition: all .3s;
}
.banner-dot.active {
  background: var(--pink);
  transform: scale(1.3);
  box-shadow: 0 0 8px rgba(245,163,199,0.5);
}

/* ---- 分类入口 ---- */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.category-card {
  background: var(--white);
  border: 2px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 28px 16px;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all .25s ease;
  cursor: pointer;
}
.category-card:hover {
  border-color: var(--pink);
  background: var(--pink-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}


/* ---- 商品卡片网格 ---- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all .25s ease;
  position: relative;
  box-shadow: var(--shadow);
}
.product-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-6px);
}
.product-image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1/1;
  background: var(--pink-light);
}
.product-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.product-card:hover .product-image-wrap img { transform: scale(1.08); }
.product-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
}
.product-placeholder span {
  font-size: 0.7rem;
  color: var(--gray);
  margin-top: 8px;
  font-weight: 600;
}
.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: linear-gradient(135deg, var(--coral), #ff8a80);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 12px;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(255,179,166,0.4);
}
.product-actions {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  opacity: 0;
  transition: all .25s ease;
  display: flex;
  gap: 8px;
}
.product-card:hover .product-actions {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.product-actions a {
  background: var(--white);
  color: var(--brown);
  border: none;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}
.product-actions a:hover {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: var(--white);
  transform: translateY(-1px);
}
.product-info { padding: 16px 14px 14px; }
.product-name {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-short-desc {
  font-size: 0.78rem;
  color: var(--gray);
  /* margin-bottom removed for centering */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-price { display: flex; align-items: center; gap: 8px; }
.price-current { font-size: 1rem; font-weight: 800; color: var(--pink-dark); }
.price-current.free { color: var(--purple); }
.price-original {
  font-size: 0.82rem;
  color: #ccc;
  text-decoration: line-through;
}

/* ---- 商品详情页 ---- */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; padding: 60px 0; }
.product-detail-image {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--pink-light);
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}
.product-detail-image img { width: 100%; height: 100%; object-fit: cover; }
.product-detail-info { padding-top: 20px; }
.product-detail-info .breadcrumb {
  font-size: 0.82rem;
  color: var(--gray);
  margin-bottom: 16px;
}
.product-detail-info .breadcrumb a:hover { color: var(--pink-dark); text-decoration: underline; }
.product-detail-info h1 { font-size: 2rem; font-weight: 900; margin-bottom: 12px; line-height: 1.2; }
.product-detail-price { font-size: 1.6rem; font-weight: 800; margin-bottom: 20px; color: var(--pink-dark); }
.product-detail-price .old-price {
  font-size: 1rem;
  color: #ccc;
  text-decoration: line-through;
  margin-left: 10px;
}
.product-detail-desc { color: var(--brown-light); line-height: 1.8; margin-bottom: 24px; font-size: 0.95rem; }
.product-meta { margin-top: 20px; font-size: 0.85rem; color: var(--gray); }
.product-meta span { color: var(--brown); font-weight: 600; }
.btn-custom-order {
  display: inline-block;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: var(--white);
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  transition: all .25s ease;
  margin-top: 20px;
}
.btn-custom-order:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245,163,199,0.35);
}

/* ---- 页脚 ---- */
.footer {
  background: var(--brown);
  color: #d4c5c7;
  padding: 50px 0 30px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .logo { color: var(--white); margin-bottom: 14px; font-size: 1.4rem; }
.footer-brand p { font-size: 0.85rem; line-height: 1.7; color: #a8989b; }
.footer-col h4 { color: var(--pink); font-size: 0.9rem; font-weight: 700; margin-bottom: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col a { font-size: 0.82rem; color: #a8989b; transition: color .2s; }
.footer-col a:hover { color: var(--pink); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.8rem;
  color: #7a6568;
}

/* =============================================
   定制蛋糕表单页面
   ============================================= */
.order-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 24px;
}
.order-page h1 {
  font-size: 2.2rem;
  font-weight: 900;
  text-align: center;
  /* margin-bottom removed for centering */
}
.order-page .subtitle {
  text-align: center;
  color: var(--gray);
  margin-bottom: 40px;
  font-size: 0.95rem;
}
.order-form {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}
.order-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.order-form .form-group {
  margin-bottom: 22px;
}
.order-form label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--brown);
  margin-bottom: 6px;
}
.order-form label .required {
  color: var(--coral);
  margin-left: 2px;
}
.order-form input[type=text],
.order-form input[type=tel],
.order-form input[type=email],
.order-form input[type=date],
.order-form input[type=number],
.order-form select,
.order-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-light);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  font-family: inherit;
  background: var(--cream);
  color: var(--brown);
}
.order-form input:focus,
.order-form select:focus,
.order-form textarea:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 4px rgba(245,163,199,0.12);
}
.order-form textarea { resize: vertical; min-height: 100px; }
.order-form .hint {
  font-size: 0.78rem;
  color: var(--gray);
  margin-top: 4px;
}
.order-form .size-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.order-form .size-option {
  padding: 12px 8px;
  text-align: center;
  border: 2px solid var(--gray-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .2s;
  font-weight: 600;
  font-size: 0.85rem;
  background: var(--white);
}
.order-form .size-option:hover { border-color: var(--pink); }
.order-form .size-option input { display: none; }
.order-form .size-option input:checked + .size-label {
  /* handled by parent */ 
}
.order-form .size-option:has(input:checked) {
  border-color: var(--pink);
  background: var(--pink-light);
  box-shadow: 0 0 0 3px rgba(245,163,199,0.15);
}
.order-form .size-label { display: block; cursor: pointer; }
.order-form .size-label .size-price {
  font-size: 0.75rem;
  color: var(--gray);
  font-weight: 400;
  display: block;
  margin-top: 2px;
}
.order-form .btn-submit {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1.05rem;
  font-weight: 800;
  transition: all .25s ease;
  margin-top: 10px;
}
.order-form .btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245,163,199,0.35);
}

/* ---- 订单一对一步骤 ---- */
.steps {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
}
.step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray);
}
.step.active { color: var(--pink-dark); }
.step .step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--gray-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
}
.step.active .step-num {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: var(--white);
}
.step-divider {
  width: 40px;
  height: 2px;
  background: var(--gray-light);
  align-self: center;
}

/* ---- 订单成功提示 ---- */
.order-success {
  text-align: center;
  padding: 60px 24px;
}
.order-success .success-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}
.order-success h2 {
  font-size: 1.8rem;
  font-weight: 900;
  margin-bottom: 12px;
}
.order-success p {
  color: var(--gray);
  max-width: 480px;
  margin: 0 auto 30px;
  line-height: 1.8;
}

/* ---- 后台管理通用 ---- */
.admin-body {
  font-family: var(--font);
  background: var(--cream);
  min-height: 100vh;
}
.admin-header {
  background: var(--brown);
  color: var(--white);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.admin-header .logo { font-size: 1.2rem; font-weight: 900; color: var(--white); display: flex; align-items: center; gap: 6px; }
.admin-header .logo span { color: var(--pink); }
.admin-header nav { display: flex; gap: 4px; }
.admin-header nav a {
  color: #aaa;
  font-size: 0.82rem;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all .2s;
  font-weight: 600;
}
.admin-header nav a:hover, .admin-header nav a.active {
  background: rgba(255,255,255,.1);
  color: var(--white);
}
.admin-header .logout { color: var(--coral) !important; }

.admin-main { max-width: 1200px; margin: 0 auto; padding: 30px 24px; }
.admin-page-title {
  font-size: 1.5rem;
  font-weight: 900;
  margin-bottom: 24px;
  color: var(--brown);
}
.admin-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.admin-toolbar input[type=text], .admin-toolbar select {
  padding: 9px 14px;
  border: 2px solid var(--gray-light);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  outline: none;
  transition: border-color .2s;
  font-family: inherit;
}
.admin-toolbar input[type=text]:focus, .admin-toolbar select:focus { border-color: var(--pink); }

.btn {
  display: inline-block;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all .2s;
  text-align: center;
  font-family: inherit;
}
.btn-dark {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: var(--white);
}
.btn-dark:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245,163,199,0.3);
}
.btn-danger { background: var(--coral-light); color: #e53e3e; border: 1px solid #fed7d7; }
.btn-danger:hover { background: #e53e3e; color: var(--white); }
.btn-success { background: #f0fff4; color: #38a169; border: 1px solid #c6f6d5; }
.btn-success:hover { background: #38a169; color: var(--white); }
.btn-sm { padding: 5px 12px; font-size: 0.78rem; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.admin-table th {
  background: var(--cream);
  padding: 12px 14px;
  text-align: left;
  font-weight: 700;
  color: var(--brown);
  border-bottom: 2px solid var(--gray-light);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--gray-light);
  color: var(--brown);
  vertical-align: middle;
}
.admin-table tr:hover td { background: var(--pink-light); }
.product-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--pink-light);
}
.product-thumb-placeholder {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--pink-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
}
.status-pending { background: #fff8e6; color: #b8860b; }
.status-confirmed { background: #e6f7ff; color: #0077b6; }
.status-baking { background: var(--pink-light); color: var(--pink-dark); }
.status-ready { background: #f0fff4; color: #38a169; }
.status-completed { background: #f0f0f0; color: var(--gray); }
.status-cancelled { background: #fff0f0; color: #e53e3e; }
.status-on { background: #f0fff4; color: #38a169; }
.status-off { background: #fff0f0; color: #e53e3e; }

.admin-form { max-width: 720px; }
.form-group { margin-bottom: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brown);
  margin-bottom: 6px;
}
.form-group input[type=text],
.form-group input[type=number],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--gray-light);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  outline: none;
  transition: border-color .2s;
  font-family: inherit;
  background: var(--white);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(245,163,199,0.1); }
.form-group textarea { resize: vertical; min-height: 100px; }
.form-group .hint { font-size: 0.78rem; color: var(--gray); margin-top: 4px; }
.form-actions { display: flex; gap: 12px; padding-top: 10px; }

.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: 0.88rem; font-weight: 600; }
.alert-success { background: #f0fff4; color: #2f855a; border: 1px solid #c6f6d5; }
.alert-error { background: #fff5f5; color: #c53030; border: 1px solid #fed7d7; }
.alert-info { background: #e6f7ff; color: #0077b6; border: 1px solid #b3e0ff; }

.upload-preview { margin-top: 10px; }
.upload-preview img { width: 80px; height: 80px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--gray-light); }

.login-wrap {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--pink-light), var(--purple-light));
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 36px;
  width: 380px;
  box-shadow: var(--shadow-hover);
}
.login-card .logo { text-align: center; font-size: 1.8rem; font-weight: 900; margin-bottom: 6px; }
.login-card .logo span { color: var(--pink); }
.login-card p { text-align: center; color: var(--gray); font-size: 0.85rem; margin-bottom: 28px; }
.login-card .btn { width: 100%; padding: 13px; font-size: 0.95rem; border-radius: var(--radius-sm); }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform .2s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-card .stat-num { font-size: 2rem; font-weight: 900; color: var(--pink-dark); }
.stat-card .stat-label { font-size: 0.8rem; color: var(--gray); margin-top: 4px; font-weight: 600; }
.stat-card .stat-icon { font-size: 1.5rem; /* margin-bottom removed for centering */ }

/* ---- 响应式 ---- */
@media (max-width: 768px) {
  .header-inner { padding: 0 16px; }
  .nav { display: none; }
  .menu-toggle { display: block; }
  .mobile-nav { display: block; }
  .mobile-overlay { display: block; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .product-detail { grid-template-columns: 1fr; gap: 30px; }
  .banner-slide { padding: 50px 20px; }
  .banner-content h2 { font-size: 1.8rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .admin-header nav a span { display: none; }
  .order-form { padding: 24px 20px; }
  .order-form .form-row { grid-template-columns: 1fr; }
  .order-form .size-options { grid-template-columns: repeat(2, 1fr); }
  .order-page { padding: 40px 16px; }
  .steps { flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; }
  .categories-grid, .section-categories .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .order-form .size-options { grid-template-columns: 1fr 1fr; }
}

/* ===== Language Switcher ===== */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  margin-right: 4px;
}
.lang-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 30px;
  padding: 0 10px;
  border-radius: 15px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: #f0ebe8;
  color: #5a4547;
  transition: all .25s ease;
  text-decoration: none;
}
.lang-link:hover {
  background: var(--pink);
  color: #fff;
}

/* ===== Category Cards - Improved Centering ===== */
.section-categories .categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}
.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 2px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 28px 12px 24px;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all .25s ease;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
}
.category-card:hover {
  border-color: var(--pink);
  background: var(--pink-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.cat-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff0f5, #f8f0ff);
  margin-bottom: 12px;
  transition: transform .3s ease;
  overflow: hidden;
  flex-shrink: 0;
  font-size: 2rem;
  line-height: 1;
}
.category-card:hover .cat-icon-wrap {
  transform: scale(1.1);
}

.category-card .cat-name {
  display: block;
  font-size: 0.95rem;
}


/* ===== Homepage Categories - COMPLETE REWRITE v3 ===== */
.home-cats-section {
  background: #fafafa;
  padding: 50px 20px;
  text-align: center;
}
.home-cats-grid {
  display: block;
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
  font-size: 0;
}
.home-cat-item {
  display: inline-block;
  vertical-align: top;
  width: 180px;
  margin: 0 10px 20px;
  padding: 28px 12px 22px;
  background: #ffffff;
  border: 2px solid #ececec;
  border-radius: 14px;
  text-align: center;
  text-decoration: none;
  color: #333;
  font-size: 15px;
  font-weight: 700;
  transition: all .25s ease;
  box-sizing: border-box;
}
.home-cat-item:hover {
  border-color: #ff8fa3;
  background: #fff5f7;
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(255, 143, 163, 0.15);
}
.home-cat-icon {
  display: block;
  width: 64px;
  height: 64px;
  line-height: 64px;
  margin: 0 auto 12px;
  text-align: center;
  font-size: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff0f5, #f8f0ff);
  box-sizing: border-box;
}
.home-cat-item:hover .home-cat-icon {
  transform: scale(1.1);
}
.home-cat-label {
  display: block;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  color: #333;
}
@media (max-width: 700px) {
  .home-cat-item { width: calc(50% - 24px); }
}
@media (max-width: 420px) {
  .home-cat-item { width: calc(100% - 24px); max-width: 280px; }
}