/* =========================================================
   SIDEBAR PERSONALIZADO
   El Blog del Currante
   ========================================================= */

#secondary.currante-sidebar-area {
	--sidebar-navy: #102039;
	--sidebar-red: #cb1111;
	--sidebar-red-dark: #a50e0e;
	--sidebar-text: #20252c;
	--sidebar-muted: #68717b;
	--sidebar-border: #dfe3e8;
	--sidebar-soft: #f4f6f8;
	--sidebar-white: #ffffff;

	box-sizing: border-box;
}

#secondary.currante-sidebar-area *,
#secondary.currante-sidebar-area *::before,
#secondary.currante-sidebar-area *::after {
	box-sizing: border-box;
}

/* Contenedor principal */

#secondary.currante-sidebar-area .currante-sidebar {
	width: 100%;
	margin: 0;
	padding: 18px !important;
	border: 1px solid var(--sidebar-border);
	border-radius: 5px;
	background: var(--sidebar-white) !important;
	box-shadow: 0 4px 16px rgba(16, 32, 57, 0.06) !important;
}

.currante-sidebar__scroll {
	width: 100%;
	padding: 0;
}

/* Separación de bloques */

.currante-sidebar__search,
.currante-sidebar__section {
	margin: 0 0 27px;
}

.currante-sidebar__section:last-child {
	margin-bottom: 0;
}

/* =========================================================
   BUSCADOR
   ========================================================= */

#secondary .currante-sidebar-search {
	display: flex;
	align-items: stretch;
	width: 100%;
	height: 42px;
	margin: 0;
	overflow: hidden;
	border: 1px solid #cfd5dc;
	border-radius: 4px;
	background: var(--sidebar-white);
	box-shadow: none;
}

#secondary .currante-sidebar-search input[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
	width: auto;
	height: 40px;
	margin: 0;
	padding: 8px 11px;
	border: 0 !important;
	border-radius: 0;
	outline: 0;
	background: var(--sidebar-white);
	color: var(--sidebar-text);
	font-family: "Open Sans", Arial, sans-serif;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.4;
	box-shadow: none !important;
}

#secondary .currante-sidebar-search input[type="search"]::placeholder {
	color: #858c94;
	opacity: 1;
}

#secondary .currante-sidebar-search input[type="search"]:focus {
	outline: 2px solid var(--sidebar-navy);
	outline-offset: -2px;
}

#secondary .currante-sidebar-search button {
	flex: 0 0 auto;
	width: auto;
	height: 40px;
	margin: 0;
	padding: 0 13px;
	border: 0 !important;
	border-radius: 0;
	background: var(--sidebar-red);
	color: #ffffff;
	font-family: "Open Sans", Arial, sans-serif;
	font-size: 11px;
	font-weight: 700;
	line-height: 40px;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	cursor: pointer;
	box-shadow: none;
	transition: background-color 0.2s ease;
}

#secondary .currante-sidebar-search button:hover,
#secondary .currante-sidebar-search button:focus {
	background: var(--sidebar-red-dark);
	color: #ffffff;
}

/* =========================================================
   TÍTULOS DE SECCIÓN
   ========================================================= */

#secondary .currante-sidebar__heading {
	position: relative;
	margin: 0 0 15px;
	padding: 0 0 10px 14px;
	border: 0;
	border-bottom: 1px solid var(--sidebar-border);
	background: transparent;
	color: var(--sidebar-navy);
	font-family: "Oswald", "Noto Sans", Arial, sans-serif;
	font-size: 19px;
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: 0;
	text-transform: none;
}

#secondary .currante-sidebar__heading::before {
	content: "";
	position: absolute;
	top: 2px;
	bottom: 11px;
	left: 0;
	width: 4px;
	background: var(--sidebar-red);
}

#secondary .currante-sidebar__heading::after {
	display: none;
}

/* =========================================================
   MENÚ DE CATEGORÍAS
   ========================================================= */

#secondary .currante-sidebar-menu,
#secondary .currante-sidebar-menu ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

#secondary .currante-sidebar-menu > li {
	margin: 0 0 6px !important;
	padding: 0 !important;
	border: 0;
}

#secondary .currante-sidebar-menu > li:last-child {
	margin-bottom: 0 !important;
}

#secondary .currante-sidebar-menu a {
	position: relative;
	display: block;
	width: 100%;
	padding: 9px 31px 9px 12px;
	border: 1px solid transparent;
	border-radius: 3px;
	background: var(--sidebar-soft);
	color: #30363d;
	font-family: "Open Sans", Arial, sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	text-decoration: none;
	box-shadow: none;
	transition:
		color 0.2s ease,
		background-color 0.2s ease,
		border-color 0.2s ease;
}

#secondary .currante-sidebar-menu > li > a::after {
	content: "›";
	position: absolute;
	top: 50%;
	right: 12px;
	color: var(--sidebar-red);
	font-family: Arial, sans-serif;
	font-size: 21px;
	font-weight: 400;
	line-height: 1;
	transform: translateY(-52%);
}

#secondary .currante-sidebar-menu a:hover,
#secondary .currante-sidebar-menu a:focus,
#secondary .currante-sidebar-menu .current-menu-item > a,
#secondary .currante-sidebar-menu .current-menu-ancestor > a {
	border-color: #dce1e6;
	background: #ffffff;
	color: var(--sidebar-red);
}

#secondary .currante-sidebar-menu .sub-menu {
	margin: 5px 0 2px;
	padding: 0 0 0 12px;
}

#secondary .currante-sidebar-menu .sub-menu li {
	margin: 0;
	padding: 0;
	border: 0;
}

#secondary .currante-sidebar-menu .sub-menu a {
	padding: 6px 10px;
	background: transparent;
	font-size: 13px;
	font-weight: 400;
}

/* =========================================================
   TARJETAS
   ========================================================= */

#secondary .currante-sidebar__cards {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 16px;
	width: 100%;
}

#secondary .currante-sidebar-card {
	display: block;
	overflow: hidden;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 1px solid var(--sidebar-border);
	border-radius: 5px;
	background: var(--sidebar-white);
	box-shadow: 0 3px 10px rgba(16, 32, 57, 0.06);
	transition:
		transform 0.2s ease,
		box-shadow 0.2s ease;
}

#secondary .currante-sidebar-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 17px rgba(16, 32, 57, 0.11);
}

/* Imagen compacta a ancho completo */

#secondary .currante-sidebar-card__image {
	position: relative;
	display: block;
	overflow: hidden;
	width: 100%;
	height: 165px;
	margin: 0;
	padding: 0;
	border: 0;
	background: #e8ecf0;
	text-decoration: none;
}

#secondary .currante-sidebar-card__thumb {
	display: block;
	width: 100%;
	height: 100%;
    min-height: 100px;
	margin: 0;
	padding: 0;
	border: 0;
	object-fit: cover;
	object-position: center;
	transition: transform 0.3s ease;
}

#secondary .currante-sidebar-card:hover .currante-sidebar-card__thumb {
	transform: scale(1.035);
}

/* Sustituto cuando el producto no tiene imagen destacada */

#secondary .currante-sidebar-card__placeholder {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background:
		linear-gradient(
			135deg,
			rgba(255, 255, 255, 0.04) 25%,
			transparent 25%,
			transparent 50%,
			rgba(255, 255, 255, 0.04) 50%,
			rgba(255, 255, 255, 0.04) 75%,
			transparent 75%
		),
		var(--sidebar-navy);
	background-size: 28px 28px;
}

#secondary .currante-sidebar-card__placeholder::after {
	content: "COMPARATIVA";
	padding: 6px 10px;
	border: 1px solid rgba(255, 255, 255, 0.45);
	color: #ffffff;
	font-family: "Open Sans", Arial, sans-serif;
	font-size: 10px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.08em;
}

/* Contenido de la tarjeta */

#secondary .currante-sidebar-card__body {
	padding: 12px 13px 13px;
}

#secondary .currante-sidebar-card__label {
	display: inline-block;
	margin: 0 0 7px;
	padding: 3px 7px;
	border-radius: 2px;
	background: var(--sidebar-navy);
	color: #ffffff;
	font-family: "Open Sans", Arial, sans-serif;
	font-size: 10px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

#secondary .currante-sidebar-card--producto .currante-sidebar-card__label {
	background: var(--sidebar-red);
}

#secondary .currante-sidebar-card__title {
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	font-family: "Oswald", "Noto Sans", Arial, sans-serif;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.28;
	letter-spacing: 0;
	text-transform: none;
}

#secondary .currante-sidebar-card__title::before,
#secondary .currante-sidebar-card__title::after {
	display: none;
}

#secondary .currante-sidebar-card__title a {
	display: -webkit-box;
	overflow: hidden;
	margin: 0;
	padding: 0;
	border: 0;
	color: var(--sidebar-navy);
	text-decoration: none;
	box-shadow: none;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

#secondary .currante-sidebar-card__title a:hover,
#secondary .currante-sidebar-card__title a:focus {
	color: var(--sidebar-red);
}

#secondary .currante-sidebar-card__excerpt {
	display: -webkit-box;
	overflow: hidden;
	margin: 7px 0 0;
	padding: 0;
	color: var(--sidebar-muted);
	font-family: "Open Sans", Arial, sans-serif;
	font-size: 12.5px;
	font-weight: 400;
	line-height: 1.48;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

#secondary .currante-sidebar-card__date {
	display: block;
	margin: 8px 0 0;
	padding: 7px 0 0;
	border-top: 1px solid #eceef1;
	color: #7a828b;
	font-family: "Open Sans", Arial, sans-serif;
	font-size: 11.5px;
	font-weight: 400;
	line-height: 1.3;
}

/* =========================================================
   STICKY + SCROLL INTERNO SIN BARRA
   ========================================================= */

@media only screen and (min-width: 993px) {

	#content > .section-block-upper {
		align-items: flex-start;
		overflow: visible;
	}

	body #secondary.currante-sidebar-area {
		position: sticky !important;
		top: 72px !important;
		align-self: flex-start;
		height: auto;
		max-height: calc(100vh - 92px);
	}

	body.admin-bar #secondary.currante-sidebar-area {
		top: 104px !important;
		max-height: calc(100vh - 124px);
	}

	#secondary.currante-sidebar-area .currante-sidebar {
		max-height: inherit;
	}

	#secondary.currante-sidebar-area .currante-sidebar__scroll {
		width: 100%;
		max-height: calc(100vh - 130px);
		padding-right: 3px;
		overflow-x: hidden !important;
		overflow-y: auto !important;
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;

		/* Firefox */
		scrollbar-width: none;

		/* Internet Explorer antiguo */
		-ms-overflow-style: none;
	}

	body.admin-bar
	#secondary.currante-sidebar-area
	.currante-sidebar__scroll {
		max-height: calc(100vh - 162px);
	}

	#secondary.currante-sidebar-area
	.currante-sidebar__scroll::-webkit-scrollbar {
		display: none;
		width: 0;
		height: 0;
		background: transparent;
	}
}

/* =========================================================
   TABLET Y MÓVIL
   ========================================================= */

@media only screen and (max-width: 992px) {

	body #secondary.currante-sidebar-area {
		position: static !important;
		width: 100%;
		max-height: none;
		margin-top: 35px;
	}

	#secondary.currante-sidebar-area .currante-sidebar,
	#secondary.currante-sidebar-area .currante-sidebar__scroll {
		height: auto;
		max-height: none;
		overflow: visible !important;
	}

	#secondary .currante-sidebar__cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media only screen and (max-width: 600px) {

	#secondary.currante-sidebar-area .currante-sidebar {
		padding: 15px !important;
	}

	#secondary .currante-sidebar__cards {
		grid-template-columns: minmax(0, 1fr);
	}

	#secondary .currante-sidebar-card__image {
		height: 150px;
	}
}

/* =========================================================
   MODO OSCURO DEL TEMA
   ========================================================= */

body.aft-dark-mode #secondary.currante-sidebar-area {
	--sidebar-text: #f1f1f1;
	--sidebar-muted: #c2c5c9;
	--sidebar-border: #3c4148;
	--sidebar-soft: #292d32;
	--sidebar-white: #202327;
}

body.aft-dark-mode #secondary .currante-sidebar__heading,
body.aft-dark-mode #secondary .currante-sidebar-menu a,
body.aft-dark-mode #secondary .currante-sidebar-card__title a,
body.aft-dark-mode #secondary .currante-sidebar-search input[type="search"] {
	color: #ffffff;
}

body.aft-dark-mode #secondary .currante-sidebar-search,
body.aft-dark-mode #secondary .currante-sidebar-search input[type="search"],
body.aft-dark-mode #secondary .currante-sidebar-card {
	background: var(--sidebar-white);
}

body.aft-dark-mode #secondary .currante-sidebar-card__excerpt,
body.aft-dark-mode #secondary .currante-sidebar-card__date {
	color: var(--sidebar-muted);
}