/* 焕然美商学院 · UI 增强层（hr-ui-enhance.css）
   ------------------------------------------------------------
   1) 每个功能页顶部「← 返回」按钮（访问历史回退，落到首页）
   2) 手机端功能抽屉收窄到约 1/3 屏宽（桌面侧栏不受影响）
   3) 风格美学首页：大图 banner + 圆角卡片宫格 + 横滑风格卡
   全部为增量样式：不覆盖业务色板，沿用黑银深色科技风。
*/

/* ========== 1. 返回上一页 ========== */
.hr-back{
  display:inline-flex;align-items:center;gap:6px;flex:0 0 auto;
  margin-right:14px;padding:7px 12px 7px 10px;
  border:1px solid #3a4144;border-radius:8px;background:#ffffff07;
  color:#c9d0cd;cursor:pointer;
  font:11px Manrope,"PingFang SC",sans-serif;letter-spacing:.04em;
  transition:background .2s ease,border-color .2s ease,color .2s ease;
}
.hr-back::before{content:"←";font-size:14px;line-height:1;color:#8fe3c6}
.hr-back:hover{background:#ffffff14;border-color:#798184;color:#fff}
body.ac-ready .hr-back{display:none}  /* 由 JS 按历史栈决定是否显示 */
body.hr-back-avail .hr-back{display:inline-flex!important}
main>header>div:first-child{display:flex;align-items:center;min-width:0}
main>header .eyebrow{margin-bottom:0}

/* 手机端：返回按钮放左上，避开汉堡菜单 */
.m-back{
  display:none;position:fixed;left:70px;top:max(14px,env(safe-area-inset-top));
  z-index:29;width:42px;height:42px;align-items:center;justify-content:center;
  border:1px solid #5b6a6c;border-radius:8px;
  background:linear-gradient(145deg,#1d2426,#0c0f10);
  box-shadow:0 8px 18px #0008;color:#eaf0ff;font-size:18px;line-height:1;cursor:pointer;
}
body.hr-back-avail .m-back{display:flex}

/* ========== 2. 手机抽屉约 1/3 屏宽 ========== */
@media (max-width:850px){
  aside{
    width:34vw!important;
    min-width:132px!important;
    max-width:230px!important;
    padding:74px 8px calc(18px + env(safe-area-inset-bottom))!important;
  }
  .brand{padding:2px 6px 0!important}
  .brand span{font-size:8px!important;letter-spacing:1px!important}
  .brand b{font-size:15px!important;letter-spacing:0!important;line-height:1.35!important}
  .brand i{display:none!important}
  aside nav{margin-top:22px!important;padding-bottom:10px!important;gap:2px!important}
  .ng-head{padding:9px 7px!important;gap:5px!important}
  .ng-num{font-size:11px!important;margin-right:2px!important}
  .ng-title{font-size:12px!important;line-height:1.25!important}
  .ng-en,.ng-count,.ng-caret{display:none!important}
  .ng-items{padding:2px 0 6px!important}
  .ng-item{padding:8px 7px!important;font-size:11px!important;line-height:1.35!important;min-height:0!important}
  .ng-all{margin:0 4px 8px!important;padding:8px 6px!important;font-size:10px!important}
  aside .side-note{padding:9px 6px 4px!important;font-size:10px!important}
  aside .side-note small,aside .side-logout{font-size:8px!important}
  aside .side-logout{width:calc(100% - 8px)!important;margin:8px 4px 0!important;padding:7px 4px!important}
  .ac-view-note,.ac-hint{padding:9px 7px!important;font-size:9px!important}
  .ac-hint li{font-size:9px!important;line-height:1.5!important}
  body.mobile-nav-open .mobile-nav-backdrop{background:#0009!important}
}

/* ========== 3. 风格美学首页 · 电商杂志式版式（深色科技风） ==========
   参考图版式：品牌栏 + 搜索 + 分类导航 → 大 Banner → 三分类卡 →
   课程商品墙（竖图 + 收藏心 + 标题 + 副标 + 色点）→ 底部 CTA。
   只借鉴版式，配色沿用黑银深色科技风；所有功能走既有 app.js 逻辑。 */
.hr-aesthetic{margin:2px 0 34px}

/* 顶栏：品牌 / 搜索 / 图标 */
.hr-shop-topbar{display:flex;align-items:center;gap:22px;padding:2px 0 18px;border-bottom:1px solid #30383b}
.hr-shop-brand{display:flex;flex-direction:column;line-height:1.1;white-space:nowrap}
.hr-shop-brand span{font:9px "DM Mono",monospace;letter-spacing:3px;color:#9fe3cd}
.hr-shop-brand b{font:500 22px "Playfair Display","Songti SC",serif;letter-spacing:.16em;color:#f2f1ec;margin-top:4px}
.hr-shop-search{display:flex;align-items:center;gap:9px;flex:1;max-width:440px;margin:0 auto;padding:9px 15px;border:1px solid #363e41;border-radius:3px;background:#ffffff08;color:#8f9b98;transition:border-color .2s}
.hr-shop-search:focus-within{border-color:#9fb8b2;background:#ffffff0e}
.hr-shop-search i{font-style:normal;font-size:16px;color:#8fb8aa}
.hr-shop-search input{flex:1;min-width:0;border:0;outline:0;background:none;color:#e9ede9;font:12px Manrope,"PingFang SC",sans-serif}
.hr-shop-search input::placeholder{color:#77817f}
.hr-shop-icons{display:flex;gap:6px;flex:0 0 auto}
.hr-shop-icons button{width:34px;height:34px;display:grid;place-content:center;border:1px solid #363e41;border-radius:50%;background:#ffffff08;color:#c8d1cd;font-size:15px;cursor:pointer;transition:.2s}
.hr-shop-icons button:hover{border-color:#9fb8b2;color:#fff;background:#ffffff14}

/* 分类导航 */
.hr-shop-nav{display:flex;gap:2px;justify-content:center;flex-wrap:wrap;padding:14px 0;border-bottom:1px solid #232a2d}
.hr-shop-nav-btn{border:0;background:none;color:#899593;cursor:pointer;padding:7px 13px;font:10px "DM Mono",monospace;letter-spacing:.12em;transition:.2s;position:relative}
.hr-shop-nav-btn:hover{color:#dfe7e3}
.hr-shop-nav-btn.active{color:#f4f5ef}
.hr-shop-nav-btn.active::after{content:"";position:absolute;left:13px;right:13px;bottom:-15px;height:1px;background:#cfe0d9}

/* 大 Banner */
.hr-shop-hero{position:relative;overflow:hidden;border:1px solid #343c3f;margin-top:20px;min-height:330px;background:#0d1116;box-shadow:inset 0 1px #ffffff10,0 24px 60px #0007}
.hr-shop-hero-img{position:absolute;inset:0 0 0 auto;height:100%;width:58%;object-fit:cover;object-position:center 16%;opacity:.9;filter:saturate(.9) contrast(1.03);-webkit-mask-image:linear-gradient(90deg,transparent 0%,#000 34%,#000 100%);mask-image:linear-gradient(90deg,transparent 0%,#000 34%,#000 100%)}
.hr-shop-hero::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#070b10f9 0%,#070b10e6 40%,#070b1033 78%,#070b1099 100%)}
.hr-shop-hero-copy{position:relative;z-index:1;padding:52px 48px;max-width:600px}
.hr-shop-hero-copy p{margin:0 0 16px;font:10px "DM Mono",monospace;letter-spacing:2.4px;color:#9fe3cd}
.hr-shop-hero-copy h2{font:500 52px/1.02 "Playfair Display","Songti SC",serif;letter-spacing:.02em;margin:0 0 18px;color:#f6f5f0}
.hr-shop-hero-copy>span{display:block;max-width:400px;font-size:13px;line-height:1.85;color:#c2cbc7;margin-bottom:26px}
.hr-shop-hero-copy button{padding:13px 22px;border:1px solid #dbe5df;background:linear-gradient(135deg,#f3f5f0,#c2cdcc);color:#101415;cursor:pointer;font:10px "DM Mono",monospace;letter-spacing:.1em;transition:.2s}
.hr-shop-hero-copy button:hover{filter:brightness(1.08)}

/* 三分类卡 */
.hr-shop-cats{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:14px}
.hr-shop-cats button{position:relative;overflow:hidden;min-height:220px;padding:0;border:1px solid #30383b;background:#0d1114;color:#eef1ed;text-align:left;cursor:pointer;transition:.25s}
.hr-shop-cats button:hover{border-color:#9fb8b2;transform:translateY(-3px);box-shadow:0 16px 34px #0009}
.hr-shop-cats img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 20%;filter:saturate(.78) brightness(.72);transition:transform .4s}
.hr-shop-cats button:hover img{transform:scale(1.05)}
.hr-shop-cats button::after{content:"";position:absolute;inset:0;background:linear-gradient(0deg,#05090ccc 0%,#05090c22 70%)}
.hr-shop-cats span{position:absolute;left:18px;right:18px;bottom:16px;z-index:1}
.hr-shop-cats b{display:block;font:500 20px "Playfair Display","Songti SC",serif;letter-spacing:.05em}
.hr-shop-cats small{display:block;margin-top:6px;font:9px "DM Mono",monospace;letter-spacing:.08em;color:#b7c4bf}

/* 区块标题 */
.hr-shop-sec-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin:38px 0 18px;padding-bottom:13px;border-bottom:1px solid #2b3235}
.hr-shop-sec-head p{margin:0 0 6px;font:9px "DM Mono",monospace;letter-spacing:2px;color:#8b9995}
.hr-shop-sec-head h3{font:500 27px/1.2 "Playfair Display","Songti SC",serif;margin:0;color:#eef0ea;letter-spacing:.02em}
.hr-shop-sec-head>span{font:9px "DM Mono",monospace;letter-spacing:1.4px;color:#8b9995;white-space:nowrap}

/* 课程商品墙 */
.hr-shop-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px 15px}
.hr-pcard{display:block;padding:0;border:0;background:none;color:#e9ece7;text-align:left;cursor:pointer;transition:.25s}
.hr-pcard-media{position:relative;overflow:hidden;aspect-ratio:4/5;background:#121619;border:1px solid #2d3437}
.hr-pcard-media img{display:block;width:100%;height:100%;object-fit:cover;object-position:center 16%;filter:saturate(.82);transition:transform .45s,filter .3s}
.hr-pcard:hover .hr-pcard-media img{transform:scale(1.05);filter:saturate(.95)}
.hr-pcard-fav{position:absolute;top:10px;right:10px;width:30px;height:30px;display:grid;place-content:center;border-radius:50%;background:#05080acc;border:1px solid #ffffff30;color:#eef2ee;font-size:15px;cursor:pointer;transition:.2s}
.hr-pcard-fav:hover{border-color:#e8a9a4;color:#f0b6b1}
.hr-pcard-fav.on{color:#ef9f99;border-color:#ef9f99}
.hr-pcard-no{position:absolute;left:10px;bottom:10px;padding:4px 8px;background:#05080acc;border:1px solid #ffffff24;font:9px "DM Mono",monospace;letter-spacing:.08em;color:#dfe6e1;font-style:normal}
.hr-pcard-info{padding:11px 2px 0}
.hr-pcard-info b{display:block;font:500 14px/1.35 "Playfair Display","Songti SC",serif;letter-spacing:.02em;color:#eef0eb}
.hr-pcard-info>span{display:block;margin-top:5px;font-size:10px;line-height:1.5;color:#8f9b98}
.hr-pcard-foot{display:flex;align-items:center;justify-content:space-between;margin-top:9px;padding-top:9px;border-top:1px solid #242b2e}
.hr-pcard-foot em{font:9px "DM Mono",monospace;letter-spacing:.05em;color:#a9b4b0;font-style:normal}
.hr-pcard-dots{display:inline-flex;gap:5px}
.hr-pcard-dots i{display:block;width:10px;height:10px;border-radius:50%;border:1px solid #ffffff2a}

.hr-shop-empty{padding:40px;text-align:center;color:#8b9995;font-size:13px;border:1px dashed #343c3f;margin-top:8px}

/* 底部 CTA */
.hr-shop-cta{display:flex;justify-content:center;margin-top:34px}
.hr-shop-cta button{padding:13px 30px;border:1px solid #101314;background:#101314;color:#f4f5ef;cursor:pointer;font:10px "DM Mono",monospace;letter-spacing:.12em;transition:.2s}
.hr-shop-cta button:hover{background:transparent;color:#eef2ed;border-color:#5c6b6c}

/* ---------- 响应式 ---------- */
@media (max-width:1100px){
  .hr-shop-grid{grid-template-columns:repeat(3,1fr)}
  .hr-shop-hero-copy{padding:42px 32px}
  .hr-shop-hero-copy h2{font-size:43px}
  .hr-shop-brand b{font-size:19px}
}
@media (max-width:850px){
  /* mobile-home.css 有 #learn > *:not(.m-home){display:none!important}，此处提权 */
  body #learn > .hr-aesthetic{display:block!important}
  body.mobile-nav-open .m-appbar{z-index:60!important}
  .mobile-menu-toggle{z-index:60!important}

  .hr-aesthetic{margin:0 calc(-1 * var(--academy-page,18px)) 22px}
  .hr-shop-topbar{gap:12px;padding:4px 16px 14px;flex-wrap:wrap}
  .hr-shop-brand b{font-size:17px}
  .hr-shop-brand span{font-size:8px;letter-spacing:2px}
  .hr-shop-search{order:3;flex:1 1 100%;max-width:none;margin:2px 0 0;padding:8px 12px}
  .hr-shop-icons{margin-left:auto}
  .hr-shop-icons button{width:30px;height:30px;font-size:13px}

  .hr-shop-nav{justify-content:flex-start;flex-wrap:nowrap;overflow-x:auto;padding:12px 16px;gap:4px;scrollbar-width:none}
  .hr-shop-nav::-webkit-scrollbar{display:none}
  .hr-shop-nav-btn{white-space:nowrap;padding:6px 11px;font-size:10px}
  .hr-shop-nav-btn.active::after{bottom:-13px}

  .hr-shop-hero{margin-top:14px;border-left:0;border-right:0;min-height:260px}
  .hr-shop-hero-img{width:62%;object-position:center 12%;opacity:.72}
  .hr-shop-hero::after{background:linear-gradient(90deg,#070b10fa 0%,#070b10e0 50%,#070b1055 100%)}
  .hr-shop-hero-copy{padding:32px 20px 26px;max-width:none}
  .hr-shop-hero-copy h2{font-size:33px;margin-bottom:12px}
  .hr-shop-hero-copy>span{font-size:12px;margin-bottom:18px}
  .hr-shop-hero-copy button{padding:10px 16px;font-size:9px}

  .hr-shop-cats{gap:8px;margin-top:10px;padding:0 16px}
  .hr-shop-cats button{min-height:150px;border-radius:2px}
  .hr-shop-cats span{left:11px;right:11px;bottom:11px}
  .hr-shop-cats b{font-size:14px}
  .hr-shop-cats small{font-size:8px;margin-top:4px}

  .hr-shop-sec-head{margin:28px 16px 14px}
  .hr-shop-sec-head h3{font-size:20px}
  .hr-shop-sec-head>span{font-size:8px}

  .hr-shop-grid{grid-template-columns:repeat(2,1fr);gap:15px 10px;padding:0 16px}
  .hr-pcard-info b{font-size:13px}
  .hr-pcard-info>span{font-size:9px}
  .hr-pcard-fav{width:26px;height:26px;font-size:13px;top:8px;right:8px}
  .hr-pcard-no{font-size:8px;left:8px;bottom:8px;padding:3px 6px}
  .hr-shop-cta{margin:26px 16px 0}
}
@media (max-width:400px){
  .hr-shop-grid{gap:13px 8px}
  .hr-shop-cats button{min-height:130px}
  .hr-shop-cats b{font-size:12px}
}
