/* ============================================
   黄色仓库 - 主样式表
   Mobile-First Responsive Design
   BEM Naming Convention
   ============================================ */

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-primary); background-color: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--secondary); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* === Layout === */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-md); }
.main-content { flex: 1; padding: var(--space-xl) 0; }

/* === Announcement Bar === */
.announcement-bar { background: var(--secondary); color: #fff; text-align: center; padding: var(--space-xs) var(--space-md); font-size: var(--fs-sm); overflow: hidden; position: relative; }
.announcement-bar__text { display: inline-block; white-space: nowrap; animation: marquee 30s linear infinite; }
@keyframes marquee { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }

/* === Header === */
.header { background: var(--card-bg); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 1000; box-shadow: var(--shadow-sm); }
.header__inner { display: flex; align-items: center; gap: var(--space-md); padding: var(--space-sm) var(--space-md); max-width: var(--max-width); margin: 0 auto; }
.header__logo { display: flex; align-items: center; gap: var(--space-sm); flex-shrink: 0; }
.header__logo img { width: 40px; height: 40px; border-radius: var(--radius-md); }
.header__logo-text { font-size: var(--fs-lg); font-weight: 800; color: var(--primary); display: none; }
@media (min-width: 768px) { .header__logo-text { display: block; } }
.header__search { flex: 1; max-width: 600px; position: relative; }
.header__search-input { width: 100%; padding: 10px 44px 10px 16px; border: 2px solid var(--border); border-radius: var(--radius-full); font-size: var(--fs-base); transition: border-color var(--transition-fast); background: var(--bg); }
.header__search-input:focus { border-color: var(--primary); background: var(--card-bg); }
.header__search-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; transition: background var(--transition-fast); }
.header__search-btn:hover { background: var(--secondary); }
.header__actions { display: flex; align-items: center; gap: var(--space-sm); }
.header__btn { display: flex; align-items: center; gap: var(--space-xs); padding: 8px 16px; border-radius: var(--radius-full); font-size: var(--fs-sm); font-weight: 600; transition: all var(--transition-fast); }
.header__btn--primary { background: var(--primary); color: #fff; }
.header__btn--primary:hover { background: var(--secondary); transform: scale(1.05); }
.header__btn--icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; position: relative; color: var(--text); }
.header__btn--icon:hover { background: var(--bg); }
.header__badge { position: absolute; top: 2px; right: 2px; width: 16px; height: 16px; background: var(--danger); color: #fff; font-size: 10px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

/* === Navigation === */
.nav { background: var(--card-bg); border-bottom: 1px solid var(--border); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.nav__list { display: flex; align-items: center; gap: 0; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-md); }
.nav__item { flex-shrink: 0; }
.nav__link { display: block; padding: 12px 16px; font-size: var(--fs-sm); font-weight: 500; color: var(--text); white-space: nowrap; border-bottom: 2px solid transparent; transition: all var(--transition-fast); }
.nav__link:hover, .nav__link--active { color: var(--primary); border-bottom-color: var(--primary); }

/* === Hero Section === */
.hero { padding: var(--space-xl) 0; }
.hero__grid { display: grid; grid-template-columns: 1fr; gap: var(--space-md); }
@media (min-width: 768px) { .hero__grid { grid-template-columns: 2fr 1fr; } }
.hero__slider { border-radius: var(--radius-lg); overflow: hidden; position: relative; aspect-ratio: 21/9; }
.hero__slide { width: 100%; height: 100%; object-fit: cover; }
.hero__sidebar { display: grid; grid-template-rows: 1fr 1fr; gap: var(--space-md); }
.hero__ad { border-radius: var(--radius-lg); overflow: hidden; position: relative; }
.hero__ad img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-base); }
.hero__ad:hover img { transform: scale(1.03); }

/* === Quick Nav (金刚区) === */
.quick-nav { padding: var(--space-xl) 0; }
.quick-nav__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
@media (min-width: 576px) { .quick-nav__grid { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 768px) { .quick-nav__grid { grid-template-columns: repeat(6, 1fr); } }
.quick-nav__item { display: flex; flex-direction: column; align-items: center; gap: var(--space-sm); padding: var(--space-md); border-radius: var(--radius-lg); transition: all var(--transition-fast); cursor: pointer; }
.quick-nav__item:hover { background: var(--card-bg); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.quick-nav__icon { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--primary-light), var(--primary)); display: flex; align-items: center; justify-content: center; font-size: 24px; color: #fff; }
.quick-nav__label { font-size: var(--fs-sm); font-weight: 500; text-align: center; color: var(--text); }

/* === Section Header === */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-lg); }
.section-header__title { font-size: var(--fs-xl); font-weight: 800; color: var(--text); }
.section-header__more { font-size: var(--fs-sm); color: var(--primary); font-weight: 500; }

/* === Flash Auction Zone === */
.flash-auction { padding: var(--space-xl) 0; background: linear-gradient(135deg, #FFF3E0, #FFE0B2); border-radius: var(--radius-xl); margin: var(--space-xl) 0; }
.flash-auction__scroll { display: flex; gap: var(--space-md); overflow-x: auto; padding: var(--space-md); -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; }
.flash-auction__card { flex: 0 0 280px; scroll-snap-align: start; background: var(--card-bg); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); transition: all var(--transition-base); }
.flash-auction__card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.flash-auction__img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.flash-auction__info { padding: var(--space-md); }
.flash-auction__title { font-size: var(--fs-base); font-weight: 600; margin-bottom: var(--space-sm); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.flash-auction__price { font-family: var(--font-mono); font-size: var(--fs-lg); font-weight: 700; color: var(--danger); }
.flash-auction__bid-btn { display: block; width: 100%; padding: 10px; background: var(--primary); color: #fff; text-align: center; font-weight: 600; border-radius: var(--radius-md); margin-top: var(--space-sm); transition: background var(--transition-fast); }
.flash-auction__bid-btn:hover { background: var(--secondary); color: #fff; }

/* === Countdown Timer === */
.countdown { display: flex; align-items: center; gap: 4px; margin: var(--space-sm) 0; }
.countdown__block { background: var(--text); color: #fff; padding: 2px 6px; border-radius: var(--radius-sm); font-family: var(--font-mono); font-size: var(--fs-sm); font-weight: 700; min-width: 28px; text-align: center; }
.countdown__sep { color: var(--text); font-weight: 700; }
.countdown--urgent .countdown__block { background: var(--danger); animation: pulse 1s infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }

/* === Guarantee Banner === */
.guarantee { padding: var(--space-2xl) 0; }
.guarantee__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-lg); }
@media (min-width: 768px) { .guarantee__grid { grid-template-columns: repeat(4, 1fr); } }
.guarantee__item { display: flex; flex-direction: column; align-items: center; text-align: center; padding: var(--space-lg); background: var(--card-bg); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); transition: all var(--transition-base); }
.guarantee__item:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.guarantee__icon { width: 64px; height: 64px; margin-bottom: var(--space-md); border-radius: 50%; background: linear-gradient(135deg, var(--primary-light), var(--primary)); display: flex; align-items: center; justify-content: center; font-size: 28px; color: #fff; }
.guarantee__title { font-size: var(--fs-base); font-weight: 700; margin-bottom: var(--space-xs); }
.guarantee__desc { font-size: var(--fs-sm); color: var(--text-light); }

/* === Product Grid (瀑布流) === */
.product-feed { padding: var(--space-xl) 0; }
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-md); }
@media (min-width: 576px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1280px) { .product-grid { grid-template-columns: repeat(5, 1fr); } }

/* === Product Card === */
.product-card { background: var(--card-bg); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: all var(--transition-base); }
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.product-card__img-wrap { position: relative; overflow: hidden; aspect-ratio: 1; }
.product-card__img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-base); }
.product-card:hover .product-card__img { transform: scale(1.08); }
.product-card__badges { position: absolute; top: var(--space-sm); left: var(--space-sm); display: flex; flex-wrap: wrap; gap: 4px; }
.product-card__badge { padding: 2px 8px; border-radius: var(--radius-full); font-size: var(--fs-xs); font-weight: 600; }
.product-card__badge--new { background: var(--success); color: #fff; }
.product-card__badge--hot { background: var(--danger); color: #fff; }
.product-card__badge--auction { background: var(--primary); color: #fff; }
.product-card__badge--rare { background: #9C27B0; color: #fff; }
.product-card__info { padding: var(--space-md); }
.product-card__title { font-size: var(--fs-sm); font-weight: 500; margin-bottom: var(--space-sm); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; }
.product-card__price { font-family: var(--font-mono); font-size: var(--fs-lg); font-weight: 700; color: var(--primary); }
.product-card__price-label { font-size: var(--fs-xs); color: var(--text-light); font-family: var(--font-primary); font-weight: 400; }
.product-card__meta { display: flex; align-items: center; justify-content: space-between; margin-top: var(--space-sm); padding-top: var(--space-sm); border-top: 1px solid var(--border); }
.product-card__seller { display: flex; align-items: center; gap: var(--space-xs); }
.product-card__seller-avatar { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.product-card__seller-name { font-size: var(--fs-xs); color: var(--text-light); }
.product-card__location { font-size: var(--fs-xs); color: var(--text-light); }

/* === Seller Leaderboard === */
.seller-board { padding: var(--space-xl) 0; }
.seller-board__grid { display: grid; grid-template-columns: 1fr; gap: var(--space-md); }
@media (min-width: 768px) { .seller-board__grid { grid-template-columns: repeat(3, 1fr); } }
.seller-card { background: var(--card-bg); border-radius: var(--radius-lg); padding: var(--space-lg); box-shadow: var(--shadow-sm); transition: all var(--transition-base); }
.seller-card:hover { box-shadow: var(--shadow-md); }
.seller-card__header { display: flex; align-items: center; gap: var(--space-md); margin-bottom: var(--space-md); }
.seller-card__avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 3px solid var(--primary-light); }
.seller-card__name { font-size: var(--fs-base); font-weight: 700; }
.seller-card__rating { display: flex; align-items: center; gap: 2px; color: var(--primary); font-size: var(--fs-sm); }
.seller-card__items { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-sm); }
.seller-card__item-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-md); }

/* === Credit Stars === */
.stars { display: inline-flex; gap: 2px; }
.stars__star { color: #ddd; font-size: 16px; }
.stars__star--filled { color: var(--primary); }
.stars__star--half { position: relative; color: #ddd; }
.stars__star--half::before { content: "\2605"; position: absolute; left: 0; width: 50%; overflow: hidden; color: var(--primary); }

/* === Condition Badges === */
.condition-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: var(--radius-full); font-size: var(--fs-xs); font-weight: 600; cursor: pointer; transition: all var(--transition-fast); }
.condition-badge--mint { background: #E8F5E9; color: #2E7D32; }
.condition-badge--excellent { background: #E3F2FD; color: #1565C0; }
.condition-badge--good { background: #FFF3E0; color: #E65100; }
.condition-badge--fair { background: #FBE9E7; color: #BF360C; }
.condition-badge--rare { background: #F3E5F5; color: #6A1B9A; }
.condition-badge:hover { transform: scale(1.05); box-shadow: var(--shadow-sm); }

/* === Security Shield === */
.security-shield { display: inline-flex; align-items: center; gap: var(--space-sm); padding: var(--space-sm) var(--space-md); background: #E8F5E9; border-radius: var(--radius-md); cursor: pointer; transition: all var(--transition-fast); }
.security-shield:hover { box-shadow: var(--shadow-sm); }
.security-shield__icon { font-size: 20px; }
.security-shield__text { font-size: var(--fs-sm); font-weight: 600; color: #2E7D32; }

/* === Footer === */
.footer { background: var(--text); color: #fff; padding: var(--space-3xl) 0 var(--space-xl); margin-top: auto; }
.footer__grid { display: grid; grid-template-columns: 1fr; gap: var(--space-2xl); }
@media (min-width: 768px) { .footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer__brand { }
.footer__brand-logo { display: flex; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-md); }
.footer__brand-logo img { width: 40px; height: 40px; border-radius: var(--radius-md); }
.footer__brand-name { font-size: var(--fs-lg); font-weight: 800; color: var(--primary); }
.footer__brand-desc { font-size: var(--fs-sm); color: #aaa; line-height: 1.8; }
.footer__col-title { font-size: var(--fs-base); font-weight: 700; margin-bottom: var(--space-md); color: #fff; }
.footer__links { display: flex; flex-direction: column; gap: var(--space-sm); }
.footer__link { font-size: var(--fs-sm); color: #aaa; transition: color var(--transition-fast); }
.footer__link:hover { color: var(--primary); }
.footer__bottom { margin-top: var(--space-2xl); padding-top: var(--space-lg); border-top: 1px solid #444; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-md); }
.footer__copyright { font-size: var(--fs-sm); color: #888; }
.footer__legal { display: flex; flex-wrap: wrap; gap: var(--space-md); }
.footer__legal a { font-size: var(--fs-sm); color: #888; }
.footer__legal a:hover { color: var(--primary); }

/* === SEO Text Block === */
.seo-text { padding: var(--space-2xl) 0; }
.seo-text__content { font-size: var(--fs-sm); color: var(--text-light); line-height: 2; }
.seo-text__content h3 { font-size: var(--fs-base); color: var(--text); margin: var(--space-lg) 0 var(--space-sm); }
.seo-text__content p { margin-bottom: var(--space-md); }

/* === Breadcrumb === */
.breadcrumb { padding: var(--space-md) 0; }
.breadcrumb__list { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); }
.breadcrumb__item { font-size: var(--fs-sm); color: var(--text-light); }
.breadcrumb__item a { color: var(--primary); }
.breadcrumb__sep { color: var(--text-light); margin: 0 4px; }

/* === Bidding Panel === */
.bid-panel { background: var(--card-bg); border-radius: var(--radius-lg); padding: var(--space-lg); box-shadow: var(--shadow-lg); position: sticky; top: 80px; }
.bid-panel__current { margin-bottom: var(--space-lg); }
.bid-panel__label { font-size: var(--fs-sm); color: var(--text-light); margin-bottom: var(--space-xs); }
.bid-panel__price { font-family: var(--font-mono); font-size: var(--fs-3xl); font-weight: 800; color: var(--danger); }
.bid-panel__input-group { display: flex; gap: var(--space-sm); margin-bottom: var(--space-md); }
.bid-panel__input { flex: 1; padding: 12px 16px; border: 2px solid var(--border); border-radius: var(--radius-md); font-family: var(--font-mono); font-size: var(--fs-lg); text-align: center; }
.bid-panel__input:focus { border-color: var(--primary); }
.bid-panel__submit { width: 100%; padding: 14px; background: var(--primary); color: #fff; font-size: var(--fs-lg); font-weight: 700; border-radius: var(--radius-md); transition: all var(--transition-fast); }
.bid-panel__submit:hover { background: var(--secondary); transform: scale(1.02); }

/* === Live Bidding Feed === */
.bid-feed { max-height: 300px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-md); }
.bid-feed__item { display: flex; align-items: center; justify-content: space-between; padding: var(--space-sm) var(--space-md); border-bottom: 1px solid var(--border); font-size: var(--fs-sm); transition: background var(--transition-fast); }
.bid-feed__item:last-child { border-bottom: none; }
.bid-feed__item--new { background: #FFF8E1; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.bid-feed__user { color: var(--text-light); }
.bid-feed__amount { font-family: var(--font-mono); font-weight: 700; color: var(--primary); }
.bid-feed__time { font-size: var(--fs-xs); color: var(--text-light); }

/* === Cookie Banner === */
.cookie-banner { position: fixed; bottom: 0; left: 0; right: 0; background: var(--card-bg); padding: var(--space-lg); box-shadow: var(--shadow-xl); z-index: 9999; display: none; border-top: 2px solid var(--primary); }
.cookie-banner--show { display: block; }
.cookie-banner__inner { max-width: var(--max-width); margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-md); }
.cookie-banner__text { font-size: var(--fs-sm); color: var(--text-light); flex: 1; }
.cookie-banner__actions { display: flex; gap: var(--space-sm); }
.cookie-banner__btn { padding: 8px 20px; border-radius: var(--radius-full); font-size: var(--fs-sm); font-weight: 600; }
.cookie-banner__btn--accept { background: var(--primary); color: #fff; }
.cookie-banner__btn--decline { background: var(--border); color: var(--text); }

/* === Skeleton Loading === */
.skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-md); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* === Back to Top === */
.back-to-top { position: fixed; bottom: 24px; right: 24px; width: 48px; height: 48px; background: var(--primary); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transition: all var(--transition-base); z-index: 999; }
.back-to-top--show { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--secondary); transform: translateY(-2px); }

/* === Page-specific: 404 === */
.error-page { text-align: center; padding: var(--space-3xl) var(--space-md); }
.error-page__img { max-width: 400px; margin: 0 auto var(--space-xl); }
.error-page__title { font-size: var(--fs-3xl); font-weight: 800; color: var(--primary); margin-bottom: var(--space-md); }
.error-page__desc { font-size: var(--fs-lg); color: var(--text-light); margin-bottom: var(--space-xl); }
.error-page__btn { display: inline-flex; align-items: center; gap: var(--space-sm); padding: 14px 32px; background: var(--primary); color: #fff; border-radius: var(--radius-full); font-weight: 700; transition: all var(--transition-fast); }
.error-page__btn:hover { background: var(--secondary); color: #fff; transform: scale(1.05); }

/* === Filter Panel === */
.filter-panel { background: var(--card-bg); border-radius: var(--radius-lg); padding: var(--space-lg); box-shadow: var(--shadow-sm); }
.filter-panel__group { margin-bottom: var(--space-lg); }
.filter-panel__group-title { font-size: var(--fs-sm); font-weight: 700; margin-bottom: var(--space-sm); color: var(--text); }
.filter-panel__options { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.filter-panel__option { padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--radius-full); font-size: var(--fs-sm); cursor: pointer; transition: all var(--transition-fast); }
.filter-panel__option:hover, .filter-panel__option--active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* === Utility Classes === */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.fw-bold { font-weight: 700; }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* === Print Styles === */
@media print { .header, .footer, .back-to-top, .cookie-banner { display: none; } body { background: #fff; } }
