/* Toy Finder · Reservas */

.tf-reservas-filtro {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 24px;
}

.tf-reservas-filtro .tf-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 40px;
	padding: 8px 14px;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 999px;
	font-size: 14px;
	line-height: 1.2;
	text-decoration: none;
	color: inherit;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.tf-reservas-filtro .tf-chip span {
	font-size: 12px;
	opacity: 0.6;
}

.tf-reservas-filtro .tf-chip:hover {
	border-color: currentColor;
}

.tf-reservas-filtro .tf-chip.is-active {
	background: #111;
	border-color: #111;
	color: #fff;
}

.tf-reservas-filtro .tf-chip:focus-visible {
	outline: 2px solid #111;
	outline-offset: 2px;
}

@media (max-width: 600px) {
	.tf-reservas-filtro {
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		margin-inline: -16px;
		padding-inline: 16px;
	}

	.tf-reservas-filtro .tf-chip {
		flex: 0 0 auto;
	}
}

/* Lateral (escritorio): lista vertical. Arriba (móvil/tablet): chips. */
.tf-reservas-filtro--sidebar {
	flex-direction: column;
	flex-wrap: nowrap;
	gap: 2px;
	margin: 0;
}

.tf-reservas-filtro--sidebar .tf-chip {
	justify-content: space-between;
	min-height: 36px;
	padding: 6px 10px 6px 22px;
	border: 0;
	border-radius: 6px;
}

.tf-reservas-filtro--sidebar .tf-chip:first-child,
.tf-reservas-filtro--sidebar .tf-chip.is-root {
	padding-left: 10px;
	font-weight: 600;
}

.tf-reservas-filtro--sidebar .tf-chip:hover {
	background: rgba(0, 0, 0, 0.05);
}

@media (min-width: 922px) {
	.tf-reservas-filtro--top {
		display: none;
	}
}

@media (max-width: 921px) {
	.tf-reservas-filtro--sidebar {
		display: none;
	}

	/* Sin la lista, el título «Marcas» del lateral sobra. */
	.ast-woo-sidebar-widget:has(.tf-reservas-filtro--sidebar) {
		display: none;
	}
}

/* Navegación de categorías (barra lateral de tienda y categorías) */

/* Astra deja 60px de margen derecho en la barra lateral: con la lista hace falta el espacio. */
@media (min-width: 922px) {
	.ast-left-sidebar #secondary:has(.tf-catnav, .tf-reservas-filtro--sidebar) {
		padding-right: 32px;
	}
}

.ast-woo-sidebar-widget .tf-catnav a,
.ast-woo-sidebar-widget .tf-reservas-filtro--sidebar a {
	color: #1a1a1a;
}

.ast-woo-sidebar-widget .tf-catnav a.is-active,
.ast-woo-sidebar-widget .tf-reservas-filtro--sidebar a.is-active {
	color: #fff;
}

.tf-catnav {
	display: flex;
	flex-direction: column;
	gap: 2px;
	font-size: 14px;
	line-height: 1.3;
}

.tf-catnav a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	min-height: 36px;
	padding: 6px 10px;
	border-radius: 6px;
	color: inherit;
	text-decoration: none;
	transition: background-color 0.15s ease;
}

.tf-catnav a:hover {
	background: rgba(0, 0, 0, 0.05);
}

.tf-catnav a:focus-visible,
.tf-catnav summary:focus-visible {
	outline: 2px solid #111;
	outline-offset: 2px;
}

.tf-catnav__name {
	min-width: 0;
	overflow-wrap: anywhere;
}

.tf-catnav__count {
	flex: 0 0 auto;
	font-size: 12px;
	opacity: 0.55;
	font-variant-numeric: tabular-nums;
}

.tf-catnav a.is-active {
	background: #111;
	color: #fff;
}

.tf-catnav a.is-active .tf-catnav__count {
	opacity: 0.75;
}

.tf-catnav__reservas {
	margin-bottom: 6px;
	border: 1px solid #b26200;
	background: #fff7ea;
	font-weight: 600;
}

.tf-catnav__reservas:hover {
	background: #ffefd2 !important;
}

.tf-catnav__root {
	font-weight: 600;
}

.tf-catnav details > summary {
	display: flex;
	align-items: center;
	list-style: none;
	cursor: pointer;
}

.tf-catnav details > summary::-webkit-details-marker {
	display: none;
}

.tf-catnav details > summary > a {
	flex: 1 1 auto;
}

.tf-catnav__toggle {
	flex: 0 0 28px;
	height: 36px;
	position: relative;
}

.tf-catnav__toggle::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 7px;
	height: 7px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translate(-50%, -70%) rotate(45deg);
	transition: transform 0.2s ease;
	opacity: 0.6;
}

.tf-catnav details[open] > summary .tf-catnav__toggle::before {
	transform: translate(-50%, -30%) rotate(-135deg);
}

.tf-catnav ul {
	margin: 2px 0 6px;
	padding: 0 0 0 12px;
	list-style: none;
	border-left: 1px solid rgba(0, 0, 0, 0.08);
	margin-left: 10px;
}

.tf-catnav ul ul {
	margin-top: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.tf-catnav a,
	.tf-catnav__toggle::before {
		transition: none;
	}
}

.tf-reserva-aviso {
	margin: 12px 0;
	padding: 12px 14px;
	border-left: 3px solid #b26200;
	background: #fff7ea;
	font-size: 14px;
	line-height: 1.45;
}

@media (prefers-reduced-motion: reduce) {
	.tf-reservas-filtro .tf-chip {
		transition: none;
	}
}

/* Chips de categorías en móvil: Reservas destacada. */
.tf-reservas-filtro .tf-chip.is-accent {
	border-color: #b26200;
	background: #fff7ea;
	font-weight: 600;
}

/* Desplegable de navegación en móvil/tablet (Tienda, categorías y Reservas). */
.tf-mnav {
	margin: 0 0 20px;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 10px;
	background: #fff;
}

.tf-mnav > summary {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 48px;
	padding: 10px 14px;
	list-style: none;
	cursor: pointer;
	font-size: 15px;
	-webkit-tap-highlight-color: transparent;
}

.tf-mnav > summary::-webkit-details-marker {
	display: none;
}

.tf-mnav > summary:focus-visible {
	outline: 2px solid #111;
	outline-offset: 2px;
	border-radius: 10px;
}

.tf-mnav__label {
	font-size: 13px;
	opacity: 0.6;
}

.tf-mnav__current {
	flex: 1 1 auto;
	min-width: 0;
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tf-mnav__chevron {
	flex: 0 0 auto;
	width: 8px;
	height: 8px;
	margin-right: 4px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
	transition: transform 0.2s ease;
}

.tf-mnav[open] .tf-mnav__chevron {
	transform: translateY(2px) rotate(-135deg);
}

.tf-mnav__list {
	max-height: 60vh;
	margin: 0;
	padding: 4px 6px 8px;
	overflow-y: auto;
	overscroll-behavior: contain;
	list-style: none;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.tf-mnav__item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	min-height: 44px;
	padding: 8px 10px;
	border-radius: 6px;
	color: #1a1a1a !important;
	text-decoration: none;
	font-size: 15px;
	font-weight: 600;
}

.tf-mnav__item.is-sub {
	padding-left: 22px;
	font-weight: 400;
}

.tf-mnav__item.is-accent {
	background: #fff7ea;
	box-shadow: inset 0 0 0 1px #b26200;
	margin-bottom: 4px;
}

.tf-mnav__item.is-active {
	background: #111;
	color: #fff !important;
}

.tf-mnav__count {
	font-size: 12px;
	font-weight: 400;
	opacity: 0.6;
	font-variant-numeric: tabular-nums;
}

@media (min-width: 922px) {
	.tf-mnav {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tf-mnav__chevron {
		transition: none;
	}
}

/* Checkout: aviso bajo las opciones de envío de cada paquete de reserva. */
.woocommerce ul#shipping_method li .tf-paquete-aviso,
.tf-paquete-aviso {
	display: block;
	margin: .6em 0 0;
	padding: .65em .8em;
	border-left: 3px solid #54b435;
	border-radius: 4px;
	background: #edfbe2;
	color: #2f3b40;
	font-size: .85em;
	line-height: 1.45;
	text-align: left;
	white-space: normal;
	text-indent: 0;
}

/* Con paquetes de reserva, cada envío ocupa todo el ancho (nombre arriba, opciones y aviso
   debajo): en la columna estrecha del resumen el aviso no se podía leer. */
table:has(.tf-paquete-aviso) tr.woocommerce-shipping-totals,
table:has(.tf-paquete-aviso) tr.woocommerce-shipping-totals > th,
table:has(.tf-paquete-aviso) tr.woocommerce-shipping-totals > td {
	display: block;
	width: 100% !important; /* el tema fija el ancho de las columnas del resumen */
	max-width: none !important;
	min-width: 0 !important;
	box-sizing: border-box;
	text-align: left;
}
table:has(.tf-paquete-aviso) tr.woocommerce-shipping-totals > th { padding-bottom: .25em; border-bottom: 0; }
table:has(.tf-paquete-aviso) tr.woocommerce-shipping-totals > td { padding-top: 0; }
table:has(.tf-paquete-aviso) tr.woocommerce-shipping-totals ul#shipping_method,
table:has(.tf-paquete-aviso) tr.woocommerce-shipping-totals ul#shipping_method li { text-align: left; }
table:has(.tf-paquete-aviso) tr.woocommerce-shipping-totals ul#shipping_method { width: 100% !important; max-width: none !important; }
table:has(.tf-paquete-aviso) tr.woocommerce-shipping-totals .woocommerce-shipping-contents { text-align: left; }
