@charset "UTF-8";
/* ==========================================================================
   首页 · 滴滴商城
   依赖：bootstrap.min.css → liquid-glass.css → home.css
   ========================================================================== */

/* 不固定高度：页面多高就多高；底部留出固定版权栏的位置 */
.app-shell {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 16px calc(40px + env(safe-area-inset-bottom, 0px));
}

/* 内容与版权之间的间距 */
.app-main {
  margin-bottom: 18px;
}

/* 卡片统一改为直角（覆盖 liquid-glass / Bootstrap 的圆角） */
.card {
  border-radius: 0;
}

/* ==========================================================================
   1. 上部分：玻璃卡片 + 头像
   ========================================================================== */

/* 与下方卡片同一套玻璃材质（继承 .card 的 --glass / --noise / 描边 / 阴影） */
.hero-card {
  margin-bottom: 0;
  padding: 24px 18px 22px;
}

/* 玻璃边缘折射环（仅首屏主卡可用） */
.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  padding: 1.5px;
  box-sizing: border-box;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  -webkit-backdrop-filter: blur(2px) brightness(1.22) saturate(1.35);
  backdrop-filter: blur(2px) brightness(1.22) saturate(1.35);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .34);
}

/* 头像 + 昵称：居中竖排 */
.hero-profile {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.hero-avatar {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .62);
  border: 1px solid var(--hair);
  color: var(--c-blue);
  box-shadow: inset 0 1px 2px rgba(31, 55, 96, .05), 0 8px 20px -12px rgba(31, 55, 96, .40);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0;
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-name {
  margin: 0;
  max-width: 100%;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 主题切换按钮：固定在卡片右上角 */
.theme-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hair);
  border-radius: 50%;
  background: rgba(255, 255, 255, .46);
  color: var(--text-soft);
  cursor: pointer;
  transition: background-color .2s var(--spring), box-shadow .2s var(--spring);
}

.theme-btn:hover {
  background: rgba(255, 255, 255, .70);
  box-shadow: var(--glass-sh-soft);
}

.theme-btn:active {
  background: rgba(255, 255, 255, .82);
  filter: brightness(.98);
}

.theme-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-btn .ico-sun {
  display: none;
}

html[data-theme-eff="dark"] .theme-btn .ico-sun {
  display: block;
}

html[data-theme-eff="dark"] .theme-btn .ico-moon {
  display: none;
}

/* ==========================================================================
   2. 中部分：一层卡片 · 四个标签页
   ========================================================================== */

.tabs-card {
  margin-top: 16px;
  margin-bottom: 0;
  /* 下拉列表需要溢出显示，卡片不做裁剪 */
  overflow: visible;
}

.tabs-card .tabs {
  display: flex;
  padding: 2px 4px 0;
}

.tabs-card .tab {
  flex: 1 1 0;
  flex-direction: column;
  gap: 5px;
  padding: 13px 4px 12px;
  font-size: 14.5px;
  cursor: pointer;
}

.tabs-card .tab i {
  font-size: 19px;
  line-height: 1;
  color: var(--text-faint);
  transition: color .2s var(--spring);
}

.tabs-card .tab.active i {
  color: var(--c-blue);
}

.tabs-card .tab.active::after {
  left: 22px;
  right: 22px;
}

.tab-panels {
  padding: 16px;
}

.tab-panel[hidden] {
  display: none !important;
}

.tab-panel {
  animation: rise .38s var(--spring) backwards;
}

.panel-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: 0;
}

.panel-label::before {
  content: "";
  width: 3px;
  height: 12px;
  border-radius: 2px;
  background: var(--c-blue);
}

/* 行内表单：左侧文字提示 + 右侧下拉（同一套玻璃材质） */
.field-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.field-row + .field-row {
  margin-top: 12px;
}

/* 提示独立一层，材质与下拉列表完全一致 */
.field-label {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--h-control);
  padding: 0 14px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  background: rgba(255, 255, 255, .62);
  border: 1px solid var(--hair);
  border-radius: var(--r-control);
  box-shadow: inset 0 1px 2px rgba(31, 55, 96, .05);
}

.field-row .dropdown {
  flex: 1 1 auto;
  min-width: 0;
}

/* ---------- 2.1 选择分类：自定义下拉列表 ---------- */
.dropdown {
  position: relative;
}

/* 收起态：与输入框同一套控件规格（44px） */
.dropdown-field {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: var(--h-control);
  padding: 0 14px;
  background: rgba(255, 255, 255, .62);
  border: 1px solid var(--hair);
  border-radius: var(--r-control);
  color: var(--text);
  font-size: 14.5px;
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 1px 2px rgba(31, 55, 96, .05);
  transition: background-color .2s var(--spring), border-color .2s ease, box-shadow .2s ease;
}

.dropdown-field:hover {
  background: rgba(255, 255, 255, .72);
}

.dropdown.open .dropdown-field {
  border-color: rgba(10, 132, 255, .55);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, .18);
}

.dropdown-value {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.is-placeholder {
  color: var(--text-faint);
}

.dropdown-value-price {
  flex: 0 0 auto;
  font-size: 15px;
  font-weight: 600;
  color: var(--c-blue);
  letter-spacing: -.02em;
}

/* 双三角箭头（内联 SVG，与 select 保持一致） */
.dropdown-arrow {
  flex: 0 0 auto;
  width: 12px;
  height: 16px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='16' viewBox='0 0 12 16'><path d='M6 3 L9.5 6.6 H2.5 Z M6 13 L2.5 9.4 H9.5 Z' fill='%238a93a6'/></svg>") no-repeat center;
  opacity: .85;
  transition: opacity .2s var(--spring);
}

.dropdown.open .dropdown-arrow {
  opacity: 1;
}

/* 展开态：悬浮层（强玻璃） */
.dropdown-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  max-height: 236px;
  overflow-y: auto;
  padding: 6px;
  background: rgba(255, 255, 255, .60);
  -webkit-backdrop-filter: var(--blur-strong);
  backdrop-filter: var(--blur-strong);
  border: 1px solid var(--stroke-soft);
  border-radius: var(--r-control);
  box-shadow: var(--glass-sh);
  animation: dropIn .22s var(--spring) backwards;
}

.dropdown-panel[hidden] {
  display: none !important;
}

@keyframes dropIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 列表项：内层不做 backdrop-filter（红线：模糊数量） */
.dropdown-option {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border: none;
  background: transparent;
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: 14.5px;
  text-align: left;
  cursor: pointer;
  transition: background-color .18s var(--spring), color .18s var(--spring);
}

.dropdown-option[hidden] {
  display: none !important;
}

.dropdown-option:hover {
  background: rgba(10, 132, 255, .10);
}

.dropdown-option[aria-selected="true"] {
  background: rgba(10, 132, 255, .10);
  color: var(--c-blue);
  font-weight: 600;
}

.dropdown-option-icon {
  flex: 0 0 auto;
  font-size: 16px;
  color: var(--text-faint);
}

.dropdown-option[aria-selected="true"] .dropdown-option-icon {
  color: var(--c-blue);
}

.dropdown-option-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-option-price {
  flex: 0 0 auto;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--c-blue);
}

.dropdown-check {
  flex: 0 0 auto;
  font-size: 15px;
  color: var(--c-blue);
  opacity: 0;
}

.dropdown-option[aria-selected="true"] .dropdown-check {
  opacity: 1;
}

/* 占位项：列表第一项，未选择时默认显示 */
.dropdown-option[data-placeholder] {
  position: relative;
  margin-bottom: 4px;
  color: var(--text-soft);
}

.dropdown-option[data-placeholder]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -3px;
  height: 1px;
  background: var(--hair);
}

.dropdown-option[data-placeholder][aria-selected="true"] {
  background: rgba(120, 140, 170, .10);
  color: var(--text-soft);
  font-weight: 500;
}

.dropdown-option[data-placeholder][aria-selected="true"] .dropdown-check {
  opacity: 0;
}

/* ---------- 2.2 已选商品详情（未选商品时整块隐藏） ---------- */
.goods-detail {
  margin-top: 14px;
  padding: 14px;
  border-radius: var(--r-sm);
  background: var(--glass-weak);
  border: 1px solid var(--hair);
  animation: rise .38s var(--spring) backwards;
}

.goods-detail[hidden] {
  display: none !important;
}

.detail-list {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px 14px;
  font-size: 13.5px;
}

.detail-list dt {
  color: var(--text-soft);
  font-weight: 400;
  white-space: nowrap;
}

.detail-list dd {
  margin: 0;
  min-width: 0;
  text-align: right;
  color: var(--text);
  font-size: 14.5px;
}

.detail-list dd .form-control {
  width: 100%;
  text-align: left;
}

.detail-price {
  font-size: 16px;
  font-weight: 600;
  color: var(--c-blue);
  letter-spacing: -.02em;
}

.detail-stock {
  font-weight: 500;
}

/* 下单份数：加减按钮 */
.detail-qty-cell {
  display: flex;
  justify-content: flex-end;
}

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.stepper-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--hair);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .42);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color .18s var(--spring), opacity .18s var(--spring);
}

.stepper-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, .66);
}

.stepper-btn:active:not(:disabled) {
  filter: brightness(.96);
}

.stepper-btn:disabled {
  opacity: .38;
  cursor: not-allowed;
}

.stepper-value {
  min-width: 30px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

/* 商品介绍 */
.detail-intro {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--hair);
}

.detail-intro-label {
  display: block;
  font-size: 13.5px;
  color: var(--text-soft);
  letter-spacing: 0;
}

.detail-intro-text {
  margin-top: 6px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text);
}

/* 立即购买：居中 */
.detail-buy {
  display: block;
  margin: 16px auto 0;
  min-width: 200px;
  padding: 11px 32px;
  font-size: 15px;
}

/* ---------- 2.3 查单 ---------- */
.query-form {
  display: flex;
  gap: 10px;
}

.query-form .form-control {
  flex: 1 1 auto;
  min-width: 0;
}

.query-form .btn {
  flex: 0 0 auto;
  padding-left: 22px;
  padding-right: 22px;
}

.query-result {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  background: var(--glass-weak);
  border: 1px solid var(--hair);
  animation: rise .38s var(--spring) backwards;
}

.query-result[hidden] {
  display: none !important;
}

.query-result dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px 14px;
  font-size: 13.5px;
}

.query-result dt {
  color: var(--text-soft);
  font-weight: 400;
}

.query-result dd {
  margin: 0;
  color: var(--text);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
}

.query-result .qr-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--hair);
}

.query-result .qr-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

/* ---------- 2.4 赚钱 ---------- */
.earn-box {
  padding: 16px;
  border-radius: var(--r-sm);
  background: var(--glass-weak);
  border: 1px solid var(--hair);
}

.earn-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.earn-desc {
  margin: 8px 0 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-soft);
}

.earn-points {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.earn-points li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text);
}

.earn-points i {
  color: var(--c-green);
  font-size: 15px;
  flex: 0 0 auto;
}

.earn-stats {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.earn-stat {
  flex: 1 1 0;
  padding: 11px 12px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .30);
  box-shadow: inset 0 0 0 1px var(--hair);
}

.earn-stat-value {
  display: block;
  font-size: 17px;
  font-weight: 600;
  color: var(--c-blue);
  letter-spacing: -.02em;
}

.earn-stat-label {
  display: block;
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--text-faint);
}

.earn-action {
  margin-top: 14px;
}

/* ---------- 2.5 更多：四宫格 ---------- */
.more-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 11px;
}

/* 文本在左，图标在右 */
.more-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 58px;
  padding: 12px 14px;
  border-radius: var(--r-control);
  background: var(--glass-weak);
  border: 1px solid var(--hair);
  color: var(--text);
  font-size: 14.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background-color .2s var(--spring), box-shadow .2s var(--spring), border-color .2s var(--spring);
}

.more-item-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.more-item i {
  flex: 0 0 auto;
  font-size: 20px;
  color: var(--c-blue);
}

.more-item:hover {
  background: rgba(255, 255, 255, .34);
  box-shadow: var(--glass-sh-soft);
}

.more-item:active {
  filter: brightness(.96);
}

/* ==========================================================================
   3. 深色微调
   ========================================================================== */

html.theme-dark .more-item:hover {
  background: rgba(255, 255, 255, .08);
}

html.theme-dark .dropdown-field {
  background-color: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .14);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35);
}

html.theme-dark .dropdown-field:hover {
  background-color: rgba(255, 255, 255, .12);
}

html.theme-dark .field-label {
  background-color: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .14);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35);
}

html.theme-dark .stepper-btn {
  background: rgba(255, 255, 255, .10);
  border-color: rgba(255, 255, 255, .14);
}

html.theme-dark .stepper-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, .16);
}

html.theme-dark .dropdown-panel {
  background: rgba(21, 26, 38, .88);
}

html.theme-dark .dropdown-arrow {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='16' viewBox='0 0 12 16'><path d='M6 3 L9.5 6.6 H2.5 Z M6 13 L2.5 9.4 H9.5 Z' fill='%23aab3c5'/></svg>");
}

html.theme-dark .dropdown-option:hover,
html.theme-dark .dropdown-option[aria-selected="true"] {
  background: rgba(10, 132, 255, .16);
}

html.theme-dark .earn-stat {
  background: rgba(255, 255, 255, .06);
}

html.theme-dark .hero-avatar {
  background: rgba(255, 255, 255, .10);
  border-color: rgba(255, 255, 255, .14);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35);
}

html.theme-dark .theme-btn {
  background: rgba(255, 255, 255, .10);
  border-color: rgba(255, 255, 255, .14);
}

html.theme-dark .theme-btn:hover {
  background: rgba(255, 255, 255, .18);
}

/* ==========================================================================
   4. 底部版权
   ========================================================================== */

/* 固定在屏幕底部（脱离文档流，不影响页面高度，无背景） */
.app-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  padding: 7px 16px calc(7px + env(safe-area-inset-bottom, 0px));
  text-align: center;
}

.app-copyright {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-faint);
  letter-spacing: 0;
}

/* ==========================================================================
   5. 轻提示（页面级）
   ========================================================================== */

.app-toast {
  position: fixed;
  left: 50%;
  bottom: calc(32px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  transform: translate(-50%, 12px);
  max-width: calc(100% - 40px);
  padding: 11px 18px;
  border-radius: var(--r-pill);
  font-size: 13.5px;
  color: var(--text);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--spring), transform .25s var(--spring);
  /* 玻璃材质（强等级） */
  background: rgba(255, 255, 255, .85);
  -webkit-backdrop-filter: saturate(185%) blur(24px);
  backdrop-filter: saturate(185%) blur(24px);
  border: 1px solid var(--stroke-soft);
  box-shadow: var(--glass-sh);
}

html.theme-dark .app-toast {
  background: rgba(23, 28, 40, .88);
}

.app-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ==========================================================================
   6. 响应式
   ========================================================================== */

/* 手机 / 平板：卡片外边距加大 */
@media (max-width: 768px) {
  .app-shell {
    padding: 18px 18px calc(40px + env(safe-area-inset-bottom, 0px));
  }

  .tabs-card {
    margin-top: 18px;
  }
}

@media (max-width: 480px) {
  .app-shell {
    padding: 16px 18px calc(38px + env(safe-area-inset-bottom, 0px));
  }

  .hero-card {
    padding: 22px 15px 20px;
  }

  .hero-avatar {
    width: 58px;
    height: 58px;
    font-size: 22px;
  }

  .hero-name {
    font-size: 17.5px;
  }

  .tab-panels {
    padding: 14px;
  }

  .dropdown-panel {
    max-height: 208px;
  }

  .tabs-card .tab.active::after {
    left: 18px;
    right: 18px;
  }

  .more-item {
    min-height: 54px;
    padding: 11px 12px;
  }
}
