* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(90deg, #e2e2e2 0%, #c9d6ff 100%);
  color: #363636;
}

body {
  max-width: 480px;
  margin: 0 auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.sq-page {
  padding: 12px 12px 90px;
}

.sq-search-box {
  margin-bottom: 10px;
}

.sq-search-form {
  position: relative;
  display: flex;
  align-items: center;
}

.sq-search-icon {
  position: absolute;
  left: 16px;
  width: 16px;
  height: 16px;
  color: #9e9ea7;
}

.sq-search-input {
  width: 100%;
  height: 42px;
  padding: 0 104px 0 42px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: #fff;
  outline: none;
  transition: 0.2s ease;
}

.sq-search-input:focus,
.sq-search-input:hover {
  border-color: rgba(69, 159, 249, 0.4);
  box-shadow: 0 0 0 4px rgba(5, 32, 128, 0.1);
}

.sq-search-btn {
  position: absolute;
  right: 4px;
  top: 4px;
  height: 34px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(210deg, #3462d2 0%, #579dff 100%);
}

.sq-banner-card {
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
}

.sq-banner {
  position: relative;
  height: 160px;
  overflow: hidden;
}

.sq-banner-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.sq-banner-slide.active {
  opacity: 1;
}

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

.sq-banner-overlay,
.sq-banner-title,
.sq-banner-desc {
  display: none !important;
}

.sq-banner-dots {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 6px;
}

.sq-banner-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
}

.sq-banner-dots span.active {
  width: 18px;
  border-radius: 999px;
  background: #fff;
}

.sq-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  margin: 10px 0;
  padding: 0 12px;
  border-radius: 10px;
  background: #fff;
}

.sq-notice-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(210deg, #3462d2 0%, #579dff 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.sq-notice-track {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}

.sq-notice-track span {
  display: inline-block;
  padding-left: 100%;
  font-size: 14px;
  line-height: 20px;
  color: #383838;
  animation: sq-marquee 20s linear infinite;
}

@keyframes sq-marquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-100%);
  }
}

.sq-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 10px 18px;
  border-radius: 10px;
  background: #fff;
}

.sq-quick-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.sq-quick-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  box-shadow: 0 10px 18px rgba(52, 98, 210, 0.12);
}

.sq-quick-icon.icon-cert {
  background: linear-gradient(130deg, #9cd4ff 0%, #3d9feb 100%);
}

.sq-quick-icon.icon-order {
  background: linear-gradient(130deg, #ff958a 0%, #fa503c 100%);
}

.sq-quick-icon.icon-share {
  background: linear-gradient(136deg, #ffb078 0%, #f66d09 100%);
}

.sq-quick-icon.icon-help {
  background: linear-gradient(132deg, #4af7be 0%, #15c78b 100%);
}

.sq-quick-label {
  font-size: 12px;
  line-height: 1.2;
  color: #363636;
  text-align: center;
  white-space: nowrap;
}

.sq-shophead {
  margin-top: 10px;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.sq-shophead-top {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(210deg, #3462d2 0%, #579dff 100%);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 1px;
}

.sq-tabs {
  display: flex;
  align-items: center;
  height: 60px;
  padding: 0 4px;
}

.sq-tab {
  position: relative;
  flex: 1;
  border: 0;
  background: transparent;
  color: #3462d2;
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
}

.sq-tab.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 10px solid #3462d2;
}

.sq-tab-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.sq-tab-filter svg {
  width: 16px;
  height: 16px;
}

.sq-goods-list {
  margin-top: 10px;
}

.sq-goods-empty {
  padding: 40px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  text-align: center;
  color: #64748b;
  font-size: 14px;
}

.sq-item {
  margin-bottom: 10px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.sq-item-top {
  position: relative;
  display: flex;
  min-height: 118px;
}

.sq-item-cover {
  width: 112px;
  padding: 10px;
}

.sq-item-cover img {
  width: 100%;
  height: 100px;
  border-radius: 6px;
  object-fit: cover;
  display: block;
}

.sq-item-main {
  flex: 1;
  min-width: 0;
  padding: 10px 10px 10px 0;
}

.sq-item-operator {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(52, 98, 210, 0.12);
  color: #3462d2;
  font-size: 11px;
  font-weight: 700;
}

.sq-item-title {
  margin: 0;
  padding-right: 58px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: #363636;
}

.sq-item-subtitle {
  display: -webkit-box;
  margin-top: 6px;
  min-height: 40px;
  font-size: 14px;
  line-height: 20px;
  color: #545454;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sq-item-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
  align-self: center;
}

.sq-action-btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 32px;
  margin: 0;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 32px;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  vertical-align: middle;
  appearance: none;
  -webkit-appearance: none;
  background: linear-gradient(210deg, #3462d2 0%, #579dff 100%);
  cursor: pointer;
}

.sq-action-btn.secondary {
  background: linear-gradient(210deg, #99a9c9 0%, #c1cadb 100%);
}

.sq-item-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid #edf2ff;
  border-bottom: 1px solid #edf2ff;
}

.sq-metric {
  padding: 10px 4px;
  text-align: center;
}

.sq-metric strong {
  display: block;
  color: #2563eb;
  font-size: 16px;
}

.sq-metric:first-child strong {
  color: #ef4444;
}

.sq-metric span {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 12px;
}

.sq-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px 12px;
  flex-wrap: nowrap;
}

.sq-item-tags {
  display: flex;
  flex: 1;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.sq-item-tags::-webkit-scrollbar {
  display: none;
}

.sq-tag {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 15px;
  color: #333;
  white-space: nowrap;
}

.sq-tag.tag-blue {
  background: linear-gradient(to left, #e2e2e2, #c9d6ff);
}

.sq-tag.tag-green {
  background: linear-gradient(to right, #ddefbb, #ffeeee);
}

.sq-tag.tag-gold {
  background: linear-gradient(to right, #fff, #ffefba);
}

.sq-tag.tag-purple {
  background: linear-gradient(to right, #e9e4f0, #d3cce3);
}

.sq-footer {
  padding: 10px 0 6px;
  text-align: center;
  font-size: 12px;
  color: #999;
}

.sq-float-support {
  position: fixed;
  right: 12px;
  bottom: 96px;
  z-index: 15;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(210deg, #3462d2 0%, #579dff 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(52, 98, 210, 0.28);
}

.sq-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.45);
  padding: 20px;
}

.sq-modal.show {
  display: block;
}

.sq-modal-panel {
  width: min(100%, 380px);
  margin: 10vh auto 0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}

.sq-modal-head {
  padding: 14px 16px;
  background: linear-gradient(210deg, #3462d2 0%, #579dff 100%);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.sq-modal-body {
  padding: 16px;
}

.sq-modal-body p,
.sq-modal-body li {
  font-size: 14px;
  line-height: 1.7;
  color: #334155;
}

.sq-share-card {
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(180deg, #eff6ff 0%, #fff 100%);
  border: 1px solid #dbeafe;
}

.sq-share-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

.sq-share-info {
  padding: 14px;
}

.sq-share-title {
  font-size: 18px;
  font-weight: 700;
  color: #1e3a8a;
}

.sq-share-link {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
  color: #475569;
  font-size: 12px;
  word-break: break-all;
  border: 1px solid #dbeafe;
}

.sq-filter-grid {
  display: grid;
  gap: 12px;
}

.sq-filter-grid label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: #475569;
}

.sq-filter-grid input,
.sq-filter-grid select {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid #d7deea;
  border-radius: 10px;
  outline: none;
}

.sq-filter-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.sq-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.sq-modal-btn {
  min-width: 88px;
  height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(210deg, #3462d2 0%, #579dff 100%);
  color: #fff;
}

.sq-modal-btn.light {
  background: #e2e8f0;
  color: #334155;
}

@media (max-width: 380px) {
  .sq-page {
    padding-left: 10px;
    padding-right: 10px;
  }

  .sq-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sq-tabs {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 4px;
    gap: 4px;
  }

  .sq-tab {
    flex: 0 0 calc(33.333% - 4px);
    padding: 6px 0;
  }

  .sq-tab.active::after {
    display: none;
  }

  .sq-item-top {
    flex-direction: column;
  }

  .sq-item-cover {
    width: 100%;
    padding-right: 10px;
  }

  .sq-item-cover img {
    height: 160px;
  }

  .sq-item-main {
    padding: 0 10px 10px;
  }

  .sq-item-title {
    padding-right: 0;
  }

  .sq-item-actions {
    justify-content: flex-end;
  }

  .sq-item-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
