/* 自定义按钮样式 - 优化购物车和结算页面按钮 */

/* 主要按钮样式 */
.btn-custom-primary {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    position: relative;
    overflow: hidden;
    min-width: 140px;
}

.btn-custom-primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
    color: #ffffff;
    text-decoration: none;
}

.btn-custom-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 123, 255, 0.3);
}

/* 次要按钮样式 */
.btn-custom-secondary {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
    position: relative;
    overflow: hidden;
    min-width: 140px;
}

.btn-custom-secondary:hover {
    background: linear-gradient(135deg, #495057 0%, #343a40 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
    color: #ffffff;
    text-decoration: none;
}

.btn-custom-secondary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(108, 117, 125, 0.3);
}

/* 成功按钮样式 */
.btn-custom-success {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    position: relative;
    overflow: hidden;
    min-width: 140px;
}

.btn-custom-success:hover {
    background: linear-gradient(135deg, #1e7e34 0%, #155724 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    color: #ffffff;
    text-decoration: none;
}

.btn-custom-success:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(40, 167, 69, 0.3);
}

/* 危险按钮样式 */
.btn-custom-danger {
    display: inline-block;
    padding: 12px 25px;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(220, 53, 69, 0.3);
    position: relative;
    overflow: hidden;
    min-width: 100px;
}

.btn-custom-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
    color: #ffffff;
    text-decoration: none;
}

.btn-custom-danger:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

/* 轮廓按钮样式 */
.btn-custom-outline {
    display: inline-block;
    padding: 15px 30px;
    background: transparent;
    color: #007bff;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: 2px solid #007bff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 140px;
}

.btn-custom-outline:hover {
    background: #007bff;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
    text-decoration: none;
}

.btn-custom-outline:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 123, 255, 0.2);
}

/* 大尺寸按钮 */
.btn-custom-lg {
    padding: 18px 40px;
    font-size: 18px;
    min-width: 180px;
}

/* 小尺寸按钮 */
.btn-custom-sm {
    padding: 10px 20px;
    font-size: 14px;
    min-width: 100px;
}

/* 全宽按钮 */
.btn-custom-block {
    display: block;
    width: 100%;
}

/* 按钮组样式 */
.btn-group-custom {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-group-custom .btn-custom-primary,
.btn-group-custom .btn-custom-secondary,
.btn-group-custom .btn-custom-success,
.btn-group-custom .btn-custom-outline {
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .btn-group-custom {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-group-custom .btn-custom-primary,
    .btn-group-custom .btn-custom-secondary,
    .btn-group-custom .btn-custom-success,
    .btn-group-custom .btn-custom-outline {
        width: 100%;
        text-align: center;
    }
}

/* 加载状态按钮 */
.btn-custom-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-custom-loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: btn-loading-spin 1s ease infinite;
}

@keyframes btn-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

/* 禁用状态 */
.btn-custom-primary:disabled,
.btn-custom-secondary:disabled,
.btn-custom-success:disabled,
.btn-custom-outline:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* 图标按钮 */
.btn-custom-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-custom-icon i {
    font-size: 16px;
}

/* 购物车特定按钮样式 */
.cart-btn-update {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

.cart-btn-update:hover {
    background: linear-gradient(135deg, #138496 0%, #117a8b 100%);
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.4);
}

/* 结算页面特定样式 */
.checkout-btn-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.checkout-btn-group .btn-custom-secondary {
    order: 1;
}

.checkout-btn-group .btn-custom-success {
    order: 2;
}

/* 动画效果 */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    }
}

.btn-custom-pulse {
    animation: pulse 2s infinite;
}

/* 购物车删除按钮样式 */
.remove-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
    text-decoration: none;
}

.remove-btn:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
    color: #ffffff;
    text-decoration: none;
}

.remove-btn:active {
    transform: scale(0.95);
}

.remove-btn .fas {
    font-size: 14px;
}

/* 购物车数量输入框样式 */
.cart-table .qty input[type="number"] {
    width: 80px;
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cart-table .qty input[type="number"]:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    outline: none;
}

/* 购物车表格优化 */
.cart-table {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.cart-table thead th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #495057;
    font-weight: 600;
    padding: 20px 15px;
    border: none;
    text-align: center;
}

.cart-table tbody td {
    padding: 20px 15px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
    text-align: center;
}

.cart-table tbody tr:last-child td {
    border-bottom: none;
}

.cart-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* 商品信息列样式 */
.cart-table .prod-column {
    text-align: left !important;
}

.cart-table .column-box {
    display: flex !important;
    align-items: center;
    gap: 15px;
    position: relative;
    min-height: 80px;
}

.cart-table .prod-thumb {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative !important;
    left: auto !important;
    top: auto !important;
}

.cart-table .prod-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: center;
    border-radius: 8px;
}

.cart-table .column-box h4 {
    margin: 0 !important;
    margin-top: 0 !important;
    font-size: 16px;
    font-weight: 600;
    color: #212529;
    line-height: 1.4;
    position: relative !important;
}

/* 价格显示样式 */
.cart-table .sub-total,
.cart-table .total-price {
    font-size: 18px;
    font-weight: 700;
    color: #007bff;
}

/* 优惠券输入框样式 */
.apply-coupon input[type="text"] {
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 15px;
}

.apply-coupon input[type="text"]:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    outline: none;
}

/* 购物车标题样式优化 */
.cart-title {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.cart-title .text p {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #495057;
}

.cart-title .text span {
    color: #007bff;
    font-weight: 700;
}
/* 结算页面样式优化 */
.checkout-page-section .order-summary {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
    position: sticky;
    top: 20px;
}

.checkout-page-section .order-summary h3 {
    color: #212529;
    font-weight: 700;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.checkout-page-section .inner-box .single-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #f1f3f4;
}

.checkout-page-section .inner-box .single-item:last-child {
    border-bottom: none;
}

.checkout-page-section .inner-box .single-item .count {
    background: #007bff;
    color: #ffffff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.checkout-page-section .inner-box .single-item p {
    flex: 1;
    margin: 0 15px;
    font-size: 14px;
    color: #495057;
    line-height: 1.4;
}

.checkout-page-section .inner-box .single-item h6 {
    font-size: 16px;
    font-weight: 700;
    color: #007bff;
    margin: 0;
}

.checkout-page-section .total-box {
    list-style: none;
    padding: 0;
    margin: 25px 0;
}

.checkout-page-section .total-box li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 16px;
    color: #495057;
    border-bottom: 1px solid #f1f3f4;
}

.checkout-page-section .total-box li:last-child {
    border-bottom: none;
}

.checkout-page-section .total-box li span {
    font-weight: 600;
    color: #212529;
}

.checkout-page-section .tax-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 8px;
    margin: 25px 0;
}

.checkout-page-section .tax-box h5 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #212529;
}

.checkout-page-section .tax-box h5 span {
    color: #007bff;
    font-size: 24px;
}

/* 表单样式优化 */
.checkout-page-section .information-inner h3 {
    color: #212529;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #007bff;
    position: relative;
}

.checkout-page-section .information-inner h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: #007bff;
}

.checkout-page-section .field-input {
    margin-bottom: 20px;
}

.checkout-page-section .field-input input,
.checkout-page-section .field-input select,
.checkout-page-section .field-input textarea {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.checkout-page-section .field-input input:focus,
.checkout-page-section .field-input select:focus,
.checkout-page-section .field-input textarea:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    outline: none;
}

.checkout-page-section .field-input input:invalid {
    border-color: #dc3545;
}

.checkout-page-section .field-input input:valid {
    border-color: #28a745;
}

/* 响应式优化 */
@media (max-width: 991px) {
    .checkout-page-section .order-summary {
        position: static;
        margin-top: 40px;
    }
    
    .checkout-btn-group {
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .cart-table .column-box {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .cart-table .prod-thumb {
        width: 60px !important;
        height: 60px !important;
        position: relative !important;
        left: auto !important;
        top: auto !important;
    }
    
    .cart-table .prod-thumb img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover;
        object-position: center;
    }
    
    .cart-table .column-box h4 {
        font-size: 14px;
        margin: 0 !important;
        margin-top: 0 !important;
        position: relative !important;
    }
    
    .cart-title {
        padding: 15px 20px;
    }
    
    .cart-title .text {
        text-align: center;
        margin-bottom: 10px;
    }
    
    .checkout-page-section .order-summary {
        padding: 20px;
    }
}
/* 系统字体定义 - 使用最常见的系统字体 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
}

h1, h2, h3, h4, h5, h6 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
    font-weight: 600;
}

/* 中文优化字体 */
.chinese-text, 
[lang="zh"], 
[lang="zh-CN"] {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', 'Source Han Sans SC', 'Noto Sans CJK SC', 'WenQuanYi Micro Hei', sans-serif;
}

/* 英文优化字体 */
.english-text,
[lang="en"] {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, 'Roboto', sans-serif;
}

/* 等宽字体 */
code, pre, .monospace {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

/* 确保按钮文字显示正常 */
.btn-custom-primary,
.btn-custom-secondary,
.btn-custom-success,
.btn-custom-danger,
.btn-custom-outline {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 600;
}

/* 修复主题按钮样式 */
.theme_btn_1.paanee_btn {
    background-color: #0077C0 !important;
    color: #ffffff !important;
    display: inline-block;
    padding: 17px 33px;
    font-size: 18px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    text-transform: capitalize;
    border: none;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.theme_btn_1.paanee_btn:hover {
    background-color: #005a94 !important;
    color: #ffffff !important;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 119, 192, 0.3);
}

.theme_btn_1.paanee_btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.5s ease;
}

.theme_btn_1.paanee_btn:hover:before {
    left: 100%;
}

/* CSS变量回退 */
:root {
    --theme_primary: #0077C0;
    --theme_dark: #0F141E;
}

/* 确保所有使用主题色的元素都有回退 */
a:hover, a {
    color: #0077C0;
}

/* 字体加载优化 - 移除外部字体依赖 */
/* 使用系统字体，无需加载检测 */

/* 字体回退处理 */
.font-fallback {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

/* 中文字体优化 */
.chinese-text {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', 'Source Han Sans SC', 'Noto Sans CJK SC', sans-serif;
}

/* 英文字体优化 */
.english-text {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, 'Roboto', sans-serif;
}
/* 覆盖原有的字体定义，统一使用系统字体 - 但排除图标字体 */

/* 覆盖 assets/css/style.css 中的字体定义 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif !important;
}

/* 覆盖标题字体 */
h1, h2, h3, h4, h5, h6,
.ff_jost,
.ff_rubik {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif !important;
}

/* 覆盖大部分元素的字体，但排除图标字体 */
body, p, div, span, a, button, input, select, textarea, 
h1, h2, h3, h4, h5, h6, li, td, th, label {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

/* 确保 Font Awesome 图标字体不被覆盖 */
.fa, .fas, .far, .fab, .fal, .fad, .fass, .fasr, .fasl,
[class^="fa-"], [class*=" fa-"],
i[class^="fa"], i[class*=" fa"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "Font Awesome 6 Pro" !important;
}

/* 特殊元素的字体覆盖 */
.theme_btn_1,
.theme_btn_2,
.paanee_btn,
button,
input,
select,
textarea {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif !important;
}

/* 导航菜单字体 */
.main-menu .navigation,
.main-menu .navigation li a {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif !important;
}

/* 表单元素字体 */
.field-input input,
.field-input select,
.field-input textarea {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif !important;
}

/* 购物车表格字体 */
.cart-table,
.cart-table th,
.cart-table td {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif !important;
}

/* 页面标题和内容字体 */
.page-title h1,
.content-box,
.inner-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif !important;
}

/* 确保中文显示良好 */
html[lang="zh"],
html[lang="zh-CN"],
body[lang="zh"],
body[lang="zh-CN"] {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', 'Source Han Sans SC', sans-serif !important;
}

/* Windows 系统优化 */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
    body, * {
        font-family: 'Segoe UI', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif !important;
    }
}

/* macOS 系统优化 */
@supports (-webkit-appearance: none) {
    body, * {
        font-family: -apple-system, 'PingFang SC', 'Hiragino Sans GB', Arial, sans-serif !important;
    }
}

/* 字体渲染优化 */
body, * {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* 字体大小和行高优化 */
body {
    font-size: 16px;
    line-height: 1.6;
}

h1 { font-size: 2.5rem; font-weight: 700; }
h2 { font-size: 2rem; font-weight: 600; }
h3 { font-size: 1.75rem; font-weight: 600; }
h4 { font-size: 1.5rem; font-weight: 600; }
h5 { font-size: 1.25rem; font-weight: 600; }
h6 { font-size: 1rem; font-weight: 600; }

/* 按钮字体权重优化 */
button, .btn, [class*="btn-"], [class*="theme_btn"] {
    font-weight: 600;
    letter-spacing: 0.025em;
}