/* ============================================================
   YOUCAN Trailer — 公共头尾增量样式（yc-header-float.css）
   内容：桌面导航下拉菜单（子分类 + 缩略图）、全站浮动联系侧边栏、手机端子分类
   作用范围：公共 header / footer，全站生效；不影响 .yc-home / .yc-page 内部板块
   品牌红：#ee1d23
   ============================================================ */

/* ---------- 1. 桌面导航下拉（hover 展开，含子分类缩略图） ---------- */
.yc-nav > li { position: relative; }

.yc-dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 760px;
	background: #fff;
	border: 1px solid #e9ecf1;
	border-radius: 12px;
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.14);
	padding: 22px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
	z-index: 1040;
}
.yc-nav > li:hover .yc-dropdown,
.yc-nav > li:focus-within .yc-dropdown {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.yc-dropdown__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
}
.yc-dropdown__item {
	display: flex;
	flex-direction: column;
	text-decoration: none;
}
.yc-dropdown__thumb {
	display: block;
	width: 100%;
	height: 110px;
	border-radius: 8px;
	overflow: hidden;
	background: #f7f8fa;
}
.yc-dropdown__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.yc-dropdown__name {
	margin-top: 8px;
	font-size: 13px;
	font-weight: 600;
	color: #16181d;
	text-align: center;
	line-height: 1.4;
}
.yc-dropdown__item:hover .yc-dropdown__name { color: #ee1d23; }

/* 有下拉的导航项：右侧小箭头（不改动原下划线动画，用 ::before） */
.yc-nav > li:has(> .yc-dropdown) > a { padding-right: 16px; }
.yc-nav > li:has(> .yc-dropdown) > a::before {
	content: '';
	position: absolute;
	right: 0;
	top: 50%;
	width: 6px;
	height: 6px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-70%) rotate(45deg);
}

/* ---------- 2. 全站浮动联系侧边栏 ---------- */
.yc-float {
	position: fixed;
	right: 18px;
	top: 50%;
	transform: translateY(-50%);
	z-index: 1050;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.yc-float__item {
	position: relative;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
	transition: transform .2s ease;
}
.yc-float__item:hover { transform: scale(1.08); color: #fff; }
.yc-float__item svg { width: 24px; height: 24px; fill: currentColor; }
.yc-float__item--email { background: #ee1d23; }
.yc-float__item--tel { background: #16181d; }
.yc-float__item--wa { background: #25D366; }

/* hover 左侧弹出文字提示 */
.yc-float__tip {
	position: absolute;
	right: 64px;
	top: 50%;
	transform: translateY(-50%);
	background: #16181d;
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	padding: 6px 12px;
	border-radius: 6px;
	white-space: nowrap;
	opacity: 0;
	visibility: hidden;
	transition: opacity .2s ease, visibility .2s ease;
	pointer-events: none;
}
.yc-float__item:hover .yc-float__tip { opacity: 1; visibility: visible; }

/* ---------- 3. 手机端子分类（抽屉内缩进列表） ---------- */
.yc-nav--mobile-sub {
	list-style: none;
	margin: 4px 0;
	padding: 0 0 0 16px;
	border-left: 2px solid #fdeaea;
}
.yc-nav--mobile-sub li a {
	display: block;
	padding: 8px 0;
	font-size: 14px;
	color: #64748b;
	text-decoration: none;
}
.yc-nav--mobile-sub li a:hover { color: #ee1d23; }

/* ---------- 响应式 ---------- */
@media (max-width: 1199px) {
	.yc-dropdown { display: none; } /* 桌面下拉只在 xl 以上（与导航显隐一致） */
}
@media (max-width: 767px) {
	.yc-float { right: 12px; gap: 10px; }
	.yc-float__item { width: 46px; height: 46px; }
	.yc-float__item svg { width: 22px; height: 22px; }
	.yc-float__tip { display: none; }
}
