/**
 * 礼嘉茂方向视觉层
 * 仅覆盖消费者前台的外观和响应式排版，业务选择器及交互逻辑保持不变。
 */
.theme-modern {
    --ref-page: #f5f7fa;
    --ref-surface: #ffffff;
    --ref-text: #111827;
    --ref-muted: #64748b;
    --ref-border: #e5eaf1;
    --ref-accent: #2563eb;
    --ref-price: #f43f5e;
    --ref-radius: 1.6rem;
    --ref-shadow: 0 .4rem 1.6rem rgba(15, 23, 42, .055);
    background: var(--ref-page);
    color: var(--ref-text);
}
.theme-modern .body-content-formal-container { background: var(--ref-page); }
.theme-modern .am-container { max-width: 125rem; }

/* PC 顶部：轻量工具栏、品牌、搜索和图标入口 */
.theme-modern .header-top { min-height: 4rem; border-bottom: 1px solid var(--ref-border); background: #f8fafc; }
.theme-modern .header-top .header { min-height: 4rem; display: flex; align-items: center; }
.theme-modern .nav-search { padding: 2.2rem 0 1.4rem; border-bottom: 1px solid var(--ref-border); background: #fff; }
.theme-modern .nav-search .am-container { min-height: 6rem; gap: 4rem; }
.theme-modern .nav-search .logo-big { flex-basis: 28rem; display: flex; align-items: center; }
.theme-modern .nav-search .logo-big img { width: auto; max-width: 22rem; max-height: 5.2rem; }
.theme-modern .nav-search .search-bar { max-width: 58rem; margin-inline: auto; }
.theme-modern .nav-search .search-bar form .search-group { height: 4.2rem; grid-template-columns: minmax(0, 1fr) 5.2rem; padding: 0; border: 1px solid #dbe1e9 !important; border-radius: .8rem !important; box-shadow: 0 .2rem .6rem rgba(15,23,42,.06); }
.theme-modern .nav-search .search-bar form .search-group #search-input { height: 4rem !important; padding-inline: 1.4rem; border-radius: .8rem 0 0 .8rem; line-height: 4rem; }
.theme-modern .nav-search .search-bar form .search-group #ai-topsearch { width: 5.2rem !important; min-width: 5.2rem; height: 4rem !important; padding: 0; border-radius: 0 .8rem .8rem 0 !important; background: #fff !important; color: transparent !important; font-size: 0; line-height: 4rem; }
.theme-modern .nav-search .search-bar form .search-group #ai-topsearch::before { color: #111827; content: "⌕"; font-size: 2.2rem; }
.theme-modern .nav-search .search-hot-keywords { display: none !important; }
.theme-modern .shop-navigation { min-height: 5rem; border-bottom: 1px solid var(--ref-border); box-shadow: none; }
.theme-modern .shop-navigation .am-topbar-nav > li > a { min-height: 5rem; padding: 0 1.8rem; line-height: 5rem; font-size: 1.4rem; }
.theme-modern .shop-navigation .am-topbar-nav > li > a.active,
.theme-modern .shop-navigation .am-topbar-nav > li > a:hover { background: transparent; color: var(--ref-accent); }

/* 全站隐藏旧版“全部分类”标题及下拉层，手机新抽屉分类不受影响 */
.theme-modern #goods-category { display: none !important; }
.theme-modern .shop-navigation .goods-category-title { display: none !important; }

/* 首页首屏：大轮播、快捷入口与保障信息 */
.theme-modern .modern-home-hero { padding: 1.6rem max(2rem, calc((100% - 125rem)/2)); background: var(--ref-page); }
.theme-modern .modern-home-hero #goods-category { display: none !important; }
.theme-modern .modern-home-hero > .slideall { border-radius: 2rem; overflow: hidden; }
.theme-modern .modern-home-hero .banner { border-radius: 2rem; background: #edf1f6; box-shadow: 0 1.2rem 3rem rgba(15,23,42,.08); }
.theme-modern .modern-home-hero .banner .am-slider,
.theme-modern .modern-home-hero .banner .am-slides li { border-radius: 2rem; overflow: hidden; }
.theme-modern .modern-home-hero .banner-mixed { border: 1px solid var(--ref-border); border-radius: 1.6rem; background: rgba(255,255,255,.97); box-shadow: var(--ref-shadow); }
.theme-modern .modern-home-main { padding-bottom: 4rem; }
.theme-modern .small-nav { padding: 1.6rem; border: 1px solid var(--ref-border); border-radius: var(--ref-radius); box-shadow: var(--ref-shadow); }
.theme-modern .small-nav .nav-icon { background: linear-gradient(145deg,#eff6ff,#fff); border: 1px solid #dbeafe; }

/* 楼层与商品卡片 */
.theme-modern .home-floor > div[id^="floor"] { margin-top: 2rem; }
.theme-modern .items-nav-title { margin-top: 0; padding: 1.8rem 2rem 1.2rem; border: 1px solid var(--ref-border); border-bottom: 0; border-radius: var(--ref-radius) var(--ref-radius) 0 0; background: #fff; }
.theme-modern .items-nav-title .floor-title { border-left: .4rem solid #172554; padding-left: 1.2rem; font-size: 2rem; }
.theme-modern .home-floor .floor { padding: 0 1.2rem 1.6rem; border: 1px solid var(--ref-border); border-radius: 0 0 var(--ref-radius) var(--ref-radius); box-shadow: var(--ref-shadow); }
.theme-modern .home-floor .aggregation-container { display: none !important; }
.theme-modern .home-floor .floor .goods-list { width: 100% !important; float: none; padding: 0 !important; }
.theme-modern .module-goods-grid-base .item { border: 1px solid var(--ref-border) !important; border-bottom: 1px solid var(--ref-border) !important; border-radius: 1.4rem !important; box-shadow: 0 .2rem .8rem rgba(15,23,42,.04); }
.theme-modern .module-goods-grid-base .item:hover { transform: translateY(-.3rem); border-color: #cbd5e1 !important; box-shadow: 0 1rem 2.4rem rgba(15,23,42,.1); }
.theme-modern .module-goods-grid-base .item .goods-info { background: #f8fafc; border-radius: 1.2rem; }
.theme-modern .module-goods-grid-base .item .goods-title { color: #111827; font-weight: 500; }
.theme-modern .module-goods-grid-base .item .price strong { color: var(--ref-price); }
.theme-modern .module-goods-grid-base .item .original-price { color: #94a3b8; }

/* 内容页和详情页只做安全视觉覆盖 */
.theme-modern .system-goods-detail .item-inform,
.theme-modern .system-goods-detail .introduce,
.theme-modern .cart-content,
.theme-modern .buy-items,
.theme-modern .user-content .am-panel { border-color: var(--ref-border); border-radius: var(--ref-radius) !important; box-shadow: var(--ref-shadow); }
.theme-modern .system-goods-detail .tb-detail-panel-base { background: #fafafa; border-color: var(--ref-border); }
.theme-modern .system-goods-detail .buy-submit-container .am-btn-primary { background: #111827; border-color: #111827; }
.theme-modern .system-goods-detail .buy-submit-container .am-btn-secondary { background: #fff; border-color: #111827; color: #111827; }

@media (min-width: 1025px) {
    /* 清除旧版多按钮图标/分隔伪元素，避免立即购买右侧出现空竖线 */
    .theme-modern .system-goods-detail .buy-submit-container .am-btn { border-left: 0 !important; border-right: 0 !important; box-shadow: none !important; }
    .theme-modern .system-goods-detail .buy-submit-container .am-btn i { display: none !important; }
    .theme-modern .system-goods-detail .buy-submit-container .am-btn::before,
    .theme-modern .system-goods-detail .buy-submit-container .am-btn::after { display: none !important; border: 0 !important; content: none !important; }
    .theme-modern .system-goods-detail .buy-nav-left-favor-submit { display: none !important; }
}

/* 订单确认页：礼嘉茂方向的轻卡片结算布局 */
.theme-modern.index-buy-index .link-list { max-width: 125rem; margin: 2.4rem auto 4rem; padding: 0; background: transparent; border: 0; box-shadow: none; }
.theme-modern.index-buy-index .address-container,
.theme-modern.index-buy-index .buy-items,
.theme-modern.index-buy-index .buy-message,
.theme-modern.index-buy-index .buy-nav-footer { margin-top: 1.6rem; padding: 2rem; border: 1px solid var(--ref-border); border-radius: var(--ref-radius); background: #fff; box-shadow: var(--ref-shadow); }
.theme-modern.index-buy-index .buy-header-nav { margin: -2rem -2rem 2rem; padding: 0 2rem; border-bottom: 1px solid var(--ref-border); }
.theme-modern.index-buy-index .buy-header-nav .am-nav-tabs { border: 0; }
.theme-modern.index-buy-index .buy-header-nav .am-nav-tabs > li > a { height: 5.2rem; border: 0; color: var(--ref-muted); font-size: 1.4rem; line-height: 5.2rem; }
.theme-modern.index-buy-index .buy-header-nav .am-nav-tabs > li.am-active > a { color: #111827; font-weight: 700; }
.theme-modern.index-buy-index .address-container .address h3,
.theme-modern.index-buy-index .buy-items h3,
.theme-modern.index-buy-index .buy-message h3 { color: #111827; font-size: 1.7rem; font-weight: 700; }
.theme-modern.index-buy-index .address-list { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1.2rem; }
.theme-modern.index-buy-index .address-cart { width: auto; min-height: 13rem; margin: 0; border: 1px solid var(--ref-border); border-radius: 1.2rem; box-shadow: none; transition: border-color .18s ease, box-shadow .18s ease; }
.theme-modern.index-buy-index .address-cart:hover,
.theme-modern.index-buy-index .address-container .address-default { border-color: #2563eb; box-shadow: 0 0 0 .2rem rgba(37,99,235,.1); }
.theme-modern.index-buy-index .address-cart .address-content { height: 100%; padding: 1.4rem; }
.theme-modern.index-buy-index .buy-items { overflow: hidden; }
.theme-modern.index-buy-index .buy-items > h3 { margin-bottom: 1.4rem; }
.theme-modern.index-buy-index .goods-group-list { border: 1px solid var(--ref-border); border-radius: 1.2rem; overflow: hidden; }
.theme-modern.index-buy-index .buy-items table thead tr th { padding: 1.2rem; background: #f8fafc; color: var(--ref-muted); font-weight: 600; }
.theme-modern.index-buy-index .buy-items table tbody tr td { padding: 1.6rem 1.2rem; border-color: var(--ref-border); }
.theme-modern.index-buy-index .goods-detail img { border-radius: 1rem; object-fit: cover; }
.theme-modern.index-buy-index .business-item ul { display: flex; flex-wrap: wrap; gap: 1rem; }
.theme-modern.index-buy-index .business-item ul li { width: auto; min-width: 15rem; margin: 0; border: 1px solid var(--ref-border); border-radius: 1rem; background: #fff; }
.theme-modern.index-buy-index .business-item ul li.selected { border-color: #111827; box-shadow: 0 0 0 .1rem #111827; }
.theme-modern.index-buy-index .memo-input { min-height: 9rem; padding: 1.2rem; border: 1px solid var(--ref-border); border-radius: 1rem; background: #f8fafc; }
.theme-modern.index-buy-index .buy-nav-footer { padding: 0; overflow: hidden; }
.theme-modern.index-buy-index .buy-order-nav { display: grid; grid-template-columns: minmax(0,1fr) 22rem; align-items: stretch; gap: 0; padding: 0; border: 0; box-shadow: none; }
.theme-modern.index-buy-index .buy-order-nav .box { margin: 0; padding: 2rem; border: 0; border-radius: 0; background: #f8fafc; }
.theme-modern.index-buy-index .buy-order-nav form.nav-buy { display: flex; align-items: stretch; }
.theme-modern.index-buy-index .buy-order-nav .nav-total-price { color: var(--ref-price); font-size: 2.4rem; font-weight: 800; }
.theme-modern.index-buy-index .buy-order-nav .go-btn-wrap,
.theme-modern.index-buy-index .buy-order-nav button[type="submit"] { width: 100%; min-height: 100%; border: 0; border-radius: 0; background: #111827; color: #fff; font-size: 1.6rem; font-weight: 700; }

@media (max-width: 767px) {
    .theme-modern.index-buy-index .link-list { margin: 0 0 8rem; }
    .theme-modern.index-buy-index .address-container,
    .theme-modern.index-buy-index .buy-items,
    .theme-modern.index-buy-index .buy-message { margin: 1.2rem; padding: 1.4rem 1.2rem; border-radius: 1.4rem; }
    .theme-modern.index-buy-index .buy-nav-footer { position: fixed; right: 0; bottom: 0; left: 0; z-index: 1050; margin: 0; padding: 0 0 env(safe-area-inset-bottom); border: 0; border-top: 1px solid var(--ref-border); border-radius: 0; box-shadow: 0 -.6rem 2rem rgba(15,23,42,.1); }
    .theme-modern.index-buy-index .buy-header-nav { margin: -1.4rem -1.2rem 1.4rem; padding: 0 1.2rem; }
    .theme-modern.index-buy-index .address-list { display: block; }
    .theme-modern.index-buy-index .address-cart { min-height: 0; margin-bottom: 1rem; border-radius: 1.2rem; }
    .theme-modern.index-buy-index .buy-items { overflow: visible; }
    .theme-modern.index-buy-index .goods-group-list { border: 0; border-radius: 0; }
    .theme-modern.index-buy-index .buy-items table,
    .theme-modern.index-buy-index .buy-items tbody,
    .theme-modern.index-buy-index .buy-items tr,
    .theme-modern.index-buy-index .buy-items td { display: block; width: 100%; }
    .theme-modern.index-buy-index .buy-items thead { display: none; }
    .theme-modern.index-buy-index .buy-items table tbody tr td { padding: 1.2rem 0; }
    .theme-modern.index-buy-index .business-item ul { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; }
    .theme-modern.index-buy-index .business-item ul li { min-width: 0; }
    .theme-modern.index-buy-index .buy-order-nav { grid-template-columns: minmax(0,1fr) 14rem; }
    .theme-modern.index-buy-index .buy-order-nav .box { padding: 1rem 1.2rem; }
    .theme-modern.index-buy-index .buy-order-nav .pay-address { display: none; }
    .theme-modern.index-buy-index .buy-order-nav .nav-total-price { font-size: 2rem; }
    .theme-modern.index-buy-index .buy-order-nav button[type="submit"] { min-height: 5.6rem; font-size: 1.5rem; }
    .theme-modern.index-buy-index .mobile-navigation { display: none; }
}

/* 页脚 */
.theme-modern .am-footer { border-top: 1px solid var(--ref-border); background: #fff; }
.theme-modern .footer-nav-title { color: #111827; font-weight: 700; }

@media (max-width: 767px) {
    .theme-modern { background: #f5f7fa; }
    .theme-modern.index-goods-index { padding-top: 5.4rem; }
    .theme-modern .shop-navigation { min-height: 5.4rem; border-bottom: 1px solid var(--ref-border); background: #fff; }
    .theme-modern .navigation-search .am-form-field { background: #f1f5f9; border: 0; }
    .theme-modern .modern-home-hero { padding: 1.2rem; }
    .theme-modern .modern-home-hero > .slideall { padding: 0; border-radius: 1.8rem; background: #e9eef5; box-shadow: 0 .8rem 2.2rem rgba(15,23,42,.08); }
    .theme-modern .modern-home-hero .banner,
    .theme-modern .modern-home-hero .banner .am-slider,
    .theme-modern .modern-home-hero .banner .am-slides li { border-radius: 1.8rem; }
    .theme-modern .small-nav { margin: 1.2rem; padding: 1.2rem .6rem; border-radius: 1.6rem; }
    .theme-modern .items-nav-title { margin: 0 1.2rem; padding: 1.6rem 0 1rem; border: 0; border-radius: 0; background: transparent; }
    .theme-modern .items-nav-title .floor-title { padding-left: .8rem; font-size: 1.7rem; }
    .theme-modern .home-floor .floor { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
    .theme-modern .module-goods-grid-base .item { border: 1px solid var(--ref-border) !important; border-bottom: 1px solid var(--ref-border) !important; border-radius: 1.4rem !important; background: #fff; }
    .theme-modern .module-goods-grid-base .item .price strong { color: var(--ref-price); }
    .theme-modern .mobile-navigation { right: 0; bottom: 0; left: 0; min-height: 6.4rem; padding: .4rem 1rem calc(.4rem + env(safe-area-inset-bottom)); border: 0; border-top: 1px solid var(--ref-border); border-radius: 0; background: rgba(255,255,255,.98); box-shadow: 0 -.4rem 1.6rem rgba(15,23,42,.08); }
    .theme-modern .mobile-navigation li.active a { background: transparent; color: #111827; }
    .theme-modern .mobile-navigation li.active a > i { color: #111827; }
    .theme-modern .mobile-detail-topbar { height: 5.4rem; border-color: var(--ref-border); box-shadow: none; }
    .theme-modern .mobile-detail-tabs a.active { color: #111827; }
    .theme-modern .mobile-detail-tabs a.active::after { background: #111827; }
    .theme-modern .mobile-detail-drawer { border-radius: 0; }
    .theme-modern .system-goods-detail .buy-submit-container .am-btn-primary { background: #111; border-color: #111; }
    .theme-modern .am-footer { background: #111827; }
}
