/* Migrated from original blocksy-child/style.css */
/* 在这里添加你的自定义CSS */

/* ===== Ultimate Member 按钮样式统一 ===== */
/* 覆盖Ultimate Member的按钮颜色，使其与Blocksy主题保持一致 */

/* 主要按钮样式 - 使用CSS变量以便与主题色彩同步 */
.um input[type=submit].um-button,
.um input[type=submit].um-button:focus,
.um a.um-button,
.um a.um-button.um-disabled:hover,
.um a.um-button.um-disabled:focus,
.um a.um-button.um-disabled:active {
    background: var(--theme-button-background-initial-color, var(--theme-palette-color-1, #405BFF)) !important;
    border-color: var(--theme-button-background-initial-color, var(--theme-palette-color-1, #405BFF)) !important;
    color: var(--theme-button-text-initial-color, #ffffff) !important;
}

/* 注册页：未勾选隐私政策时禁用提交按钮 */
.um-form[data-mode="register"] #um-submit-btn:disabled,
.um-form[data-mode="register"] #um-submit-btn.um-disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* 按钮悬停状态 */
.um input[type=submit].um-button:hover,
.um a.um-button:hover {
    background: var(--theme-button-background-hover-color, var(--theme-palette-color-2, #3651DF)) !important;
    border-color: var(--theme-button-background-hover-color, var(--theme-palette-color-2, #3651DF)) !important;
    color: var(--theme-button-text-hover-color, #ffffff) !important;
}

/* 确保按钮文字颜色 */
.um .um-button {
    color: var(--theme-button-text-initial-color, #ffffff) !important;
}

.um .um-button:before {
    color: var(--theme-button-text-initial-color, #ffffff) !important;
}

/* 次要/辅助按钮样式保持原样 */
.um .um-button.um-alt,
.um input[type=submit].um-button.um-alt {
    background: #eeeeee !important;
    border-color: #eeeeee !important;
    color: #666666 !important;
}

.um .um-button.um-alt:hover,
.um input[type=submit].um-button.um-alt:hover{
    background: #e5e5e5 !important;
    border-color: #e5e5e5 !important;
}

/* 链接颜色统一 */
.um a.um-link {
    color: var(--theme-link-initial-color, var(--theme-palette-color-1, #405BFF)) !important;
}

.um a.um-link:hover,
.um a.um-link-hvr:hover {
    color: var(--theme-link-hover-color, var(--theme-palette-color-2, #3651DF)) !important;
}

/* 其他UI元素颜色统一 */
.um .um-tip:hover,
.um .um-field-radio.active:not(.um-field-radio-state-disabled) i,
.um .um-field-checkbox.active:not(.um-field-radio-state-disabled) i,
.um .um-member-name a:hover,
.um .um-member-more a:hover,
.um .um-member-less a:hover,
.um .um-members-pagi a:hover,
.um .um-cover-add:hover,
.um .um-profile-subnav a.active,
.um .um-item-meta a,
.um-account-name a:hover,
.um-account-nav a.current,
.um-account-side li a.current span.um-account-icon,
.um-account-side li a.current:hover span.um-account-icon,
.um-dropdown li a:hover,
i.um-active-color,
span.um-active-color {
    color: var(--theme-link-initial-color, var(--theme-palette-color-1, #405BFF)) !important;
}

/* 背景颜色统一 */
.um .um-field-group-head,
.picker__box,
.picker__nav--prev:hover,
.picker__nav--next:hover,
.um .um-members-pagi span.current,
.um .um-members-pagi span.current:hover,
.um .um-profile-nav-item.active a,
.um .um-profile-nav-item.active a:hover,
.upload,
.um-modal-header,
.um-modal-btn,
.um-modal-btn.disabled,
.um-modal-btn.disabled:hover,
div.uimob800 .um-account-side li a.current,
div.uimob800 .um-account-side li a.current:hover {
    background: var(--theme-button-background-initial-color, var(--theme-palette-color-1, #405BFF)) !important;
    color: #ffffff !important;
}

.um .um-field-group-head:hover,
.picker__footer,
.picker__header,
.picker__day--infocus:hover,
.picker__day--outfocus:hover,
.picker__day--highlighted:hover,
.picker--focused .picker__day--highlighted,
.picker__list-item:hover,
.picker__list-item--highlighted:hover,
.picker--focused .picker__list-item--highlighted,
.picker__list-item--selected,
.picker__list-item--selected:hover,
.picker--focused .picker__list-item--selected {
    background: var(--theme-button-background-hover-color, var(--theme-palette-color-2, #3651DF)) !important;
    color: #ffffff !important;
}

/* 强制主题色按钮的文字为白色 */
.um input[type=submit].um-button,
.um input[type=submit].um-button:hover,
.um input[type=submit].um-button:focus,
.um a.um-button:not(.um-alt),
.um a.um-button:not(.um-alt):hover,
.um a.um-button:not(.um-alt):focus {
    color: #ffffff !important;
}

/* 确保按钮内的所有文字元素都是白色 */
.um .um-button:not(.um-alt),
.um .um-button:not(.um-alt):before,
.um .um-button:not(.um-alt):after,
.um .um-button:not(.um-alt) *,
.um input[type=submit].um-button,
.um input[type=submit].um-button *,
.um a.um-button:not(.um-alt),
.um a.um-button:not(.um-alt) * {
    color: #ffffff !important;
}

/* 保持次要按钮的原有颜色 */
.um .um-button.um-alt,
.um .um-button.um-alt:before,
.um .um-button.um-alt:after,
.um .um-button.um-alt *,
.um input[type=submit].um-button.um-alt,
.um input[type=submit].um-button.um-alt * {
    color: #666666 !important;
}

/* ===== 订单页面样式调整 ===== */
/* 订单表格整体样式 */
.woocommerce-account .woocommerce-orders-table {
    border-collapse: collapse;
    width: 100%;
}

/* 订单号单元格垂直居中 */
.woocommerce-account .woocommerce-orders-table td.woocommerce-orders-table__cell-order-number,
.woocommerce-account .woocommerce-orders-table th.woocommerce-orders-table__header-order-number {
    vertical-align: middle !important;
    text-align: center !important;
}

/* 表头对齐 - 确保所有表头内容居中 */
.woocommerce-account .woocommerce-orders-table th,
.woocommerce-orders-table th,
.woocommerce-orders-table thead th,
.woocommerce-orders-table thead tr th,
.woocommerce-orders-table .woocommerce-orders-table__header-order-number,
.woocommerce-orders-table .woocommerce-orders-table__header-order-date,
.woocommerce-orders-table .woocommerce-orders-table__header-order-status,
.woocommerce-orders-table .woocommerce-orders-table__header-order-total,
.woocommerce-orders-table .woocommerce-orders-table__header-order-actions {
    text-align: center !important;
    vertical-align: middle !important;
}

/* 特别针对"订单"表头的对齐 */
.woocommerce-account .woocommerce-orders-table th.woocommerce-orders-table__header-order-number {
    text-align: center !important;
}

/* 所有表格单元格垂直和水平居中 */
.woocommerce-account .woocommerce-orders-table td,
.woocommerce-account .woocommerce-orders-table th {
    vertical-align: middle !important;
    text-align: center !important;
    padding: 15px 10px !important;
}

/* 查看按钮文字颜色调整为白色 */
.woocommerce-account .woocommerce-orders-table .woocommerce-button.button.view,
.woocommerce-account .woocommerce-orders-table .button.view,
.woocommerce-account .woocommerce-orders-table a.button[href*="view-order"] {
    color: #ffffff !important;
    background-color: var(--theme-button-background-initial-color, var(--theme-palette-color-1, #405BFF)) !important;
    border-color: var(--theme-button-background-initial-color, var(--theme-palette-color-1, #405BFF)) !important;
}

/* 查看按钮悬停状态 */
.woocommerce-account .woocommerce-orders-table .woocommerce-button.button.view:hover,
.woocommerce-account .woocommerce-orders-table .button.view:hover,
.woocommerce-account .woocommerce-orders-table a.button[href*="view-order"]:hover {
    color: #ffffff !important;
    background-color: var(--theme-button-background-hover-color, var(--theme-palette-color-2, #3651DF)) !important;
    border-color: var(--theme-button-background-hover-color, var(--theme-palette-color-2, #3651DF)) !important;
}

/* 确保操作列的按钮都垂直居中 */
.woocommerce-account .woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions {
    vertical-align: middle !important;
    text-align: center !important;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .woocommerce-account .woocommerce-orders-table td,
    .woocommerce-account .woocommerce-orders-table th {
        padding: 10px 5px !important;
        font-size: 14px;
    }
    
    .woocommerce-account .woocommerce-orders-table .button {
        padding: 8px 12px !important;
        font-size: 12px !important;
    }
}

/* ===== 订单详情页面账单地址隐藏 ===== */
/* 强制隐藏账单地址相关元素，防止闪烁 */
.woocommerce-customer-details,
.woocommerce-columns,
section.woocommerce-customer-details,
.woocommerce-order h2:nth-of-type(2),
.woocommerce-order h2:nth-of-type(2) + *,
.woocommerce-order h2:nth-of-type(3),
.woocommerce-order h2:nth-of-type(3) + *,
.woocommerce-order .woocommerce-column--1,
.woocommerce-order .woocommerce-column--2,
.woocommerce-order .col-1,
.woocommerce-order .col-2,
.woocommerce-order .woocommerce-billing-fields,
.woocommerce-order .woocommerce-shipping-fields,
.woocommerce-order .woocommerce-address-fields,
.woocommerce-order .woocommerce-billing-address,
.woocommerce-order .woocommerce-shipping-address,
.woocommerce-order .address {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    clip: rect(0, 0, 0, 0) !important;
    pointer-events: none !important;
    user-select: none !important;
}

/* 确保订单详情表格可见 */
.woocommerce-order-details,
.shop_table,
.woocommerce-order-details__title,
.woocommerce-table,
.woocommerce-table--order-details {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
    position: static !important;
    left: auto !important;
    clip: auto !important;
    pointer-events: auto !important;
    user-select: auto !important;
}

/* 针对view-order页面的特殊隐藏 */
.view-order .woocommerce-customer-details,
.view-order .woocommerce-columns,
.view-order section.woocommerce-customer-details,
.view-order .woocommerce-order h2:nth-of-type(2),
.view-order .woocommerce-order h2:nth-of-type(2) + *,
.view-order .woocommerce-order h2:nth-of-type(3),
.view-order .woocommerce-order h2:nth-of-type(3) + * {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
}

/* ===== 订单详情页面宽度修复 ===== */
/* 修复订单详情页面的宽度问题 */
.woocommerce-order-details,
.woocommerce-order-details *,
.woocommerce-order-details .woocommerce-table,
.woocommerce-order-details .shop_table,
.woocommerce-order-details table.order_details {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    box-sizing: border-box !important;
}

/* 强制表格容器宽度 */
.woocommerce-order-details .woocommerce-table,
.woocommerce-order-details .shop_table,
.woocommerce-order-details table.order_details {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    table-layout: fixed !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 强制表格列宽度 */
.woocommerce-order-details .woocommerce-table th,
.woocommerce-order-details .shop_table th,
.woocommerce-order-details table.order_details th,
.woocommerce-order-details .woocommerce-table td,
.woocommerce-order-details .shop_table td,
.woocommerce-order-details table.order_details td {
    width: auto !important;
    max-width: none !important;
    min-width: auto !important;
    box-sizing: border-box !important;
}

/* 产品名称列强制宽度 */
.woocommerce-order-details .woocommerce-table .product-name,
.woocommerce-order-details .shop_table .product-name,
.woocommerce-order-details table.order_details .product-name {
    width: 70% !important;
    min-width: 300px !important;
    max-width: none !important;
}

/* 总价列强制宽度 */
.woocommerce-order-details .woocommerce-table .product-total,
.woocommerce-order-details .shop_table .product-total,
.woocommerce-order-details table.order_details .product-total {
    width: 30% !important;
    min-width: 100px !important;
    max-width: none !important;
    text-align: right !important;
}

/* 订单详情页面整体容器宽度 */
.woocommerce-order,
.woocommerce-order *,
.woocommerce-order .woocommerce-order-details,
.woocommerce-order .woocommerce-order-details * {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    box-sizing: border-box !important;
}

/* 卡密信息部分强制宽度 */
.woocommerce-order-card-secrets,
.woocommerce-order-card-secrets *,
.woocommerce-order-card-secrets .woocommerce-order-card-secrets-content,
.woocommerce-order-card-secrets .card-secret-product-group {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    box-sizing: border-box !important;
}

/* 强制页面内容区域宽度 */
.woocommerce-account,
.woocommerce-account *,
.woocommerce-account .woocommerce,
.woocommerce-account .woocommerce * {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    box-sizing: border-box !important;
}

/* 移除任何可能的宽度限制 */
.woocommerce-order-details,
.woocommerce-order-details *,
.woocommerce-order-card-secrets,
.woocommerce-order-card-secrets * {
    flex: 1 1 100% !important;
    flex-basis: 100% !important;
    flex-grow: 1 !important;
    flex-shrink: 0 !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .woocommerce-order-details .woocommerce-table .product-name,
    .woocommerce-order-details .shop_table .product-name,
    .woocommerce-order-details table.order_details .product-name {
        width: 60% !important;
        min-width: 200px !important;
    }
    
    .woocommerce-order-details .woocommerce-table .product-total,
    .woocommerce-order-details .shop_table .product-total,
    .woocommerce-order-details table.order_details .product-total {
        width: 40% !important;
        min-width: 80px !important;
    }
}

/* ===== 结账页面样式优化 ===== */
/* 终极解决方案：强制隐藏所有账单地址字段 */
.woocommerce-checkout #billing_company_field,
.woocommerce-checkout #billing_country_field,
.woocommerce-checkout #billing_address_1_field,
.woocommerce-checkout #billing_address_2_field,
.woocommerce-checkout #billing_city_field,
.woocommerce-checkout #billing_state_field,
.woocommerce-checkout #billing_postcode_field,
.woocommerce-checkout #billing_phone_field,
.woocommerce-checkout .woocommerce-shipping-fields,
.woocommerce-checkout #ship-to-different-address,
.woocommerce-checkout .shipping_address,
/* 更通用的选择器 */
.woocommerce-checkout [id*="billing_company"],
.woocommerce-checkout [id*="billing_country"],
.woocommerce-checkout [id*="billing_address"],
.woocommerce-checkout [id*="billing_city"],
.woocommerce-checkout [id*="billing_state"],
.woocommerce-checkout [id*="billing_postcode"],
.woocommerce-checkout [id*="billing_phone"],
/* 通过标签文本隐藏 */
.woocommerce-checkout label[for*="billing_company"],
.woocommerce-checkout label[for*="billing_country"],
.woocommerce-checkout label[for*="billing_address"],
.woocommerce-checkout label[for*="billing_city"],
.woocommerce-checkout label[for*="billing_state"],
.woocommerce-checkout label[for*="billing_postcode"],
.woocommerce-checkout label[for*="billing_phone"],
/* 通用隐藏规则 */
.woocommerce-checkout [class*="billing_company"],
.woocommerce-checkout [class*="billing_country"],
.woocommerce-checkout [class*="billing_address"],
.woocommerce-checkout [class*="billing_city"],
.woocommerce-checkout [class*="billing_state"],
.woocommerce-checkout [class*="billing_postcode"],
.woocommerce-checkout [class*="billing_phone"] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    clip: rect(0, 0, 0, 0) !important;
    pointer-events: none !important;
    user-select: none !important;
}

/* 确保必要字段可见 */
.woocommerce-checkout #billing_first_name_field,
.woocommerce-checkout #billing_last_name_field,
.woocommerce-checkout #billing_email_field {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    left: auto !important;
    height: auto !important;
    overflow: visible !important;
    margin: inherit !important;
    padding: inherit !important;
    clip: auto !important;
    pointer-events: auto !important;
    user-select: auto !important;
}

/* 终极解决方案：使用CSS选择器强制隐藏所有可能的账单地址字段 */
.woocommerce-checkout .form-row[id*="billing_company"],
.woocommerce-checkout .form-row[id*="billing_country"],
.woocommerce-checkout .form-row[id*="billing_address"],
.woocommerce-checkout .form-row[id*="billing_city"],
.woocommerce-checkout .form-row[id*="billing_state"],
.woocommerce-checkout .form-row[id*="billing_postcode"],
.woocommerce-checkout .form-row[id*="billing_phone"],
.woocommerce-checkout .form-row[id*="billing_company_field"],
.woocommerce-checkout .form-row[id*="billing_country_field"],
.woocommerce-checkout .form-row[id*="billing_address_1_field"],
.woocommerce-checkout .form-row[id*="billing_address_2_field"],
.woocommerce-checkout .form-row[id*="billing_city_field"],
.woocommerce-checkout .form-row[id*="billing_state_field"],
.woocommerce-checkout .form-row[id*="billing_postcode_field"],
.woocommerce-checkout .form-row[id*="billing_phone_field"] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    clip: rect(0, 0, 0, 0) !important;
    pointer-events: none !important;
}

/* 隐藏包含账单地址文字的标题和容器 - 使用更兼容的选择器 */
.woocommerce-checkout h2,
.woocommerce-checkout h3,
.woocommerce-checkout h4 {
    /* 通过JavaScript隐藏包含特定文字的标题 */
}

/* 隐藏整个账单地址容器 - 使用更兼容的选择器 */
.woocommerce-checkout .woocommerce-billing-fields {
    /* 通过JavaScript控制显示 */
}

/* 确保必要字段可见 */
.woocommerce-checkout #billing_first_name_field,
.woocommerce-checkout #billing_last_name_field,
.woocommerce-checkout #billing_email_field {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    left: auto !important;
    height: auto !important;
    overflow: visible !important;
}

/* 简化结账页面 - 只显示必要的客户信息字段 */
.woocommerce-checkout .woocommerce-billing-fields {
    margin-bottom: 30px;
}

/* 客户信息字段样式 */
.woocommerce-checkout #billing_first_name_field,
.woocommerce-checkout #billing_last_name_field,
.woocommerce-checkout #billing_email_field {
    margin-bottom: 20px;
}

/* 姓名字段并排显示 */
.woocommerce-checkout #billing_first_name_field,
.woocommerce-checkout #billing_last_name_field {
    width: 48% !important;
    display: inline-block !important;
    vertical-align: top !important;
}

.woocommerce-checkout #billing_first_name_field {
    margin-right: 4% !important;
}

/* 邮箱字段全宽显示 */
.woocommerce-checkout #billing_email_field {
    width: 100% !important;
    display: block !important;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .woocommerce-checkout #billing_first_name_field,
    .woocommerce-checkout #billing_last_name_field {
        width: 100% !important;
        display: block !important;
        margin-right: 0 !important;
        margin-bottom: 15px !important;
    }
}

/* 结账页面整体优化 */
.woocommerce-checkout .col2-set {
    display: flex !important;
    flex-wrap: wrap !important;
}

.woocommerce-checkout .col-1 {
    flex: 1 1 100% !important;
    margin-bottom: 30px !important;
}

/* 支付方式区域美化 */
.woocommerce-checkout #payment {
    background: #f9f9f9 !important;
    padding: 25px !important;
    border-radius: 8px !important;
    border: 1px solid #e0e0e0 !important;
}

.woocommerce-checkout #payment .form-row {
    margin-bottom: 0 !important;
}

/* 提交订单按钮美化 */
.woocommerce-checkout #place_order {
    width: 100% !important;
    padding: 15px 30px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    margin-top: 20px !important;
    background: var(--theme-button-background-initial-color, var(--theme-palette-color-1, #405BFF)) !important;
    border-color: var(--theme-button-background-initial-color, var(--theme-palette-color-1, #405BFF)) !important;
    color: #ffffff !important;
}

.woocommerce-checkout #place_order:hover {
    background: var(--theme-button-background-hover-color, var(--theme-palette-color-2, #3651DF)) !important;
    border-color: var(--theme-button-background-hover-color, var(--theme-palette-color-2, #3651DF)) !important;
    color: #ffffff !important;
}

/* ===== 强制居中 orders 表格表头（更高优先级选择器） ===== */
.woocommerce-account .woocommerce table.shop_table.woocommerce-orders-table thead th,
.woocommerce-account .woocommerce .woocommerce-orders-table thead th,
.woocommerce-account .woocommerce .woocommerce-orders-table th {
    text-align: center !important;
    vertical-align: middle !important;
}

/* 居中表头内部文本与 span.nobr */
.woocommerce-account .woocommerce .woocommerce-orders-table thead th .nobr,
.woocommerce-account .woocommerce .woocommerce-orders-table thead th span,
.woocommerce-account .woocommerce .woocommerce-orders-table thead th a {
    display: inline-block !important;
    width: 100%;
    text-align: center !important;
}

/* 再次提升优先级，确保表头文本水平居中 */
.woocommerce-account .woocommerce .woocommerce-orders-table thead tr th,
.woocommerce-account .woocommerce .woocommerce-orders-table thead tr th .nobr,
.woocommerce-account .woocommerce .woocommerce-orders-table thead tr th span {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* 某些主题将 th 设为 flex，统一居中对齐 */
.woocommerce-account .woocommerce .woocommerce-orders-table thead tr th {
    justify-content: center !important;
    align-items: center !important;
}

/* ===== 终极表头居中解决方案 ===== */
/* 使用最高优先级选择器 */
.woocommerce-account .woocommerce .woocommerce-orders-table thead th,
.woocommerce-account .woocommerce .woocommerce-orders-table thead tr th,
.woocommerce-account .woocommerce .woocommerce-orders-table th,
.woocommerce-account .woocommerce table.woocommerce-orders-table thead th,
.woocommerce-account .woocommerce table.woocommerce-orders-table thead tr th,
.woocommerce-account .woocommerce table.woocommerce-orders-table th,
.woocommerce-account .woocommerce .woocommerce-orders-table thead th *,
.woocommerce-account .woocommerce .woocommerce-orders-table thead tr th *,
.woocommerce-account .woocommerce .woocommerce-orders-table th *,
.woocommerce-account .woocommerce table.woocommerce-orders-table thead th *,
.woocommerce-account .woocommerce table.woocommerce-orders-table thead tr th *,
.woocommerce-account .woocommerce table.woocommerce-orders-table th * {
    text-align: center !important;
    text-align-last: center !important;
    vertical-align: middle !important;
    justify-content: center !important;
    align-items: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* 强制所有可能的表头容器居中 */
.woocommerce-account .woocommerce .woocommerce-orders-table thead,
.woocommerce-account .woocommerce .woocommerce-orders-table thead tr,
.woocommerce-account .woocommerce table.woocommerce-orders-table thead,
.woocommerce-account .woocommerce table.woocommerce-orders-table thead tr {
    text-align: center !important;
}

/* 针对可能的flex布局 */
.woocommerce-account .woocommerce .woocommerce-orders-table thead th,
.woocommerce-account .woocommerce .woocommerce-orders-table thead tr th,
.woocommerce-account .woocommerce .woocommerce-orders-table th {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
}

/* 确保表头内容居中 */
.woocommerce-account .woocommerce .woocommerce-orders-table thead th > *,
.woocommerce-account .woocommerce .woocommerce-orders-table thead tr th > *,
.woocommerce-account .woocommerce .woocommerce-orders-table th > * {
    text-align: center !important;
    margin: 0 auto !important;
}

/* ===== 终极通配符表头居中解决方案 ===== */
/* 使用通配符选择器覆盖所有可能的表头 */
.woocommerce-account table thead th,
.woocommerce-account table thead tr th,
.woocommerce-account table th,
.woocommerce-account .woocommerce table thead th,
.woocommerce-account .woocommerce table thead tr th,
.woocommerce-account .woocommerce table th,
.woocommerce-account .woocommerce-orders-table thead th,
.woocommerce-account .woocommerce-orders-table thead tr th,
.woocommerce-account .woocommerce-orders-table th,
.woocommerce-account .woocommerce .woocommerce-orders-table thead th,
.woocommerce-account .woocommerce .woocommerce-orders-table thead tr th,
.woocommerce-account .woocommerce .woocommerce-orders-table th {
    text-align: center !important;
    text-align-last: center !important;
    vertical-align: middle !important;
    justify-content: center !important;
    align-items: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: flex !important;
    flex-direction: column !important;
}

/* 强制所有表头内容居中 */
.woocommerce-account table thead th *,
.woocommerce-account table thead tr th *,
.woocommerce-account table th *,
.woocommerce-account .woocommerce table thead th *,
.woocommerce-account .woocommerce table thead tr th *,
.woocommerce-account .woocommerce table th *,
.woocommerce-account .woocommerce-orders-table thead th *,
.woocommerce-account .woocommerce-orders-table thead tr th *,
.woocommerce-account .woocommerce-orders-table th *,
.woocommerce-account .woocommerce .woocommerce-orders-table thead th *,
.woocommerce-account .woocommerce .woocommerce-orders-table thead tr th *,
.woocommerce-account .woocommerce .woocommerce-orders-table th * {
    text-align: center !important;
    margin: 0 auto !important;
    display: inline-block !important;
}

/* 针对可能的表格类名 */
.woocommerce-orders-table thead th,
.woocommerce-orders-table thead tr th,
.woocommerce-orders-table th,
table.woocommerce-orders-table thead th,
table.woocommerce-orders-table thead tr th,
table.woocommerce-orders-table th {
    text-align: center !important;
    text-align-last: center !important;
    vertical-align: middle !important;
    justify-content: center !important;
    align-items: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: flex !important;
    flex-direction: column !important;
}

/* 确保所有表头内容居中 */
.woocommerce-orders-table thead th *,
.woocommerce-orders-table thead tr th *,
.woocommerce-orders-table th *,
table.woocommerce-orders-table thead th *,
table.woocommerce-orders-table thead tr th *,
table.woocommerce-orders-table th * {
    text-align: center !important;
    margin: 0 auto !important;
    display: inline-block !important;
}

/* ===== 针对具体CSS类的表头居中解决方案 ===== */
.woocommerce-orders-table__header,
.woocommerce-orders-table__header-order-number,
.woocommerce-orders-table__header-order-date,
.woocommerce-orders-table__header-order-status,
.woocommerce-orders-table__header-order-total,
.woocommerce-orders-table__header-order-actions {
    text-align: center !important;
    text-align-last: center !important;
    vertical-align: middle !important;
    justify-content: center !important;
    align-items: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: flex !important;
    flex-direction: column !important;
}

/* 确保表头内的所有内容都居中 */
.woocommerce-orders-table__header *,
.woocommerce-orders-table__header-order-number *,
.woocommerce-orders-table__header-order-date *,
.woocommerce-orders-table__header-order-status *,
.woocommerce-orders-table__header-order-total *,
.woocommerce-orders-table__header-order-actions * {
    text-align: center !important;
    margin: 0 auto !important;
    display: inline-block !important;
}

/* ===== 最强力表头居中解决方案 - 覆盖内联样式 ===== */
/* 使用最高优先级选择器，覆盖所有可能的样式 */
.woocommerce-account .woocommerce .woocommerce-orders-table thead th,
.woocommerce-account .woocommerce .woocommerce-orders-table thead tr th,
.woocommerce-account .woocommerce .woocommerce-orders-table th,
.woocommerce-account .woocommerce table.woocommerce-orders-table thead th,
.woocommerce-account .woocommerce table.woocommerce-orders-table thead tr th,
.woocommerce-account .woocommerce table.woocommerce-orders-table th,
.woocommerce-account table.woocommerce-orders-table thead th,
.woocommerce-account table.woocommerce-orders-table thead tr th,
.woocommerce-account table.woocommerce-orders-table th,
.woocommerce-account .woocommerce-orders-table thead th,
.woocommerce-account .woocommerce-orders-table thead tr th,
.woocommerce-account .woocommerce-orders-table th,
.woocommerce-account .woocommerce-orders-table thead th,
.woocommerce-account .woocommerce-orders-table thead tr th,
.woocommerce-account .woocommerce-orders-table th {
    text-align: center !important;
    text-align-last: center !important;
    vertical-align: middle !important;
    justify-content: center !important;
    align-items: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: flex !important;
    flex-direction: column !important;
}

/* 强制所有表头内容居中，覆盖内联样式 */
.woocommerce-account .woocommerce .woocommerce-orders-table thead th *,
.woocommerce-account .woocommerce .woocommerce-orders-table thead tr th *,
.woocommerce-account .woocommerce .woocommerce-orders-table th *,
.woocommerce-account .woocommerce table.woocommerce-orders-table thead th *,
.woocommerce-account .woocommerce table.woocommerce-orders-table thead tr th *,
.woocommerce-account .woocommerce table.woocommerce-orders-table th *,
.woocommerce-account table.woocommerce-orders-table thead th *,
.woocommerce-account table.woocommerce-orders-table thead tr th *,
.woocommerce-account table.woocommerce-orders-table th *,
.woocommerce-account .woocommerce-orders-table thead th *,
.woocommerce-account .woocommerce-orders-table thead tr th *,
.woocommerce-account .woocommerce-orders-table th * {
    text-align: center !important;
    margin: 0 auto !important;
    display: inline-block !important;
}

/* 终极解决方案：使用属性选择器覆盖所有可能的表头 */
[class*="woocommerce-orders-table"] thead th,
[class*="woocommerce-orders-table"] thead tr th,
[class*="woocommerce-orders-table"] th {
    text-align: center !important;
    text-align-last: center !important;
    vertical-align: middle !important;
    justify-content: center !important;
    align-items: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: flex !important;
    flex-direction: column !important;
}

/* 确保所有表头内容居中 */
[class*="woocommerce-orders-table"] thead th *,
[class*="woocommerce-orders-table"] thead tr th *,
[class*="woocommerce-orders-table"] th * {
    text-align: center !important;
    margin: 0 auto !important;
    display: inline-block !important;
}

/* ===== 简化但有效的表头居中解决方案 ===== */
/* 直接针对所有可能的表头元素 */
.woocommerce-orders-table th,
.woocommerce-orders-table thead th,
.woocommerce-orders-table thead tr th,
table.woocommerce-orders-table th,
table.woocommerce-orders-table thead th,
table.woocommerce-orders-table thead tr th,
.woocommerce-account .woocommerce-orders-table th,
.woocommerce-account .woocommerce-orders-table thead th,
.woocommerce-account .woocommerce-orders-table thead tr th {
    text-align: center !important;
    text-align-last: center !important;
    vertical-align: middle !important;
}

/* 确保表头内容居中 */
.woocommerce-orders-table th *,
.woocommerce-orders-table thead th *,
.woocommerce-orders-table thead tr th *,
table.woocommerce-orders-table th *,
table.woocommerce-orders-table thead th *,
table.woocommerce-orders-table thead tr th *,
.woocommerce-account .woocommerce-orders-table th *,
.woocommerce-account .woocommerce-orders-table thead th *,
.woocommerce-account .woocommerce-orders-table thead tr th * {
    text-align: center !important;
    margin: 0 auto !important;
}

/* ===== 针对实际HTML结构的表头居中解决方案 ===== */
/* 根据浏览器开发者工具显示的实际结构 */
table.shop_table th,
table.shop_table thead th,
table.shop_table thead tr th,
.woocommerce-orders-table table.shop_table th,
.woocommerce-orders-table table.shop_table thead th,
.woocommerce-orders-table table.shop_table thead tr th,
.woocommerce-account table.shop_table th,
.woocommerce-account table.shop_table thead th,
.woocommerce-account table.shop_table thead tr th,
.woocommerce-account .woocommerce table.shop_table th,
.woocommerce-account .woocommerce table.shop_table thead th,
.woocommerce-account .woocommerce table.shop_table thead tr th {
    text-align: center !important;
    text-align-last: center !important;
    vertical-align: middle !important;
}

/* 确保表头内容居中 */
table.shop_table th *,
table.shop_table thead th *,
table.shop_table thead tr th *,
.woocommerce-orders-table table.shop_table th *,
.woocommerce-orders-table table.shop_table thead th *,
.woocommerce-orders-table table.shop_table thead tr th *,
.woocommerce-account table.shop_table th *,
.woocommerce-account table.shop_table thead th *,
.woocommerce-account table.shop_table thead tr th *,
.woocommerce-account .woocommerce table.shop_table th *,
.woocommerce-account .woocommerce table.shop_table thead th *,
.woocommerce-account .woocommerce table.shop_table thead tr th * {
    text-align: center !important;
    margin: 0 auto !important;
}

/* 终极解决方案：覆盖所有可能的表头 */
table th,
table thead th,
table thead tr th,
.woocommerce-orders-table table th,
.woocommerce-orders-table table thead th,
.woocommerce-orders-table table thead tr th,
.woocommerce-account table th,
.woocommerce-account table thead th,
.woocommerce-account table thead tr th {
    text-align: center !important;
    text-align-last: center !important;
    vertical-align: middle !important;
}

/* 确保所有表头内容居中 */
table th *,
table thead th *,
table thead tr th *,
.woocommerce-orders-table table th *,
.woocommerce-orders-table table thead th *,
.woocommerce-orders-table table thead tr th *,
.woocommerce-account table th *,
.woocommerce-account table thead th *,
.woocommerce-account table thead tr th * {
    text-align: center !important;
    margin: 0 auto !important;
}

/* ===== 最强力覆盖woocommerce.min.css的规则 ===== */
/* 直接覆盖woocommerce.min.css中的text-align: initial */
table.shop_table th,
table.shop_table thead th,
table.shop_table thead tr th,
.woocommerce-orders-table table.shop_table th,
.woocommerce-orders-table table.shop_table thead th,
.woocommerce-orders-table table.shop_table thead tr th,
.woocommerce-account table.shop_table th,
.woocommerce-account table.shop_table thead th,
.woocommerce-account table.shop_table thead tr th,
.woocommerce-account .woocommerce table.shop_table th,
.woocommerce-account .woocommerce table.shop_table thead th,
.woocommerce-account .woocommerce table.shop_table thead tr th {
    text-align: center !important;
    text-align-last: center !important;
    vertical-align: middle !important;
}

/* 确保表头内容居中 */
table.shop_table th *,
table.shop_table thead th *,
table.shop_table thead tr th *,
.woocommerce-orders-table table.shop_table th *,
.woocommerce-orders-table table.shop_table thead th *,
.woocommerce-orders-table table.shop_table thead tr th *,
.woocommerce-account table.shop_table th *,
.woocommerce-account table.shop_table thead th *,
.woocommerce-account table.shop_table thead tr th *,
.woocommerce-account .woocommerce table.shop_table th *,
.woocommerce-account .woocommerce table.shop_table thead th *,
.woocommerce-account .woocommerce table.shop_table thead tr th * {
    text-align: center !important;
    margin: 0 auto !important;
}

/* 终极解决方案：使用最高优先级选择器 */
html body .woocommerce-account .woocommerce .woocommerce-orders-table table.shop_table thead th,
html body .woocommerce-account .woocommerce .woocommerce-orders-table table.shop_table thead tr th,
html body .woocommerce-account .woocommerce .woocommerce-orders-table table.shop_table th,
html body .woocommerce-account .woocommerce table.shop_table thead th,
html body .woocommerce-account .woocommerce table.shop_table thead tr th,
html body .woocommerce-account .woocommerce table.shop_table th {
    text-align: center !important;
    text-align-last: center !important;
    vertical-align: middle !important;
}

/* 确保所有表头内容居中 */
html body .woocommerce-account .woocommerce .woocommerce-orders-table table.shop_table thead th *,
html body .woocommerce-account .woocommerce .woocommerce-orders-table table.shop_table thead tr th *,
html body .woocommerce-account .woocommerce .woocommerce-orders-table table.shop_table th * {
    text-align: center !important;
    margin: 0 auto !important;
}

/* ===== 终极解决方案：使用最高优先级和通配符选择器 ===== */
/* 覆盖所有可能的表头样式 */
*[class*="woocommerce-orders-table"] *[class*="header"] *,
*[class*="woocommerce-orders-table"] thead th *,
*[class*="woocommerce-orders-table"] thead tr th *,
*[class*="woocommerce-orders-table"] th *,
*[class*="orders-table"] *[class*="header"] *,
*[class*="orders-table"] thead th *,
*[class*="orders-table"] thead tr th *,
*[class*="orders-table"] th * {
    text-align: center !important;
    margin: 0 auto !important;
    display: inline-block !important;
}

/* 强制所有表头居中 */
*[class*="woocommerce-orders-table"] thead th,
*[class*="woocommerce-orders-table"] thead tr th,
*[class*="woocommerce-orders-table"] th,
*[class*="orders-table"] thead th,
*[class*="orders-table"] thead tr th,
*[class*="orders-table"] th {
    text-align: center !important;
    text-align-last: center !important;
    vertical-align: middle !important;
    justify-content: center !important;
    align-items: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* 强制 WooCommerce 订单表格表头居中（勿使用 [class*="header"]，会误伤 .ct-header 导航） */
.woocommerce-orders-table thead th,
.woocommerce-orders-table thead tr th,
.woocommerce-orders-table th,
.woocommerce-account table.shop_table thead th,
.woocommerce-account table.shop_table thead tr th,
.woocommerce-account table.shop_table th {
    text-align: center !important;
    text-align-last: center !important;
    vertical-align: middle !important;
}

.woocommerce-orders-table thead th *,
.woocommerce-orders-table thead tr th *,
.woocommerce-orders-table th *,
.woocommerce-account table.shop_table thead th *,
.woocommerce-account table.shop_table thead tr th *,
.woocommerce-account table.shop_table th * {
    text-align: center !important;
    margin: 0 auto !important;
}

/* ===== 终极解决方案：直接覆盖table.shop_table th ===== */
/* 这是从浏览器开发者工具中看到的关键规则 */
table.shop_table th,
table.shop_table thead th,
table.shop_table thead tr th {
    text-align: center !important;
    text-align-last: center !important;
    vertical-align: middle !important;
}

/* 确保表头内容居中 */
table.shop_table th *,
table.shop_table thead th *,
table.shop_table thead tr th * {
    text-align: center !important;
    margin: 0 auto !important;
    display: inline-block !important;
}

/* 使用最高优先级选择器覆盖所有可能的样式 */
html body table.shop_table th,
html body table.shop_table thead th,
html body table.shop_table thead tr th,
html body .woocommerce-orders-table table.shop_table th,
html body .woocommerce-orders-table table.shop_table thead th,
html body .woocommerce-orders-table table.shop_table thead tr th {
    text-align: center !important;
    text-align-last: center !important;
    vertical-align: middle !important;
}

/* 确保所有表头内容居中 */
html body table.shop_table th *,
html body table.shop_table thead th *,
html body table.shop_table thead tr th *,
html body .woocommerce-orders-table table.shop_table th *,
html body .woocommerce-orders-table table.shop_table thead th *,
html body .woocommerce-orders-table table.shop_table thead tr th * {
    text-align: center !important;
    margin: 0 auto !important;
    display: inline-block !important;
}

/* 终极解决方案：使用CSS变量和!important */
:root {
    --force-th-text-align: center !important;
}

table.shop_table th,
table.shop_table thead th,
table.shop_table thead tr th,
.woocommerce-orders-table table.shop_table th,
.woocommerce-orders-table table.shop_table thead th,
.woocommerce-orders-table table.shop_table thead tr th {
    text-align: var(--force-th-text-align) !important;
    text-align-last: var(--force-th-text-align) !important;
    vertical-align: middle !important;
}

/* ===== View-Order页面优化样式 ===== */
.custom-view-order {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: inherit;
}

.custom-view-order .order-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.custom-view-order .order-title {
    font-size: 2.5em;
    margin: 0 0 15px 0;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.custom-view-order .order-meta {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    font-size: 1.1em;
}

.custom-view-order .order-date,
.custom-view-order .order-status {
    background: rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.custom-view-order .status-completed {
    color: #4ade80;
    font-weight: 600;
}

.custom-view-order .status-processing {
    color: #fbbf24;
    font-weight: 600;
}

.custom-view-order .status-pending {
    color: #f87171;
    font-weight: 600;
}

.custom-view-order .order-content {
    display: grid;
    gap: 30px;
}

.custom-view-order .order-details-section,
.custom-view-order .order-summary-section,
.custom-view-order .order-notes-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border: 1px solid #f1f5f9;
}

.custom-view-order h3 {
    color: #1e293b;
    font-size: 1.5em;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 3px solid #e2e8f0;
    position: relative;
}

.custom-view-order h3::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

.custom-view-order .order-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.custom-view-order .order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.custom-view-order .order-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #cbd5e1;
}

.custom-view-order .item-info {
    flex: 1;
}

.custom-view-order .item-name {
    font-size: 1.2em;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.custom-view-order .item-name a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.custom-view-order .item-name a:hover {
    color: #764ba2;
}

.custom-view-order .item-meta {
    display: flex;
    gap: 20px;
    color: #64748b;
    font-size: 0.95em;
}

.custom-view-order .item-total {
    font-size: 1.3em;
    font-weight: 700;
    color: #059669;
    background: #ecfdf5;
    padding: 10px 20px;
    border-radius: 8px;
    border: 2px solid #a7f3d0;
}

.custom-view-order .order-totals {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.custom-view-order .total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #e2e8f0;
}

.custom-view-order .total-row:last-child {
    border-bottom: none;
}

.custom-view-order .total-row .label {
    font-size: 1.1em;
    color: #475569;
    font-weight: 500;
}

.custom-view-order .total-row .value {
    font-size: 1.1em;
    color: #1e293b;
    font-weight: 600;
}

.custom-view-order .total-final {
    border-top: 2px solid #cbd5e1;
    padding-top: 20px;
    margin-top: 10px;
}

.custom-view-order .total-final .label {
    font-size: 1.3em;
    font-weight: 700;
    color: #1e293b;
}

.custom-view-order .total-final .value {
    font-size: 1.5em;
    font-weight: 800;
    color: #059669;
}

.custom-view-order .customer-note {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 20px;
    color: #92400e;
    font-style: italic;
    line-height: 1.6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .custom-view-order {
        padding: 15px;
    }
    
    .custom-view-order .order-header {
        padding: 20px;
        text-align: center;
    }
    
    .custom-view-order .order-title {
        font-size: 2em;
    }
    
    .custom-view-order .order-meta {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .custom-view-order .order-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .custom-view-order .item-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .custom-view-order .item-total {
        align-self: stretch;
        text-align: center;
    }
}

/* ===== 卡密信息页面样式修改 ===== */
/* 再次购买按钮字体颜色改为白色 */
.order-again-button {
    color: white !important;
}

/* 确保按钮文字在悬停时也保持白色 */
.order-again-button:hover {
    color: white !important;
}

/* 重要提示和再次购买按钮之间的间距 */
.card-secrets-notice {
    margin-bottom: 30px !important;
}

/* 产品名称字体小两个号 */
.card-secret-product-group h3 {
    font-size: 0.9em !important;
}

/* ===== 简单的Orders页面样式 ===== */
.woocommerce-orders-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.woocommerce-orders-table th,
.woocommerce-orders-table td {
    padding: 12px;
    text-align: center;
    border: 1px solid #ddd;
    vertical-align: middle;
}

.woocommerce-orders-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.woocommerce-orders-table .woocommerce-button.button.view {
    background-color: var(--theme-palette-color-1, #405BFF);
    color: #ffffff;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    border: none;
}

.woocommerce-orders-table .woocommerce-button.button.view:hover {
    background-color: var(--theme-palette-color-2, #3651DF);
}

/* ===== 简单的View-Order页面样式 ===== */
.woocommerce-order-details {
    margin-bottom: 30px;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    box-sizing: border-box !important;
}

.woocommerce-order-details table {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    border-collapse: collapse;
    table-layout: fixed !important;
}

.woocommerce-order-details th,
.woocommerce-order-details td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.woocommerce-order-details th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.woocommerce-order-card-secrets {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* 确保订单详情和卡密信息宽度一致 */
.woocommerce-order,
.woocommerce-order > * {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* 强制订单详情表格列宽度 */
.woocommerce-order-details table th,
.woocommerce-order-details table td {
    width: auto !important;
    min-width: 0 !important;
}

/* 订单详情表格列宽优化 */
.woocommerce-table--order-details {
    table-layout: fixed !important;
    width: 100% !important;
}

.woocommerce-table--order-details .woocommerce-table__product-name {
    width: 70% !important;
    max-width: 70% !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

.woocommerce-table--order-details .woocommerce-table__product-total {
    width: 30% !important;
    max-width: 30% !important;
    text-align: right !important;
}

/* 确保表格内容正确显示 */
.woocommerce-table--order-details th,
.woocommerce-table--order-details td {
    padding: 12px !important;
    vertical-align: top !important;
    border: 1px solid #ddd !important;
}

/* 产品名称列的内容处理 */
.woocommerce-table--order-details .product-name a {
    word-break: break-word !important;
    display: inline-block !important;
    max-width: 100% !important;
}

.woocommerce-table--order-details .product-quantity {
    display: block !important;
    margin-top: 5px !important;
    color: #666 !important;
}

/* ===== WooCommerce order width fix ===== */
/* Keep the old width fix scoped to order output. Global Elementor width
   overrides break Web Agency style sections and Pro container layouts. */
.woocommerce-order,
.woocommerce-order > *,
.woocommerce-order-details,
.woocommerce-order-details > *,
.woocommerce-order .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* 确保卡密信息区域和订单详情区域宽度一致 */
.woocommerce-order-card-secrets,
.woocommerce-order-details {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Blog single: in-column header + sticky sidebar layout */
body.single-post {
    --sidebar-offset: 24px;
}

body.single-post .hero-section,
body.blog .hero-section {
    display: none !important;
}

body.single-post [data-sidebar="right"],
body.single-post [data-sidebar="left"] {
    align-items: start;
}

@media (min-width: 1000px) {
    body.single-post aside.money-sidebar,
    body.single-post .ct-sidebar {
        position: sticky;
        top: calc(var(--sidebar-offset, 24px) + var(--admin-bar, 0px) + var(--theme-frame-size, 0px) + var(--header-sticky-height, 0px) * (var(--sticky-shrink, 100) / 100));
        align-self: start;
    }
}

body.single-post .mmh-post-header {
    max-width: 850px;
    width: 100%;
    margin: 0 0 24px;
    padding-top: 4px;
    text-align: left;
}

body.single-post .mmh-post-header .mmh-post-title {
    --theme-font-size: 26px;
    line-height: 1.42;
    margin: 0 0 18px;
    color: var(--theme-palette-color-4, #111827);
    text-wrap: pretty;
}

body.single-post .mmh-post-header .mmh-hero-intro {
    margin: 0 0 20px;
    width: 100%;
}

body.single-post .mmh-post-header .mmh-hero-intro .mmh-intro {
    display: flex;
    align-items: flex-start;
    background: #ffffff;
    border: 1px solid rgba(225, 1, 6, 0.12);
    border-left: 4px solid var(--theme-palette-color-1, #e10106);
    border-radius: 10px;
    padding: 16px 18px;
    margin: 0;
    box-shadow: 0 2px 8px rgba(24, 32, 48, 0.04);
}

body.single-post .mmh-post-header .mmh-hero-intro .mmh-intro-icon {
    font-size: 1.25rem;
    margin-right: 12px;
    line-height: 1.3;
    flex-shrink: 0;
}

body.single-post .mmh-post-header .mmh-hero-intro .mmh-intro-text {
    color: var(--theme-palette-color-3, #374151);
    font-size: 0.98rem;
    line-height: 1.68;
}

body.single-post .mmh-post-header .mmh-post-byline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    color: #6b7280;
    margin: 0;
    padding: 0;
}

body.single-post .mmh-post-header .mmh-post-author-link {
    color: #374151;
    font-weight: 600;
    text-decoration: none;
}

body.single-post .mmh-post-header .mmh-post-author-link:hover {
    color: var(--theme-palette-color-1, #e10106);
}

body.single-post .mmh-post-header .mmh-post-byline-sep {
    color: #9ca3af;
}

body.single-post .mmh-post-header .mmh-post-date {
    color: #6b7280;
    font-weight: 600;
}

body.single-post article .ct-featured-image {
    max-width: 850px;
    width: 100%;
    margin: 0 0 24px;
}

body.single-post article .ct-featured-image .ct-media-container,
body.single-post article .ct-featured-image img {
    width: 100%;
    max-width: 100%;
}

body.single-post .entry-content .mmh-prose {
    line-height: 1.72;
    max-width: 850px !important;
    width: 100%;
    margin-left: 0 !important;
    margin-right: auto !important;
}

body.single-post .entry-content .mmh-prose > div:first-child {
    max-width: 100%;
    margin-bottom: 2em;
}

body.single-post .entry-content .mmh-prose iframe[src*="youtube.com"],
body.single-post .entry-content .mmh-prose iframe[src*="youtu.be"] {
    border-radius: 12px;
}

@media (max-width: 689.98px) {
    body.single-post .mmh-post-header {
        margin-bottom: 18px;
        padding-left: 2px;
        padding-right: 2px;
    }

    body.single-post .mmh-post-header .mmh-post-title {
        --theme-font-size: 22px;
        line-height: 1.38;
        margin-bottom: 14px;
    }

    body.single-post .mmh-post-header .mmh-hero-intro .mmh-intro {
        padding: 14px 16px;
    }

    body.single-post .entry-content .mmh-prose iframe[src*="youtube.com"],
    body.single-post .entry-content .mmh-prose iframe[src*="youtu.be"],
    body.single-post .entry-content iframe[src*="youtube.com"],
    body.single-post .entry-content iframe[src*="youtu.be"] {
        width: 100% !important;
        max-width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
}

body.single-post .entry-content .mmh-prose > h1:first-of-type,
body.single-post .entry-content .mmh-intro {
    display: none !important;
}

body.single-post .entry-content .mmh-prose p {
    margin-block: 0 1.1em;
}

body.single-post .entry-content .mmh-prose li {
    margin-bottom: 0.45em;
    line-height: 1.72;
}

body.single-post .entry-content .mmh-prose .mmh-alert-content,
body.single-post .entry-content .mmh-prose .mmh-intro-text {
    line-height: 1.72;
}
