/**
 * 易典国学商城主题 — 覆盖 Shopro 默认橙/黄主题
 * 必须在 index-DQFTr6B1.css 之后加载
 */
html.main-brown,
html.main-orange,
html.main-yellow,
html.main-red,
html.main-golden,
html,
body,
#app,
uni-app,
uni-page,
uni-page-wrapper,
uni-page-body,
.main-brown,
.main-orange,
.main-yellow,
.main-red,
.main-golden,
.main-black,
.main-blue {
  --ui-BG-Main: #8a501e !important;
  --ui-BG-Main-tag: rgba(138, 80, 30, 0.08) !important;
  --ui-BG-Main-gradient: #c6895d !important;
  --ui-BG-Main-light: rgba(198, 137, 93, 0.25) !important;
  --ui-BG-Main-opacity-1: rgba(138, 80, 30, 0.12) !important;
  --ui-BG-Main-opacity-4: rgba(138, 80, 30, 0.45) !important;
  --ui-BG-Main-1: rgba(138, 80, 30, 0.96) !important;
  --ui-BG-Main-2: rgba(170, 100, 48, 0.9) !important;
  --ui-BG-Main-3: rgba(198, 137, 93, 0.75) !important;
  --ui-BG-Main-4: rgba(237, 209, 165, 0.6) !important;
  --ui-BG-Main-TC: #ffffff !important;
  --ui-BG-1: #f9f1dd !important;
  --ui-BG-2: #fdf5e6 !important;
}

html,
body,
uni-page-body,
.page-main,
.page-app {
  background-color: #f9f1dd !important;
}

/* 顶栏 / 搜索区 */
.ss-navbar,
.navbar,
.custom-navbar,
.uni-navbar,
.uni-navbar__content,
.uni-navbar__header,
.ss-custom-navbar,
[class*="navbar-inner"] {
  background: linear-gradient(180deg, #8a501e 0%, #a0622e 100%) !important;
  background-color: #8a501e !important;
}

.uni-navbar__header .uni-nav-bar-text,
.uni-navbar__header .uni-navbar-btn-text {
  color: #fff !important;
}

/* 搜索框 */
.uni-searchbar,
.ss-search,
[class*="search-box"],
[class*="search-bar"] {
  background: rgba(253, 245, 230, 0.95) !important;
}

/* 底部 Tab */
.uni-tabbar,
.uni-tabbar-border,
.uni-tabbar__bd {
  background: #fdf5e6 !important;
  border-top-color: rgba(138, 80, 30, 0.15) !important;
}

.uni-tabbar__label,
.uni-tabbar__icon {
  color: #8b7355 !important;
}

.uni-tabbar__item.uni-tabbar__item--active .uni-tabbar__label {
  color: #8a501e !important;
}

/* 按钮 / 渐变 */
[class*="buy-btn"],
[class*="confirm-btn"],
[class*="card-btn"]:not([class*="disabled"]),
.ui-BG-Main-Gradient,
.ss-linear-main {
  background: linear-gradient(90deg, #8a501e, #c6895d) !important;
  background-color: #8a501e !important;
}

/* 价格 */
.price-text,
.ss-price-text,
.goods-price,
[class*="price-text"] {
  color: #a04220 !important;
}

/* 领券 / 标题条等装修块内联色兜底 */
[style*="#FF6000"],
[style*="#ff6000"],
[style*="#FF5E00"],
[style*="#ff5e00"],
[style*="#FF7A0C"],
[style*="#ff7a0c"] {
  background-color: #8a501e !important;
  background-image: none !important;
  color: #fff !important;
}

/* 轮播图圆角 */
.uni-swiper-slide,
.uni-swiper-slide image,
.uni-swiper-slide img,
.su-swiper image {
  border-radius: 10px !important;
}

/* 分类宫格：图标下方文字（原白色在米色底上不可见） */
.menu-title,
.grid-item .menu-title,
[class*="menu-title"] {
  color: #5c3a1a !important;
  font-weight: 500 !important;
  font-size: 12px !important;
  text-shadow: none !important;
}

/* 商品分区标题（浅色背景上的深色字） */
.goods-title,
[class*="goods-card"] [class*="title"],
[class*="block-title"] {
  color: #1b0a02 !important;
}

/* 悬浮返回易典国学：可拖动，默认左下 */
#yidian-back-btn {
  position: fixed;
  left: 12px;
  top: auto;
  right: auto;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 88px);
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px 10px 12px;
  background: linear-gradient(135deg, #8a501e 0%, #a0622e 100%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(138, 80, 30, 0.35);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  letter-spacing: 0.5px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  pointer-events: auto;
}

#yidian-back-btn.yidian-dragged {
  bottom: auto !important;
  right: auto !important;
}

#yidian-back-btn.yidian-dragging {
  cursor: grabbing;
  transition: none;
  opacity: 0.95;
  z-index: 10050;
  box-shadow: 0 8px 24px rgba(138, 80, 30, 0.45);
  transform: scale(1.03);
}

#yidian-back-btn.yidian-hidden {
  display: none !important;
  pointer-events: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

#yidian-back-btn:active:not(.yidian-dragging) {
  opacity: 0.92;
  transform: scale(0.96);
  box-shadow: 0 2px 8px rgba(138, 80, 30, 0.25);
}

#yidian-back-btn .arrow {
  font-size: 18px;
  line-height: 1;
  font-weight: 700;
}

#yidian-back-btn .label {
  white-space: nowrap;
}

/* ========== 分区标题：国风圆角条（窄条 + 横排） ========== */
.ss-title-wrap,
[class*="ss-title-wrap"] {
  margin: 6px 12px 4px !important;
  border-radius: 8px !important;
  height: auto !important;
  min-height: 28px !important;
  max-height: none !important;
  padding: 0 10px !important;
  box-sizing: border-box !important;
  background: linear-gradient(135deg, #7a4518 0%, #8a501e 42%, #b07842 100%) !important;
  box-shadow: 0 2px 6px rgba(138, 80, 30, 0.12) !important;
  display: flex !important;
  align-items: center !important;
  position: relative !important;
  overflow: hidden !important;
}

.ss-title-wrap::before,
[class*="ss-title-wrap"]::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, #f5e6c8, #c6895d);
  border-radius: 8px 0 0 8px;
}

.ss-title-wrap .title-content,
[class*="ss-title-wrap"] .title-content {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  justify-content: flex-start !important;
  align-items: center !important;
  flex: 1 !important;
  padding-left: 4px !important;
  min-height: auto !important;
  gap: 0 !important;
}

.ss-title-wrap .title-content .title-text,
[class*="ss-title-wrap"] .title-text {
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0.3px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.ss-title-wrap .title-content .sub-title-text,
[class*="ss-title-wrap"] .sub-title-text {
  color: rgba(255, 248, 235, 0.92) !important;
  font-size: 12px !important;
  margin-top: 0 !important;
  margin-left: 6px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.ss-title-wrap .more-box,
[class*="ss-title-wrap"] .more-box {
  color: rgba(255, 248, 235, 0.9) !important;
  font-size: 11px !important;
}

/* ========== 商品卡片：圆角 + 标题对齐 ========== */
.goods-card-box,
.goods-sm-box,
.goods-md-box,
.goods-sl-box,
.goods-lg-box,
.md-goods-card,
.sl-goods-card,
.goods-xs-box {
  border-radius: 12px !important;
  overflow: hidden !important;
}

.md-goods-card .md-goods-title,
.sl-goods-card .sl-goods-title,
.goods-title,
[class*="goods-title"] {
  color: #3d2914 !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
}

.md-goods-card .md-goods-subtitle,
.sl-goods-card .sl-goods-subtitle {
  color: #8b7355 !important;
}

.goods-card-box image,
.goods-sm-box image,
.md-goods-card image,
.sl-goods-card image {
  border-radius: 10px !important;
}

/* 横向商品列表（低价特卖）对齐 */
.goods-xs-list,
.goods-list-box {
  padding: 0 8px !important;
}

/* ========== 底部 Tab：国风图标 ========== */
.uni-tabbar {
  box-shadow: 0 -2px 16px rgba(138, 80, 30, 0.08) !important;
  padding-bottom: env(safe-area-inset-bottom, 0) !important;
}

.uni-tabbar__item {
  padding-top: 4px !important;
}

.uni-tabbar__icon img,
.uni-tabbar__icon image {
  width: 26px !important;
  height: 26px !important;
  object-fit: contain !important;
}

.uni-tabbar__item.uni-tabbar__item--active .uni-tabbar__icon img,
.uni-tabbar__item.uni-tabbar__item--active .uni-tabbar__icon image {
  transform: scale(1.06);
  filter: drop-shadow(0 2px 4px rgba(138, 80, 30, 0.25));
}

.uni-tabbar__label {
  font-size: 11px !important;
  margin-top: 2px !important;
  letter-spacing: 0.5px !important;
}

.uni-tabbar__item.uni-tabbar__item--active .uni-tabbar__label {
  font-weight: 600 !important;
  color: #8a501e !important;
}

/* 分类宫格：简约中式线稿图标 */
.menu-box,
.ss-menu-button-wrap,
[class*="menu-button"] {
  padding: 10px 4px 6px !important;
}

.menu-box .menu-icon,
.menu-box .menu-icon image,
.menu-box .menu-icon img,
.ss-menu-button-wrap image,
.ss-menu-button-wrap img,
[class*="menu-button"] .menu-icon image,
[class*="menu-button"] .menu-icon img {
  width: 44px !important;
  height: 44px !important;
  border-radius: 0 !important;
  object-fit: contain !important;
  box-shadow: none !important;
  background: transparent !important;
}

.menu-box .menu-title,
.ss-menu-button-wrap .menu-title,
[class*="menu-button"] .menu-title,
[class*="menu-button"] .title {
  color: #3d2914 !important;
  font-size: 12px !important;
  margin-top: 8px !important;
  font-weight: 500 !important;
}

/* 促销魔方：整图显示，不裁切（宁可留边） */
.ss-cube-wrap,
.cube-img-wrap,
.cube-img {
  border-radius: 12px !important;
  overflow: hidden !important;
}

.cube-img-wrap {
  background: #f6efe3 !important;
}

.cube-img,
.cube-img uni-image,
.cube-img-wrap uni-image {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}

.cube-img uni-image > div,
.cube-img-wrap uni-image > div {
  background-size: contain !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-color: #f6efe3 !important;
}

.cube-img img,
.cube-img-wrap img {
  object-fit: contain !important;
  object-position: center center !important;
  width: 100% !important;
  height: 100% !important;
}

/* 商品列表封面：统一成正方形，居中铺满，避免竖图两边留白 */
.xs-img-box,
.sm-img-box,
.md-img-box,
.sl-img-box,
.lg-img-box,
.goods-img {
  background: #f6efe3 !important;
}

.sl-img-box,
.md-img-box {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1;
}

.sl-img-box uni-image,
.md-img-box uni-image,
.sm-img-box uni-image,
.lg-img-box uni-image,
.xs-img-box uni-image {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}

.xs-img-box > div,
.sm-img-box > div,
.md-img-box > div,
.sl-img-box > div,
.lg-img-box > div,
.goods-img > div,
.xs-img-box uni-image > div,
.sm-img-box uni-image > div,
.md-img-box uni-image > div,
.sl-img-box uni-image > div,
.lg-img-box uni-image > div,
.goods-img uni-image > div {
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-color: #f6efe3 !important;
}

.xs-img-box img,
.sm-img-box img,
.md-img-box img,
.sl-img-box img,
.lg-img-box img,
.goods-img img,
.md-goods-card image,
.sl-goods-card image,
.xs-goods-card image,
.sm-goods-card image,
.lg-goods-card image {
  object-fit: cover !important;
  object-position: center center !important;
}

/* 分享弹窗：确保分享按钮在悬浮返回按钮之上，可点击 */
.share-box,
.share-list-box,
.share-item,
.share-btn {
  pointer-events: auto !important;
  position: relative;
  z-index: 10001 !important;
}
