/* ============================================
   FABRIC - Modern Fabric Marketplace
   Design System v2.0
   ============================================ */

/* ========== CSS Variables ========== */
:root {
  --primary: #0f172a;
  --primary-light: #1e293b;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --bg: #fafafa;
  --bg-elevated: #ffffff;
  --bg-muted: #f1f5f9;
  --text: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 12px rgba(0,0,0,0.05);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Typography */
  --text-xs: 11px;
  --text-sm: 13px;
  --text-base: 15px;
  --text-lg: 18px;
  --text-xl: 22px;
  --text-2xl: 28px;
  --text-3xl: 36px;

  /* Layout */
  --container-max: 1400px;
  --header-height: 60px;
  --sidebar-width: 220px;

  /* Breakpoints */
  --bp-mobile: 480px;
  --bp-tablet: 768px;
  --bp-desktop: 1024px;
  --bp-wide: 1600px;
}

/* ========== Reset & Base ========== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

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

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

ul {
  list-style: none;
}

/* ========== Typography & Utility Classes ========== */
.breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  padding: 16px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb a {
  color: var(--text-secondary);
}

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

.breadcrumb span {
  color: var(--text-muted);
}

.mt-16 {
  margin-top: 16px;
}

.required {
  color: var(--danger);
}

/* ========== Layout: Container, Grid System, Flex Helpers ========== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.home-layout {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 24px;
  padding: 0 20px;
  max-width: 1920px;
  margin: 0 auto;
}

/* 三列布局：左广告 + 中正文 + 右广告，整体居中 */
.content-with-ads {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: center;
  max-width: 1808px;
  margin: 0 auto;
  padding: 0 20px;
}

.content-with-ads > .container,
.content-with-ads > .container.cloth-detail-main {
  flex: 0 0 1400px;
  min-width: 0;
  max-width: 100%;
  padding-top: 20px;
}

.ad-sidebar {
  flex: 0 0 180px;
  width: 180px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.home-ad-sidebar {
  margin-top: 0;
}

.ad-sidebar .ad-card {
  width: 100%;
}

.ad-sidebar .ad-card .card-image {
  height: 200px;
}

.ad-sidebar .ad-card .card-body {
  padding: 10px;
}

.ad-sidebar .ad-card .card-title {
  font-size: 13px;
  text-align: center;
}

.ad-sidebar-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ad-card {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  display: block;
  color: var(--text);
  border: 1px solid var(--border-light);
  position: relative;
}

.ad-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--warning);
}

.ad-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 400;
  padding: 0;
  border-radius: 0;
  z-index: 2;
}

/* ========== Site Header ========== */
.site-header {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: var(--transition);
}

.site-header.scrolled {
  box-shadow: var(--shadow);
  background: rgba(255,255,255,0.95);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-header .logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.02em;
}

.site-header .logo::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 6px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5'/%3E%3C/svg%3E") center/contain no-repeat;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-header nav {
  display: flex;
  gap: 28px;
  white-space: nowrap;
}

.site-header nav a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
}

.site-header nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
  border-radius: 1px;
}

.site-header nav a:hover {
  color: var(--primary);
}

.site-header nav a:hover::after {
  width: 100%;
}

/* ========== Hero / Banner ========== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #1e3a5f 100%);
  color: #fff;
  padding: 24px 0;
  position: relative;
  overflow: visible;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.hero-container {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.hero-filter {
  width: 140px;
  flex-shrink: 0;
  display: flex;
  align-items: stretch;
}

.hero-tabs-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.hero-tab-item {
  position: static;
}

.hero-tab-link {
  display: block;
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  border-radius: var(--radius) 0 0 var(--radius);
  transition: var(--transition);
  white-space: nowrap;
}

.hero-tab-link:hover,
.hero-tab-item:hover .hero-tab-link,
.hero-tabs-wrapper:not(:hover) .hero-tab-item.active .hero-tab-link,
.hero-tabs-wrapper:hover .hero-tab-item:hover .hero-tab-link {
  color: #fff;
  background: rgba(255,255,255,0.12);
}

.hero-tabs-wrapper:hover .hero-tab-item:not(:hover) .hero-tab-link {
  color: rgba(255,255,255,0.8);
  background: transparent;
}

.hero-tab-panel {
  display: none;
  position: absolute;
  left: 100%;
  top: 0;
  margin-left: 8px;
  width: 580px;
  background: rgba(255, 255, 255, 0.33);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  padding: 16px 20px;
  z-index: 100;
  color: var(--text);
}

.hero-tab-item:hover .hero-tab-panel {
  display: block;
}

.hero-tab-panel .filter-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.hero-tab-panel .filter-row:last-child {
  border-bottom: none;
}

.hero-tab-panel .filter-label {
  font-size: 13px;
  color: #fff;
  white-space: nowrap;
  min-width: 56px;
  font-weight: 600;
}

.hero-tab-panel .filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  align-items: center;
}

.hero-tab-panel .filter-opt {
  color: var(--text);
  font-size: 13px;
  padding: 4px 14px;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s ease;
  line-height: 1.8;
}

.hero-tab-panel .filter-opt:hover {
  color: var(--accent);
  background: rgba(59,130,246,0.06);
  transform: translateY(-1px);
}

.hero-tab-panel .filter-opt.active {
  color: #fff;
  background: var(--accent);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(59,130,246,0.25);
}

.hero-banner {
  flex: 1;
  min-width: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.banner-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 200px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: rgba(0,0,0,0.2);
}

.banner-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease-in-out;
}

.banner-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
}

.banner-slide a {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  position: relative;
}

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

.banner-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 16px 14px;
  background: linear-gradient(transparent, rgba(0,0,0,0.65));
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.banner-caption span {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  max-width: 75%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.banner-caption small {
  color: rgba(255,255,255,0.6);
  font-size: 11px;
  background: rgba(255,255,255,0.15);
  padding: 2px 8px;
  border-radius: 10px;
}

.banner-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  cursor: pointer;
  transition: var(--transition);
}

.dot.active {
  background: #fff;
  width: 18px;
  border-radius: 3px;
}

.banner-placeholder {
  width: 100%;
  min-height: 200px;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.06);
  border: 1px dashed rgba(255,255,255,0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(255,255,255,0.35);
  font-size: 14px;
}

.search-banner-section {
  margin: 0 0 20px;
}

/* 搜索页：两侧广告位第一个卡片与搜索结果顶部对齐（由 JS 动态设置 padding-top） */
.ad-sidebar-align-to-grid {
  /* placeholder, value set by JS */
}

.search-banner-section .banner-carousel {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: rgba(0,0,0,0.08);
}

.search-banner-section .banner-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease-in-out;
}

.search-banner-section .banner-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
}

.search-banner-section .banner-slide a {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  position: relative;
}

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

/* ========== Sections & Section Headings ========== */
.section-heading {
  font-size: 24px;
  font-weight: 700;
  margin: 48px 0 24px;
  display: flex;
  align-items: center;
  letter-spacing: -0.02em;
  gap: 12px;
  flex-wrap: nowrap;
}

.section-heading::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 24px;
  background: linear-gradient(180deg, var(--accent), var(--primary));
  border-radius: 2px;
  margin-right: 12px;
}

.section-heading span {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.heading-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex-shrink: 1;
  min-width: 0;
}

.heading-right::-webkit-scrollbar {
  display: none;
}

.section-search {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  margin-left: auto;
}

.section-search input {
  width: 140px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
  background: var(--bg-elevated);
  color: var(--text);
  transition: var(--transition);
}

.section-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
  width: 180px;
}

.section-search input::placeholder {
  color: var(--text-muted);
}

.section-heading .more {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.section-heading .more:hover {
  color: var(--accent);
}

.section-filter-tags,
.inline-filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  align-items: center;
}

.inline-filter-tags {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.inline-filter-tags::-webkit-scrollbar {
  display: none;
}

.filter-tag {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  transition: var(--transition);
  white-space: nowrap;
  font-weight: 500;
  cursor: pointer;
}

.filter-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-tag.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.filter-tag.more-tag,
.filter-tag.more-link {
  color: var(--text-muted);
  font-size: 12px;
  border-style: dashed;
  cursor: pointer;
}

.filter-tag.more-link:hover {
  color: var(--accent);
}

/* Ad Grid Section */
.ad-grid-section {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 32px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, #eef2f7, #e8edf4);
}

.ad-grid-left {
  flex: 0 0 300px;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  background: transparent;
  flex-shrink: 0;
}

.ad-grid-left h3 {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0;
  line-height: 1.35;
}

.ad-grid-left p {
  font-size: 13.5px;
  color: #6b7280;
  margin: 0;
  line-height: 1.65;
}

.ad-grid-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 9px 28px;
  border-radius: 22px;
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  background: #3b82f6;
  text-decoration: none;
  width: fit-content;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 8px rgba(59,130,246,0.3);
}

.ad-grid-btn:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59,130,246,0.4);
  color: #fff;
}

.ad-grid-right {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  padding: 12px 16px 12px 0;
  align-items: center;
}

.ad-grid-item {
  position: relative;
  display: block;
  aspect-ratio: 5/3.5;
  overflow: hidden;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.ad-grid-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 6px 10px;
  font-size: 11.5px;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.ad-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.ad-grid-item:hover img {
  transform: scale(1.05);
}

.ad-grid-item:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.14);
}

.ad-grid-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  color: #c0c4cc;
  background: linear-gradient(135deg, #f5f7fa, #eef1f5);
  border-radius: 10px;
}

.banner-ad {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  border-radius: var(--radius);
  padding: 32px;
  margin: 32px 0;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.banner-ad::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: rgba(255,255,255,0.03);
  border-radius: 50%;
}

.banner-ad h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.banner-ad p {
  opacity: 0.75;
  font-size: 14px;
}

.ad-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

/* ========== Card System ========== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.card {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  display: block;
  color: var(--text);
  border: 1px solid var(--border-light);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border);
}

.card-image {
  height: 200px;
  overflow: hidden;
  background: var(--bg-muted);
  position: relative;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover .card-image img {
  transform: scale(1.08);
}

.card-body {
  padding: 16px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.card-shop {
  color: var(--text-secondary);
}

.vip-badge,
.shop-card-vip,
.shop-hero-vip {
  background: none;
  color: inherit;
  padding: 0;
  border-radius: 0;
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
  font-weight: 400;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

.vip-badge {
  font-size: 13px;
  margin-left: 4px;
}

.shop-card-vip {
  font-size: 14px;
  margin-left: 6px;
}

.shop-hero-vip {
  font-size: 16px;
  margin-left: 8px;
}

.card-code {
  color: var(--text-muted);
  font-family: 'SF Mono', monospace;
  font-size: 12px;
}

.card-number {
  color: var(--primary);
  font-size: 12px;
  margin-left: 8px;
}

.card-tags {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.card-tag {
  font-size: 11px;
  padding: 3px 10px;
  background: var(--bg-muted);
  color: var(--text-secondary);
  border-radius: 20px;
  font-weight: 500;
}

.no-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
  background: var(--bg-muted);
}

/* ========== Quick Entry Bar ========== */
.quick-entry-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}

.quick-card {
  text-decoration: none;
  color: var(--text);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--border-light);
}

.quick-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
  color: var(--text);
}

.quick-card-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: var(--card-bg, #f8f9fa);
  gap: 12px;
}

.quick-card-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.quick-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--card-color, var(--primary));
}

.quick-card-sub {
  font-size: 13px;
  color: var(--text-secondary);
}

.quick-card-emoji {
  font-size: 48px;
  line-height: 1;
  opacity: 0.85;
}

/* ========== Shop Cards ========== */
.shop-card-lg {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  display: block;
  color: var(--text);
  border: 1px solid var(--border-light);
  position: relative;
}

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

.shop-card-lg .shop-cover {
  height: 200px;
  position: relative;
  overflow: hidden;
}

.shop-card-lg .shop-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.shop-card-lg:hover .shop-cover img {
  transform: scale(1.05);
}

.shop-card-lg .shop-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 16px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: #fff;
}

.shop-card-lg .shop-overlay h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}

.shop-card-lg .shop-overlay p {
  font-size: 13px;
  opacity: 0.85;
}

.shop-card-compact {
  background: linear-gradient(135deg, #f8faff 0%, #f0f4ff 100%);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  border: 1px solid rgba(59,130,246,0.12);
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.shop-card-compact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #818cf8, var(--accent));
  opacity: 0.6;
}

.shop-card-compact:hover {
  box-shadow: 0 8px 32px rgba(59,130,246,0.10);
  transform: translateY(-2px);
}

.shop-card-avatar {
  position: relative;
  flex-shrink: 0;
}

.shop-card-avatar img,
.shop-card-avatar .avatar-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 2px 12px rgba(59,130,246,0.15);
}

.shop-card-avatar .avatar-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(59,130,246,0.2);
  pointer-events: none;
}

.shop-card-body {
  flex: 1;
  min-width: 0;
}

.shop-card-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.shop-card-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.01em;
}

.shop-card-verified {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: var(--accent);
  border-radius: 50%;
  color: #fff;
  font-size: 10px;
  flex-shrink: 0;
}

.shop-card-intro {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shop-card-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.shop-card-contact {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  padding: 3px 10px;
  background: rgba(255,255,255,0.7);
  border-radius: 20px;
  border: 1px solid rgba(0,0,0,0.04);
  white-space: nowrap;
}

.shop-card-contact svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.7;
}

.shop-card-action {
  flex-shrink: 0;
}

.shop-card-action .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(59,130,246,0.25);
  white-space: nowrap;
}

.shop-card-action .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59,130,246,0.35);
  background: linear-gradient(135deg, #4f46e5, var(--accent));
  color: #fff;
}

.shop-card-action .btn:active {
  transform: translateY(0);
}

.shop-cloth-section .card-grid {
  grid-template-columns: repeat(5, 1fr);
}

#shop-cloth-section .section-heading {
  margin-bottom: 16px;
  margin-top: 0;
}

#shop-cloth-section .section-heading h2 {
  font-size: 18px;
  font-weight: 600;
}

#shop-cloth-section .section-heading::before {
  height: 18px;
}

.card-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.card-link:hover {
  text-decoration: underline;
}

/* ========== Search Page ========== */
.search-page {
  margin: 0 auto 40px;
  max-width: 1920px;
  padding: 0 20px;
}

.filter-bar-sticky {
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-light);
  padding: 16px 20px;
  margin-bottom: 24px;
}

.filter-bar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-chip {
  position: relative;
}

.filter-chip select {
  appearance: none;
  padding: 8px 32px 8px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  outline: none;
  transition: var(--transition);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.filter-chip select:hover,
.filter-chip select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.product-type-tab {
  padding: 8px 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.product-type-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.product-type-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.product-type-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  background: var(--accent);
  color: #fff;
  margin-left: 6px;
  vertical-align: middle;
}

.filter-actions {
  display: flex;
  gap: 8px;
}

.filter-attrs-panel {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.filter-group-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  padding-top: 4px;
  min-width: 56px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.attr-chip {
  display: inline-block;
  padding: 4px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  font-size: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  background: var(--bg-elevated);
}

.attr-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.attr-chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

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

.results-count {
  font-size: 14px;
  color: var(--text-secondary);
}

.results-sort {
  display: flex;
  gap: 4px;
}

.sort-btn {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 20px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.sort-btn:hover,
.sort-btn.active {
  background: var(--bg-muted);
  color: var(--text);
}

.sort-btn.active {
  border-color: var(--border);
  font-weight: 500;
}

/* ========== Product Detail ========== */
.product-detail {
  display: grid;
  grid-template-columns: 0.55fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.product-gallery {
  position: sticky;
  top: 80px;
  align-self: start;
}

.gallery-main {
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg-muted);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-light);
}

.gallery-main img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-info h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.product-code {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
  font-family: 'SF Mono', monospace;
}

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

.product-tag {
  padding: 6px 14px;
  background: var(--bg-muted);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.product-attrs {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
  border: 1px solid var(--border-light);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 24px;
}

.attr-row {
  display: flex;
  padding: 6px 0;
  font-size: 14px;
}

.attr-label {
  color: var(--text-secondary);
  width: 80px;
  flex-shrink: 0;
  font-weight: 500;
}

.attr-value {
  color: var(--text);
  flex: 1;
}

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

.guarantee-bar {
  display: flex;
  gap: 0;
  margin-top: 20px;
  background: var(--bg-muted);
  border-radius: var(--radius);
  padding: 16px 8px;
  border: 1px solid var(--border-light);
}

.guarantee-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  position: relative;
}

.guarantee-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 24px;
  width: 1px;
  background: var(--border);
}

.guarantee-item svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  color: var(--text-secondary);
  opacity: 0.7;
}

.guarantee-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.guarantee-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

.btn-primary {
  padding: 14px 32px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

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

.detail-section {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
  border: 1px solid var(--border-light);
}

.detail-section .card-grid {
  margin-bottom: 0;
}

.detail-section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 200px));
  gap: 12px;
  justify-content: center;
}

.detail-gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.detail-gallery-single {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 600px;
  margin: 0 auto;
}

.detail-gallery-single img {
  width: 100%;
  height: auto;
  aspect-ratio: unset;
  object-fit: contain;
}

/* ========== Shop Detail ========== */
.shop-hero {
  position: relative;
  height: 260px;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}

.shop-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-hero-overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 32px 24px;
  color: #fff;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.shop-hero-info {
  width: 100%;
  max-width: calc(100% - 280px);
}

.shop-hero-info > h1 {
  position: absolute;
  top: 28px;
  left: 32px;
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  background: rgba(255,255,255,0.9);
  color: #1a1a1a;
  padding: 8px 22px;
  border-radius: 50px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: inline-block;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.shop-hero-info h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.shop-hero-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 13px;
  opacity: 0.95;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.shop-hero-contacts span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.shop-hero-intro {
  font-size: 14px;
  opacity: 0.9;
  margin: 6px 0 10px;
  max-width: 520px;
  line-height: 1.5;
}

.shop-feature-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  flex-shrink: 0;
  align-self: center;
  background: rgba(255,255,255,0.95);
  border-radius: var(--radius);
  padding: 16px 18px;
  backdrop-filter: blur(10px);
}

.feature-card-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}

.feature-card-item svg {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  color: var(--primary);
  opacity: 0.7;
}

.feature-card-item b {
  font-size: 13px;
  color: var(--text);
  display: block;
  line-height: 1.3;
}

.feature-card-item small {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  line-height: 1.3;
}

.shop-main-layout {
  display: flex;
  gap: 20px;
  margin-top: 24px;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 24px;
  align-items: flex-start;
}

.shop-left-sidebar {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 70px;
  align-self: flex-start;
  max-height: calc(100vh - 94px);
  overflow-y: auto;
}

.shop-left-sidebar .sidebar-section {
  padding: 0;
}

.sidebar-section {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  padding: 14px 16px;
  margin-bottom: 12px;
}

.shop-left-sidebar > .sidebar-section {
  padding: 14px 16px 14px;
}

.sidebar-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  gap: 6px;
}

.sidebar-title-bar svg {
  color: var(--primary);
  flex-shrink: 0;
}

.sidebar-clear {
  font-size: 12px;
  color: #fff;
  cursor: pointer;
  font-weight: 500;
  text-decoration: none;
  padding: 3px 10px;
  border-radius: 10px;
  background: var(--accent);
  transition: all 0.15s ease;
}

.sidebar-clear:hover {
  background: var(--primary);
  text-decoration: none;
}

.sidebar-cat-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-cat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.15s ease;
}

.sidebar-cat-item:hover {
  background: var(--bg-muted);
  color: var(--primary);
}

.sidebar-cat-icon {
  font-size: 15px;
  width: 22px;
  text-align: center;
}

.sidebar-cat-item svg {
  margin-left: auto;
  color: var(--border);
  flex-shrink: 0;
}

.sidebar-filter-group {
  margin-bottom: 10px;
}

.sidebar-filter-group:last-child {
  margin-bottom: 0;
}

.sidebar-filter-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.sidebar-filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sidebar-filter-opt {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 12.5px;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  user-select: none;
}

.sidebar-filter-opt:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.sidebar-filter-opt input[type=radio] {
  display: none;
}

.sidebar-filter-opt:has(input[type=radio]:checked) {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.sidebar-filter-more {
  font-size: 11px;
  color: var(--accent);
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 4px;
}

.sidebar-filter-more:hover {
  background: var(--bg-muted);
}

.shop-right-content {
  flex: 1;
  min-width: 0;
}

.shop-hero-meta {
  display: flex;
  gap: 16px;
  font-size: 14px;
  opacity: 0.85;
}

.shop-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.shop-search-form {
  display: flex;
  align-items: center;
  gap: 6px;
}

.shop-search-form input {
  width: 260px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  background: var(--bg-elevated);
  color: var(--text);
  transition: var(--transition);
}

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

.shop-search-form button {
  padding: 6px 10px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.shop-search-form button:hover {
  background: var(--primary-light);
}

.shop-search-clear {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

.shop-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.shop-cat-tag {
  display: inline-block;
  padding: 6px 16px;
  font-size: 13px;
  border-radius: 20px;
  background: var(--bg-muted);
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  border: 1px solid transparent;
}

.shop-cat-tag:hover {
  background: var(--border);
  color: var(--text);
}

.shop-cat-tag.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.shop-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 15px;
}

.info-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  font-size: 14px;
}

.info-chip .icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.info-chip .label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.info-chip .value {
  font-weight: 500;
  color: var(--text);
}

/* ========== Ranking Page ========== */
.ranking-hero {
  position: relative;
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
  color: #fff;
  padding: 60px 0 50px;
  text-align: center;
  overflow: hidden;
}
.ranking-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(118, 75, 162, 0.15) 0%, transparent 50%);
  animation: heroGlow 8s ease-in-out infinite alternate;
}
@keyframes heroGlow {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-20px, 20px); }
}
.ranking-hero .hero-content {
  position: relative;
  z-index: 1;
}
.ranking-hero .hero-icon {
  font-size: 52px;
  margin-bottom: 12px;
  display: inline-block;
  animation: heroBounce 2s ease-in-out infinite;
}
@keyframes heroBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.ranking-hero h1 {
  font-size: 40px;
  font-weight: 800;
  margin: 0 0 8px;
  background: linear-gradient(135deg, #f5af19 0%, #f12711 50%, #f5af19 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: goldShine 3s linear infinite;
}
@keyframes goldShine {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}
.ranking-hero .hero-sub {
  font-size: 16px;
  color: rgba(255,255,255,0.65);
  margin: 0;
  letter-spacing: 1px;
}
.ranking-hero .hero-sub strong {
  color: #f5af19;
  font-weight: 700;
}
.ranking-hero .hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  animation: floatParticle 6s ease-in-out infinite;
}
.hero-particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; width: 4px; height: 4px; }
.hero-particle:nth-child(2) { left: 25%; top: 60%; animation-delay: 1s; width: 8px; height: 8px; }
.hero-particle:nth-child(3) { left: 45%; top: 10%; animation-delay: 2s; width: 5px; height: 5px; }
.hero-particle:nth-child(4) { left: 65%; top: 70%; animation-delay: 0.5s; width: 6px; height: 6px; }
.hero-particle:nth-child(5) { left: 80%; top: 30%; animation-delay: 1.5s; width: 4px; height: 4px; }
.hero-particle:nth-child(6) { left: 90%; top: 80%; animation-delay: 2.5s; width: 7px; height: 7px; }
.hero-particle:nth-child(7) { left: 35%; top: 85%; animation-delay: 3s; width: 5px; height: 5px; }
.hero-particle:nth-child(8) { left: 55%; top: 40%; animation-delay: 0.3s; width: 6px; height: 6px; }
@keyframes floatParticle {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.3; }
  50% { transform: translateY(-30px) scale(1.5); opacity: 0.8; }
}

.ranking-stats-bar {
  display: flex;
  justify-content: center;
  gap: 0;
  background: #fff;
  border-bottom: 1px solid #e8ecf0;
  position: sticky;
  top: 60px;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.ranking-stats-bar a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  font-size: 15px;
  font-weight: 500;
  color: #6b7280;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.ranking-stats-bar a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(-50%);
  border-radius: 3px 3px 0 0;
}
.ranking-stats-bar a:hover { color: #4f46e5; }
.ranking-stats-bar a.active { color: #4f46e5; }
.ranking-stats-bar a.active::after { width: 60%; }
.ranking-stats-bar a .tab-icon { font-size: 20px; }
.ranking-stats-bar a .tab-count {
  font-size: 11px;
  background: #eef2ff;
  color: #4f46e5;
  padding: 1px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.ranking-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 36px 20px 60px;
  display: none;
  animation: fadeSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.ranking-section.active { display: block; }
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.ranking-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 2px solid #f0f2f5;
}
.ranking-cat-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ranking-cat-header h2 .cat-emoji { font-size: 28px; }
.ranking-cat-header .cat-desc {
  font-size: 14px;
  color: #94a3b8;
  font-weight: 400;
}

.ranking-grid {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
}
.ranking-col {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.04);
  overflow: hidden;
  transition: box-shadow 0.3s;
  width: 520px;
  min-height: 460px;
  flex-shrink: 0;
}
.ranking-col:hover { box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 8px 28px rgba(0,0,0,0.07); }

.ranking-col .col-header {
  padding: 18px 22px;
  background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
  border-bottom: 1px solid #eef0f5;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ranking-col .col-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: #334155;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ranking-col .col-header .col-badge {
  font-size: 11px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  padding: 2px 10px;
  border-radius: 12px;
  font-weight: 600;
}

.rank-list { list-style: none; padding: 0; margin: 0; }
.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 22px;
  border-bottom: 1px solid #f5f6f8;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
  position: relative;
}
.rank-item:last-child { border-bottom: none; }
.rank-item:hover {
  background: linear-gradient(90deg, #f8f9ff 0%, #f0f2ff 50%, #f8f9ff 100%);
  transform: translateX(4px);
}

.rank-badge {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  position: relative;
  transition: transform 0.3s;
}
.rank-item:hover .rank-badge { transform: scale(1.08); }
.rank-1 {
  background: linear-gradient(135deg, #f7971e, #ffd200);
  box-shadow: 0 2px 8px rgba(247, 151, 30, 0.35);
}
.rank-2 {
  background: linear-gradient(135deg, #757f9a, #b8c6d4);
  box-shadow: 0 2px 8px rgba(117, 127, 154, 0.3);
}
.rank-3 {
  background: linear-gradient(135deg, #c94b4b, #d4946b);
  box-shadow: 0 2px 8px rgba(201, 75, 75, 0.3);
}
.rank-other {
  background: #e2e6ee;
  color: #8895a7;
  font-weight: 600;
}
.rank-badge .medal-icon {
  font-size: 16px;
  display: none;
}
.rank-1 .medal-icon, .rank-2 .medal-icon, .rank-3 .medal-icon {
  display: inline;
}
.rank-1 .badge-num, .rank-2 .badge-num, .rank-3 .badge-num { display: none; }

.rank-thumb-wrap {
  position: relative;
  flex-shrink: 0;
}
.rank-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  background: #f3f4f6;
  border: 2px solid #f0f2f5;
  transition: all 0.3s;
}
.rank-item:hover .rank-thumb {
  border-color: #667eea;
  transform: scale(1.05);
}
.rank-thumb-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #c0c7d6;
  border: 2px solid #f0f2f5;
}

.rank-info { flex: 1; min-width: 0; }
.rank-info .rank-title {
  font-size: 15px;
  color: #1e293b;
  text-decoration: none;
  font-weight: 600;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s;
}
.rank-info .rank-title:hover { color: #4f46e5; }
.rank-info .rank-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 13px;
  color: #94a3b8;
}
.rank-info .rank-meta .meta-shop-icon { font-size: 12px; }
.rank-info .rank-meta .meta-shop {
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.rank-score {
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
  text-align: right;
  min-width: 60px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.2;
}
.rank-score .score-num {
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 18px;
}
.rank-item:hover .rank-score .score-num {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
}

.rank-shop-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  border-bottom: 1px solid #f5f6f8;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.rank-shop-item:last-child { border-bottom: none; }
.rank-shop-item:hover {
  background: linear-gradient(90deg, #f8f9ff 0%, #f0f2ff 50%, #f8f9ff 100%);
  transform: translateX(4px);
}
.rank-shop-item .shop-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #667eea;
  font-weight: 700;
  border: 2px solid #e8ecf5;
  transition: all 0.3s;
}
.rank-shop-item:hover .shop-avatar {
  border-color: #667eea;
  transform: scale(1.05);
}
.rank-shop-item .rank-info .shop-name-link {
  font-size: 15px;
  color: #1e293b;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}
.rank-shop-item .rank-info .shop-name-link:hover { color: #4f46e5; }

.rank-empty {
  text-align: center;
  padding: 50px 20px;
  color: #94a3b8;
  font-size: 15px;
}
.rank-empty .empty-icon { font-size: 40px; margin-bottom: 10px; display: block; }
.rank-empty .empty-text { color: #abb8cc; }

.period-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 20px;
  background: #fff;
  border-bottom: 1px solid #e8ecf0;
  flex-wrap: wrap;
}
.period-selector .period-label {
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  margin-right: 4px;
}
.period-selector .period-btn {
  display: inline-block;
  padding: 6px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  background: #f3f4f6;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}
.period-selector .period-btn:hover {
  color: #4f46e5;
  background: #eef2ff;
  border-color: #c7d2fe;
}
.period-selector .period-btn.active {
  color: #fff;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* ========== Footer ========== */
.site-footer {
  background: var(--primary);
  color: #94a3b8;
  padding: 60px 0 0;
  margin-top: 80px;
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-col h4 {
  color: #fff;
  font-size: 15px;
  margin-bottom: 16px;
  font-weight: 600;
}

.footer-col p,
.footer-col a {
  display: block;
  margin-bottom: 10px;
  color: #94a3b8;
  line-height: 1.6;
  transition: var(--transition);
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  text-align: center;
  padding: 20px 0;
  color: #64748b;
  font-size: 13px;
}

/* ========== Right Sidebar ========== */
.right-sidebar {
  position: fixed;
  right: 0;
  bottom: 80px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--bg-elevated);
  border-radius: var(--radius) 0 0 var(--radius);
  padding: 10px 6px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  border-right: none;
}

.sidebar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 42px;
  height: 42px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
  border: none;
  background: transparent;
  font-size: 10px;
}

.sidebar-item:hover {
  background: var(--bg-muted);
  color: var(--accent);
}

.sidebar-item svg {
  width: 20px;
  height: 20px;
}

/* ========== Toast / Skeleton / Lightbox / Empty State ========== */
.toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 14px 24px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.3s ease;
  border: 1px solid var(--border-light);
}

.toast.success {
  border-left: 3px solid var(--success);
}

.toast.error {
  border-left: 3px solid var(--danger);
}

@keyframes toastIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-muted) 25%, var(--border-light) 50%, var(--bg-muted) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.5s infinite;
  border-radius: var(--radius-sm);
}

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

.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.lightbox.show {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  font-size: 36px;
  color: #fff;
  cursor: pointer;
  z-index: 1;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

.lightbox-close:hover {
  background: rgba(255,255,255,0.1);
}

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

.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* ========== Admin Layout & Components ========== */
.shop-name-header {
  background: var(--text);
  color: #fff;
  padding: 0 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.shop-name-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
}

.shop-label {
  font-size: 14px;
  font-weight: 600;
}

.shop-label .name {
  color: rgba(255,255,255,0.95);
  font-weight: 600;
}

.shop-label .user-name {
  color: rgba(255,255,255,0.95);
  font-weight: 600;
}

.shop-label .sep {
  color: rgba(255,255,255,0.4);
  margin: 0 8px;
}

.header-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-links a {
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  text-decoration: none;
  transition: color .15s;
}

.header-links a:hover {
  color: #fff;
}

.admin-layout {
  display: flex;
  min-height: calc(100vh - 48px);
  max-width: 100%;
}

.admin-sidebar {
  width: 200px;
  min-width: 200px;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border-light);
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: 48px;
  height: calc(100vh - 48px);
  overflow-y: auto;
}

.sidebar-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 8px 20px 12px;
}

.admin-sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.admin-sidebar a:hover {
  background: var(--bg-muted);
}

.admin-sidebar a.active {
  background: var(--bg-muted);
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
}

.admin-sidebar a .icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.admin-main {
  flex: 1;
  padding: 24px 32px;
  background: var(--bg);
  min-width: 0;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.user-info {
  font-size: 14px;
}

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

.page-header h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow: hidden;
}

.panel-header {
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-muted);
}

.panel-body {
  padding: 20px;
}

.form-inline-full {
  margin-bottom: 16px;
}

.form-inline-full label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.form-inline-full input,
.form-inline-full textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  background: var(--bg);
  color: var(--text);
  transition: var(--transition);
}

.form-inline-full input:focus,
.form-inline-full textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.form-inline-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 24px;
  margin-bottom: 16px;
}

.form-inline-group {
  flex: 1;
  min-width: 0;
}

.form-inline-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.form-inline-group input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  background: var(--bg);
  color: var(--text);
  transition: var(--transition);
}

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

.input-short {
  max-width: 160px;
}

.cat-inline {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cat-inline select,
.cat-inline input {
  flex: 1;
  min-width: 0;
}

.form-inline-group select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  background: var(--bg);
  color: var(--text);
  transition: var(--transition);
  appearance: auto;
  cursor: pointer;
}

.form-inline-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.img-row-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 16px;
}

.img-col-layout {
  min-width: 220px;
}

.img-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.img-cell {
  width: 120px;
  height: 120px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.img-cell:hover {
  border-color: var(--accent);
  background: rgba(59,130,246,0.03);
}

.img-cell.has-img {
  border-style: solid;
  border-color: var(--border-light);
  cursor: default;
}

.cell-plus {
  font-size: 28px;
  color: var(--text-muted);
  line-height: 1;
}

.cell-text {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.cell-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cell-del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  opacity: 0;
  transition: var(--transition);
}

.img-cell.has-img:hover .cell-del {
  opacity: 1;
}

.trigger-hidden {
  display: none !important;
}

.img-cell input[type="file"] {
  display: none;
}

.form-section {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.inline-add-form {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.inline-add-form input {
  flex: 1;
  max-width: 360px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
}

.inline-add-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

.form-section h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text);
}

.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

.form-row label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  background: var(--bg);
  color: var(--text);
  transition: var(--transition);
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.image-upload-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.image-upload-section:hover {
  border-color: var(--accent);
  background: rgba(59,130,246,0.03);
}

.image-upload-section .upload-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.image-upload-section p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.image-upload-section input[type="file"] {
  display: none;
}

.current-cover {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  border: 1px solid var(--border-light);
}

.filter-bar {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin-bottom: 16px;
}

.filter-bar form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-bar input,
.filter-bar select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  background: var(--bg);
  color: var(--text);
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--accent);
}

.batch-actions {
  margin-bottom: 12px;
  display: flex;
  gap: 8px;
}

.btn-danger {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}

.btn-danger:hover {
  background: #dc2626;
}

.attr-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.attr-tab {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.attr-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.attr-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.attr-add {
  margin-bottom: 16px;
}

.attr-add form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.attr-add input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  flex: 1;
  max-width: 300px;
  background: var(--bg);
  color: var(--text);
}

.expired-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.expired-box {
  text-align: center;
  padding: 48px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  max-width: 460px;
}

.expired-box .icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.expired-box h2 {
  font-size: 22px;
  margin-bottom: 12px;
}

.expired-box p {
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-size: 14px;
}

.expired-box .btn {
  margin-top: 20px;
}

.table-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.no-img-text {
  color: var(--text-muted);
  font-size: 12px;
}

.data-table .status-badge {
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 20px;
  font-weight: 500;
}

.data-table .actions {
  display: flex;
  gap: 8px;
}

.data-table .actions a {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
}

.data-table .actions a:hover {
  text-decoration: underline;
}

.data-table .actions .btn-danger-text {
  color: #ef4444;
}

.page-info {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* Dashboard Stats */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.stat-card h3 {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 8px;
  font-weight: 500;
}

.stat-num {
  font-size: 32px;
  font-weight: 700;
  margin: 0;
}

.stat-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin: 4px 0 0;
}

.stat-blue .stat-num { color: var(--primary); }
.stat-green .stat-num { color: #16a34a; }
.stat-red .stat-num { color: #dc2626; }
.stat-orange .stat-num { color: #ea580c; }

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.dashboard-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
}

.dashboard-panel.full {
  grid-column: 1 / -1;
}

.dashboard-panel h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

.dashboard-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 14px;
}

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

.panel-empty {
  padding: 32px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.quick-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-success {
  background: #16a34a;
  color: #fff;
  border-color: #16a34a;
}

.btn-success:hover {
  background: #15803d;
}

.btn-warning {
  background: #d97706;
  color: #fff;
  border-color: #d97706;
}

.btn-warning:hover {
  background: #b45309;
}

.table-panel {
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
}

.table-panel .data-table {
  border: none;
  border-radius: 0;
}

.empty-cell {
  text-align: center;
  color: var(--text-muted);
  padding: 32px 16px;
  font-size: 14px;
}

.settings-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
}

.settings-panel h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

.page-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logs-page {
  margin-bottom: 16px;
}

.log-action {
  font-weight: 500;
  color: var(--primary);
}

/* ========== Pagination ========== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 40px 0;
}

.page-btn {
  padding: 10px 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}

.page-btn:hover {
  background: var(--bg-muted);
  color: var(--text);
  border-color: var(--border);
}

.page-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ========== Utilities (Buttons, Forms, Badges, Alerts, Modals) ========== */
.btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
  font-weight: 500;
}

.btn:hover {
  background: var(--bg-muted);
}

.btn-primary-solid {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn-primary-solid:hover {
  background: var(--primary-light);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

.btn-secondary {
  padding: 14px 32px;
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary:hover {
  border-color: var(--text-secondary);
  background: var(--bg-muted);
}

.btn-block {
  width: 100%;
  padding: 12px 20px;
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  transition: var(--transition);
  background: var(--bg-elevated);
  color: var(--text);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.data-table {
  width: 100%;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  overflow: hidden;
  border-collapse: collapse;
  border: 1px solid var(--border-light);
}

.data-table th {
  background: var(--bg-muted);
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text);
}

.data-table tr:hover {
  background: var(--bg-muted);
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.badge-success { background: #dcfce7; color: #166534; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info { background: #dbeafe; color: #1e40af; }

/* 广告类型竖向胶囊标签 */
.ad-type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 48px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  vertical-align: middle;
}
.badge-shop { background: #f0fdf4; color: #166534; }
.badge-cloth { background: #eff6ff; color: #1e40af; }

.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 14px;
  border-left: 3px solid;
}

.alert-error { background: #fef2f2; color: #991b1b; border-color: var(--danger); }
.alert-warning { background: #fffbeb; color: #92400e; border-color: var(--warning); }
.alert-success { background: #f0fdf4; color: #166534; border-color: var(--success); }
.alert-info { background: #eff6ff; color: #1e40af; border-color: var(--accent); }

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 16px;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-box {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 24px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
  margin: 0;
  font-size: 16px;
}

.modal-body {
  padding: 20px;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--border-light);
}

.modal-input-wrap {
  margin-top: 12px;
}

.modal-input-wrap input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}

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

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-muted);
  padding: 20px;
}

.login-box {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.login-box h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 8px;
  text-align: center;
}

.login-box .login-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  margin: 0 0 24px;
}

.login-box .login-link {
  margin-top: 16px;
  text-align: center;
  font-size: 14px;
}

.login-link {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
}

.login-link a {
  color: var(--text-muted);
  text-decoration: none;
}

.login-link a:hover {
  color: var(--accent);
}

/* ========== VIP 服务页面 ========== */

.vip-status-panel {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

.vip-status-panel.vip-active {
  background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
  border-color: #fde68a;
}

.vip-status-panel.vip-inactive {
  background: var(--bg-elevated);
  border-color: var(--border);
}

.vip-status-icon {
  font-size: 36px;
  line-height: 1;
  flex-shrink: 0;
}

.vip-status-body {
  flex: 1;
  min-width: 0;
}

.vip-status-title {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.vip-badge-lg {
  display: inline-block;
  padding: 4px 14px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
}

.vip-status-text {
  font-size: 15px;
  color: var(--text-secondary);
}

.vip-progress-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vip-progress-track {
  flex: 1;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  max-width: 300px;
}

.vip-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #d97706);
  border-radius: 4px;
  transition: width 0.6s ease;
}

.vip-progress-label {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.vip-cta-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.vip-cta-line span {
  font-size: 14px;
  color: var(--text-secondary);
}

/* 权益对比表 */
.vip-section {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.vip-section-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vip-section-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 20px;
}

.vip-compare-table {
  overflow-x: auto;
}

.vip-compare-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.vip-compare-table th,
.vip-compare-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.vip-compare-table thead th {
  font-weight: 600;
  background: var(--bg-muted);
  position: sticky;
  top: 0;
}

.col-free { color: var(--text-muted); width: 120px; }
.col-vip { color: var(--primary); width: 180px; font-weight: 600; }
.feature-name { font-weight: 500; }
.vip-check { font-size: 15px; }
.vip-cross { font-size: 15px; }

.vip-compare-table tbody tr:hover {
  background: var(--bg-muted);
}

/* 服务方案卡片 */
.vip-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.vip-pricing-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: var(--transition);
}

.vip-pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.vip-pricing-card.vip-pricing-recommended {
  border-color: #f59e0b;
  box-shadow: 0 0 0 1px #f59e0b, var(--shadow);
}

.vip-pricing-recommended-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  padding: 3px 16px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.vip-pricing-header {
  text-align: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 16px;
}

.vip-pricing-header h4 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px;
}

.vip-price {
  font-size: 36px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 4px;
}

.vip-currency {
  font-size: 18px;
  font-weight: 600;
  vertical-align: super;
}

.vip-price-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

.vip-pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  flex: 1;
}

.vip-pricing-features li {
  padding: 6px 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.vip-pricing-footer {
  text-align: center;
}

.vip-pricing-tag {
  display: inline-block;
  padding: 3px 12px;
  background: var(--bg-muted);
  border-radius: 10px;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.vip-pricing-tag-hot {
  background: #fef3c7;
  color: #92400e;
}

.vip-pricing-tag-save {
  background: #dbeafe;
  color: #1e40af;
}

/* 开通流程步骤 */
.vip-steps {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: nowrap;
  margin-top: 12px;
}

.vip-step {
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  min-width: 0;
}

.vip-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.vip-step-body h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 4px;
}

.vip-step-body p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

.vip-step-arrow {
  font-size: 20px;
  color: var(--text-muted);
  padding-top: 24px;
  flex-shrink: 0;
}

/* VIP 历史记录 */
.vip-log-list {
  margin-top: 8px;
}

.vip-log-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

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

.vip-log-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.vip-log-body {
  flex: 1;
  min-width: 0;
}

.vip-log-action {
  display: block;
  font-size: 14px;
  font-weight: 500;
}

.vip-log-detail {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.vip-log-time {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* 常见问题 */
.vip-faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.vip-faq-item {
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.vip-faq-q {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.vip-faq-a {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========== 限时活动卡 ========== */
.vip-activity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 18px;
  margin-top: 18px;
}
.vip-activity-card {
  position: relative;
  background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 100%);
  border: 2px solid #f59e0b;
  border-radius: 12px;
  padding: 24px 22px;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.12);
  transition: all 0.25s;
  overflow: hidden;
}
.vip-activity-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.2);
}
.vip-activity-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.vip-activity-badge {
  display: inline-block;
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}
.vip-activity-header h4 {
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 8px 0;
}
.vip-activity-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
}
.vip-activity-duration { color: #92400e; }
.vip-activity-duration strong { color: #b45309; font-size: 16px; }
.vip-activity-deadline { color: #ef4444; font-size: 13px; font-weight: 500; }
.vip-activity-condition {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 16px 0;
}
.vip-activity-condition-label {
  font-size: 13px;
  font-weight: 600;
  color: #92400e;
  margin-bottom: 6px;
}
.vip-activity-condition-text {
  font-size: 14px;
  color: #374151;
  line-height: 1.6;
}
.vip-activity-features {
  list-style: none;
  padding: 0;
  margin: 0 0 18px 0;
}
.vip-activity-features li {
  font-size: 14px;
  color: #1f2937;
  padding: 4px 0;
}
.vip-activity-footer { text-align: center; }
.vip-activity-footer .btn {
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  color: #fff;
  border: none;
  padding: 10px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.vip-activity-footer .btn:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

/* ========== 前台 VIP 活动横幅（首页/搜索/详情等通用） ========== */
.front-vip-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 50%, #be185d 100%);
  color: #fff;
  border-radius: var(--radius);
  text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25);
  overflow: hidden;
  position: relative;
}
.front-vip-banner::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(255,255,255,0.18) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.front-vip-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.35);
  color: #fff;
}
.fvb-icon {
  font-size: 24px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}
.fvb-title {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.fvb-text {
  font-size: 13px;
  opacity: 0.95;
  flex: 1;
  min-width: 0;
  line-height: 1.4;
}
.fvb-cta {
  font-size: 13px;
  font-weight: 600;
  background: rgba(255,255,255,0.22);
  padding: 5px 14px;
  border-radius: 16px;
  white-space: nowrap;
  flex-shrink: 0;
  backdrop-filter: blur(4px);
}

/* ========== Responsive Media Queries ========== */
@media (min-width: 900px) {
  .img-col-layout {
    flex: 1;
    min-width: 0;
  }
}

@media (max-width: 1600px) {
  .home-layout {
    flex-direction: column;
    align-items: center;
  }
  .home-layout > .content-with-ads {
    width: 100%;
    max-width: 1200px;
  }
  .content-with-ads {
    flex-direction: column;
    align-items: center;
    max-width: 1200px;
  }
  .content-with-ads > .container,
  .content-with-ads > .container.cloth-detail-main {
    width: 100%;
    flex: 1 1 auto;
  }
  .ad-sidebar {
    flex: 0 0 auto;
    width: 100%;
    max-width: 1200px;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  .ad-sidebar .ad-card {
    width: 150px;
  }
}

@media (max-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .product-detail {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .product-gallery {
    position: static;
  }

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

  .hero h1 {
    font-size: 24px;
  }
}

@media (max-width: 900px) {
  .shop-main-layout {
    flex-direction: column;
  }
  .shop-left-sidebar {
    width: 100%;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    position: relative;
    top: auto;
    max-height: none;
    overflow-y: visible;
  }
  .sidebar-section {
    flex: 1 1 calc(50% - 6px);
    margin-bottom: 0;
  }
  .shop-cloth-section .card-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .ranking-hero { padding: 44px 0 36px; }
  .ranking-hero h1 { font-size: 30px; }
  .ranking-stats-bar a { padding: 14px 20px; font-size: 14px; }
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  .quick-entry-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 18px 0;
  }

  .quick-card-body {
    padding: 14px 16px;
    gap: 10px;
  }

  .quick-card-title {
    font-size: 15px;
  }

  .quick-card-emoji {
    font-size: 36px;
  }

  .section-filter-tags {
    gap: 6px;
    margin-bottom: 14px;
  }

  .filter-tag {
    padding: 4px 12px;
    font-size: 12px;
  }

  /* 移动端 inline-filter-tags 换行展示，避免横向滚动隐藏标签 */
  .inline-filter-tags {
    flex-wrap: wrap;
    gap: 6px;
  }
  .inline-filter-tags .filter-tag.more-link {
    display: inline-block;
  }

  .section-heading {
    flex-wrap: wrap;
    gap: 8px;
  }
  .heading-right {
    flex: 1 1 100%;
    gap: 8px;
  }
  .section-search {
    margin-left: 0;
  }
  .section-search input {
    width: 120px;
  }
  .section-search input:focus {
    width: 140px;
  }

  .ad-grid-section {
    flex-direction: column;
    margin: 20px 0;
  }

  .ad-grid-left {
    flex: none;
    padding: 20px;
    text-align: center;
  }

  .ad-grid-btn {
    margin: 0 auto;
  }

  .ad-grid-right {
    grid-template-columns: repeat(3, 1fr);
  }

  .site-header .container {
    height: auto;
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .header-right {
    width: 100%;
    justify-content: space-between;
  }

  .site-header nav {
    gap: 16px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    min-width: 0;
  }
  .site-header nav::-webkit-scrollbar {
    display: none;
  }
  .site-header nav a {
    font-size: 13px;
    flex-shrink: 0;
  }

  .shop-cloth-section .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .ranking-col {
    width: 100%;
    flex-shrink: 1;
  }

  .ranking-grid {
    flex-wrap: wrap;
  }

  .hero {
    padding: 28px 0;
  }

  .hero-container {
    flex-direction: column;
    gap: 16px;
  }

  .hero-filter {
    align-items: flex-start;
  }

  .hero-tabs-wrapper {
    width: 100%;
  }

  .hero-tab-item {
    position: static;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .hero-tab-link {
    padding: 12px 16px;
    font-size: 14px;
    border-radius: 0;
  }

  .hero-tab-panel {
    position: static;
    margin-left: 0;
    margin-top: 0;
    width: 100%;
    background: #f8f9fa;
    display: none;
  }

  .hero-tab-item.active .hero-tab-panel,
  .hero-tab-item:hover .hero-tab-panel {
    display: block;
  }

  .hero-banner {
    width: 100%;
  }

  .banner-carousel,
  .banner-placeholder {
    min-height: 160px;
  }

  .card-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .card-image {
    height: 180px;
  }

  .section-heading {
    font-size: 20px;
  }

  .shop-hero {
    height: 240px;
  }

  .shop-hero-overlay {
    padding: 30px 20px 16px;
  }

  .shop-hero-info h1 {
    font-size: 22px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .filter-bar-inner {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .filter-chip select {
    white-space: nowrap;
  }

  .right-sidebar {
    bottom: 16px;
    padding: 6px 4px;
  }

  .sidebar-item {
    width: 36px;
    height: 36px;
  }

  .admin-sidebar {
    width: 56px;
    min-width: 56px;
    padding: 12px 0;
  }

  .sidebar-title {
    display: none;
  }

  .admin-sidebar a {
    padding: 12px;
    justify-content: center;
    border-left: none;
    font-size: 0;
  }

  .admin-sidebar a .icon {
    font-size: 20px;
  }

  .admin-main {
    padding: 16px;
  }

  .form-row {
    flex-direction: column;
    gap: 12px;
  }

  /* 移动端表单内联行改为单列，避免输入框过窄 */
  .form-inline-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .attr-tabs {
    gap: 4px;
  }

  .attr-tab {
    font-size: 12px;
    padding: 4px 10px;
  }
}

@media (max-width: 640px) {
  .guarantee-bar {
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 16px;
  }
  .guarantee-item {
    flex: 0 0 calc(50% - 6px);
  }
  .guarantee-item:not(:last-child)::after {
    display: none;
  }

  .shop-card-compact {
    flex-wrap: wrap;
    padding: 20px;
  }
  .shop-card-action {
    width: 100%;
  }
  .shop-card-action .btn {
    width: 100%;
    justify-content: center;
  }

  .shop-hero-overlay {
    padding: 30px 20px 16px;
    flex-direction: column;
  }
  .shop-hero-info {
    max-width: 100%;
  }
  .shop-hero-info > h1 {
    position: absolute;
    top: 16px;
    left: 20px;
    font-size: 22px;
  }
  .shop-hero-info h1 {
    font-size: 22px;
  }
  .feature-card-item b { font-size: 12px; }
  .feature-card-item small { font-size: 10px; }
  .sidebar-section {
    flex: 1 1 100%;
  }

  .ranking-hero { padding: 36px 0 30px; }
  .ranking-hero .hero-icon { font-size: 40px; }
  .ranking-hero h1 { font-size: 24px; }
  .ranking-hero .hero-sub { font-size: 14px; }
  .ranking-stats-bar { overflow-x: auto; -webkit-overflow-scrolling: touch; justify-content: flex-start; }
  .ranking-stats-bar a { padding: 12px 16px; font-size: 13px; white-space: nowrap; }
  .period-selector { padding: 12px 14px; gap: 6px; }
  .period-selector .period-btn { padding: 5px 14px; font-size: 12px; }
  .ranking-section { padding: 24px 14px 40px; }
  .rank-item { padding: 10px 14px; gap: 10px; }
  .rank-shop-item { padding: 12px 14px; }
  .rank-thumb { width: 48px; height: 48px; }
  .rank-thumb-placeholder { width: 48px; height: 48px; }
  .rank-badge { width: 28px; height: 28px; font-size: 12px; }
  .rank-score .score-num { font-size: 15px; }

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

  .vip-steps {
    flex-wrap: wrap;
    justify-content: center;
  }
  .vip-step {
    flex: 0 0 calc(50% - 16px);
    min-width: 0;
  }
  .vip-step-arrow {
    display: none;
  }

  .shop-feature-cards {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .ranking-cat-header h2 {
    font-size: 18px;
  }
  .ranking-cat-header h2 .cat-emoji {
    font-size: 20px;
  }

  .product-info h1 {
    font-size: 22px;
  }

  .vip-price {
    font-size: 28px;
  }
  .vip-currency {
    font-size: 15px;
  }

  .toast-container {
    top: 70px;
    right: 12px;
    left: 12px;
  }
  .toast {
    max-width: 100%;
  }

  .front-vip-banner {
    padding: 12px 16px;
    gap: 10px;
  }
  .fvb-icon { font-size: 20px; }
  .fvb-title { font-size: 14px; }
  .fvb-text { font-size: 12px; }
  .fvb-cta { font-size: 12px; padding: 4px 12px; }
}

@media (max-width: 480px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .shop-cloth-section .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-image {
    height: 140px;
  }

  .card-body {
    padding: 10px;
  }

  .card-title {
    font-size: 13px;
  }

  .hero h1 {
    font-size: 24px;
  }

  .detail-section {
    padding: 16px;
  }

  .product-info h1 {
    font-size: 20px;
  }

  .shop-hero {
    height: 200px;
  }
  .shop-hero-info h1 {
    font-size: 18px;
  }
  .shop-hero-intro {
    font-size: 12px;
  }
  .shop-hero-contacts span {
    font-size: 11px;
  }

  .right-sidebar {
    bottom: 12px;
    padding: 4px 2px;
    gap: 4px;
  }
  .sidebar-item {
    width: 32px;
    height: 32px;
  }
  .sidebar-item svg {
    width: 16px;
    height: 16px;
  }
  .sidebar-item span {
    font-size: 10px;
  }

  .ranking-hero h1 {
    font-size: 20px;
  }
  .ranking-hero .hero-icon {
    font-size: 32px;
  }

  .vip-price {
    font-size: 24px;
  }

  .container {
    padding: 0 12px;
  }

  .quick-entry-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .ad-grid-right {
    grid-template-columns: repeat(2, 1fr);
  }

  .section-heading {
    font-size: 17px;
  }

  /* 480px 以下 VIP 横幅：标题+文本换行纵向排列，CTA 始终右对齐 */
  .front-vip-banner {
    flex-wrap: wrap;
    padding: 10px 12px;
    gap: 6px 10px;
  }
  .fvb-icon { font-size: 18px; }
  .fvb-title { font-size: 13px; }
  .fvb-text {
    flex: 1 1 100%;
    font-size: 11px;
    line-height: 1.4;
    order: 3;
  }
  .fvb-cta {
    font-size: 11px;
    padding: 3px 10px;
    order: 4;
    margin-left: auto;
  }
}