/* ========================================================
   WooCommerce 赛博朋克全局样式 V4 (终极融合版)
   修复：白色锯齿收据背景、购物车美化、导航栏适配
   ======================================================== */

/* 1. 全局背景与字体 */
body.woocommerce-page {
    background-color: #050505 !important;
    color: #e4e4e7 !important;
    font-family: 'Rubik', sans-serif !important;
}

/* 2. 链接颜色 (默认橙色) */
.woocommerce-page a {
    color: #ea580c !important;
    text-decoration: none !important;
}
.woocommerce-page a:hover {
    color: #fb923c !important;
}

/* 3. 购物车/结算页的主要容器 */
.woocommerce-cart .entry-content,
.woocommerce-checkout .entry-content {
    max-width: 1200px;
    margin: 0 auto;
}

/* =========================================
   购物车表格区域 (左侧)
   ========================================= */
.woocommerce table.shop_table {
    border: none !important;
    background-color: transparent !important;
    color: #fff !important;
    border-collapse: separate !important;
    border-spacing: 0 15px !important; /* 让每一行分开一点 */
}

.woocommerce table.shop_table th {
    background-color: transparent !important;
    color: #71717a !important; /* 表头灰色 */
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    border-bottom: 1px solid #27272a !important;
}

.woocommerce table.shop_table td {
    background-color: #121212 !important; /* 每一行深灰背景 */
    border-top: 1px solid #27272a !important;
    border-bottom: 1px solid #27272a !important;
    padding: 20px !important;
}
/* 圆角处理 */
.woocommerce table.shop_table td:first-child {
    border-left: 1px solid #27272a !important;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}
.woocommerce table.shop_table td:last-child {
    border-right: 1px solid #27272a !important;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* 产品图片黑魔法 (反转白色占位图) */
.woocommerce table.shop_table img {
    border-radius: 4px;
    background-color: #000;
}
/* 如果是默认占位图，反色处理 */
.woocommerce table.shop_table img[src*="placeholder"] {
    filter: invert(0.9) hue-rotate(180deg);
    opacity: 0.7;
}

/* 删除按钮 */
.woocommerce a.remove {
    color: #ef4444 !important; /* 红色 */
    background: transparent !important;
    font-size: 1.5rem !important;
}
.woocommerce a.remove:hover {
    background: #ef4444 !important;
    color: #fff !important;
}

/* 数量选择器 */
.woocommerce .quantity .qty {
    background-color: #000 !important;
    color: #fff !important;
    border: 1px solid #3f3f46 !important;
    border-radius: 4px;
    padding: 5px;
    width: 60px !important;
}

/* =========================================
   结算总计区域 (右侧卡片) & 结账页订单概览
   ★★★ 这里是修复白色锯齿背景的核心区域 ★★★
   ========================================= */
.cart-collaterals .cart_totals,
.woocommerce-checkout #order_review,
.woocommerce-checkout-review-order,
.woocommerce-checkout .checkout-order-review {
    background-color: #121212 !important; /* 强制深灰背景 */
    background-image: none !important;    /* 移除任何背景图 */
    mask: none !important;                /* 移除 CSS Mask 锯齿 */
    -webkit-mask: none !important;
    
    padding: 30px !important;
    border: 1px solid #27272a !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
    color: #ffffff !important;
    margin-top: 20px !important;
    position: relative !important;
}

/* 移除可能存在的伪元素锯齿 (::before / ::after) */
.woocommerce-checkout #order_review::before,
.woocommerce-checkout #order_review::after,
.woocommerce-checkout-review-order::before,
.woocommerce-checkout-review-order::after {
    display: none !important;
    background: none !important;
    content: none !important;
}

.cart_totals h2,
#order_review_heading {
    color: #fff !important;
    font-style: italic;
    text-transform: uppercase;
    border-bottom: 2px solid #ea580c;
    padding-bottom: 10px;
    display: inline-block;
}

/* 结账页表格内部文字修正 */
#order_review table.shop_table th,
#order_review table.shop_table td {
    background-color: transparent !important;
    color: #e4e4e7 !important;
    border-top: 1px solid #27272a !important;
    border-bottom: 1px solid #27272a !important;
}
#order_review table.shop_table .product-name {
    color: #fff !important;
    font-weight: 600;
}
#order_review table.shop_table .product-total,
#order_review table.shop_table .order-total .woocommerce-Price-amount {
    color: #ea580c !important;
    font-weight: bold;
}

/* =========================================
   支付方式区域 (Payment Methods) 修复
   ========================================= */
#payment {
    background-color: transparent !important;
    border-radius: 0 !important;
}
#payment .payment_methods {
    border-bottom: 1px solid #27272a !important;
    padding: 0 !important;
    margin-bottom: 20px !important;
}
#payment .payment_methods li {
    background-color: #27272a !important;
    border: 1px solid #3f3f46 !important;
    border-radius: 8px !important;
    margin-bottom: 10px !important;
    padding: 10px 15px !important;
    list-style: none !important;
}
#payment .payment_methods li label {
    color: #fff !important;
    margin-bottom: 0 !important;
}
#payment div.payment_box {
    background-color: #18181b !important;
    color: #a1a1aa !important;
    border: 1px solid #3f3f46 !important;
    margin-top: 10px !important;
}
#payment div.payment_box::before {
    border-bottom-color: #3f3f46 !important;
}

/* =========================================
   按钮终极美化 (解决灰色按钮问题)
   ========================================= */
/* 1. 结算/结账主按钮 */
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
.woocommerce-checkout #place_order,
.woocommerce button.button.alt {
    background-color: #ea580c !important; /* 强制橙色 */
    background-image: linear-gradient(to right, #ea580c, #c2410c) !important;
    color: #fff !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    border-radius: 6px !important;
    padding: 15px 30px !important;
    font-size: 1.1rem !important;
    transition: all 0.3s ease !important;
    border: none !important;
    display: block !important;
    width: 100% !important;
    text-align: center !important;
}

/* 悬停发光效果 */
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover,
.woocommerce-checkout #place_order:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(234, 88, 12, 0.6) !important; /* 橙色光晕 */
}

/* 2. 普通按钮 (如应用优惠券) */
.woocommerce button.button {
    background-color: #27272a !important; /* 深灰 */
    color: #fff !important;
    border: 1px solid #3f3f46 !important;
    border-radius: 4px !important;
    padding: 10px 20px !important;
}
.woocommerce button.button:hover {
    background-color: #3f3f46 !important;
    color: #fff !important;
}

/* 3. 优惠券输入框 */
.woocommerce .coupon input.input-text {
    background-color: #000 !important;
    border: 1px solid #3f3f46 !important;
    color: #fff !important;
    padding: 10px !important;
    border-radius: 4px !important;
    width: 150px !important;
}

/* =========================================
   其他修正
   ========================================= */
/* 输入框通用 */
.woocommerce-page input[type="text"],
.woocommerce-page input[type="email"],
.woocommerce-page input[type="tel"],
.woocommerce-page textarea,
.woocommerce-checkout select,
.select2-container--default .select2-selection--single {
    background-color: #18181b !important;
    border: 1px solid #27272a !important;
    color: #fff !important;
    border-radius: 4px !important;
    height: 45px !important;
    display: flex;
    align-items: center;
    padding-left: 10px !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #fff !important;
    line-height: 45px !important;
}

/* 提示信息条 (绿色/蓝色条) */
.woocommerce-message, .woocommerce-info {
    background-color: #121212 !important;
    color: #fff !important;
    border-top: 3px solid #ea580c !important; /* 改成橙色条 */
}
.woocommerce-message::before, .woocommerce-info::before {
    color: #ea580c !important;
}

/* =========================================
   导航栏伪装补丁 (针对 iBox 主题)
   ========================================= */

/* 1. 强制头部背景变黑 */
.site-header, 
#masthead, 
.main-header-bar {
    background-color: #050505 !important;
    border-bottom: 1px solid #27272a;
}

/* 2. 导航链接变色 */
.main-navigation a,
.menu-item a {
    color: #a1a1aa !important; /* 灰色 */
}

.main-navigation a:hover,
.menu-item.current-menu-item a {
    color: #ea580c !important; /* 橙色高亮 */
}

/* 3. Logo 文字颜色 (如果是文字版) */
.site-title a,
.site-logo a {
    color: #fff !important;
}

/* 4. 购物车图标颜色 */
.header-cart-icon,
.ast-cart-menu-wrap {
    color: #fff !important;
}
.ast-cart-menu-wrap:hover {
    color: #ea580c !important;
}
/* 1. 修正“购物车为空”的提示框颜色 */
.woocommerce-cart .woocommerce-info {
    background-color: #121212 !important; /* 深灰背景 */
    color: #a1a1aa !important;            /* 浅灰文字 */
    border-top: 3px solid #ea580c !important; /* 橙色顶条 */
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

/* 2. 图标颜色修正 */
.woocommerce-cart .woocommerce-info::before {
    color: #ea580c !important; /* 橙色图标 */
}

/* 3. "Return to shop" 按钮美化 */
.woocommerce-cart .return-to-shop .button {
    background-color: #ea580c !important; /* 橙色按钮 */
    color: #fff !important;
    border-radius: 6px;
    padding: 12px 24px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.woocommerce-cart .return-to-shop .button:hover {
    background-color: #c2410c !important; /* 深橙色悬停 */
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(234, 88, 12, 0.4);
}