:root {
  --sf-shadow-modal: 0 24px 70px rgba(15, 36, 65, 0.24);
}

html { scroll-behavior: smooth; }

button, a, .product-card, .subcat-card, .cat-card, .brand-card, .hero-card,
.filter-category__item, .user-area__link, .floating-panel__item {
  -webkit-tap-highlight-color: transparent;
}

.sf-clickable, .cascader-item__link, .footer-promise { cursor: pointer; }
.sf-clickable { transition: transform .18s ease, filter .18s ease; }
.sf-clickable:hover { filter: brightness(.98); }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
[role="button"]:focus-visible {
  outline: 3px solid rgba(24, 114, 233, 0.28);
  outline-offset: 2px;
}

.sf-toast-region {
  position: fixed;
  top: 76px;
  left: 50%;
  z-index: 12000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  transform: translateX(-50%);
}

.sf-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  max-width: min(560px, calc(100vw - 32px));
  padding: 12px 18px;
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  background: #163761;
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(15, 36, 65, 0.24);
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity .22s ease, transform .22s ease;
}

.sf-toast.show { opacity: 1; transform: translateY(0); }
.sf-toast--success { background: #12805c; }
.sf-toast--warning { background: #b85d00; }

.sf-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 24, 45, 0.52);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
  backdrop-filter: blur(3px);
}

.sf-dialog-backdrop.open { opacity: 1; visibility: visible; }

.sf-dialog {
  width: min(430px, 100%);
  padding: 30px;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--sf-shadow-modal);
  transform: translateY(14px) scale(.98);
  transition: transform .2s ease;
}

.sf-dialog-backdrop.open .sf-dialog { transform: translateY(0) scale(1); }
.sf-dialog__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  font-size: 25px;
  background: #fff3e9;
  border-radius: 50%;
}
.sf-dialog__title { margin: 0 0 9px; color: #102c50; font-size: 20px; }
.sf-dialog__desc { margin: 0; color: #65758b; font-size: 14px; line-height: 1.75; }
.sf-dialog__actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 26px; }
.sf-dialog__btn {
  min-width: 104px;
  padding: 10px 18px;
  font: inherit;
  font-weight: 600;
  border: 1px solid #d7dee8;
  border-radius: 7px;
  cursor: pointer;
}
.sf-dialog__btn--cancel { color: #46566b; background: #fff; }
.sf-dialog__btn--primary { color: #fff; background: #f16618; border-color: #f16618; }
.sf-dialog__btn:hover { filter: brightness(.97); transform: translateY(-1px); }

.sf-result-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  color: #77879c;
  font-size: 12px;
}

.sf-empty {
  grid-column: 1 / -1;
  display: none;
  min-height: 320px;
  padding: 64px 20px;
  text-align: center;
  background: #fff;
  border: 1px dashed #ccd7e5;
  border-radius: 10px;
}
.sf-empty.show { display: block; }
.sf-empty__icon { display: block; margin-bottom: 14px; font-size: 46px; opacity: .62; }
.sf-empty__title { margin-bottom: 8px; color: #17365e; font-size: 18px; font-weight: 700; }
.sf-empty__desc { margin-bottom: 20px; color: #7b8ca2; font-size: 14px; }
.sf-empty__btn {
  padding: 9px 20px;
  color: #fff;
  font-weight: 600;
  background: #176dc1;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.product-card.sf-hidden { display: none !important; }
.product-card.sf-enter { animation: sfCardEnter .32s ease both; }
@keyframes sfCardEnter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-banner { transition: background .4s ease, box-shadow .3s ease; }
.hero-banner { overflow: hidden; }
.sf-hero-product-photo {
  position: absolute;
  right: 4%;
  bottom: -12%;
  width: 38%;
  height: 116%;
  object-fit: contain;
  object-position: center;
  opacity: .36;
  filter: drop-shadow(0 18px 24px rgba(0,0,0,.24));
  mix-blend-mode: screen;
  pointer-events: none;
  transition: opacity .3s ease, transform .4s ease;
}
.hero-banner:hover .sf-hero-product-photo { opacity: .5; transform: scale(1.03); }
.hero-banner__text, .hero-banner__dots { position: relative; z-index: 2; }
.hero-banner__text.sf-changing { animation: sfSlideText .35s ease; }
@keyframes sfSlideText {
  0% { opacity: .2; transform: translateX(14px); }
  100% { opacity: 1; transform: translateX(0); }
}
.hero-banner__dots span { cursor: pointer; transition: width .2s ease, background .2s ease; }
.hero-banner__dots span.active { width: 22px; border-radius: 5px; }

.filter-category__item.active, .subcat-card.active {
  color: #176dc1;
  background: #eaf3ff;
  box-shadow: inset 3px 0 #176dc1;
}

.cat-card__icon img, .subcat-card__icon img, .subcat-thumb__img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cat-card__icon {
  width: 64px;
  height: 50px;
  margin: 0 auto 10px !important;
  overflow: hidden;
  background: #eef3f9;
  border-radius: 7px;
}
.subcat-card__icon {
  width: 72px;
  height: 50px;
  margin: 0 auto 7px !important;
  overflow: hidden;
  background: #eef3f9;
  border-radius: 7px;
}
.subcat-thumb__img { overflow: hidden; }

.hero-card { position: relative; overflow: hidden; }
.hero-card::after {
  content: '';
  position: absolute;
  inset: 0 0 0 58%;
  background: var(--sf-card-image) center / cover no-repeat;
  opacity: .25;
  pointer-events: none;
  transition: opacity .2s ease, transform .25s ease;
}
.hero-card:hover::after { opacity: .42; transform: scale(1.06); }
.hero-card > * { position: relative; z-index: 1; }

.sf-section-banner {
  position: relative;
  min-height: 126px;
  margin-bottom: 18px;
  padding: 24px 34% 24px 28px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(112deg, #163d6d, #1b6382);
  border-radius: 10px;
  box-shadow: 0 10px 26px rgba(21,55,96,.12);
}
.sf-section-banner__eyebrow { margin-bottom: 7px; color: #ffb37e; font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.sf-section-banner__title { margin: 0 0 7px; font-size: 24px; line-height: 1.25; }
.sf-section-banner__desc { margin: 0; color: rgba(255,255,255,.78); font-size: 13px; line-height: 1.65; }
.sf-section-banner__image { position: absolute; top: 0; right: 0; width: 32%; height: 100%; object-fit: cover; opacity: .72; mask-image: linear-gradient(to right, transparent, #000 36%); }

.brand-card.sf-clickable::after { content: '点击查看'; margin-top: 4px; color: #96a4b6; font-family: var(--font-body); font-size: 9px; font-weight: 400; }

@media (max-width: 1024px) {
  .sf-section-banner { padding-right: 28px; }
  .sf-section-banner__image { opacity: .18; width: 48%; }
}

.header__search-box.sf-invalid { animation: sfShake .28s ease; }
@keyframes sfShake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.sf-route-loading {
  position: fixed;
  inset: 0;
  z-index: 13000;
  display: grid;
  place-items: center;
  color: #17365e;
  font-size: 14px;
  background: rgba(255,255,255,.76);
  opacity: 0;
  visibility: hidden;
  transition: opacity .16s ease;
  backdrop-filter: blur(2px);
}
.sf-route-loading.show { opacity: 1; visibility: visible; }
.sf-route-loading::before {
  content: '';
  width: 30px;
  height: 30px;
  margin-right: 12px;
  border: 3px solid #dbe8f6;
  border-top-color: #176dc1;
  border-radius: 50%;
  animation: sfSpin .7s linear infinite;
}
@keyframes sfSpin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media (max-width: 1024px) {
  .sf-toast-region { top: 20px; }
}
