/* ============ 分类页工具行 + 排序 ============ */
.merc-cat-toolbar {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	padding: 0 0 16px;
}
.merc-cat-toolbar .sort-by {
	display: none;
}
.merc-sort {
	position: relative;
}
.merc-sort__btn {
	align-items: center;
	background: #fff;
	border: 1px solid var(--merc-border);
	border-radius: 8px;
	color: var(--merc-chocolat);
	cursor: pointer;
	display: flex;
	font-size: 13px;
	gap: 8px;
	padding: 9px 14px;
}
.merc-sort__label {
	color: #8a857c;
}
.merc-sort__value {
	font-weight: 700;
}
.merc-sort__caret {
	font-size: 11px;
	color: #8a857c;
}
.merc-sort__menu {
	background: #fff;
	border: 1px solid var(--merc-border);
	border-radius: 8px;
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.30);
	display: none;
	min-width: 200px;
	padding: 6px 0;
	position: absolute;
	right: 0;
	top: calc(100% + 6px);
	z-index: 20;
}
.merc-sort.show .merc-sort__menu,
.merc-sort__menu.show {
	display: block;
}
.merc-sort__option {
	color: var(--merc-text);
	display: block;
	font-size: 14px;
	padding: 9px 16px;
	text-decoration: none;
}
.merc-sort__option:hover {
	background: #faf6f0;
	color: var(--merc-hover);
}
.merc-sort__option.current {
	color: var(--merc-hover);
	font-weight: 700;
}

/* ============ 分类页子分类分组（Mercadona 布局）============ */
.merc-cat-section {
	margin: 0 0 40px;
}
.merc-cat-section__title {
	color: var(--merc-chocolat);
	font-size: 22px;
	font-weight: 800;
	margin: 0 0 16px;
}

/* ============ 分类页标题（名称 + 下划线）============ */
.merc-category-header {
	margin: 48px 0 24px;
}
.merc-category-title {
	color: var(--merc-chocolat);
	font-size: 28px;
	font-weight: 800;
	margin: 0;
	padding-bottom: 24px;
	border-bottom: 1px solid #d6d6d3;
}
/* Ver todas 列表页 H1(新品/畅销/降价/搜索等) 与分类页同规格(尺寸+下划线+顶部间距) */
body.layout-left-column #js-product-list-header,
#js-product-list-header {
	color: var(--merc-chocolat);
	font-size: 28px;
	font-weight: 800;
	margin: 48px 0 24px;
	padding-bottom: 24px;
}
/* 分类页标题下划线只保留 H1 一条(#js-product-list-header 容器线在子分类名上方, 2026-08-27 去掉) */
.merc-category-title {
	border-bottom: 1px solid #d6d6d3;
}

/* ============ Ver 下一分类 ============ */
.merc-next-cat {
	margin: 32px 0 10px;
	padding: 16px;
	text-align: center;
}
.merc-next-cat__btn {
	background: #fff;
	border: 2px solid var(--merc-border);
	border-radius: 22px;
	color: var(--merc-text);
	display: inline-block;
	font-size: 15px;
	font-weight: 600;
	padding: 12px 30px;
	text-decoration: none;
	transition: border-color 0.2s, color 0.2s;
}
.merc-next-cat__btn:hover {
	border-color: var(--merc-hover);
	color: var(--merc-hover);
	text-decoration: none;
}

/* 隐藏原生分页（"Ver 下一分类"/无限加载替代） */
#js-product-list .pagination {
	display: none;
}

/* 分类页左栏（mercarica.js 填充分类树） */
/* 侧边栏：初始隐藏（防旧内容/空容器闪烁），JS 渲染后淡入 */
body.layout-left-column .merc-cats-col {
	display: none;
	position: fixed;
	left: 0;
	top: 70px;
	bottom: 0;
	width: 300px;
	overflow-y: auto;
	padding: 0 12px 30px 16px;
	box-sizing: border-box;
	background: #f6f4ef;
	opacity: 0;
	transition: opacity 0.2s ease;
}
body.layout-left-column .merc-cats-col.is-loaded {
	display: block;
	opacity: 1;
}

/* 隐藏服务端旧分类树（ps_categorytree block-categories），防 JS 渲染前闪烁 */
body.layout-left-column .merc-cats-col .block-categories {
	display: none;
}
/* 隐藏 ps_facetedsearch 筛选器（Suppliers/Brands 等），侧边栏不需要 */
body.layout-left-column .merc-cats-col #search_filters_wrapper {
	display: none;
}

/* 面包屑只在弹窗内 + 详情页（其他页面隐藏） */
.breadcrumb,
.breadcrumb-wrapper {
	display: none;
}
/* 详情页面包屑（Mercadona 风格：小字 + › 分隔, 2026-08-27） */
body#product .breadcrumb {
	display: block;
	margin: 0 0 20px;
	padding: 0;
	font-size: 13px;
	line-height: 1.5;
}
body#product .breadcrumb ol {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
}
body#product .breadcrumb li {
	display: flex;
	align-items: center;
	gap: 6px;
	color: #8a857c;
}
body#product .breadcrumb li::after {
	content: '›';
	color: #a09a90;
	font-size: 14px;
}
body#product .breadcrumb li:last-child::after {
	content: '';
}
body#product .breadcrumb a {
	color: var(--merc-hover, #6B8E23);
	text-decoration: none;
	font-weight: 600;
}
body#product .breadcrumb a:hover {
	text-decoration: underline;
}
body#product .breadcrumb li:last-child {
	color: var(--merc-text, #2E2A27);
	font-weight: 700;
}

/* 分类页：容器贴满屏幕（侧边栏贴死屏幕左边，Mercadona 布局） */
body.layout-left-column #wrapper {
	padding-top: 0;
	min-height: calc(100vh - 70px);
	display: flex;
	flex-direction: column;
}
body.layout-left-column #wrapper .container {
	max-width: 100%;
	width: 100%;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	flex: 1;
}
body.layout-left-column #wrapper .row {
	margin-left: 0;
	margin-right: 0;
	flex: 1;
	display: flex;
	align-items: stretch;
	min-height: 0;
}
body.layout-left-column #wrapper .row .merc-cats-col {
	flex: 0 0 300px;
	max-width: 300px;
	width: 300px;
	padding-left: 16px;
	padding-right: 12px;
	position: fixed;
	left: 0;
	top: 70px;
	bottom: 0;
	overflow-y: auto;
	padding: 0 12px 30px 16px;
	box-sizing: border-box;
	background: #f6f4ef;
}
body.layout-left-column #wrapper .row #content-wrapper {
	flex: 1 1 auto;
	max-width: none;
	margin-left: 300px;
	padding-left: 60px;
	width: auto;
	box-sizing: border-box;
}
/* 分类页 footer 让位侧边栏（侧边栏 fixed 覆盖左侧） */
body.layout-left-column #footer .container {
	margin-left: 300px;
	max-width: none;
	width: auto;
}
.merc-cats-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.merc-cats-item {
	margin: 0;
}
.merc-cats-link {
	color: var(--merc-text);
	display: block;
	font-size: 14px;
	padding: 9px 12px;
	text-decoration: none;
	border-radius: 0;
}
.merc-cats-link:hover {
	color: var(--merc-hover);
}
/* 一级分类（父项）：无底色，加粗，下方深色横线 */
.merc-cats-item > .merc-cats-link {
	background: transparent;
	font-weight: 600;
	margin-bottom: 0;
	padding-right: 36px;
	border-bottom: 1px solid #d6d6d3;
}
/* 所有层级分类名下方横线（父/子/孙） */
.merc-cats-children .merc-cats-link {
	border-bottom: 1px solid #d6d6d3;
}
/* 选中分类整行背景加深 */
.merc-cats-item.is-active > .merc-cats-link,
.merc-cats-children .merc-cats-item.is-active > .merc-cats-link {
	background-color: #e8e0d8;
	color: var(--merc-hover);
	font-weight: 700;
}
/* 大类 toggle 展开/收起按钮（已移除，不显示） */
.merc-cats-item {
	position: relative;
}
.merc-cats-children {
	list-style: none;
	margin: 0;
	padding-left: 18px;
}
.merc-cats-children-3 {
	padding-left: 16px;
}
.merc-cats-children .merc-cats-link {
	font-size: 13px;
	padding: 7px 10px;
	color: #6b675f;
}
.merc-cats-children .merc-cats-link:hover {
	color: var(--merc-hover);
}

/* ============ 产品区块响应式：桌面网格 / 平板网格 / 移动横滑 ============ */

/* 详情页相关推荐 + Mis habituales：桌面 ≥1024px → 网格 5 列 */


/* 平板 768-1023px → 网格 3-4 列 */


/* 移动 <768px → 横滑（默认状态，覆盖掉桌面网格） */


/* ============ 分类 AJAX 加载状态 ============ */
.merc-cat-loading {
	align-items: center;
	display: flex;
	justify-content: center;
	padding: 60px 0;
}
.merc-cat-loading__spinner {
	animation: merc-spin 0.8s linear infinite;
	border: 3px solid #e8e0d8;
	border-radius: 50%;
	border-top-color: var(--merc-hover);
	height: 34px;
	width: 34px;
}
@keyframes merc-spin {
	to { transform: rotate(360deg); }
}

/* 地址页容器 */
body#address .merc-acct-wrap {
	max-width: 1100px;
}
