/* ============================================================
   Apple Theme — NS16 Multi-Blogger E-commerce
   中性大气风格，灵感来自 apple.com
   ============================================================ */

/* === 变量 === */
:root {
  --apple-blue: #0071e3;
  --apple-blue-hover: #0077ed;
  --apple-dark: #1d1d1f;
  --apple-gray: #86868b;
  --apple-light-gray: #f5f5f7;
  --apple-white: #ffffff;
  --apple-border: #d2d2d7;
  --apple-price: #bf4800;
  --apple-success: #34c759;
  --apple-danger: #ff3b30;
  --apple-radius: 12px;
  --apple-radius-lg: 18px;
  --apple-radius-pill: 980px;
  --apple-shadow: 0 2px 12px rgba(0,0,0,0.08);
  --apple-shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
  --apple-transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
  --apple-font: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* === 基础 (IMG_2178 白底干净风格) === */
* { box-sizing: border-box; }
body {
  font-family: var(--apple-font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--apple-dark);
  background: #fafafa;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0; padding: 0;
}
a { color: var(--apple-blue); text-decoration: none; }
a:hover { color: var(--apple-blue-hover); text-decoration: underline; }
img { max-width: 100%; }

/* === 导航栏 === */
.apple-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: 48px;
  background: rgba(255,255,255,0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  transition: var(--apple-transition);
}
.apple-nav.scrolled {
  background: rgba(255,255,255,0.92);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.apple-nav-inner {
  max-width: 1200px; margin: 0 auto; height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px;
}
.apple-nav-brand {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--apple-dark);
  font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em;
}
.apple-nav-brand:hover { text-decoration: none; color: var(--apple-dark); }
.apple-nav-logo { height: 28px; width: auto; }
.apple-nav-links { display: flex; gap: 28px; }
.apple-nav-link {
  color: var(--apple-dark); font-size: 0.82rem; font-weight: 400;
  text-decoration: none; opacity: 0.8; transition: opacity 0.2s;
}
.apple-nav-link:hover { opacity: 1; text-decoration: none; }
.apple-nav-actions { display: flex; align-items: center; gap: 16px; }
.apple-nav-icon {
  background: none; border: none; color: var(--apple-dark);
  font-size: 1.1rem; cursor: pointer; opacity: 0.8;
  padding: 4px; transition: opacity 0.2s;
}
.apple-nav-icon:hover { opacity: 1; }
.apple-nav-btn {
  background: var(--apple-blue); color: #fff; border: none;
  padding: 4px 14px; border-radius: var(--apple-radius-pill);
  font-size: 0.78rem; font-weight: 500; cursor: pointer;
  transition: background 0.2s;
}
.apple-nav-btn:hover { background: var(--apple-blue-hover); }
.apple-cart-badge {
  position: absolute; top: -4px; right: -6px;
  background: var(--apple-danger); color: #fff;
  font-size: 0.6rem; font-weight: 700;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* === 手机菜单 === */
.apple-mobile-menu {
  position: fixed; top: 48px; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(20px);
  z-index: 999; padding: 20px;
  display: none; flex-direction: column; gap: 0;
}
.apple-mobile-menu.active { display: flex; }
.apple-mobile-link {
  display: block; padding: 16px 0; font-size: 1.1rem; font-weight: 500;
  color: var(--apple-dark); text-decoration: none;
  border-bottom: 1px solid var(--apple-border);
}
.apple-mobile-lang { margin-top: 20px; display: flex; gap: 16px; }
.apple-mobile-lang a { color: var(--apple-blue); font-size: 0.9rem; }

/* === 搜索覆盖层 === */
.apple-search-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4); z-index: 2000;
  display: none; align-items: flex-start; justify-content: center;
  padding-top: 100px;
}
.apple-search-overlay.active { display: flex; }
.apple-search-inner {
  width: 90%; max-width: 680px; background: #fff;
  border-radius: var(--apple-radius-lg); padding: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.apple-search-form {
  display: flex; align-items: center; gap: 12px; padding: 8px 16px;
}
.apple-search-form i { font-size: 1.2rem; color: var(--apple-gray); }
.apple-search-form input {
  flex: 1; border: none; outline: none;
  font-size: 1.1rem; font-family: var(--apple-font);
  background: transparent;
}
.apple-search-close {
  background: none; border: none; color: var(--apple-blue);
  font-size: 0.9rem; cursor: pointer; white-space: nowrap;
}

/* === 主内容区 === */
.apple-main { margin-top: 48px; min-height: 60vh; }

/* === 通用组件 === */
.apple-btn-primary {
  background: var(--apple-blue); color: #fff; border: none;
  padding: 12px 24px; border-radius: var(--apple-radius-pill);
  font-size: 0.95rem; font-weight: 500; cursor: pointer;
  transition: background 0.2s; display: inline-block; text-align: center;
  text-decoration: none;
}
.apple-btn-primary:hover { background: var(--apple-blue-hover); color: #fff; text-decoration: none; }
.apple-btn-secondary {
  background: transparent; color: var(--apple-blue); border: none;
  padding: 12px 24px; border-radius: var(--apple-radius-pill);
  font-size: 0.95rem; font-weight: 500; cursor: pointer;
  text-decoration: none;
}
.apple-btn-secondary:hover { text-decoration: underline; }

.apple-input {
  border: 1px solid var(--apple-border); border-radius: var(--apple-radius);
  padding: 10px 14px; font-size: 0.95rem; font-family: var(--apple-font);
  transition: border-color 0.2s;
}
.apple-input:focus { border-color: var(--apple-blue); box-shadow: 0 0 0 3px rgba(0,113,227,0.1); outline: none; }

/* === 区块标题 === */
.apple-section-title {
  font-size: 2rem; font-weight: 700; letter-spacing: -0.02em;
  color: var(--apple-dark); text-align: center;
  margin-bottom: 0.5rem;
}
.apple-section-sub {
  font-size: 1.1rem; color: var(--apple-gray);
  text-align: center; margin-bottom: 2rem;
}
@media (max-width: 768px) {
  .apple-section-title { font-size: 1.5rem; }
  .apple-section-sub { font-size: 0.95rem; }
}

/* === 商品卡片 (IMG_2178 白底干净风格) === */
.apple-product-card {
  background: #fff; border-radius: 16px;
  overflow: hidden; transition: var(--apple-transition);
  text-decoration: none; color: var(--apple-dark); display: block;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.apple-product-card:hover {
  transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.10);
  text-decoration: none; color: var(--apple-dark);
}
.apple-product-img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  background: var(--apple-light-gray);
  border-radius: 16px 16px 0 0;
}
.apple-product-info { padding: 12px 14px 16px; }
.apple-product-name {
  font-size: 0.85rem; font-weight: 500; line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  margin-bottom: 6px; color: var(--apple-dark);
}
.apple-product-price {
  font-size: 1rem; font-weight: 700; color: var(--apple-dark);
  letter-spacing: -0.01em;
}
.apple-product-price-old {
  font-size: 0.8rem; color: var(--apple-gray);
  text-decoration: line-through; margin-left: 6px;
}

/* === 分类标签 === */
.apple-category-tags {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 0 0 12px 0; scrollbar-width: none;
  -ms-overflow-style: none;
}
.apple-category-tags::-webkit-scrollbar { display: none; }
.apple-category-tag {
  padding: 6px 16px; border-radius: var(--apple-radius-pill);
  background: var(--apple-light-gray); color: var(--apple-dark);
  font-size: 0.82rem; font-weight: 500; white-space: nowrap;
  border: none; cursor: pointer; transition: var(--apple-transition);
  text-decoration: none;
}
.apple-category-tag:hover, .apple-category-tag.active {
  background: var(--apple-dark); color: #fff; text-decoration: none;
}

/* === 商品详情页分类导航条 === */
.apple-product-cats {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 0 0 14px; margin-bottom: 4px;
  border-bottom: 1px solid var(--apple-border);
}
.apple-product-cat-link {
  padding: 5px 14px; border-radius: 980px;
  background: var(--apple-light-gray); color: var(--apple-dark);
  font-size: 0.78rem; font-weight: 500;
  text-decoration: none; white-space: nowrap;
  transition: all 0.2s;
}
.apple-product-cat-link:hover {
  background: var(--apple-dark); color: #fff; text-decoration: none;
}
.apple-product-cat-link.active {
  background: var(--apple-dark); color: #fff;
}

/* 分类下拉面板（网格 + 小图 + 限高滚动） */
.apple-cat-dropdown {
  border-radius: 16px !important; border: 1px solid var(--apple-border) !important;
  box-shadow: 0 12px 40px rgba(0,0,0,0.14) !important;
  padding: 12px !important;
  max-height: 280px; overflow-y: auto;
  width: max-content; max-width: 580px;
}
.apple-cat-dropdown-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 6px;
  min-width: 160px;
}
.apple-cat-dropdown-item {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 10px 4px; border-radius: 12px;
  text-decoration: none; color: var(--apple-dark);
  font-size: 0.78rem; font-weight: 500;
  transition: background 0.15s;
}
.apple-cat-dropdown-item:hover {
  background: var(--apple-light-gray); text-decoration: none; color: var(--apple-dark);
}
.apple-cat-dropdown-img {
  width: 44px; height: 44px; border-radius: 10px;
  object-fit: cover; margin-bottom: 6px;
  background: var(--apple-light-gray);
}
.apple-cat-dropdown-placeholder {
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 700; color: var(--apple-gray);
}

@media (max-width: 768px) {
  .apple-cat-dropdown { min-width: 320px; }
  .apple-cat-dropdown-grid { grid-template-columns: repeat(4, 1fr); }
}

/* === 商品详情 (IMG_2178 大图风格) === */
.apple-gallery-main {
  width: 100%; border-radius: 20px;
  object-fit: contain; max-height: 500px;
  background: var(--apple-light-gray);
}
.apple-gallery-thumbs { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.apple-gallery-thumb {
  width: 64px; height: 64px; object-fit: cover;
  border-radius: 10px; cursor: pointer;
  border: 2px solid transparent; transition: all 0.2s;
  background: var(--apple-light-gray);
}
.apple-gallery-thumb:hover { border-color: var(--apple-border); transform: scale(1.05); }
.apple-gallery-thumb.active {
  border-color: var(--apple-dark);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.apple-price { font-size: 1.6rem; font-weight: 800; color: var(--apple-dark); letter-spacing: -0.02em; }
.apple-price-member { font-size: 0.85rem; color: var(--apple-gray); }
.apple-stock { font-size: 0.85rem; margin-top: 4px; }
.apple-stock.in-stock { color: var(--apple-success); }
.apple-stock.out-stock { color: var(--apple-danger); }

.apple-option-btn {
  padding: 10px 20px; border: 2px solid var(--apple-border);
  border-radius: 12px; background: #fff;
  font-size: 0.85rem; font-weight: 500; cursor: pointer;
  transition: var(--apple-transition);
}
.apple-option-btn:hover { border-color: var(--apple-dark); }
.apple-option-btn.selected {
  border-color: var(--apple-dark); background: var(--apple-dark);
  color: #fff; font-weight: 600;
}

.apple-qty {
  display: inline-flex; align-items: center; border: 2px solid var(--apple-border);
  border-radius: 12px; overflow: hidden;
}
.apple-qty button {
  width: 40px; height: 40px; border: none; background: #fff;
  font-size: 1.1rem; cursor: pointer; transition: background 0.15s;
  font-weight: 600;
}
.apple-qty button:hover { background: var(--apple-light-gray); }
.apple-qty input {
  width: 52px; height: 40px; text-align: center; border: none;
  border-left: 1px solid var(--apple-border);
  border-right: 1px solid var(--apple-border);
  font-size: 0.95rem; font-weight: 600; font-family: var(--apple-font);
}

/* === 购物车 === */
.apple-cart-section { padding: 20px 0; border-bottom: 1px solid var(--apple-border); }
.apple-cart-section:last-child { border-bottom: none; }
.apple-cart-blogger {
  font-size: 0.85rem; font-weight: 600; color: var(--apple-gray);
  text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 16px;
}
.apple-cart-item {
  display: flex; gap: 16px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid rgba(0,0,0,0.04);
}
.apple-cart-item:last-child { border-bottom: none; }
.apple-cart-item img {
  width: 80px; height: 80px; object-fit: cover;
  border-radius: var(--apple-radius); flex-shrink: 0;
}
.apple-cart-summary {
  position: sticky; top: 80px;
  background: var(--apple-light-gray); border-radius: var(--apple-radius-lg);
  padding: 24px;
}

/* === 结账步骤 === */
.apple-steps {
  display: flex; align-items: center; justify-content: center;
  gap: 0; margin-bottom: 2rem; font-size: 0.85rem;
}
.apple-step {
  color: var(--apple-gray); font-weight: 500; padding: 8px 16px;
}
.apple-step.active { color: var(--apple-dark); font-weight: 700; }
.apple-step-divider { width: 40px; height: 1px; background: var(--apple-border); }

.apple-address-card {
  border: 1.5px solid var(--apple-border); border-radius: var(--apple-radius);
  padding: 16px; cursor: pointer; transition: var(--apple-transition);
  margin-bottom: 10px;
}
.apple-address-card:hover { border-color: var(--apple-blue); }
.apple-address-card.selected { border-color: var(--apple-blue); background: rgba(0,113,227,0.03); }

/* === 迷你购物车 === */
.apple-mini-cart {
  display: none; position: absolute; right: -20px; top: 100%;
  width: 320px; background: #fff; border-radius: var(--apple-radius);
  box-shadow: 0 12px 40px rgba(0,0,0,0.15); z-index: 1060;
  margin-top: 8px; overflow: hidden;
  animation: fadeSlideDown 0.2s ease;
}
.apple-mini-cart.show { display: block; }
@keyframes fadeSlideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.apple-mini-cart-item {
  display: flex; gap: 10px; padding: 12px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.05); align-items: center;
}
.apple-mini-cart-item img {
  width: 44px; height: 44px; object-fit: cover;
  border-radius: 8px; flex-shrink: 0;
}
.apple-mini-cart-footer {
  padding: 12px 16px; background: var(--apple-light-gray);
  border-top: 1px solid rgba(0,0,0,0.05);
}
.apple-mini-cart-empty {
  padding: 30px; text-align: center; color: var(--apple-gray); font-size: 0.85rem;
}

/* === Footer === */
.apple-footer {
  background: var(--apple-light-gray);
  border-top: 1px solid var(--apple-border);
  padding: 48px 0 24px;
  margin-top: 60px;
}
.apple-footer-title {
  font-size: 0.85rem; font-weight: 700; color: var(--apple-dark);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 14px;
}
.apple-footer-link {
  display: block; font-size: 0.92rem; color: var(--apple-gray);
  margin-bottom: 10px; text-decoration: none;
  transition: color 0.15s;
}
.apple-footer-link:hover { color: var(--apple-dark); text-decoration: none; }
.apple-footer-bottom { margin-top: 24px; padding-top: 16px; }

/* === Modal 登录/注册弹窗 === */

/* Tab 切换栏 — iOS 分段控制器风格 */
.apple-modal-tabs {
  display: flex; background: var(--apple-light-gray);
  padding: 4px; border-radius: 10px; gap: 0;
}
.apple-modal-tab {
  flex: 1; padding: 9px 0; border: none; border-radius: 8px;
  font-size: 0.88rem; font-weight: 600; cursor: pointer;
  background: transparent; color: var(--apple-gray);
  transition: all 0.25s; text-align: center;
}
.apple-modal-tab.active {
  background: #fff; color: var(--apple-dark);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* 表单区域 */
#authModal .modal-content { border: none !important; border-radius: 20px !important; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.2) !important; }
#authModal .modal-dialog { max-width: 420px; margin: 1.75rem auto; padding: 0 16px; }
#authModal .tab-content { padding: 24px 24px 28px !important; }
#authModal .tab-pane { text-align: left; }

/* 输入字段 */
#authModal .apple-auth-field { margin-bottom: 16px; }
#authModal .apple-auth-field label {
  display: block; font-size: 0.8rem; font-weight: 600;
  color: var(--apple-dark); margin-bottom: 6px;
}
#authModal .apple-auth-input-wrap {
  display: flex; align-items: center; gap: 10px;
  border: 1.5px solid var(--apple-border); border-radius: 12px;
  padding: 0 14px; transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff; height: 46px; width: 100%;
}
#authModal .apple-auth-input-wrap:focus-within {
  border-color: var(--apple-dark);
  box-shadow: 0 0 0 3px rgba(29,29,31,0.06);
}
#authModal .apple-auth-input-wrap i {
  color: var(--apple-gray); font-size: 1rem; flex-shrink: 0; width: 18px; text-align: center;
}
#authModal .apple-auth-input-wrap input {
  flex: 1; border: none; outline: none; padding: 0;
  font-size: 0.92rem; font-family: var(--apple-font);
  background: transparent; color: var(--apple-dark);
  height: 100%;
}
#authModal .apple-auth-input-wrap input::placeholder { color: #c7c7cc; }

/* 提交按钮 */
#authModal .apple-auth-submit {
  width: 100%; padding: 13px; border: none; border-radius: 12px;
  background: var(--apple-dark); color: #fff;
  font-size: 0.95rem; font-weight: 600;
  cursor: pointer; transition: background 0.2s;
  margin-top: 6px;
}
#authModal .apple-auth-submit:hover { background: #333; }

/* 分割线 */
#authModal .apple-auth-divider {
  display: flex; align-items: center; gap: 14px; margin: 20px 0;
  color: var(--apple-gray); font-size: 0.78rem;
}
#authModal .apple-auth-divider::before,
#authModal .apple-auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--apple-border);
}

/* 社交登录按钮 */
#authModal .apple-auth-social {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 12px; border-radius: 12px;
  font-size: 0.88rem; font-weight: 600;
  text-decoration: none; transition: all 0.2s;
}
#authModal .apple-auth-social.fb { background: #1877f2; color: #fff; }
#authModal .apple-auth-social.fb:hover { background: #166fe5; text-decoration: none; color: #fff; }

/* Alert */
#authModal .apple-auth-alert {
  padding: 10px 14px; border-radius: 10px; font-size: 0.85rem;
}
#authModal .apple-auth-alert.error { background: #fef2f2; color: #dc2626; }

/* 双列输入在手机端改单列 */
#authModal .apple-auth-row { display: flex; gap: 10px; width: 100%; }
#authModal .apple-auth-row > * { min-width: 0; }
@media (max-width: 480px) {
  #authModal .apple-auth-row { flex-direction: column; gap: 0; }
}

/* 确保弹窗居中 */
#authModal .modal-dialog { margin-left: auto; margin-right: auto; }
.apple-dropdown { border-radius: var(--apple-radius); border: 1px solid var(--apple-border); box-shadow: var(--apple-shadow-hover); }
.apple-dropdown .dropdown-item { font-size: 0.85rem; padding: 8px 16px; }

/* === 通知 === */
.apple-notify {
  position: fixed; top: 64px; left: 50%; transform: translateX(-50%);
  background: var(--apple-dark); color: #fff;
  padding: 10px 24px; border-radius: var(--apple-radius-pill);
  font-size: 0.85rem; z-index: 10000;
  animation: fadeSlideDown 0.3s ease;
  transition: opacity 0.3s;
}

/* === 回到顶部按钮 === */
.apple-scroll-top {
  position: fixed; z-index: 1040;
  right: 20px; bottom: 90px;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--apple-dark); color: #fff;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  opacity: 0; transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}
.apple-scroll-top.visible {
  opacity: 1; transform: translateY(0);
  pointer-events: auto;
}
.apple-scroll-top:hover {
  background: #333; transform: translateY(-2px);
}
.apple-scroll-top:active {
  transform: scale(0.9);
}

/* === 渐入动画 === */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* === Hero 区块 === */
.apple-hero {
  padding: 80px 0 60px;
  text-align: center;
  background: var(--apple-light-gray);
}
.apple-hero h1 {
  font-size: 3rem; font-weight: 700; letter-spacing: -0.03em;
  color: var(--apple-dark); margin-bottom: 12px; line-height: 1.1;
}
.apple-hero p {
  font-size: 1.2rem; color: var(--apple-gray); margin-bottom: 28px;
  max-width: 600px; margin-left: auto; margin-right: auto;
}
.apple-hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* === 博主卡片 === */
.apple-blogger-card {
  background: var(--apple-light-gray); border-radius: var(--apple-radius-lg);
  overflow: hidden; transition: var(--apple-transition);
  text-decoration: none; color: var(--apple-dark); display: block;
}
.apple-blogger-card:hover {
  transform: translateY(-4px); box-shadow: var(--apple-shadow-hover);
  text-decoration: none; color: var(--apple-dark);
}
.apple-blogger-card img {
  width: 100%; height: 200px; object-fit: cover;
}
.apple-blogger-card .card-body { padding: 16px; }

/* === 横滚容器 === */
.apple-scroll-row {
  display: flex; gap: 16px; overflow-x: auto;
  scrollbar-width: none; -ms-overflow-style: none;
  padding-bottom: 8px; scroll-snap-type: x mandatory;
}
.apple-scroll-row::-webkit-scrollbar { display: none; }
.apple-scroll-row > * { scroll-snap-align: start; flex-shrink: 0; }

/* === 响应式 === */
@media (max-width: 768px) {
  .apple-hero h1 { font-size: 2rem; }
  .apple-hero p { font-size: 1rem; }
  .apple-hero { padding: 50px 20px 40px; }
  .apple-nav-inner { padding: 0 16px; }
  .apple-product-card .apple-product-img { aspect-ratio: 1; }
  .apple-cart-item img { width: 60px; height: 60px; }
  .apple-cart-summary { position: static; margin-top: 20px; }
  .apple-mini-cart { right: -60px; width: 300px; }
  .apple-gallery-main { max-height: 350px; }
}

@media (max-width: 480px) {
  body { font-size: 15px; }
  .apple-hero h1 { font-size: 1.6rem; }
  .apple-section-title { font-size: 1.3rem; }
}

/* === 店铺信息条 === */
.apple-store-header {
  display: flex; align-items: center; gap: 16px;
  padding: 28px 0 20px; border-bottom: 1px solid var(--apple-border);
  margin-bottom: 24px;
}
.apple-store-logo { width: 56px; height: 56px; object-fit: cover; border-radius: 50%; flex-shrink: 0; }
.apple-store-name { font-size: 1.5rem; font-weight: 700; margin: 0; letter-spacing: -0.02em; }
.apple-store-desc { color: var(--apple-gray); font-size: 0.88rem; margin: 2px 0 0; }
.apple-store-count { font-size: 0.8rem; color: var(--apple-gray); white-space: nowrap; }

/* === 博主公告 === */
.apple-announcement {
  background: var(--apple-light-gray); border-radius: var(--apple-radius);
  padding: 16px 20px; margin-bottom: 24px;
}
.apple-announcement-label { font-size: 0.78rem; color: var(--apple-gray); margin-bottom: 6px; }
.apple-announcement-body { font-size: 0.9rem; line-height: 1.6; }

/* === 精选分类区块 === */
.apple-featured-section { margin-bottom: 40px; }
.apple-featured-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.apple-featured-title { font-size: 1.3rem; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
.apple-featured-link { font-size: 0.85rem; color: var(--apple-blue); text-decoration: none; }
.apple-featured-link:hover { text-decoration: underline; }

/* === 侧边栏 === */
.apple-sidebar-section { margin-bottom: 28px; }
.apple-sidebar-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.92rem; font-weight: 700; color: var(--apple-dark);
  margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 2px solid var(--apple-dark);
  letter-spacing: -0.01em;
}
.apple-sidebar-title i {
  font-size: 1.1rem;
}
.apple-sidebar-link {
  display: block; padding: 9px 12px; font-size: 0.88rem;
  color: var(--apple-dark); text-decoration: none;
  border-radius: 10px; margin-bottom: 2px;
  transition: all 0.15s;
}
.apple-sidebar-link:hover { background: var(--apple-light-gray); color: var(--apple-dark); text-decoration: none; }
.apple-sidebar-link.active { background: var(--apple-dark); color: #fff; font-weight: 600; }
.apple-sidebar-link.sub { padding-left: 28px; font-size: 0.82rem; }

/* === 分页 === */
.apple-pagination {
  display: flex; justify-content: center; gap: 4px; margin: 32px 0 16px;
}
.apple-page-link {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 0.85rem; font-weight: 500;
  text-decoration: none; color: var(--apple-blue);
  transition: var(--apple-transition);
}
.apple-page-link:hover { background: var(--apple-light-gray); text-decoration: none; }
.apple-page-link.active { background: var(--apple-dark); color: #fff; }

/* === 分类图标区（手机端 Shopee 风格） === */
.apple-cat-icons {
  display: flex; gap: 4px; overflow-x: auto;
  padding: 8px 0 12px; scrollbar-width: none;
  -ms-overflow-style: none;
}
.apple-cat-icons::-webkit-scrollbar { display: none; }

.apple-cat-icon-item {
  display: flex; flex-direction: column; align-items: center;
  min-width: 68px; padding: 4px 2px; text-decoration: none;
  color: var(--apple-dark); transition: var(--apple-transition);
  flex-shrink: 0;
}
.apple-cat-icon-item:hover { text-decoration: none; color: var(--apple-blue); }
.apple-cat-icon-item.active .apple-cat-icon-name { color: var(--apple-blue); font-weight: 600; }

.apple-cat-icon-img {
  width: 56px; height: 56px; border-radius: 50%;
  object-fit: cover; border: 3px solid var(--apple-light-gray);
  transition: all 0.2s;
  background: var(--apple-light-gray);
}
.apple-cat-icon-item.active .apple-cat-icon-img {
  border-color: var(--apple-blue);
  box-shadow: 0 0 0 2px var(--apple-blue), 0 4px 12px rgba(0,113,227,0.25);
  transform: scale(1.05);
}
.apple-cat-icon-item:hover .apple-cat-icon-img { border-color: var(--apple-blue); }

.apple-cat-icon-placeholder {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--apple-light-gray);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 700; color: var(--apple-gray);
  border: 3px solid var(--apple-light-gray);
  transition: all 0.2s;
}
.apple-cat-icon-item.active .apple-cat-icon-placeholder {
  border-color: var(--apple-blue);
  background: rgba(0,113,227,0.08);
  color: var(--apple-blue);
  box-shadow: 0 0 0 2px var(--apple-blue), 0 4px 12px rgba(0,113,227,0.25);
  transform: scale(1.05);
}

.apple-cat-icon-name {
  font-size: 0.7rem; margin-top: 5px; text-align: center;
  line-height: 1.2; max-width: 68px;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  color: var(--apple-gray); transition: color 0.2s;
}
.apple-cat-icon-item.active .apple-cat-icon-name {
  color: var(--apple-blue); font-weight: 700;
}

/* === 子分类标签 === */
.apple-sub-cats {
  display: flex; gap: 6px; overflow-x: auto;
  padding: 8px 0; scrollbar-width: none;
}
.apple-sub-cats::-webkit-scrollbar { display: none; }
.apple-sub-cat {
  display: inline-block; padding: 5px 14px;
  border-radius: var(--apple-radius-pill);
  background: var(--apple-light-gray); color: var(--apple-dark);
  font-size: 0.78rem; font-weight: 500;
  text-decoration: none; white-space: nowrap;
  transition: var(--apple-transition); flex-shrink: 0;
}
.apple-sub-cat:hover { background: #e8e8ed; text-decoration: none; color: var(--apple-dark); }
.apple-sub-cat.active { background: var(--apple-dark); color: #fff; }

/* === 手机端排序 === */
.apple-mobile-sort {
  border: 1px solid var(--apple-border); border-radius: var(--apple-radius-pill);
  padding: 4px 10px; font-size: 0.78rem; background: #fff;
  color: var(--apple-dark); cursor: pointer; outline: none;
}

/* === Bento 网格首页 === */
.bento-container { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

.bento-section-header { text-align: center; padding: 44px 0 28px; }
.bento-section-title { font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; color: var(--apple-dark); margin: 0; }
.bento-section-sub { font-size: 1rem; color: var(--apple-gray); margin: 6px 0 0; }

/* Bento 网格 — 每个博主一组 */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto auto;
  gap: 12px;
  margin-bottom: 40px;
}

/* 博主信息卡 — 占 2 列 */
.bento-card {
  border-radius: 20px; overflow: hidden;
  text-decoration: none; color: var(--apple-dark);
  transition: transform 0.3s cubic-bezier(0.25,0.1,0.25,1), box-shadow 0.3s;
  display: flex; flex-direction: column;
}
.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
  text-decoration: none; color: var(--apple-dark);
}

.bento-card-hero {
  grid-column: span 2; grid-row: span 2;
  background: linear-gradient(135deg, #1d1d1f, #2d2d2f);
  color: #fff; padding: 28px; position: relative;
  justify-content: flex-end; min-height: 280px;
  background-size: 300% 300%;
  animation: bentoAurora 6s ease infinite;
}
@keyframes bentoAurora {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
/* 极光配色方案 */
.bento-card-hero.bento-aurora-0 { background: linear-gradient(135deg, #0071e3, #7b2ff7, #c644fc, #0071e3); background-size: 300% 300%; }
.bento-card-hero.bento-aurora-1 { background: linear-gradient(135deg, #f7971e, #ff6b6b, #ee5a6f, #f7971e); background-size: 300% 300%; }
.bento-card-hero.bento-aurora-2 { background: linear-gradient(135deg, #11998e, #38ef7d, #11998e, #38ef7d); background-size: 300% 300%; }
.bento-card-hero.bento-aurora-3 { background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #667eea); background-size: 300% 300%; }
.bento-card-hero.bento-aurora-4 { background: linear-gradient(135deg, #fc5c7d, #6a82fb, #fc5c7d, #6a82fb); background-size: 300% 300%; }
.bento-card-hero.bento-aurora-5 { background: linear-gradient(135deg, #f857a6, #ff5858, #ffc371, #f857a6); background-size: 300% 300%; }
.bento-card-hero:hover { color: #fff; }
.bento-hero-logo {
  width: 60px; height: 60px; border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(255,255,255,0.2); margin-bottom: 16px;
}
.bento-hero-logo-placeholder {
  width: 60px; height: 60px; border-radius: 50%;
  background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px; font-size: 1.5rem; color: rgba(255,255,255,0.4);
}
.bento-hero-info { margin-top: auto; }
.bento-hero-name { font-size: 1.4rem; font-weight: 700; margin: 0 0 6px; letter-spacing: -0.02em; }
.bento-hero-desc { font-size: 0.85rem; opacity: 0.7; margin: 0 0 14px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bento-hero-cta {
  display: inline-block; padding: 8px 20px;
  background: rgba(255,255,255,0.15); border-radius: 980px;
  font-size: 0.82rem; font-weight: 600; color: #fff;
  backdrop-filter: blur(10px);
}
.bento-card-hero:hover .bento-hero-cta { background: rgba(255,255,255,0.25); }
.bento-hero-social {
  position: absolute; top: 20px; right: 20px;
  display: flex; gap: 8px; font-size: 1rem; color: rgba(255,255,255,0.4);
}

/* 精选大图商品卡 — 占 2 列 */
.bento-card-featured {
  grid-column: span 2;
  background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.bento-featured-img {
  width: 100%; height: 200px; object-fit: cover;
}
.bento-featured-info { padding: 14px 16px; }
.bento-featured-cat {
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--apple-gray);
}
.bento-featured-name {
  font-size: 0.92rem; font-weight: 600; margin: 4px 0 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bento-featured-price { font-size: 1rem; font-weight: 700; color: var(--apple-dark); }

/* 小商品卡 — 占 1 列 */
.bento-card-sm {
  background: var(--apple-light-gray);
  padding: 12px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  min-height: 160px;
}
.bento-sm-img {
  width: 80px; height: 80px; object-fit: contain;
  border-radius: 12px; margin-bottom: 8px;
  background: #fff; padding: 4px;
}
.bento-sm-name {
  font-size: 0.78rem; font-weight: 500; margin-bottom: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 100%;
}
.bento-sm-price { font-size: 0.88rem; font-weight: 700; color: var(--apple-dark); }

/* 查看全部引导卡 */
.bento-card-cta {
  background: var(--apple-dark); color: #fff;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 20px;
  min-height: 160px;
}
.bento-card-cta:hover { color: #fff; background: #333; }
.bento-cta-text { font-size: 0.88rem; font-weight: 600; margin-bottom: 2px; }
.bento-cta-name { font-size: 0.72rem; opacity: 0.5; }

/* 统计卡 */
.bento-card-stat {
  background: linear-gradient(135deg, var(--apple-light-gray), #e8e8ed);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 20px;
  min-height: 160px;
}
.bento-stat-num { font-size: 2rem; font-weight: 800; color: var(--apple-dark); letter-spacing: -0.03em; line-height: 1; }
.bento-stat-label { font-size: 0.78rem; color: var(--apple-gray); margin-top: 4px; font-weight: 500; }

/* 底部 CTA */
.bento-bottom-cta { text-align: center; padding: 8px 0 48px; }

/* Bento 响应式 */
@media (max-width: 768px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .bento-card-hero { min-height: 220px; padding: 20px; }
  .bento-hero-name { font-size: 1.15rem; }
  .bento-card-featured { grid-column: span 2; }
  .bento-featured-img { height: 160px; }
  .bento-section-title { font-size: 1.5rem; }
  .bento-section-header { padding: 32px 0 20px; }
  .bento-card-sm { min-height: 130px; }
  .bento-sm-img { width: 64px; height: 64px; }
}

@media (max-width: 480px) {
  .bento-card-hero { min-height: 180px; padding: 16px; grid-column: span 2; }
  .bento-hero-logo { width: 44px; height: 44px; }
  .bento-hero-name { font-size: 1.05rem; }
  .bento-card-sm { min-height: 110px; padding: 10px; }
  .bento-sm-img { width: 52px; height: 52px; }
  .bento-sm-name { font-size: 0.72rem; }
}

/* === 独立登录/注册页面 === */
.apple-auth-page {
  min-height: calc(100vh - 48px); display: flex; align-items: center;
  justify-content: center; background: #fafafa; padding: 20px;
}
.apple-auth-container {
  display: flex; max-width: 820px; width: 100%;
  background: #fff; border-radius: 20px; overflow: hidden;
  box-shadow: 0 4px 40px rgba(0,0,0,0.08);
}
.apple-auth-visual {
  flex: 0 0 300px; background: linear-gradient(135deg, #1d1d1f 0%, #333 100%);
  color: #fff; display: flex; align-items: center; justify-content: center; padding: 40px;
}
.apple-auth-visual-inner { text-align: center; }
.apple-auth-form { flex: 1; padding: 48px 40px; display: flex; align-items: center; }
.apple-auth-form-inner { width: 100%; }
.apple-auth-title { font-size: 1.6rem; font-weight: 700; color: var(--apple-dark); margin: 0 0 4px; letter-spacing: -0.02em; }
.apple-auth-subtitle { font-size: 0.88rem; color: var(--apple-gray); margin: 0 0 28px; }
.apple-auth-alert { padding: 10px 14px; border-radius: 10px; font-size: 0.85rem; margin-bottom: 20px; }
.apple-auth-alert.error { background: #fef2f2; color: #dc2626; }
.apple-auth-alert.success { background: #f0fdf4; color: #16a34a; }
.apple-auth-field { margin-bottom: 18px; }
.apple-auth-field label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--apple-dark); margin-bottom: 6px; }
.apple-auth-input-wrap {
  display: flex; align-items: center; gap: 10px;
  border: 1.5px solid var(--apple-border); border-radius: 12px;
  padding: 0 14px; transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff; height: 46px;
}
.apple-auth-input-wrap:focus-within { border-color: var(--apple-dark); box-shadow: 0 0 0 3px rgba(29,29,31,0.06); }
.apple-auth-input-wrap i { color: var(--apple-gray); font-size: 1rem; flex-shrink: 0; width: 18px; text-align: center; }
.apple-auth-input-wrap input, .apple-auth-input-wrap select {
  flex: 1; border: none; outline: none; padding: 0; height: 100%;
  font-size: 0.95rem; font-family: var(--apple-font); background: transparent; color: var(--apple-dark);
}
.apple-auth-input-wrap input::placeholder { color: #c7c7cc; }
.apple-auth-submit {
  width: 100%; padding: 13px; border: none; border-radius: 12px;
  background: var(--apple-dark); color: #fff; font-size: 0.95rem; font-weight: 600;
  cursor: pointer; transition: background 0.2s; margin-top: 4px;
}
.apple-auth-submit:hover { background: #333; }
.apple-auth-divider {
  display: flex; align-items: center; gap: 14px; margin: 24px 0;
  color: var(--apple-gray); font-size: 0.78rem;
}
.apple-auth-divider::before, .apple-auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--apple-border); }
.apple-auth-social {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 12px; border-radius: 12px; font-size: 0.9rem; font-weight: 600;
  text-decoration: none; transition: all 0.2s;
}
.apple-auth-social.fb { background: #1877f2; color: #fff; }
.apple-auth-social.fb:hover { background: #166fe5; text-decoration: none; color: #fff; }
.apple-auth-switch { text-align: center; font-size: 0.85rem; color: var(--apple-gray); margin-top: 24px; }
.apple-auth-switch a { color: var(--apple-blue); font-weight: 500; }
@media (max-width: 767px) {
  .apple-auth-container { flex-direction: column; border-radius: 16px; }
  .apple-auth-visual { display: none !important; }
  .apple-auth-form { padding: 32px 24px; }
  .apple-auth-page { padding: 12px; align-items: flex-start; padding-top: 24px; }
}

/* === 占位图 === */
.apple-img-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--apple-light-gray); color: var(--apple-border); font-size: 2rem;
}

/* === 手机端底部导航栏 (Church 悬浮风格) === */

/* 外层容器 — 不贴底，留出悬浮空间 */
.apple-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1050;
  padding: 0 16px 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0));
  pointer-events: none;
}

/* 内层卡片 — 白底圆角 + 柔阴影 = 悬浮效果 */
.apple-bottom-inner {
  display: flex; align-items: flex-end; justify-content: space-around;
  height: 56px; background: #fff; border-radius: 20px;
  box-shadow: 0 -2px 24px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.06);
  pointer-events: auto; position: relative; overflow: visible;
}

/* 单个 Tab 项 */
.apple-bottom-item {
  position: relative; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  flex: 1; height: 56px;
  color: #a0a5b2; text-decoration: none;
  font-size: 10px; font-weight: 500; letter-spacing: 0.02em;
  gap: 2px; -webkit-tap-highlight-color: transparent;
  cursor: pointer; border: none; background: none; padding: 0;
  transition: color 0.25s ease;
}
.apple-bottom-item i {
  font-size: 20px; line-height: 1;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.25s ease;
}
.apple-bottom-item:hover, .apple-bottom-item:active { color: var(--apple-dark); text-decoration: none; }
.apple-bottom-item:active i { transform: scale(0.82); transition-duration: 0.06s; }

/* 购物车 badge */
.apple-bottom-cart { position: relative; }
.apple-bottom-badge {
  position: absolute; top: 6px; right: calc(50% - 20px);
  background: var(--apple-danger); color: #fff;
  font-size: 0.5rem; font-weight: 700;
  min-width: 15px; height: 15px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
}

/* 中心头像占位 */
.apple-bottom-center {
  flex: none; width: 76px; height: 56px; position: relative;
}

/* 中心头像按钮 — 凸出 tab bar 上方，极光渐变环 */
.apple-bottom-avatar {
  position: absolute; left: 50%; bottom: 22px;
  transform: translateX(-50%);
  width: 58px; height: 58px; border-radius: 50%;
  background: linear-gradient(135deg, #0071e3, #7b2ff7, #c644fc, #ff6b6b, #38ef7d, #0071e3);
  background-size: 400% 400%;
  animation: avatarAuroraRing 3s ease infinite;
  padding: 3px;
  box-shadow: 0 6px 24px rgba(123,47,247,0.35), 0 2px 8px rgba(0,0,0,0.12);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; color: #fff;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  overflow: hidden;
}
@keyframes avatarAuroraRing {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.apple-bottom-avatar:hover { text-decoration: none; color: #fff; }
.apple-bottom-avatar:active { transform: translateX(-50%) scale(0.9); transition-duration: 0.08s; }
.apple-bottom-avatar img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 50%; border: 2.5px solid #fff;
}
.apple-bottom-avatar i { font-size: 1.4rem; }

/* === FAB 弹出菜单 (从右下角向上展开) === */
.apple-popup-overlay {
  position: fixed; inset: 0; z-index: 1048;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: none; opacity: 0; transition: opacity 0.3s;
}
.apple-popup-overlay.active { display: block; opacity: 1; }

.apple-popup-menu {
  position: fixed; bottom: 80px; right: 16px; z-index: 1049;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.apple-popup-menu.active { opacity: 1; pointer-events: auto; }

.apple-popup-inner {
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
  padding: 0;
}

/* 每个菜单项 — 独立药丸卡片 */
.apple-popup-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-radius: 980px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  font-size: 0.88rem; font-weight: 600;
  color: var(--apple-dark); text-decoration: none;
  transition: all 0.2s;
  transform: translateY(20px) scale(0.9);
  opacity: 0;
}
.apple-popup-menu.active .apple-popup-item {
  transform: translateY(0) scale(1);
  opacity: 1;
}
/* 逐个延迟弹出 */
.apple-popup-menu.active .apple-popup-item:nth-child(1) { transition-delay: 0.02s; }
.apple-popup-menu.active .apple-popup-item:nth-child(2) { transition-delay: 0.05s; }
.apple-popup-menu.active .apple-popup-item:nth-child(3) { transition-delay: 0.08s; }
.apple-popup-menu.active .apple-popup-item:nth-child(4) { transition-delay: 0.11s; }
.apple-popup-menu.active .apple-popup-item:nth-child(5) { transition-delay: 0.14s; }
.apple-popup-menu.active .apple-popup-item:nth-child(6) { transition-delay: 0.17s; }
.apple-popup-menu.active .apple-popup-item:nth-child(7) { transition-delay: 0.20s; }
.apple-popup-menu.active .apple-popup-item:nth-child(8) { transition-delay: 0.23s; }
.apple-popup-menu.active .apple-popup-item:nth-child(9) { transition-delay: 0.26s; }
.apple-popup-menu.active .apple-popup-item:nth-child(10) { transition-delay: 0.29s; }
.apple-popup-menu.active .apple-popup-item:nth-child(11) { transition-delay: 0.32s; }
.apple-popup-menu.active .apple-popup-item:nth-child(12) { transition-delay: 0.35s; }

.apple-popup-item:active { transform: scale(0.95); }
.apple-popup-item i {
  width: 20px; height: 20px; text-align: center; line-height: 20px;
  font-size: 0.88rem; color: var(--apple-gray);
}

/* 当前页面高亮 */
.apple-popup-active {
  background: var(--apple-dark) !important; color: #fff !important;
  box-shadow: 0 4px 20px rgba(29,29,31,0.25);
}
.apple-popup-active i { color: #fff !important; }

/* 危险操作（退出） */
.apple-popup-danger { color: var(--apple-danger) !important; }
.apple-popup-danger i { color: var(--apple-danger) !important; }

/* 分隔线 — FAB 模式下隐藏 */
.apple-popup-divider { display: none; }

/* 关闭按钮 */
.apple-popup-close {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: var(--apple-dark);
  transition: all 0.2s;
  margin-top: 4px;
}
.apple-popup-close:active { transform: scale(0.9); }

.apple-popup-badge {
  background: var(--apple-danger); color: #fff;
  font-size: 0.6rem; font-weight: 700;
  padding: 1px 6px; border-radius: 10px; margin-left: auto;
}

/* === 分类底部弹出面板 (Bottom Sheet) === */
.apple-sheet-backdrop {
  position: fixed; inset: 0; z-index: 1060;
  background: rgba(0,0,0,0.4);
  display: none; opacity: 0;
  transition: opacity 0.3s;
}
.apple-sheet-backdrop.active { display: block; opacity: 1; }

.apple-sheet {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1061;
  background: #fff;
  border-radius: 20px 20px 0 0;
  max-height: 75vh; overflow: hidden;
  display: flex; flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}
.apple-sheet.active { transform: translateY(0); }

.apple-sheet-handle {
  padding: 10px 0 4px; text-align: center; cursor: pointer; flex-shrink: 0;
}
.apple-sheet-bar {
  width: 36px; height: 4px; border-radius: 2px;
  background: var(--apple-border); margin: 0 auto;
}
.apple-sheet-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 20px 12px; border-bottom: 1px solid var(--apple-border);
  flex-shrink: 0;
}
.apple-sheet-body {
  overflow-y: auto; padding: 12px 16px 24px; flex: 1;
  -webkit-overflow-scrolling: touch;
}

/* 分类项 */
.apple-sheet-cat-group { border-bottom: 1px solid rgba(0,0,0,0.04); }
.apple-sheet-cat-group:last-child { border-bottom: none; }

.apple-sheet-cat-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 4px; text-decoration: none; color: var(--apple-dark);
  font-size: 0.92rem; font-weight: 500;
  transition: background 0.15s; border-radius: 10px;
}
.apple-sheet-cat-item:hover { background: var(--apple-light-gray); text-decoration: none; color: var(--apple-dark); }

.apple-sheet-cat-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--apple-light-gray);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 700; color: var(--apple-gray);
  flex-shrink: 0;
}
.apple-sheet-cat-icon i { font-size: 1.1rem; }
.apple-sheet-cat-icon-img {
  width: 44px; height: 44px; border-radius: 12px;
  object-fit: cover; flex-shrink: 0;
}

.apple-sheet-arrow {
  font-size: 0.8rem; color: var(--apple-gray);
  transition: transform 0.25s; cursor: pointer;
  padding: 8px; margin: -8px;
}
.apple-sheet-arrow.rotated { transform: rotate(180deg); }

/* 子分类（折叠） */
.apple-sheet-subcats {
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 0 0 56px;
}
.apple-sheet-subcats.open {
  max-height: 500px;
  padding: 4px 0 8px 56px;
}
.apple-sheet-subcat {
  display: inline-block;
  padding: 5px 14px; margin: 3px 4px;
  border-radius: var(--apple-radius-pill);
  background: var(--apple-light-gray); color: var(--apple-dark);
  font-size: 0.8rem; font-weight: 500;
  text-decoration: none; white-space: nowrap;
  transition: var(--apple-transition);
}
.apple-sheet-subcat:hover { background: var(--apple-dark); color: #fff; text-decoration: none; }

/* 有底部导航时，主内容和 footer 底部留空 */
@media (max-width: 767.98px) {
  .apple-main { padding-bottom: 64px; }
  .apple-footer { padding-bottom: 72px; }
}
