/*
 Theme Name:    Electro Child
 Theme URI:     https://themeforest.net/item/electro-electronics-store-woocommerce-theme/15720624
 Description:   This is the child theme of Electro
 Author:        MadrasThemes
 Author URI:    https://madrasthemes.com/
 Template:      electro
 Version:       3.5.2
 License:       GNU General Public License v2 or later
 License URI:   http://www.gnu.org/licenses/gpl-2.0.html
 Tags:          light, dark, two-columns, right-sidebar, responsive-layout
 Text Domain:   electro-child
*/

/* ============================================================
   B2B 询盘模式样式（无价格 / 无购物车 / 发起询盘）
   ============================================================ */

/* 顶部右上角"发起询盘"按钮 */
.cs-header-quote { display: flex; align-items: center; }
.cs-quote-btn {
	display: inline-flex; align-items: center; gap: 8px;
	background: #f68b1e; color: #fff !important;
	padding: 10px 18px; border-radius: 30px;
	font-weight: 700; font-size: 13.5px; line-height: 1;
	white-space: nowrap; transition: background .2s ease, transform .2s ease;
}
.cs-quote-btn i { font-size: 16px; }
.cs-quote-btn:hover { background: #dd7a13; color: #fff !important; transform: translateY(-1px); }

/* 防御：残留购物车图标一律隐藏 */
.header-icon__cart { display: none !important; }
.handheld-header-links .cart { display: none !important; }

/* 全局空价格容器隐藏（价格已由 PHP 层移除，这里清理残留容器） */
.price:empty, .product-price:empty, .electro-price:empty,
.products .price:empty, .single-product .price:empty { display: none !important; }

/* 产品详情页报价按钮（占据原加入购物车位置） */
.product-actions-wrapper .cs-product-quote {
	display: block; width: 100%; text-align: center;
	padding: 13px 18px; border-radius: 8px; margin: 4px 0 8px;
}

/* 产品卡片按钮统一为引导性圆角 */
.products .product .button,
.add-to-cart-wrap .button { border-radius: 6px !important; }

/* 移动端手持 header（搜索 + 发起询盘图标） */
.handheld-header-links ul { display: flex; align-items: center; gap: 6px; }
.handheld-header-links ul.columns-2 { justify-content: flex-end; }
.handheld-header-links li.my-account a {
	display: inline-flex; align-items: center; justify-content: center;
	width: 38px; height: 38px; border-radius: 50%;
	background: #f68b1e; color: #fff !important;
}
.handheld-header-links li.my-account a i { font-size: 17px; }
.handheld-header-links li.my-account a:hover { background: #dd7a13; }

@media (max-width: 767px) {
	.cs-quote-btn { padding: 9px 14px; font-size: 12.5px; }
	.cs-quote-btn .ec-mail { display: none; }
}

/* 询盘站无在线价格：隐藏促销徽章、价格筛选控件与空价格容器 */
.onsale { display: none !important; }
.widget_price_filter { display: none !important; }
.price .electro-price:empty { display: none; }
.product .price:has(.electro-price:empty),
.single-product .price:has(.electro-price:empty) { display: none !important; }

/* 详情页价格容器（.product-actions 内）留空清理 */
.product-actions-wrapper .price:empty { display: none !important; }

/* ============================================================
   WhatsApp 右下角在线聊天浮窗
   ============================================================ */
.cs-whatsapp-btn {
	position: fixed; right: 22px; bottom: 22px; z-index: 9999;
	width: 56px; height: 56px; border-radius: 50%;
	background: #25d366;
	display: flex; align-items: center; justify-content: center;
	box-shadow: 0 6px 18px rgba(37, 211, 102, .35);
	transition: transform .2s ease, background .2s ease;
	animation: cs-wa-pulse 2.4s infinite;
}
.cs-whatsapp-btn svg { width: 30px; height: 30px; fill: #fff; }
.cs-whatsapp-btn:hover {
	background: #1ebc58;
	transform: translateY(-2px) scale(1.04);
	animation-play-state: paused;
}
.cs-whatsapp-btn .cs-whatsapp-tip {
	position: absolute; right: calc(100% + 12px); top: 50%;
	transform: translateY(-50%) translateX(6px);
	background: #fff; color: #1a1a1a;
	font-size: 13px; font-weight: 600; line-height: 1;
	padding: 9px 13px; border-radius: 8px;
	white-space: nowrap; box-shadow: 0 4px 14px rgba(0, 0, 0, .14);
	opacity: 0; visibility: hidden;
	transition: opacity .2s ease, transform .2s ease;
}
.cs-whatsapp-btn .cs-whatsapp-tip::after {
	content: ""; position: absolute; left: 100%; top: 50%;
	transform: translateY(-50%);
	border: 5px solid transparent; border-left-color: #fff;
}
.cs-whatsapp-btn:hover .cs-whatsapp-tip {
	opacity: 1; visibility: visible;
	transform: translateY(-50%) translateX(0);
}
@keyframes cs-wa-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, .5); }
	70%  { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
	100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}
@media (max-width: 767px) {
	.cs-whatsapp-btn { width: 48px; height: 48px; right: 14px; bottom: 14px; }
	.cs-whatsapp-btn svg { width: 26px; height: 26px; }
	.cs-whatsapp-btn .cs-whatsapp-tip { display: none; }
}

/* ============================================================
   回到顶部按钮上移，与 WhatsApp 浮窗错开（避免重叠）
   WhatsApp：桌面 22~78px、移动 14~62px（自底部）
   回到顶部：改为距底部 92px 起，留出约 14px 间隙
   ============================================================ */
.back-to-top-link {
	top: calc(100vh - 8rem);
}
@media (max-width: 767px) {
	.back-to-top-link { top: calc(100vh - 7.5rem); }
}

/* 页脚分类树：隐藏空/无意义的 "On Sale" 与 "Uncategorized" 项 */
.footer-widget .cat-item-24,
.footer-widget .cat-item-54,
.footer-widgets .cat-item-24,
.footer-widgets .cat-item-54 { display: none; }

/* ============================================================
   页脚 Product Categories 图标网格（替代原 "Find it Fast" 文字列表）
   ============================================================ */
.cs-footer-cats-wrap { width: 100%; max-width: 100%; }
.cs-footer-cats {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
}
.cs-footer-cat {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #fff;
	border: 1px solid #e4eaf1;
	border-radius: 10px;
	padding: 11px 14px;
	color: var(--cs-blue);
	font-size: 13px;
	font-weight: 600;
	transition: all .2s ease;
	text-decoration: none;
}
.cs-footer-cat:hover {
	border-color: var(--cs-orange);
	box-shadow: 0 6px 16px rgba(30,58,95,.10);
	transform: translateY(-2px);
	color: var(--cs-blue);
	text-decoration: none;
}
.cs-footer-cat-icon {
	width: 34px; height: 34px;
	border-radius: 8px;
	background: #eef4fb;
	color: var(--cs-blue);
	font-size: 14px;
	display: flex; align-items: center; justify-content: center;
	flex-shrink: 0;
	transition: all .2s ease;
}
.cs-footer-cat:hover .cs-footer-cat-icon {
	background: var(--cs-orange);
	color: #fff;
}
.cs-footer-cat-name {
	line-height: 1.3;
}
@media (max-width: 1199px) {
	.cs-footer-cats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
	.cs-footer-cats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
	.cs-footer-cat { padding: 9px 11px; font-size: 12.5px; }
	.cs-footer-cat-icon { width: 30px; height: 30px; font-size: 12px; }
}