/* =========================================================
   Navegación por categorías (ver inc/categorias.php)
   Color de marca: #680000
   ========================================================= */

/* ---------- Botón "Categorías" + panel (escritorio) ---------- */
#mega-menu-wrap-primary #mega-menu-primary > li.mega-planet-cats {
	position: relative;
}

#mega-menu-wrap-primary #mega-menu-primary > li.mega-planet-cats > a.mega-menu-link {
	background: #680000;
	color: #fff;
	border-radius: 6px;
	margin-right: 6px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

#mega-menu-wrap-primary #mega-menu-primary > li.mega-planet-cats > a.mega-menu-link::before {
	content: "";
	width: 16px;
	height: 12px;
	background: linear-gradient(#fff, #fff) 0 0 / 100% 2px no-repeat,
		linear-gradient(#fff, #fff) 0 50% / 100% 2px no-repeat,
		linear-gradient(#fff, #fff) 0 100% / 100% 2px no-repeat;
	flex: none;
}

#mega-menu-wrap-primary #mega-menu-primary > li.mega-planet-cats > a.mega-menu-link::after {
	content: "";
	width: 6px;
	height: 6px;
	border-right: 2px solid #fff;
	border-bottom: 2px solid #fff;
	transform: rotate(45deg) translateY(-2px);
	flex: none;
}

#mega-menu-wrap-primary #mega-menu-primary > li.mega-planet-cats:hover > a.mega-menu-link,
#mega-menu-wrap-primary #mega-menu-primary > li.mega-planet-cats.is-open > a.mega-menu-link {
	background: #8a0f0f;
}

.pc-cats-panel {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	width: 880px;
	max-width: calc(100vw - 24px);
	background: #fff;
	border-radius: 0 0 12px 12px;
	box-shadow: 0 18px 40px rgba(0, 0, 0, .25);
	z-index: 99999;
	text-align: left;
	text-transform: none;
	font-weight: normal;
}

@media (min-width: 769px) and (hover: hover) {
	.planet-cats:hover > .pc-cats-panel { display: block; }
}
.planet-cats.is-open > .pc-cats-panel { display: block; }

.pc-cats-list {
	min-height: 430px;
	width: 250px;
	background: #f6f3f4;
	border-radius: 0 0 0 12px;
	padding: 8px 0;
}

#mega-menu-wrap-primary .pc-cats-panel a,
.main-navigation .pc-cats-panel a {
	text-transform: none !important;
	text-decoration: none !important;
	box-shadow: none;
	letter-spacing: 0;
}

.main-navigation .pc-cats-panel .pc-cat-link {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 11px 18px;
	color: #333;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	border-left: 3px solid transparent;
	position: relative;
}

.pc-cat-link .pc-ico { color: #680000; flex: none; }
.pc-cat-link span { flex: 1; }

.pc-cat-link::after {
	content: "";
	width: 7px;
	height: 7px;
	border-right: 2px solid #aaa;
	border-bottom: 2px solid #aaa;
	transform: rotate(-45deg);
	flex: none;
}

.main-navigation .pc-cat.is-active > .pc-cat-link,
.main-navigation .pc-cat-link:hover {
	background: #fff;
	color: #680000;
	border-left-color: #680000;
}

.pc-cat.is-active > .pc-cat-link::after { border-color: #680000; }

/* Panel derecho */
.pc-cat-pane {
	display: none;
	position: absolute;
	top: 0;
	bottom: 0;
	left: 250px;
	right: 0;
	padding: 20px 24px;
	overflow-y: auto;
	background: #fff;
	border-radius: 0 0 12px 0;
}
.pc-cat.is-active > .pc-cat-pane { display: block; }

.pc-pane-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
	padding-bottom: 10px;
	border-bottom: 2px solid #680000;
}
.pc-pane-title { font-size: 19px; font-weight: 700; color: #222; }
.main-navigation .pc-cats-panel .pc-pane-all { color: #680000; font-size: 14px; font-weight: 600; white-space: nowrap; }
.main-navigation .pc-cats-panel .pc-pane-all:hover { text-decoration: underline !important; }

.pc-cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	align-items: start;
}

.pc-card {
	border: 1px solid #ece7e8;
	border-radius: 10px;
	padding: 10px 14px;
	background: #fcfbfb;
	transition: border-color .15s, box-shadow .15s;
}
.pc-card:hover { border-color: #680000; box-shadow: 0 3px 10px rgba(104, 0, 0, .12); }

.main-navigation .pc-cats-panel .pc-card-title {
	display: block;
	color: #222;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
}
.main-navigation .pc-cats-panel .pc-card-title:hover { color: #680000; }

.main-navigation .pc-cats-panel .pc-card-sub {
	display: block;
	color: #666;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.3;
	padding: 5px 0 0 10px;
	position: relative;
}
.pc-card-sub::before {
	content: "";
	position: absolute;
	left: 0;
	top: 12px;
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: #c9b6b8;
}
.main-navigation .pc-cats-panel .pc-card-sub:hover { color: #680000; }

/* ---------- Móvil: acordeón dentro del menú ---------- */
@media (max-width: 768px) {
	#mega-menu-wrap-primary #mega-menu-primary > li.mega-planet-cats > a.mega-menu-link {
		display: flex;
		margin: 4px 8px;
		border-radius: 6px;
	}

	.pc-cats-panel {
		position: static;
		width: auto;
		max-width: none;
		box-shadow: none;
		border-radius: 0;
		background: #f6f3f4;
	}
	.pc-cats-list { width: auto; border-radius: 0; padding: 0; background: transparent; }
	.pc-cat-pane {
		position: static;
		padding: 4px 16px 14px 16px;
		background: #fff;
		border-radius: 0;
		overflow: visible;
	}
	.pc-cat.is-active > .pc-cat-pane { display: none; }
	.pc-cat.is-expanded > .pc-cat-pane { display: block; }
	.main-navigation .pc-cat.is-active > .pc-cat-link { background: transparent; color: #333; border-left-color: transparent; }
	.main-navigation .pc-cat.is-expanded > .pc-cat-link { background: #fff; color: #680000; border-left-color: #680000; }
	.pc-cat.is-expanded > .pc-cat-link::after { transform: rotate(45deg); border-color: #680000; }
	.pc-pane-head { margin-bottom: 10px; padding-bottom: 8px; }
	.pc-pane-title { display: none; }
	.pc-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
}

/* ---------- Mi cuenta a la derecha, junto al buscador ---------- */
@media (min-width: 769px) {
	#mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item-1096 {
		float: right;
	}
}

/* ---------- Barra de subcategorías (tienda y categorías) ---------- */
.pc-subcats {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 20px;
	padding: 12px 14px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}

.pc-subcats .pc-pill {
	display: inline-block;
	padding: 7px 15px;
	border: 1px solid #ddd5d6;
	border-radius: 999px;
	background: #fff;
	color: #333;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none !important;
	box-shadow: none;
	transition: background .15s, color .15s, border-color .15s;
}
.pc-subcats .pc-pill:hover { border-color: #680000; color: #680000; }
.pc-subcats .pc-pill.is-active { background: #680000; border-color: #680000; color: #fff; }

@media (max-width: 768px) {
	.pc-subcats {
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}
	.pc-subcats::-webkit-scrollbar { display: none; }
	.pc-subcats .pc-pill { white-space: nowrap; flex: none; }
}

/* ---------- Widget "Categorías" de la barra lateral ---------- */
.widget_product_categories ul.product-categories,
.widget_product_categories ul.product-categories ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.widget_product_categories ul.product-categories li::before,
.widget_product_categories ul.product-categories li a::before { content: none !important; display: none !important; }

.widget_product_categories ul.product-categories > li {
	border-bottom: 1px solid #efe9ea;
	position: relative;
}
.widget_product_categories ul.product-categories > li:last-child { border-bottom: 0; }

.widget_product_categories ul.product-categories li > a {
	display: block;
	padding: 9px 4px;
	color: #333;
	font-size: 15px;
	text-decoration: none !important;
	box-shadow: none;
	transition: color .15s, padding-left .15s;
}
.widget_product_categories ul.product-categories > li > a { font-weight: 700; padding-right: 32px; }
.widget_product_categories ul.product-categories li > a:hover { color: #680000; padding-left: 8px; }

.widget_product_categories ul.product-categories ul.children {
	margin: 0 0 8px 6px;
	padding-left: 12px;
	border-left: 2px solid #ead9db;
	display: none;
}
.widget_product_categories ul.product-categories li.pc-open > ul.children { display: block; }
.widget_product_categories ul.product-categories ul.children li > a { padding: 6px 4px; font-size: 14px; font-weight: 400; color: #555; }

.widget_product_categories ul.product-categories li.current-cat > a,
.widget_product_categories ul.product-categories li.current-cat-parent > a {
	color: #680000;
	font-weight: 700;
}

.widget_product_categories .pc-toggle {
	position: absolute;
	top: 4px;
	right: 0;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	color: #680000;
	box-shadow: none;
}
.widget_product_categories .pc-toggle::before {
	content: "";
	display: block;
	width: 8px;
	height: 8px;
	margin: 0 auto;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translate(-2px, -2px);
	transition: transform .2s;
}
.widget_product_categories li.pc-open > .pc-toggle::before { transform: rotate(-135deg) translate(-2px, -2px); }
