/*
  商城好物专属样式。
  结构：搜索 → 类目 → 会员价横幅 → 精选大卡 → 商品双列 → 购物车浮标
*/

/* 搜索框（.search-bar）已上移到 components.css —— 课堂页也用它。
   留在本页的表现是课堂页写了这个类却拿不到样式。 */

/* ---------- 类目宫格 ---------- */

/*
  四列一排，两排八项。九宫格的表现是最后一格常常空着或塞个「更多」，
  而「更多」跟前八项长得一样，用户以为它也是一个类目。
*/
.cat-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--sp-3) var(--sp-2);
}

.cat-cell {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--sp-1);
	color: #302c26;
	min-height: var(--tap);
}

.cat-cell .ph {
	width: 4.25rem;
	height: 4.25rem;
	border-radius: var(--r-lg);
	background: none !important;
}

.cat-cell .ph::after {
	opacity: 0.1;
}

.cat-cell .ct-n {
	font-size: var(--fs-xs);
	text-align: center;
	line-height: 1.3;
}

/* ---------- 会员价横幅 ---------- */

/*
  姜黄底 + 墨字。非会员看到的是同一块但文案不同（「开通后省 ¥86」），
  给会员和非会员两套完全不同的版式的表现是要维护两套，
  而其中一套上线后很少有人再看。
*/
.vip-strip {
	display: flex;
	align-items: center;
	gap: var(--sp-3);
	margin-top: var(--sp-4);
	padding: var(--sp-3) var(--sp-4);
	border-radius: var(--r-lg);
	background:
		linear-gradient(110deg, var(--c-gold-soft) 0%, #f6e6c4 60%, var(--c-gold-soft) 100%);
	border: 1px solid rgba(200, 134, 42, 0.35);
	color: var(--c-gold-ink);
}

.vip-strip .vs-t {
	font-family: var(--ff-serif);
	font-size: var(--fs-md);
	font-weight: 600;
}

.vip-strip .vs-s {
	font-size: var(--fs-xs);
	margin-top: 2px;
	opacity: 0.85;
}

.vip-strip .vs-go {
	flex: none;
	font-size: var(--fs-sm);
	font-weight: 600;
	padding: 0 var(--sp-3);
	min-height: var(--tap-sm);
	display: inline-flex;
	align-items: center;
	border: 1px solid currentColor;
	border-radius: var(--r-pill);
}

/* ---------- 精选大卡 ---------- */

/* 一张横幅商品卡，用来给主推品一个不同于列表的位置。 */
.feat-card {
	position: relative;
	display: block;
	margin-top: var(--sp-3);
	border-radius: var(--r-xl);
	overflow: hidden;
	box-shadow: var(--sh-2);
}

.feat-card .fc-body {
	position: absolute;
	inset: 0;
	z-index: 2;
	padding: var(--sp-4);
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	background: linear-gradient(to top, rgba(20, 16, 10, 0.86) 0%, rgba(20, 16, 10, 0.1) 62%);
	color: #fff;
}

.feat-card .fc-t {
	font-family: var(--ff-serif);
	font-size: var(--fs-lg);
	font-weight: 600;
	line-height: 1.25;
}

.feat-card .fc-s {
	font-size: var(--fs-xs);
	opacity: 0.85;
	margin-top: 3px;
}

.feat-card .fc-foot {
	display: flex;
	align-items: flex-end;
	gap: var(--sp-2);
	margin-top: var(--sp-3);
}

.feat-card .price {
	color: #fff;
}

.feat-card .price-old {
	color: rgba(255, 255, 255, 0.6);
}

/* 商品卡族（.prod-grid / .prod-card / .pd-* / .pd-vip）已上移到 components.css
   —— 商品列表页、商品详情页的「看了又看」、购物车、结算都在用。
   留在本页的表现是那些页面写了这些类却拿不到样式。 */

/* ---------- 购物车浮标 ---------- */

/*
  右下角浮标。放在底栏之上 —— 跟底栏平级的表现是它遮住「我的」那一栏，
  用户点「我的」结果进了购物车。
*/
.cart-fab {
	position: fixed;
	right: var(--page-x);
	z-index: 35;
	bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + var(--sp-3));
	width: var(--tap);
	height: var(--tap);
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--c-cinnabar);
	color: #fff;
	box-shadow: var(--sh-3);
}

.cart-fab .cf-n {
	position: absolute;
	top: -2px;
	right: -2px;
	min-width: 1.1rem;
	height: 1.1rem;
	padding: 0 3px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--ff-num);
	font-size: var(--fs-cap);
	line-height: 1;
	background: var(--c-gold);
	color: #3a2500;
	border: 1.5px solid var(--c-surface);
	border-radius: var(--r-pill);
}

/* 排序条直接用组件层的 .seg + .seg-auto，本页不再单独定义 ——
   单独定义的表现是它跟课堂的分类段是同一类控件却两套高度，
   同一套交互在两页手感不同。 */