/* ==========================================================================
   HuPiShop 商城主题样式
   ========================================================================== */

:root {
	--brand: #ff4d2d;
	--brand-dark: #e63c1c;
	--brand-soft: #fff1ec;
	--accent: #ffb100;
	--ink: #1f2329;
	--muted: #8a9099;
	--line: #eceef1;
	--bg: #f6f7f9;
	--white: #fff;
	--radius: 12px;
	--shadow: 0 2px 12px rgba(20, 24, 31, .06);
}

* { box-sizing: border-box; }

body.hp-body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Helvetica, Arial, sans-serif;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }

.hp-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ---------- 按钮 ---------- */
.hp-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	padding: 10px 20px; border: 0; border-radius: 999px;
	background: linear-gradient(135deg, var(--brand), var(--brand-dark));
	color: #fff; font-size: 14px; font-weight: 500; cursor: pointer;
	transition: .18s; box-shadow: 0 4px 14px rgba(255, 77, 45, .22);
}
.hp-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(255, 77, 45, .3); }
.hp-btn:active { transform: none; }
.hp-btn--ghost { background: #fff; color: var(--brand); border: 1px solid var(--brand); box-shadow: none; }
.hp-btn--ghost:hover { background: var(--brand-soft); }
.hp-btn--sm { padding: 6px 14px; font-size: 13px; }
.hp-btn--lg { padding: 13px 34px; font-size: 15px; }
.hp-btn--block { width: 100%; }
.hp-link { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 13px; }
.hp-link:hover { color: var(--brand); }

/* ---------- 头部 ---------- */
.hp-header {
	position: sticky; top: 0; z-index: 60;
	background: #fff; border-bottom: 1px solid var(--line);
	box-shadow: 0 1px 0 rgba(0, 0, 0, .02);
}
.hp-header__inner { display: flex; align-items: center; gap: 20px; height: 66px; }

.hp-logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.hp-logo__mark {
	width: 34px; height: 34px; border-radius: 9px;
	background: linear-gradient(135deg, var(--brand), var(--accent));
	color: #fff; font-weight: 700; font-size: 14px;
	display: flex; align-items: center; justify-content: center;
}
.hp-logo__text { font-size: 17px; font-weight: 700; letter-spacing: .5px; }
.hp-logo img { max-height: 34px; width: auto; }

.hp-search { flex: 1; max-width: 420px; display: flex; }
.hp-search__input {
	flex: 1; height: 38px; padding: 0 14px;
	border: 2px solid var(--brand); border-right: 0;
	border-radius: 999px 0 0 999px; outline: none; font-size: 13px; background: #fff;
}
.hp-search__btn {
	width: 52px; height: 38px; border: 0; cursor: pointer;
	background: var(--brand); color: #fff;
	border-radius: 0 999px 999px 0; display: flex; align-items: center; justify-content: center;
}

.hp-menu { display: flex; gap: 18px; margin: 0; padding: 0; list-style: none; }
.hp-menu a { font-size: 14px; color: var(--ink); }
.hp-menu a:hover { color: var(--brand); }

.hp-header__actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.hp-action, .hp-cart { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink); position: relative; }
.hp-action:hover, .hp-cart:hover { color: var(--brand); }
.hp-cart__count {
	min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
	background: var(--brand); color: #fff; font-size: 11px; font-style: normal;
	display: flex; align-items: center; justify-content: center;
}

/* ---------- 主体区块 ---------- */
.hp-main { min-height: 60vh; padding-bottom: 48px; }
.hp-section { margin-top: 34px; }
.hp-section__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.hp-section__head h1 { font-size: 24px; }
.hp-section__head h2 { font-size: 20px; position: relative; padding-left: 12px; }
.hp-section__head h2::before {
	content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 4px;
	border-radius: 2px; background: linear-gradient(var(--brand), var(--accent));
}
.hp-more { font-size: 13px; color: var(--muted); }
.hp-more:hover { color: var(--brand); }
.hp-empty { text-align: center; color: var(--muted); padding: 32px 0; }
.hp-empty-box { text-align: center; padding: 70px 0; color: var(--muted); }
.hp-empty-box .hp-btn { margin-top: 14px; }
.hp-content-box { background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }

/* ---------- 轮播 ---------- */
.hp-hero { margin-top: 18px; display: grid; grid-template-columns: 1fr 260px; gap: 16px; }
.hp-slider { position: relative; height: 340px; border-radius: var(--radius); overflow: hidden; background: #fff; }
.hp-slider__track { position: relative; height: 100%; }
.hp-slide {
	position: absolute; inset: 0; opacity: 0; transition: opacity .5s;
	background: linear-gradient(120deg, #ff7a45, #ff4d2d 45%, #ffb100);
	background-size: cover; background-position: center;
	display: flex; align-items: center; padding: 0 56px; color: #fff;
}
.hp-slide.is-active { opacity: 1; }
.hp-slide__inner h2 { font-size: 34px; text-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
.hp-slide__inner p { margin: 10px 0 20px; font-size: 15px; opacity: .95; }
.hp-slide__inner .hp-btn { background: #fff; color: var(--brand); box-shadow: none; }
.hp-slider__arrow {
	position: absolute; top: 50%; transform: translateY(-50%);
	width: 34px; height: 34px; border: 0; border-radius: 50%; cursor: pointer;
	background: rgba(0, 0, 0, .28); color: #fff; font-size: 22px; line-height: 1;
}
.hp-slider__arrow--prev { left: 12px; }
.hp-slider__arrow--next { right: 12px; }
.hp-slider__dots { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 8px; }
.hp-slider__dots button {
	width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%;
	background: rgba(255, 255, 255, .55); cursor: pointer;
}
.hp-slider__dots button.is-active { width: 22px; border-radius: 5px; background: #fff; }

.hp-hero__side { display: flex; flex-direction: column; gap: 16px; }
.hp-promo-card {
	flex: 1; background: #fff; border-radius: var(--radius); padding: 16px;
	box-shadow: var(--shadow); display: flex; flex-direction: column; justify-content: center;
}
.hp-promo-card__tag {
	align-self: flex-start; font-size: 11px; padding: 2px 8px; border-radius: 99px;
	background: var(--brand-soft); color: var(--brand); margin-bottom: 8px;
}
.hp-promo-card strong { font-size: 16px; }
.hp-promo-card p { margin: 4px 0 10px; color: var(--muted); font-size: 12px; }
.hp-promo-card .hp-btn { align-self: flex-start; }

/* ---------- 分类 ---------- */
.hp-cats { display: grid; grid-template-columns: repeat(10, 1fr); gap: 12px; }
.hp-cat {
	background: #fff; border-radius: var(--radius); padding: 14px 8px;
	text-align: center; box-shadow: var(--shadow); transition: .18s;
}
.hp-cat:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(20, 24, 31, .1); }
.hp-cat__img {
	width: 52px; height: 52px; margin: 0 auto 8px; border-radius: 50%;
	background: linear-gradient(135deg, var(--brand-soft), #fff6e5);
	display: flex; align-items: center; justify-content: center;
	color: var(--brand); font-size: 20px; font-weight: 600; overflow: hidden;
}
.hp-cat__img img { width: 100%; height: 100%; object-fit: cover; }
.hp-cat__name { display: block; font-size: 13px; }
.hp-cat__count { display: block; font-size: 11px; color: var(--muted); }

/* ---------- 促销区 ---------- */
.hp-promo {
	background: linear-gradient(120deg, #fff5f0, #fff9ec);
	border-radius: var(--radius); padding: 18px;
}
.hp-promo__bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hp-promo__title { display: flex; align-items: center; gap: 10px; flex: 1; }
.hp-promo__title h2 { font-size: 20px; color: var(--brand-dark); }
.hp-promo__title p { margin: 0; font-size: 12px; color: var(--muted); }
.hp-promo__flame { font-size: 22px; }

.hp-countdown { display: flex; align-items: center; gap: 4px; }
.hp-countdown__label { font-size: 12px; color: var(--muted); margin-right: 4px; }
.hp-countdown b {
	min-width: 30px; padding: 3px 0; border-radius: 6px; text-align: center;
	background: var(--ink); color: #fff; font-size: 14px; font-weight: 600;
}
.hp-countdown i { font-style: normal; color: var(--muted); font-size: 12px; }

.hp-scroller { display: flex; gap: 12px; overflow-x: auto; padding: 14px 2px 4px; }
.hp-scroller::-webkit-scrollbar { height: 6px; }
.hp-scroller::-webkit-scrollbar-thumb { background: #dcdfe4; border-radius: 3px; }
.hp-promo-item {
	flex: 0 0 150px; background: #fff; border-radius: 10px; padding: 10px;
	position: relative; box-shadow: var(--shadow);
}
.hp-promo-item img { width: 100%; height: 110px; object-fit: cover; border-radius: 8px; }
.hp-promo-item h4 { font-size: 13px; margin: 8px 0 6px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-promo-item__off {
	position: absolute; left: 10px; top: 10px; background: var(--brand); color: #fff;
	font-size: 11px; padding: 2px 7px; border-radius: 99px;
}
.hp-promo-item__price span { color: var(--brand); font-weight: 600; }
.hp-promo-item__price del { color: var(--muted); font-size: 12px; margin-left: 6px; }

/* ---------- 商品网格 ---------- */
.hp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.hp-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: .18s; }
.hp-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(20, 24, 31, .12); }
.hp-card__media { position: relative; display: block; }
.hp-card__media img { width: 100%; height: 190px; object-fit: cover; }
.hp-badge {
	position: absolute; left: 8px; top: 8px; font-size: 11px; padding: 2px 8px; border-radius: 99px; color: #fff;
}
.badge-hot { background: var(--brand); }
.badge-new { background: #2bb673; }
.hp-soldout {
	position: absolute; inset: 0; background: rgba(255, 255, 255, .6);
	display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px;
}
.hp-card__body { padding: 12px; }
.hp-card__title { font-size: 14px; font-weight: 500; height: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-card__price { margin: 8px 0; }
.hp-price { color: var(--brand); font-size: 18px; font-weight: 600; }
.hp-price-origin { color: var(--muted); font-size: 12px; margin-left: 6px; text-decoration: line-through; }
.hp-card__foot { display: flex; align-items: center; justify-content: space-between; }
.hp-sales { font-size: 12px; color: var(--muted); }

/* ---------- 面包屑 / 布局 ---------- */
.hp-breadcrumb { padding: 16px 0 4px; font-size: 12px; color: var(--muted); display: flex; gap: 6px; }
.hp-breadcrumb a:hover { color: var(--brand); }
.hp-layout { display: grid; grid-template-columns: 200px 1fr; gap: 20px; margin-top: 10px; }
.hp-widget { background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.hp-widget h3 { font-size: 15px; margin-bottom: 10px; }
.hp-catlist li a { display: flex; justify-content: space-between; padding: 8px 10px; border-radius: 8px; font-size: 13px; }
.hp-catlist li a:hover { background: var(--bg); }
.hp-catlist li.is-active a { background: var(--brand-soft); color: var(--brand); }
.hp-catlist em { font-style: normal; color: var(--muted); font-size: 12px; }

.hp-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.hp-toolbar__title { font-size: 20px; }
.hp-sort { display: flex; gap: 12px; font-size: 13px; }
.hp-sort a { color: var(--muted); padding: 4px 10px; border-radius: 99px; }
.hp-sort a.is-active { background: var(--brand); color: #fff; }
.hp-pager { margin: 24px 0; text-align: center; }
.hp-pager .page-numbers { padding: 6px 12px; border-radius: 8px; background: #fff; margin: 0 3px; box-shadow: var(--shadow); }
.hp-pager .page-numbers.current { background: var(--brand); color: #fff; }

/* ---------- 商品详情 ---------- */
.hp-detail { display: grid; grid-template-columns: 460px 1fr; gap: 28px; background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-top: 12px; }
.hp-detail__stage { position: relative; border-radius: 10px; overflow: hidden; background: var(--bg); }
.hp-detail__stage img { width: 100%; height: 420px; object-fit: cover; }
.hp-detail__thumbs { display: flex; gap: 8px; margin-top: 10px; }
.hp-detail__thumbs button { width: 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; }
.hp-detail__thumbs button.is-active { border-color: var(--brand); }
.hp-detail__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.hp-detail__info h1 { font-size: 22px; }
.hp-detail__price { margin: 14px 0; padding: 14px; background: linear-gradient(120deg, #fff5f0, #fff9ec); border-radius: 10px; }
.hp-detail__now { color: var(--brand); font-size: 28px; font-weight: 700; }
.hp-detail__price del { color: var(--muted); margin-left: 8px; }
.hp-detail__off { margin-left: 8px; font-size: 12px; background: var(--brand); color: #fff; padding: 2px 8px; border-radius: 99px; }
.hp-detail__meta { display: flex; gap: 22px; color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.hp-detail__meta span { color: var(--ink); }

.hp-spec, .hp-qty { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.hp-spec__label { width: 62px; font-size: 13px; color: var(--muted); line-height: 32px; }
.hp-spec__list { display: flex; flex-wrap: wrap; gap: 8px; }
.hp-spec__item { padding: 6px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; font-size: 13px; }
.hp-spec__item.is-active { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.hp-qty__box { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.hp-qty__box button { width: 32px; height: 32px; border: 0; background: #fff; cursor: pointer; font-size: 15px; }
.hp-qty__box button:hover { background: var(--brand-soft); }
.hp-qty__box input { width: 52px; height: 32px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; }
.hp-qty__box--sm button { width: 26px; height: 26px; }
.hp-qty__box--sm input { width: 42px; height: 26px; }
.hp-detail__actions { display: flex; gap: 12px; margin-top: 6px; }
.hp-detail__tips { display: flex; gap: 16px; margin-top: 16px; font-size: 12px; color: var(--muted); }

/* ---------- 购物车 ---------- */
.hp-cart-wrap { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.hp-cart-table { width: 100%; border-collapse: collapse; }
.hp-cart-table th { background: #fafbfc; padding: 12px; font-size: 13px; font-weight: 500; text-align: left; }
.hp-cart-table td { padding: 14px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.hp-cart-table .col-check { width: 44px; text-align: center; }
.hp-cart-table .col-price { width: 110px; }
.hp-cart-table .col-qty { width: 140px; }
.hp-cart-table .col-sub { width: 110px; color: var(--brand); font-weight: 600; }
.hp-cart-table .col-op { width: 70px; text-align: center; }
.hp-cart-goods { display: flex; gap: 12px; align-items: center; }
.hp-cart-goods img { width: 66px; height: 66px; object-fit: cover; border-radius: 8px; }
.hp-cart-goods a { font-size: 14px; }
.hp-cart-spec { display: block; font-size: 12px; color: var(--muted); }
.hp-cart-bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: #fafbfc; }
.hp-cart-bar__left { display: flex; gap: 16px; align-items: center; font-size: 13px; }
.hp-cart-bar__right { display: flex; gap: 16px; align-items: center; }
.hp-total { color: var(--brand); font-size: 20px; }

/* ---------- 结算 ---------- */
.hp-checkout { display: grid; grid-template-columns: 1fr 320px; gap: 20px; margin-top: 12px; }
.hp-panel { background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.hp-panel h3 { font-size: 15px; margin-bottom: 14px; padding-left: 10px; border-left: 3px solid var(--brand); }
.hp-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hp-form-full { grid-column: 1 / -1; }
.hp-form-grid label span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.hp-form-grid input { width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; outline: none; }
.hp-form-grid input:focus { border-color: var(--brand); }
.hp-paymethods { display: flex; flex-direction: column; gap: 10px; }
.hp-paymethod { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 12px; cursor: pointer; }
.hp-paymethod.is-active { border-color: var(--brand); background: var(--brand-soft); }
.hp-paymethod__icon { width: 46px; height: 46px; border-radius: 8px; background: linear-gradient(135deg, var(--brand), var(--accent)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.hp-paymethod p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.hp-order-goods { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.hp-order-goods img { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; }
.hp-order-goods__info { flex: 1; font-size: 13px; }
.hp-order-goods__info span { display: block; color: var(--muted); font-size: 12px; }
.hp-order-goods__price { font-size: 13px; color: var(--muted); }
.hp-coupon { display: flex; gap: 8px; }
.hp-coupon input { flex: 1; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; outline: none; }
.hp-coupon-msg { font-size: 12px; color: var(--brand); min-height: 18px; margin: 6px 0 0; }
.hp-summary__row { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.hp-summary__total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 10px; border-top: 1px dashed var(--line); margin-bottom: 14px; }
.hp-summary__total strong { color: var(--brand); font-size: 22px; }
.hp-tip { font-size: 12px; color: var(--muted); margin: 10px 0 0; text-align: center; }

/* ---------- 收银台 ---------- */
.hp-pay { max-width: 980px; margin: 20px auto; }
.hp-pay__head { text-align: center; margin-bottom: 20px; }
.hp-pay__head h1 { font-size: 24px; }
.hp-pay__head p { color: var(--muted); font-size: 13px; }
.hp-pay__head b { color: var(--brand); }
.hp-pay__body { display: grid; grid-template-columns: 380px 1fr; gap: 20px; }
.hp-pay__qr { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); text-align: center; }
.hp-pay__qr h3 { font-size: 15px; margin-bottom: 14px; }
.hp-pay__qrbox {
	width: 240px; height: 240px; margin: 0 auto 12px; border: 1px dashed var(--line);
	border-radius: 10px; display: flex; align-items: center; justify-content: center; background: #fafbfc;
}
.hp-pay__qrbox img { width: 220px; height: 220px; }
.hp-pay__loading { color: var(--muted); font-size: 13px; }
.hp-pay__done { font-size: 20px; color: #2bb673; font-weight: 600; }
.hp-pay__hint { font-size: 12px; color: var(--muted); }
.hp-pay__amount { margin: 14px 0; font-size: 13px; }
.hp-pay__amount strong { color: var(--brand); font-size: 24px; margin-left: 6px; }
.hp-pay__info { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.hp-pay__info h3 { font-size: 15px; margin-bottom: 12px; padding-left: 10px; border-left: 3px solid var(--brand); }
.hp-pay__info ul { margin-bottom: 16px; }
.hp-pay__info li { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0; }
.hp-pay__info li span { color: var(--muted); }

/* ---------- 会员中心 ---------- */
.hp-account { display: grid; grid-template-columns: 240px 1fr; gap: 20px; margin-top: 16px; }
.hp-account__side { background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); align-self: start; }
.hp-account__user { display: flex; gap: 12px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.hp-account__avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--accent)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.hp-account__user p { margin: 0; font-size: 12px; color: var(--muted); }
.hp-account__menu { margin-top: 12px; }
.hp-account__menu a { display: block; padding: 9px 12px; border-radius: 8px; font-size: 14px; }
.hp-account__menu a:hover { background: var(--bg); }
.hp-account__menu .is-active a { background: var(--brand-soft); color: var(--brand); }
.hp-order { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 14px; overflow: hidden; }
.hp-order__head { display: flex; align-items: center; gap: 16px; padding: 10px 14px; background: #fafbfc; font-size: 12px; color: var(--muted); }
.hp-order__status { margin-left: auto; color: var(--brand); font-weight: 600; }
.hp-order__body { padding: 0 14px; }
.hp-order__foot { padding: 10px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.hp-status--paid, .hp-status--completed { color: #2bb673 !important; }
.hp-status--cancelled, .hp-status--refunded { color: var(--muted) !important; }

.hp-auth { max-width: 380px; margin: 40px auto; background: #fff; border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.hp-auth__tabs { display: flex; gap: 18px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.hp-auth__tabs button { background: none; border: 0; padding: 8px 2px; font-size: 16px; cursor: pointer; color: var(--muted); }
.hp-auth__tabs button.is-active { color: var(--brand); border-bottom: 2px solid var(--brand); }
.hp-auth__form label { display: block; margin-bottom: 12px; }
.hp-auth__form label span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.hp-auth__form input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; outline: none; }
.hp-auth__form input:focus { border-color: var(--brand); }
.hp-auth__msg { font-size: 12px; color: var(--brand); min-height: 18px; margin: 10px 0 0; }
.is-hidden { display: none !important; }

/* ---------- 提示 ---------- */
.hp-toast {
	position: fixed; left: 50%; top: 84px; transform: translate(-50%, -12px);
	background: rgba(31, 35, 41, .92); color: #fff; padding: 10px 18px; border-radius: 99px;
	font-size: 13px; opacity: 0; pointer-events: none; transition: .25s; z-index: 999;
}
.hp-toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 底部 ---------- */
.hp-footer { background: #fff; border-top: 1px solid var(--line); padding: 34px 0 20px; margin-top: 40px; }
.hp-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; }
.hp-footer__col h4 { font-size: 14px; margin-bottom: 10px; }
.hp-footer__col p, .hp-footer__col li { font-size: 12px; color: var(--muted); line-height: 1.9; }
.hp-footer__col a:hover { color: var(--brand); }
.hp-footer__bottom { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); text-align: center; font-size: 12px; color: var(--muted); }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
	.hp-cats { grid-template-columns: repeat(5, 1fr); }
	.hp-grid { grid-template-columns: repeat(3, 1fr); }
	.hp-hero { grid-template-columns: 1fr; }
	.hp-hero__side { flex-direction: row; }
}

@media (max-width: 860px) {
	.hp-header__nav, .hp-search { display: none; }
	.hp-grid { grid-template-columns: repeat(2, 1fr); }
	.hp-detail, .hp-checkout, .hp-pay__body, .hp-account, .hp-layout { grid-template-columns: 1fr; }
	.hp-footer__grid { grid-template-columns: 1fr 1fr; }
	.hp-cart-table .col-price, .hp-cart-table .col-op { display: none; }
	.hp-form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
	.hp-cats { grid-template-columns: repeat(4, 1fr); }
	.hp-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
	.hp-slider { height: 200px; }
	.hp-slide__inner h2 { font-size: 22px; }
	.hp-hero__side { flex-direction: column; }
}

/* ================= 虚拟资源课程栏目 ================= */
.hp-section__head > div { display: flex; flex-direction: column; gap: 2px; }
.hp-section__sub { margin: 0; font-size: 13px; color: var(--muted); font-weight: 400; }

.hp-courses { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.hp-grid--course { margin-top: 4px; }

.hp-course {
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: .2s;
}
.hp-course:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); }

.hp-course__media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #f2f4f7; }
.hp-course__media img { width: 100%; height: 100%; object-fit: cover; }
.hp-course__tag {
	position: absolute; left: 10px; top: 10px;
	background: rgba(31,35,41,.78); color: #fff;
	font-size: 12px; padding: 3px 9px; border-radius: 20px;
}
.hp-course__owned {
	position: absolute; right: 10px; top: 10px;
	background: #1d9e75; color: #fff;
	font-size: 12px; padding: 3px 9px; border-radius: 20px;
}

.hp-course__body { padding: 12px 14px 14px; display: flex; flex-direction: column; flex: 1; gap: 6px; }
.hp-course__title { margin: 0; font-size: 14px; font-weight: 500; line-height: 1.45; }
.hp-course__title a:hover { color: var(--brand); }
.hp-course__desc { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.6; min-height: 38px; }
.hp-course__meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.hp-course__provider { background: #eef4ff; color: #185fa5; padding: 2px 8px; border-radius: 4px; }
.hp-course__foot { margin-top: auto; display: flex; align-items: center; gap: 8px; padding-top: 8px; }
.hp-course__foot .hp-price { font-size: 17px; font-weight: 500; color: var(--brand); }
.hp-course__foot .hp-price-origin { font-size: 12px; color: var(--muted); text-decoration: line-through; }
.hp-course__foot .hp-btn { margin-left: auto; }

/* ================= 资源解锁卡片 ================= */
.hp-resource {
	margin-top: 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: #fbfcfd;
	overflow: hidden;
}
.hp-resource.is-unlocked { border-color: #b7e4d3; background: #f4fbf8; }
.hp-resource.is-locked { border-style: dashed; }

.hp-resource__head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.hp-resource.is-unlocked .hp-resource__head { border-bottom-color: #d9f0e6; }
.hp-resource__badge {
	background: #1d9e75; color: #fff; font-size: 12px;
	padding: 2px 8px; border-radius: 4px; flex: none;
}
.hp-resource__badge--lock { background: var(--muted); }

.hp-resource__row {
	display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
	padding: 10px 14px; border-bottom: 1px dashed var(--line); font-size: 13px;
}
.hp-resource__row:last-child { border-bottom: 0; }
.hp-resource__label { color: var(--muted); flex: none; }
.hp-resource__link { flex: 1 1 200px; min-width: 0; color: #185fa5; word-break: break-all; }
.hp-resource__code {
	background: #fff; border: 1px solid var(--line); border-radius: 6px;
	padding: 3px 12px; font-size: 15px; letter-spacing: 2px;
	font-family: Consolas, Menlo, monospace;
}
.hp-resource__note { margin: 0; padding: 0 14px 12px; font-size: 12px; color: var(--muted); }

.hp-resource__mask { padding: 18px 14px 22px; text-align: center; color: var(--muted); }
.hp-resource__mask span { font-size: 22px; display: block; }
.hp-resource__mask p { margin: 6px 0 2px; font-size: 13px; color: var(--ink); }
.hp-resource__mask small { font-size: 12px; }

/* ================= 会员中心 · 我的资源 ================= */
.hp-res-tip { margin: 0 0 14px; font-size: 13px; color: var(--muted); }
.hp-res-list { display: flex; flex-direction: column; gap: 14px; }
.hp-res-item {
	display: flex; gap: 14px;
	border: 1px solid var(--line); border-radius: var(--radius);
	padding: 14px; background: var(--white);
}
.hp-res-item__media { flex: none; width: 120px; }
.hp-res-item__media img { width: 120px; height: 80px; object-fit: cover; border-radius: 8px; }
.hp-res-item__info { flex: 1; min-width: 0; }
.hp-res-item__info h4 { margin: 0 0 4px; font-size: 14px; font-weight: 500; }
.hp-res-item__meta { display: block; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.hp-res-item .hp-resource { margin-top: 0; }

@media (max-width: 640px) {
	.hp-res-item { flex-direction: column; }
	.hp-res-item__media, .hp-res-item__media img { width: 100%; height: auto; }
	.hp-resource__link { flex-basis: 100%; }
}

/* ================= 通用内容页（文章 / 页面 / 搜索 / 404） ================= */
.hp-sidebar { min-width: 0; }
.hp-content { min-width: 0; }

.hp-postlist { display: flex; flex-direction: column; gap: 16px; }

.hp-article {
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 18px 20px;
}
.hp-article__title { margin: 0 0 6px; font-size: 16px; font-weight: 500; line-height: 1.5; }
.hp-article__title a:hover { color: var(--brand); }
.hp-article__title--page { font-size: 22px; margin-bottom: 10px; }
.hp-article__meta { margin: 0 0 10px; font-size: 12px; color: var(--muted); }
.hp-article__meta a { color: var(--muted); }
.hp-article__excerpt { margin: 0 0 10px; font-size: 13px; color: var(--muted); line-height: 1.7; }
.hp-article__body { font-size: 14px; line-height: 1.9; color: var(--ink); }
.hp-article__body p { margin: 0 0 14px; }
.hp-article__body img { max-width: 100%; height: auto; border-radius: 8px; }
.hp-article__body h2, .hp-article__body h3 { margin: 20px 0 10px; }
.hp-article__body ul, .hp-article__body ol { margin: 0 0 14px; padding-left: 22px; }
.hp-article__body a { color: #185fa5; }
.hp-article__body blockquote {
	margin: 0 0 14px; padding: 10px 14px;
	border-left: 3px solid var(--brand); background: var(--bg); color: var(--muted);
}
.hp-article__thumb { margin: 0 0 14px; }
.hp-article__thumb img { width: 100%; height: auto; border-radius: 10px; }

.hp-pager--post { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.hp-pager--post a { color: var(--muted); }
.hp-pager--post a:hover { color: var(--brand); }

.hp-404 { padding: 60px 0 80px; }
.hp-404__code {
	margin: 0; font-size: 72px; font-weight: 600;
	color: var(--brand); opacity: .25; line-height: 1;
}
.hp-404 h2 { margin: 12px 0 8px; font-size: 20px; }
.hp-404 p { margin: 0; }
.hp-404__actions { display: flex; justify-content: center; gap: 10px; margin-top: 20px; }

/* 评论区基础排版 */
.hp-comments { margin-top: 24px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.hp-comments h3 { font-size: 16px; margin-bottom: 12px; }
.hp-comments .comment-list { list-style: none; margin: 0 0 16px; padding: 0; }
.hp-comments .comment { padding: 12px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.hp-comments .comment:last-child { border-bottom: 0; }
.hp-comments .comment-meta { color: var(--muted); font-size: 12px; margin-bottom: 4px; }

@media (max-width: 640px) {
	.hp-404__code { font-size: 54px; }
	.hp-article { padding: 14px 16px; }
}
