/*
 * 页面48 UI样式优化 - 浅色背景适配
 * 修复积分抵扣板块的文字可读性问题
 */

/* ===== 积分抵扣板块文字优化 ===== */

/* myCred积分抵扣主容器 - 深色文字，浅色背景 */
body.page-id-48 #mycred-partial-payment-woo,
body.page-id-48 .mycred-blocks-panel,
body.page-id-48 .ad-points-panel,
body.page-id-48 .points-panel-white {
    background-color: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    padding: 16px !important;
    margin-bottom: 16px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* 积分抵扣标题 - 深色 */
body.page-id-48 #mycred-partial-payment-woo h3,
body.page-id-48 #mycred-partial-payment-woo h4,
body.page-id-48 .mycred-blocks-panel h3,
body.page-id-48 .mycred-blocks-panel h4,
body.page-id-48 .ad-points-panel h3,
body.page-id-48 .ad-points-panel h4,
body.page-id-48 .points-panel-header h3 {
    color: #1f2937 !important;
    font-weight: 600 !important;
    margin-bottom: 16px !important;
    font-size: 18px !important;
}

/* 积分抵扣内容文字 - 深色 */
body.page-id-48 #mycred-partial-payment-woo p,
body.page-id-48 #mycred-partial-payment-woo div,
body.page-id-48 #mycred-partial-payment-woo span,
body.page-id-48 .mycred-blocks-panel p,
body.page-id-48 .mycred-blocks-panel div,
body.page-id-48 .mycred-blocks-panel span,
body.page-id-48 .ad-points-panel p,
body.page-id-48 .ad-points-panel div,
body.page-id-48 .ad-points-panel span {
    color: #374151 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
}

/* 积分抵扣标签 - 中等深度 */
body.page-id-48 #mycred-partial-payment-woo label,
body.page-id-48 .mycred-blocks-panel label,
body.page-id-48 .ad-points-panel label,
body.page-id-48 .balance-row .label,
body.page-id-48 .calc-label {
    color: #6b7280 !important;
    font-weight: 500 !important;
    font-size: 13px !important;
}

/* 积分数值 - 强调色 */
body.page-id-48 .balance-row .value,
body.page-id-48 .calc-value,
body.page-id-48 #mycred-partial-payment-woo .mycred-balance,
body.page-id-48 .points-balance-info .value {
    color: #059669 !important;
    font-weight: 600 !important;
}

/* 积分输入框 - 深色文字 */
body.page-id-48 #mycred-partial-payment-woo input[type="text"],
body.page-id-48 #mycred-partial-payment-woo input[type="number"],
body.page-id-48 .mycred-blocks-panel input[type="text"],
body.page-id-48 .mycred-blocks-panel input[type="number"],
body.page-id-48 .ad-points-panel input[type="text"],
body.page-id-48 .ad-points-panel input[type="number"] {
    color: #1f2937 !important;
    background-color: #f9fafb !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* 积分输入框焦点状态 */
body.page-id-48 #mycred-partial-payment-woo input[type="text"]:focus,
body.page-id-48 #mycred-partial-payment-woo input[type="number"]:focus,
body.page-id-48 .mycred-blocks-panel input:focus,
body.page-id-48 .ad-points-panel input:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
    outline: none !important;
}

/* 积分抵扣按钮 - 主题色 */
body.page-id-48 #mycred-partial-payment-woo input[type="submit"],
body.page-id-48 #mycred-partial-payment-woo .button,
body.page-id-48 .mycred-blocks-panel input[type="submit"],
body.page-id-48 .mycred-blocks-panel .button,
body.page-id-48 .ad-points-panel .button,
body.page-id-48 .points-submit-btn,
body.page-id-48 #mycred-range-action input[type="submit"],
body.page-id-48 input[name="submit"][value*="积分抵扣"] {
    background-color: #ff671d !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 10px 20px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-top: 12px !important;
}

/* 积分抵扣按钮悬停状态 - 主题色加深 */
body.page-id-48 #mycred-partial-payment-woo input[type="submit"]:hover,
body.page-id-48 #mycred-partial-payment-woo .button:hover,
body.page-id-48 .mycred-blocks-panel .button:hover,
body.page-id-48 .ad-points-panel .button:hover,
body.page-id-48 .points-submit-btn:hover,
body.page-id-48 #mycred-range-action input[type="submit"]:hover,
body.page-id-48 input[name="submit"][value*="积分抵扣"]:hover {
    background-color: #e55a17 !important;
}

/* ===== 积分滑动条样式优化 ===== */

/* 积分滑动条容器 */
body.page-id-48 #mycred-range-selector,
body.page-id-48 .mycred-partial-payment-range {
    margin: 12px 0 !important;
}

/* 积分滑动条样式 - 主题色 */
body.page-id-48 #mycred-partial-payment-woo input[type="range"],
body.page-id-48 .mycred-partial-payment-inpt[type="range"] {
    -webkit-appearance: none !important;
    width: 100% !important;
    height: 6px !important;
    border-radius: 3px !important;
    background: #e5e7eb !important;
    outline: none !important;
    margin: 8px 0 !important;
}

/* 滑动条滑块 - 主题色 */
body.page-id-48 #mycred-partial-payment-woo input[type="range"]::-webkit-slider-thumb,
body.page-id-48 .mycred-partial-payment-inpt[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    background: #ff671d !important;
    cursor: pointer !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

/* Firefox滑块样式 */
body.page-id-48 #mycred-partial-payment-woo input[type="range"]::-moz-range-thumb,
body.page-id-48 .mycred-partial-payment-inpt[type="range"]::-moz-range-thumb {
    width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    background: #ff671d !important;
    cursor: pointer !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

/* 滑动条激活状态 */
body.page-id-48 #mycred-partial-payment-woo input[type="range"]:active::-webkit-slider-thumb,
body.page-id-48 .mycred-partial-payment-inpt[type="range"]:active::-webkit-slider-thumb {
    background: #e55a17 !important;
    transform: scale(1.1) !important;
}

/* ===== 购物车小计区域优化 ===== */

/* 购物车小计容器 */
body.page-id-48 .cart_totals {
    background-color: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    padding: 20px !important;
    margin-bottom: 0 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* 确保右列内所有组件统一宽度 */
body.page-id-48 .e-cart__column-end > *,
body.page-id-48 .cart-collaterals > * {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* 积分抵扣板块内部布局优化 */
body.page-id-48 #mycred-partial-payment-woo .form-group,
body.page-id-48 .ad-points-panel .form-group,
body.page-id-48 .points-panel-content .form-group {
    margin-bottom: 12px !important;
}

/* ===== 用户积分余额显示样式 ===== */

/* 积分余额显示容器 */
body.page-id-48 .user-balance-display {
    background-color: #f0f9ff !important;
    border: 1px solid #bfdbfe !important;
    border-radius: 6px !important;
    padding: 12px !important;
    margin-bottom: 16px !important;
}

/* 积分余额信息行 */
body.page-id-48 .user-balance-display .balance-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 6px !important;
    padding: 4px 0 !important;
}

body.page-id-48 .user-balance-display .balance-row:last-child {
    margin-bottom: 0 !important;
}

/* 积分余额标签 */
body.page-id-48 .user-balance-display .balance-label {
    color: #1e40af !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}

/* 积分余额数值 */
body.page-id-48 .user-balance-display .balance-value {
    color: #1e40af !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

/* 积分余额信息行布局 */
body.page-id-48 .balance-row,
body.page-id-48 .calc-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 8px !important;
    padding: 8px 0 !important;
}

/* 积分计算区域样式 */
body.page-id-48 .points-calculation,
body.page-id-48 .mycred-partial-info {
    background-color: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    padding: 12px !important;
    margin: 12px 0 !important;
}

/* 购物车小计标题 */
body.page-id-48 .cart_totals h2 {
    color: #1f2937 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    margin-bottom: 16px !important;
    border-bottom: 1px solid #e5e7eb !important;
    padding-bottom: 12px !important;
}

/* 购物车小计表格 */
body.page-id-48 .cart_totals table th,
body.page-id-48 .cart_totals table td {
    color: #374151 !important;
    font-size: 14px !important;
    border-bottom: 1px solid #f3f4f6 !important;
    padding: 8px 0 !important;
}

/* 购物车总计行 - 强调显示 */
body.page-id-48 .cart_totals .order-total th,
body.page-id-48 .cart_totals .order-total td {
    color: #1f2937 !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    border-top: 2px solid #e5e7eb !important;
    border-bottom: none !important;
    padding-top: 12px !important;
}

/* ===== 结账按钮优化 ===== */

/* 结账按钮 - 主题色背景 */
body.page-id-48 .wc-proceed-to-checkout .checkout-button,
body.page-id-48 .cart_totals .checkout-button,
body.page-id-48 .cart-collaterals .checkout-button {
    background-color: #ff671d !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 12px 24px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    width: 100% !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
}

/* 结账按钮悬停状态 - 取消hover效果，保持一致 */
body.page-id-48 .wc-proceed-to-checkout .checkout-button:hover,
body.page-id-48 .cart_totals .checkout-button:hover,
body.page-id-48 .cart-collaterals .checkout-button:hover {
    background-color: #ff671d !important;
    color: #ffffff !important;
    border-color: transparent !important;
    text-decoration: none !important;
}

/* ===== 优惠券区域优化 ===== */

/* 优惠券输入框 */
body.page-id-48 .coupon input[type="text"] {
    color: #1f2937 !important;
    background-color: #f9fafb !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
}

/* 优惠券按钮 - 主题色背景 */
body.page-id-48 .coupon .button,
body.page-id-48 .coupon input[type="submit"],
body.page-id-48 .coupon button[name="apply_coupon"] {
    background-color: #ff671d !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 10px 20px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
}

/* 优惠券按钮悬停 - 主题色加深 */
body.page-id-48 .coupon .button:hover,
body.page-id-48 .coupon input[type="submit"]:hover,
body.page-id-48 .coupon button[name="apply_coupon"]:hover {
    background-color: #e55a17 !important;
}

/* ===== 通用文字对比度修复 ===== */

/* 确保所有文字在浅色背景下可读 */
body.page-id-48 .elementor-widget-woocommerce-cart {
    color: #1f2937 !important;
}

/* 确保链接文字可读 */
body.page-id-48 .elementor-widget-woocommerce-cart a {
    color: #3b82f6 !important;
}

body.page-id-48 .elementor-widget-woocommerce-cart a:hover {
    color: #2563eb !important;
}

/* 购物车商品信息文字 */
body.page-id-48 .shop_table td,
body.page-id-48 .shop_table th {
    color: #374151 !important;
}

/* 商品标题链接 - 黑色，不是蓝色 */
body.page-id-48 .shop_table .product-name a,
body.page-id-48 .woocommerce-cart-form .product-name a {
    color: #1f2937 !important;
    text-decoration: none !important;
    font-weight: 500 !important;
}

/* 商品标题链接悬停状态 */
body.page-id-48 .shop_table .product-name a:hover,
body.page-id-48 .woocommerce-cart-form .product-name a:hover {
    color: #374151 !important;
    text-decoration: underline !important;
}

/* 商品价格 - 黑色显示 */
body.page-id-48 .shop_table .woocommerce-Price-amount,
body.page-id-48 .shop_table .product-price,
body.page-id-48 .shop_table .product-subtotal,
body.page-id-48 .shop_table .amount {
    color: #1f2937 !important;
    font-weight: 600 !important;
}

/* ===== DJI风格数量选择器（修复版） ===== */

/* 数量选择器容器 - 使用更具体的选择器 */
body.page-id-48 .shop_table .quantity,
body.page-id-48 .woocommerce-cart-form .quantity,
body.page-id-48 .product-quantity .quantity {
    display: flex !important;
    align-items: stretch !important;
    background-color: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    height: 40px !important;
    width: 120px !important;
    position: relative !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* 重新设计原有按钮 - 强制高度匹配 */
body.page-id-48 .shop_table .quantity .rt-qty-minus,
body.page-id-48 .shop_table .quantity .rt-qty-plus,
body.page-id-48 .woocommerce-cart-form .quantity .rt-qty-minus,
body.page-id-48 .woocommerce-cart-form .quantity .rt-qty-plus {
    flex: 0 0 30px !important;
    width: 30px !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    border: none !important;
    background-color: #ffffff !important;
    color: #6b7280 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
}

/* 减号按钮 - 左侧贴合 */
body.page-id-48 .quantity .rt-qty-minus {
    border-right: 1px solid #e2e8f0 !important;
    border-top-left-radius: 7px !important;
    border-bottom-left-radius: 7px !important;
}

/* 加号按钮 - 右侧贴合，确保填满 */
body.page-id-48 .quantity .rt-qty-plus {
    border-left: 1px solid #e2e8f0 !important;
    border-top-right-radius: 7px !important;
    border-bottom-right-radius: 7px !important;
}

/* 按钮悬停效果 */
body.page-id-48 .quantity .rt-qty-minus:hover,
body.page-id-48 .quantity .rt-qty-plus:hover {
    background-color: #f1f5f9 !important;
    color: #1f2937 !important;
}

/* 数量输入框 - 强制高度和居中 */
body.page-id-48 .quantity input.input-text.qty.text,
body.page-id-48 .quantity input[type="number"].qty,
body.page-id-48 .shop_table .quantity input.qty,
body.page-id-48 .woocommerce-cart-form .quantity input.qty {
    flex: 1 !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    border: none !important;
    background: transparent !important;
    text-align: center !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
    margin: 0 !important;
    padding: 0 !important;
    outline: none !important;
    -moz-appearance: textfield !important;
    box-sizing: border-box !important;
    line-height: 40px !important;
    vertical-align: middle !important;
}

/* 隐藏Chrome/Safari的上下箭头 */
body.page-id-48 .quantity .qty::-webkit-outer-spin-button,
body.page-id-48 .quantity .qty::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* 隐藏屏幕阅读器标签（不影响可访问性） */
body.page-id-48 .quantity .screen-reader-text {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* 数量选择器焦点状态 */
body.page-id-48 .quantity:focus-within {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

/* 数量选择器整体悬停效果 */
body.page-id-48 .quantity:hover {
    border-color: #cbd5e1 !important;
}

/* 数量输入框焦点状态 */
body.page-id-48 .quantity .qty:focus {
    background-color: rgba(59, 130, 246, 0.05) !important;
}

/* 强制居中修复 - 最高优先级 */
body.page-id-48 .quantity input {
    text-align: center !important;
    line-height: 40px !important;
}

/* 如果上述方法无效，使用JavaScript强制居中 */
