.cart-sidebar-wrapper {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 999998;
    visibility: hidden;
    width: 100%;
}

.cart-sidebar-wrapper.active {
    visibility: visible;
}

.cart-sidebar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cart-sidebar-wrapper.active .cart-sidebar-overlay {
    opacity: 1;
}

.cart-sidebar {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    width: 780px;
    max-width: 95vw;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    background: #fff;
}

.cart-sidebar-wrapper.active .cart-sidebar {
    transform: translateX(0);
}

/* 标题栏样式 */
.cart-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.cart-sidebar-title {
    font-size: 16px;
    font-weight: 500;
}

.item-count {
    color: #666;
    font-weight: normal;
}

/* 关闭按钮样式 */
.cart-sidebar-close {
    font-size: 20px !important;
    color: #666 !important;
    border: none !important;
    background: none !important;
    padding: 5px !important;
    cursor: pointer !important;
    width: 30px !important;
    height: 30px !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    min-width: unset !important;
    min-height: unset !important;
    box-shadow: none !important;
    outline: none !important;
}

.cart-sidebar-close:hover {
    color: #ee4d2d !important;
    background: transparent !important;
}

/* 确保关闭按钮的 × 符号大小正确 */
.cart-sidebar-close::before {
    content: "×" !important;
    font-size: 24px !important;
    line-height: 1 !important;
    font-weight: normal !important;
    font-family: Arial, sans-serif !important;
}

/* 内容区域布局 */
.cart-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* 商品项样式 */
.mini-cart-item {
    display: flex;
    gap: 12px;
    padding: 15px;
    border-bottom: 1px solid #eee;
    position: relative;
    width: 100%; /* 确保宽度占满 */
    box-sizing: border-box; /* 包含内边距 */
}

/* 删除按钮样式 */
.mini-cart-remove {
    position: absolute !important;
    right: 10px !important;
    top: 10px !important;
    width: 24px !important;  /* 增大基础尺寸 */
    height: 24px !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer !important;
    z-index: 2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #999 !important;
}

/* 垃圾桶图标 */
.mini-cart-remove::before {
    content: "\f182" !important;
    font-family: dashicons !important;
    font-size: 20px !important;  /* 增大图标尺寸 */
    color: #999 !important;
    display: block !important;
    line-height: 1 !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* 悬停效果 */
.mini-cart-remove:hover::before {
    color: #ee4d2d !important;
}

/* 移动端特别处理 */
@media (max-width: 767px) {
    .mini-cart-remove {
        right: 5px !important;
        top: 5px !important;
        width: 30px !important;  /* 移动端更大的点击区域 */
        height: 30px !important;
    }

    .mini-cart-remove::before {
        font-size: 22px !important;  /* 移动端更大的图标 */
    }
}

/* 商品图片样式 */
.mini-cart-image {
    width: 70px;
    flex-shrink: 0;
}

.mini-cart-image img {
    width: 100%;
    height: auto;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 4px;
    background: #fff;
}

/* 商品信息区域 */
.mini-cart-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    line-height: 1.2;
    width: 100%; /* 确保宽度占满 */
}

.mini-cart-title {
    font-size: 14px;
    color: #333;
    margin-bottom: 2px;
    padding-right: 25px;
    line-height: 1.2;
}

/* 发货信息 */
.shipping-info {
    font-size: 12px;
    color: #666;
    margin: 2px 0;
    line-height: 1.2;
}

.txt_txt-accent {
    color: #ee4d2d;
    font-weight: 500;
}

/* 底部控制区 */
.mini-cart-controls {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
}

.mini-cart-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 数量控制器 */
.mini-cart-quantity {
    min-width: 95px;
}

.mini-cart-quantity .quantity {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.mini-cart-quantity .quantity .qty {
    width: 50px;
    height: 32px;
    padding: 0 8px;
    text-align: center;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 2px;
    -moz-appearance: textfield;
    margin: 0;
    background: #fff;
}

.mini-cart-quantity .quantity .plus,
.mini-cart-quantity .quantity .minus {
    position: relative;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #ddd;
    background: #fff;
    color: #ee4d2d;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s ease;
}

.mini-cart-quantity .quantity .minus {
    border-radius: 2px 0 0 2px;
    border-right: none;
}

.mini-cart-quantity .quantity .plus {
    border-radius: 0 2px 2px 0;
    border-left: none;
}

.mini-cart-quantity .quantity .qty {
    border-radius: 0;
}

.mini-cart-quantity .quantity .plus:hover,
.mini-cart-quantity .quantity .minus:hover {
    background-color: #fff5f4;
}

/* 隐藏输入框的上下箭头 */
.mini-cart-quantity .quantity .qty::-webkit-inner-spin-button,
.mini-cart-quantity .quantity .qty::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* 价格区域样式 */
.mini-cart-price-area {
    flex: 0 0 auto; /* 不伸缩，保持自身大小 */
    min-width: 120px;
    text-align: right;
}

.mini-cart-price-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.mini-cart-price-row {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-bottom: 2px;
}

.mini-cart-original-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    order: -1; /* 将原价放在左边 */
}

.mini-cart-final-price {
    font-size: 16px;
    font-weight: 600;
    color: #ff4b33;
}

.mini-cart-save-info {
    font-size: 12px;
    color: #ee4d2d;
    margin-bottom: 2px;
}

/* 批量购买提示 */
.mini-cart-bulk-hint {
    background-color: #fff9e6; /* 浅黄色背景 */
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 11px;
    color: #666;
    margin-top: 4px;
    line-height: 1.3;
}

.mini-cart-bulk-hint:before {
    content: '▶';
    color: #ff4b33;
    font-size: 10px;
}

.mini-cart-bulk-hint .bulk-price,
.mini-cart-bulk-hint .bulk-discount {
    color: #ff4b33;
    font-weight: 500;
}

/* 折扣信息 */
.discount-info {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.discount-value {
    color: #ee4d2d;
}

.shipping-progress {
    background: #fff;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.progress-bar {
    height: 4px;
    background: #eee;
    border-radius: 2px;
    position: relative;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: #ff4b33;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.truck-icon {
    position: absolute;
    right: -10px;
    top: -14px;
    font-size: 20px;
}

.shipping-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.free-shipping {
    color: #666;
}

.remaining-amount {
    color: #ff4b33;
    font-weight: 500;
}

.free-shipping-achieved {
    color: #ff4b33;
    font-weight: 500;
}

/* 推荐商品区域样式 */
.cart-recommendations {
    padding: 12px 15px;
    border-top: 1px solid #eee;
}

.recommendations-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 0 20px;
    box-sizing: border-box;
}

.nav-button {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 30px !important; /* 从20px增加到30px */
    height: 30px !important; /* 从20px增加到30px */
    min-width: 30px !important;
    min-height: 30px !important;
    border: none !important;
    background: #f5f5f5 !important;
    color: #666 !important;
    cursor: pointer !important;
    font-size: 21px !important; /* 从14px增加到21px */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 1 !important;
    padding: 0 !important;
    border-radius: 50% !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

.nav-button:hover {
    background: #eee !important;
    color: #333 !important;
    border: none !important;
}

.nav-button.prev {
    left: 0;
}

.nav-button.next {
    right: 0;
}

.nav-button.prev::before {
    content: "‹";
    display: block;
    font-family: Arial, sans-serif;
}

.nav-button.next::before {
    content: "›";
    display: block;
    font-family: Arial, sans-serif;
}

.recommendations-slider {
    display: flex;
    width: 100%;
    transform: translateX(0);
    transition: transform 0.3s ease;
}

.recommendation-item {
    flex: 0 0 50%;
    width: 50%;
    display: flex;
    padding: 6px;
    box-sizing: border-box;
}

/* 推荐产品图片样式 */
.recommendation-image {
    width: 60px;
    height: auto !important; /* 让高度自适应 */
    flex-shrink: 0;
}

.recommendation-image img {
    width: 100%;
    height: auto !important; /* 让图片保持原始比例 */
    object-fit: contain !important; /* 确保图片完整显示 */
    border-radius: 4px;
}

.recommendation-details {
    flex: 1;
    min-width: 0;
    padding-left: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.recommendation-title {
    font-size: 13px;
    line-height: 1.3;
    color: #333;
    text-decoration: none;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.recommendation-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
    padding-right: 2px;
}

.recommendation-price {
    font-size: 13px;
    font-weight: 500;
    color: #ee4d2d;
}

.add-to-cart-button,
.select-options-button {
    width: 45px !important;
    height: 20px !important;
    min-height: 20px !important;
    padding: 0 !important;
    font-size: 10px !important;
    background: #ee4d2d !important;
    color: #fff !important;
    border: none !important;
    border-radius: 3px !important;
    cursor: pointer !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    margin: 0 !important;
    outline: none !important;
    box-shadow: 0 1px 2px rgba(238, 77, 45, 0.2) !important;
    font-weight: normal !important;
    white-space: nowrap !important;
    text-transform: none !important;
}

/* Select Options 按钮特殊处理 */
.select-options-button {
    width: 55px !important;
    font-size: 9px !important;
    letter-spacing: -0.2px !important;
}

/* 悬停效果 */
.add-to-cart-button:hover,
.select-options-button:hover {
    background: #ff6347 !important;
    color: #fff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 4px rgba(238, 77, 45, 0.3) !important;
}

/* 点击效果 */
.add-to-cart-button:active,
.select-options-button:active {
    transform: translateY(0) !important;
    box-shadow: 0 1px 2px rgba(238, 77, 45, 0.2) !important;
}

/* 加载状态 */
.add-to-cart-button.loading,
.select-options-button.loading {
    opacity: 0.7 !important;
    cursor: wait !important;
}

/* 底部结算区域 */
.cart-sidebar-footer {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2px 15px 15px 15px;
    border-top: 1px solid #eee;
    background: #fff;
    z-index: 1;
    width: 100%; /* 确保宽度占满 */
    box-sizing: border-box; /* 包含内边距 */
}

.cart-sidebar-footer .subtotal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-top: 1px solid #eee;
}

.cart-sidebar-footer .subtotal-label {
    font-size: 16px;
    font-weight: 500;
}

.cart-sidebar-footer .amount {
    font-size: 18px;
    font-weight: 600;
    color: #ff4b33;
}

/* 小计价格样式 */
.subtotal-row .amount del {
    font-size: 0.9em;
    color: #999;
    text-decoration: line-through;
    margin-right: 5px;
    font-weight: normal;  /* 原价不加粗 */
}

.subtotal-row .amount ins {
    text-decoration: none;
    color: #ee4d2d;
    font-weight: 600;  /* 折扣价加粗 */
    font-size: 1em;    /* 保持原始大小 */
}

/* 当没有折扣时的价格样式 */
.subtotal-row .amount > .amount {
    color: #ee4d2d;
    font-weight: 600;  /* 单个价格时也加粗 */
}

.cart-sidebar-footer .checkout-button {
    display: block;
    width: 100%; /* 满宽 */
    padding: 12px;
    background: #ff4b33;
    color: #fff !important; /* 白色文字 */
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-decoration: none;
}

.cart-sidebar-footer .checkout-button:hover {
    background: #ff3618; /* 稍深的橙色 */
}

/* 移动端样式调整 */
@media (max-width: 768px) {
    /* 侧边栏容器样式 */
    .cart-sidebar-wrapper {
        width: 100%;
        height: 100%;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }

    .cart-sidebar-overlay {
        width: 100%;
        height: 100%;
    }

    .cart-sidebar {
        width: 100% !important; /* 强制宽度100% */
        height: 100%;
        max-width: 100% !important; /* 强制最大宽度100% */
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: auto; /* 确保从右边开始 */
        transform: translateX(100%);
    }

    /* 隐藏推荐产品列 */
    .cart-recommendations-column {
        display: none;
    }

    /* 购物车内容列占满宽度 */
    .cart-content-column {
        width: 100% !important; /* 强制宽度100% */
        height: 100%;
        display: flex;
        flex-direction: column;
        flex: 1;
    }

    /* 调整购物车内容区域的滚动 */
    .cart-sidebar-content {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }

    /* 调整头部样式 */
    .cart-sidebar-header {
        position: sticky;
        top: 0;
        background: #fff;
        z-index: 999;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        width: 100%;
    }

    /* 调整底部样式 */
    .cart-sidebar-footer {
        position: sticky;
        bottom: 0;
        background: #fff;
        box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
        padding: 10px;
        width: 100%;
    }

    /* 确保内容区域正确显示 */
    .cart-sidebar-items {
        width: 100%;
    }

    /* 确保每个商品项正确显示 */
    .mini-cart-item {
        width: 100%;
        box-sizing: border-box;
    }

    .cart-recommendations {
        padding: 15px;
    }

    .cart-recommendations h3 {
        font-size: 14px;
        margin-bottom: 10px;
        position: sticky;    /* 标题也固定 */
        top: 0;
        background: #fff;
        z-index: 2;
    }

    .recommendation-item {
        width: 100px;
        flex-shrink: 0;    /* 防止项目被压缩 */
    }

    .recommendation-item img {
        height: 100px;
    }

    .recommendation-title {
        font-size: 12px;
        margin-bottom: 2px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .recommendation-price {
        font-size: 12px;
        margin-bottom: 4px;
    }
}

/* 购物车侧边栏MOQ警告样式 */
.cart-sidebar-moq-warning {
    margin: 8px 0;
    padding: 8px 12px;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.2);
}

.cart-sidebar-moq-warning .warning-icon {
    margin-right: 6px;
}

.cart-sidebar-moq-warning .warning-message {
    font-weight: 600;
}

.mini-cart-item.has-moq-warning {
    background: rgba(255, 243, 205, 0.1);
    border-radius: 8px;
}

.mini-cart-item.has-moq-warning .quantity input {
    border-color: #ffc107;
    box-shadow: 0 0 0 1px rgba(255, 193, 7, 0.2);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .cart-sidebar-moq-warning {
        font-size: 11px;
        padding: 6px 10px;
        margin: 6px 0;
    }
}

/* 批量折扣表格样式 */
.bulk-discount-wrapper {
    margin: 10px 0;
    font-size: 14px;
}

.bulk-discount-price-display {
    margin-bottom: 8px;
}

.bulk-discount-price-display .regular-price {
    color: #999;
    text-decoration: line-through;
    margin-right: 8px;
}

.bulk-discount-price-display .sale-price {
    color: #ee4d2d;
    text-decoration: none;
    font-weight: 500;
}

.bulk-discount-table {
    width: 100%;
    border-spacing: 0;
}

.bulk-discount-table .bulk-rule {
    padding: 4px 0;
}

.bulk-discount-table .bulk-rule.active {
    background: #fff5f4;
    color: #ee4d2d;
}

.bulk-discount-table .quantity-mark {
    font-weight: 500;
}

.bulk-discount-table .price-amount {
    font-weight: 500;
    color: #ee4d2d;
}

.bulk-discount-table .save-text {
    color: #ee4d2d;
}

/* 当侧边栏打开时禁止页面滚动 */
body.cart-sidebar-open {
    overflow: hidden;
}

/* 商品链接样式 */
.mini-cart-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.mini-cart-title a:hover {
    color: #ee4d2d;
}

/* 推荐产品链接样式 */
.recommendation-title {
    margin-bottom: 8px;
}

.recommendation-title a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.recommendation-title a:hover {
    color: #ee4d2d;
}

.recommendation-image {
    display: block;
    margin-bottom: 10px;
}

.select-options-button {
    display: inline-block;
    padding: 6px 12px;
    background: #ee4d2d;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.select-options-button:hover {
    background: #d73211;
    color: #fff;
    text-decoration: none;
}

/* 移动端适配 */
@media (max-width: 767px) {
    .mini-cart-price-area {
        min-width: 140px;
    }

    .mini-cart-bulk-hint {
        padding: 3px 6px;
        font-size: 10px;
    }

    .mini-cart-details {
        gap: 8px;
    }

    .cart-recommendations {
        padding: 10px;
    }
    
    .recommendation-item {
        padding: 4px;
    }

    .recommendation-image {
        width: 50px;
        height: auto !important;
    }

    .recommendation-details {
        padding-left: 8px;
    }

    .recommendation-title {
        font-size: 12px;
        line-height: 1.2;
        margin-bottom: 4px;
        -webkit-line-clamp: 2;
        overflow: hidden;
        display: -webkit-box;
        -webkit-box-orient: vertical;
    }

    .recommendation-bottom {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 4px;
    }

    .nav-button {
        width: 36px !important; /* 移动端更大 */
        height: 36px !important;
        font-size: 24px !important;
    }
}

/* 折扣表样式 */
.cart-discount-table-wrapper {
    padding: 15px;
    border-top: 1px solid #eee;
    margin-top: auto;
}

.cart-discount-table-wrapper h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
}

.cart-discount-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.cart-discount-table th,
.cart-discount-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.cart-discount-table th {
    font-weight: 500;
    color: #666;
}

.cart-discount-table tr.current-level {
    background-color: #fff5f4;
    color: #ee4d2d;
}

.cart-discount-table tr.current-level td {
    font-weight: 500;
}

/* 购物车折扣表样式 */
.cart-sidebar .cart-sidebar-discount-wrapper {
    padding: 5px 15px;
    border-bottom: 1px solid #eee;
}

.cart-sidebar .cart-sidebar-rule {
    display: flex !important;
    align-items: center !important;
    padding: 4px 0 !important;
    cursor: pointer;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
}

.cart-sidebar .rule-arrow {
    color: #999;
    font-size: 12px;
    margin-right: 8px;
    transition: transform 0.3s ease;
    line-height: 1 !important;
    display: inline-block !important;
}

.cart-sidebar .cart-sidebar-rule.active {
    background: #fff5f4 !important;
    border-radius: 4px;
    padding: 4px 8px !important;
}

.cart-sidebar .cart-sidebar-rule.active .rule-arrow {
    transform: rotate(90deg) !important;
    color: #ff4b33;
}

.cart-sidebar .rule-content {
    display: flex !important;
    align-items: center !important;
    gap: 5px;
    font-size: 13px !important;
    line-height: 1.2 !important;
}

.cart-sidebar .quantity {
    color: #333;
}

.cart-sidebar .discount {
    color: #666;
}

.cart-sidebar .cart-sidebar-rule.active .quantity,
.cart-sidebar .cart-sidebar-rule.active .discount {
    color: #ff4b33;
}

/* 移动端适配 */
@media (max-width: 767px) {
    .cart-sidebar .rule-content {
        font-size: 12px !important;
    }
    
    .cart-sidebar .cart-sidebar-rule {
        padding: 3px 0 !important;
    }
    
    .cart-sidebar .cart-sidebar-rule.active {
        padding: 3px 8px !important;
    }
}

/* 相关商品标题样式 */
.cart-sidebar .cart-recommendations h3 {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #333 !important;
    margin: 8px 0 !important;
    padding: 0 15px !important;
    line-height: 1.2 !important;
    font-family: inherit !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

/* 相关商品区域样式 */
.cart-sidebar .cart-recommendations {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
    border-top: 1px solid #eee !important;
    border-bottom: 1px solid #eee !important;
    margin: 0 !important;
}

/* 验证按钮样式 */
.cart-sidebar .verification-wrapper {
    padding: 10px 15px !important;
    text-align: center !important;
}

.cart-sidebar .verify-discount-button {
    background-color: #e6524b;
    color: #fff;
    border: none;
    padding: 0.5em 1em;
    border-radius: var(--wc-border-radius, 3px);
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
    max-width: 100%;
    line-height: 1.5;
    font-weight: normal;
    text-transform: none;
    letter-spacing: normal;
    box-shadow: 0 2px 4px rgba(230, 82, 75, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    margin: 0 auto; /* 加这一行 */
}
.cart-sidebar .verify-discount-button:before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z"/></svg>') no-repeat center center;
    background-size: contain;
}


.cart-sidebar .verify-discount-button:hover {
    background-color: #d64a43;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(230, 82, 75, 0.3);
}

.cart-sidebar .verify-discount-button:active {
    transform: translateY(0);
    background-color: #c9443d;
    box-shadow: 0 1px 2px rgba(230, 82, 75, 0.2);
}

/* 推荐产品区域样式优化 */
.cart-recommendations-column {
    width: 28%;
    flex-shrink: 0;
    background: linear-gradient(180deg, #f8f8f8 80%, #f1f3f6 100%);
    box-shadow: 2px 0 12px 0 rgba(60,60,60,0.06);
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    z-index: 2;
    position: relative;
    order: -1;
    overflow-y: auto;
}

.cart-recommendations-column::after {
    content: "";
    position: absolute;
    right: 0; top: 0; bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #ee4d2d 0%, #fbeee6 100%);
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    z-index: 3;
}

/* 推荐产品标题 */
.recommendations-header {
    background: linear-gradient(90deg, #fff 60%, #fbeee6 100%);
    border-bottom: 1.5px solid #e0e0e0;
    border-top-left-radius: 12px;
    padding-top: 14px;
    padding-bottom: 10px;
    text-align: center;
}

.recommendations-title {
    font-size: 15px;
    font-weight: 600;
    color: #ee4d2d;
    letter-spacing: 1px;
}

/* 推荐产品列表容器 */
.recommendations-content {
    padding: 8px;
}

/* 单个推荐产品样式 */
.cart-recommendations-column .rec-product {
    padding: 8px;
    margin-bottom: 12px;
    background: #fff;
    border-radius: 8px; /* 增加圆角 */
    box-shadow: 0 2px 5px rgba(0,0,0,0.08); /* 增强阴影效果 */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #eee; /* 淡化边框 */
    overflow: hidden; /* 确保图片放大效果不溢出 */
    display: flex;
    flex-direction: column;
}

.cart-recommendations-column .rec-product:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* 不再使用grid布局，图片单独一行 */
/* 第一行不再需要，但保留此注释以便于维护 */

/* 图片容器 - 现在是单独一行，宽度占满 */
.cart-recommendations-column .rec-product-image {
    width: 100% !important;
    height: 160px !important; /* 调整高度适合服装图片 */
    border-radius: 6px !important; /* 增加圆角 */
    overflow: hidden !important;
    border: none !important; /* 移除边框 */
    background: #f8f8f8 !important; /* 更淡的背景色 */
    display: flex !important;  /* 使用flex布局居中图片 */
    align-items: center !important; /* 垂直居中 */
    justify-content: center !important; /* 水平居中 */
    margin-bottom: 8px !important; /* 添加与下方信息的间距 */
    padding: 0 !important; /* 移除内边距，最大化图片空间 */
    position: relative !important; /* 添加相对定位 */
}

.cart-recommendations-column .rec-product-image a {
    display: flex !important;  /* flex布局 */
    width: 100% !important;
    height: 100% !important;
    align-items: center !important; /* 垂直居中 */
    justify-content: center !important; /* 水平居中 */
    transition: opacity 0.2s ease !important;
    position: relative !important; /* 添加相对定位 */
}

.cart-recommendations-column .rec-product-image img,
.cart-recommendations-column .rec-product-image a img {
    max-width: 95% !important;  /* 限制最大宽度，留出一些边距 */
    max-height: 95% !important;  /* 限制最大高度，留出一些边距 */
    width: auto !important;  /* 自动调整宽度 */
    height: auto !important;  /* 自动调整高度 */
    object-fit: contain !important;  /* 确保完整显示图片 */
    display: block !important;
    margin: auto !important;  /* 四周居中 */
    background: transparent !important;  /* 透明背景 */
    padding: 0 !important;  /* 移除内边距以充分利用空间 */
    box-sizing: border-box !important;
    transition: transform 0.3s ease !important; /* 添加过渡效果 */
    position: relative !important; /* 确保定位正确 */
}

/* 鼠标悬停时稍微放大图片 */
.cart-recommendations-column .rec-product-image:hover img {
    transform: scale(1.08) !important;
}

/* 产品信息样式 - 现在是单独一行 */
.cart-recommendations-column .rec-product-info {
    display: flex;
    flex-direction: column;
    gap: 4px; /* 稍微增加间距 */
    width: 100%; /* 确保宽度占满 */
    overflow: hidden; /* 防止内容溢出 */
    margin-bottom: 6px; /* 与下方按钮的间距 */
}

.cart-recommendations-column .rec-product-title {
    font-size: 0.8em;
    line-height: 1.3;
    max-height: 2.6em;  /* 限制标题高度 */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.cart-recommendations-column .rec-product-title:hover {
    color: #ee4d2d;
    text-decoration: none;
}

/* 修改产品价格样式，确保价格区间在一行显示 */
.cart-recommendations-column .rec-product-price {
    font-size: 0.8em; /* 减小字体大小 */
    font-weight: 500;
    color: #ee4d2d;
    white-space: nowrap; /* 防止换行 */
    overflow: hidden; /* 如果内容溢出则隐藏 */
    text-overflow: ellipsis; /* 显示省略号 */
    max-width: 100%; /* 确保不超出容器 */
    line-height: 1.2; /* 减小行高 */
    margin-bottom: 3px; /* 增加与标题的间距 */
}

/* 确保WooCommerce价格组件样式一致 */
.cart-recommendations-column .rec-product-price .woocommerce-Price-amount {
    font-size: 1em; /* 相对于父元素的大小 */
    white-space: nowrap;
}

/* 调整价格符号大小 */
.cart-recommendations-column .rec-product-price .woocommerce-Price-currencySymbol {
    font-size: 0.9em; /* 稍微减小货币符号 */
}

/* 变体选择和加购按钮行 */
.cart-recommendations-column .rec-product-row-2 {
    display: grid;
    grid-template-columns: 2.5fr 1fr;  /* 给select更多空间 */
    gap: 6px;
    align-items: center;
}

/* 变体选择下拉框 */
.cart-recommendations-column .rec-product-variant select {
    width: 100%;
    padding: 2px 6px;
    font-size: 0.85em;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    height: 28px;
    cursor: pointer;
    transition: border-color 0.2s ease;
    text-overflow: ellipsis;
    white-space: nowrap;
    -webkit-appearance: none;  /* 移除默认样式 */
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23333' viewBox='0 0 12 12'%3E%3Cpath d='M6 8.5L1.5 4h9L6 8.5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    padding-right: 24px;  /* 为下拉箭头留出空间 */
}

.cart-recommendations-column .rec-product-variant select:hover {
    border-color: #ccc;
}

.cart-recommendations-column .rec-product-variant select:focus {
    border-color: #ee4d2d;
    outline: none;
}

/* 加购按钮 */
.cart-recommendations-column .rec-add-to-cart {
    min-width: 40px !important;
    max-width: 45px !important;
    padding: 4px 8px !important;
    font-size: 0.85em !important;
    background: #ee4d2d !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1.2 !important;
    height: 28px !important;
    margin: 0 !important;
    box-shadow: none !important;
    font-weight: normal !important;
}

.cart-recommendations-column .rec-add-to-cart:not(:disabled):hover {
    background: #ff5a3c !important;
    transform: translateY(-1px);
}

.cart-recommendations-column .rec-add-to-cart:disabled {
    background: #ccc !important;
    cursor: not-allowed !important;
    opacity: 0.7 !important;
    transform: none !important;
}

.cart-recommendations-column .rec-add-to-cart.success {
    background: #28a745 !important;
    color: white !important;
    border-color: #28a745 !important;
    animation: success-pulse 0.3s ease;
}

@keyframes success-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 确保select option显示完整 */
.cart-recommendations-column .rec-product-variant select option {
    padding: 4px 6px;
    font-size: 0.85em;
    white-space: normal;  /* 允许文本换行 */
    word-wrap: break-word;
}

/* 购物车内容列 - 75% */
.cart-content-column {
    width: 72%;  /* 改为72% */
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-left: none;
}

/* 推荐产品链接样式 */
.cart-recommendations-column .rec-product-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.cart-recommendations-column .rec-product-title {
    font-size: 0.8em;
    line-height: 1.2;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-decoration: none;
    transition: color 0.2s ease;
}

.cart-recommendations-column .rec-product-title:hover {
    color: #ee4d2d;
    text-decoration: none;
}

/* 修改处理推荐产品关闭时的布局 */
.cart-sidebar:not(:has(.cart-recommendations-column)) .cart-content-column,
.cart-sidebar.no-recommendations .cart-content-column {
    width: 72%;  /* 保持原来的宽度 */
    margin: 0 auto; /* 居中显示 */
}

/* 当没有推荐产品时，调整侧边栏的宽度 */
.cart-sidebar.no-recommendations {
    max-width: 500px; /* 减小整个侧边栏的宽度 */
    margin: 0 auto; /* 居中显示 */
}

/* 禁用状态的结账按钮样式 */
.cart-sidebar-footer .checkout-button.disabled {
    background: #ccc !important;
    cursor: not-allowed !important;
    opacity: 0.7 !important;
}

/* 最小订单提示样式 */
.checkout-hint {
    color: #ee4d2d;
    font-size: 12px;
    text-align: center;
    margin-bottom: 10px;
    padding: 5px;
    background: #fff5f4;
    border-radius: 4px;
    line-height: 1.3;
}

/* MOQ警告样式 */
.moq-warning {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    margin-top: 8px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    font-size: 12px;
    color: #856404;
    animation: moq-fade-in 0.3s ease-in-out;
}

.moq-warning-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.moq-warning-text {
    flex: 1;
    line-height: 1.3;
}

/* 有MOQ警告时商品项的样式 */
.mini-cart-item.has-moq-warning {
    background: #fffbf5;
    border-left: 3px solid #ffeaa7;
}

/* MOQ警告动画 */
@keyframes moq-fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 移动端MOQ警告调整 */
@media (max-width: 767px) {
    .moq-warning {
        font-size: 11px;
        padding: 6px 8px;
        margin-top: 6px;
    }
    
    .moq-warning-icon {
        font-size: 12px;
    }
}

/* 强制覆盖主题样式的特殊规则 */
body .cart-sidebar .cart-recommendations-column .rec-product-image img,
.woocommerce .cart-sidebar .cart-recommendations-column .rec-product-image img,
.woocommerce-page .cart-sidebar .cart-recommendations-column .rec-product-image img,
html body .cart-sidebar .cart-recommendations-column .rec-product-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    transform: none !important;
}

/* 悬停时的特殊处理 */
body .cart-sidebar .cart-recommendations-column .rec-product-image:hover img,
.woocommerce .cart-sidebar .cart-recommendations-column .rec-product-image:hover img,
.woocommerce-page .cart-sidebar .cart-recommendations-column .rec-product-image:hover img,
html body .cart-sidebar .cart-recommendations-column .rec-product-image:hover img {
    transform: scale(1.1) !important;
}

/* 确保图片容器正确显示 */
body .cart-sidebar .cart-recommendations-column .rec-product-image,
.woocommerce .cart-sidebar .cart-recommendations-column .rec-product-image,
.woocommerce-page .cart-sidebar .cart-recommendations-column .rec-product-image,
html body .cart-sidebar .cart-recommendations-column .rec-product-image {
    display: block !important;
    position: relative !important;
    overflow: hidden !important;
    height: 0 !important; /* 高度设为0，使用padding-top来控制比例 */
    padding-top: 100% !important; /* 1:1比例 */
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-bottom: 0 !important;
    background: #f8f8f8 !important;
    border-radius: 6px !important;
    margin: 0 0 8px 0 !important;
}

/* 确保链接正确显示 */
body .cart-sidebar .cart-recommendations-column .rec-product-image a,
.woocommerce .cart-sidebar .cart-recommendations-column .rec-product-image a,
.woocommerce-page .cart-sidebar .cart-recommendations-column .rec-product-image a,
html body .cart-sidebar .cart-recommendations-column .rec-product-image a {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* 处理WooCommerce缩略图问题 */
body .cart-sidebar .cart-recommendations-column .rec-product-image img.attachment-woocommerce_thumbnail,
body .cart-sidebar .cart-recommendations-column .rec-product-image img.wp-post-image,
.woocommerce .cart-sidebar .cart-recommendations-column .rec-product-image img.attachment-woocommerce_thumbnail,
.woocommerce-page .cart-sidebar .cart-recommendations-column .rec-product-image img.wp-post-image,
html body .cart-sidebar .cart-recommendations-column .rec-product-image img.attachment-woocommerce_thumbnail,
html body .cart-sidebar .cart-recommendations-column .rec-product-image img.wp-post-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* 确保产品卡片内部布局正确 */
body .cart-sidebar .cart-recommendations-column .rec-product,
.woocommerce .cart-sidebar .cart-recommendations-column .rec-product,
.woocommerce-page .cart-sidebar .cart-recommendations-column .rec-product,
html body .cart-sidebar .cart-recommendations-column .rec-product {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    padding: 8px !important;
    margin-bottom: 12px !important;
}

/* 移除不需要的伪元素 */
