/* 
 * 电商系统专用样式 - 购物车、订单、支付页面
 * 使用页面特定的类名前缀，避免影响其他页面
 * 只有包含 .ecommerce-page 类的页面才会应用这些样式
 */

/* ===========================================
   购物车页面样式 - 只在 .ecommerce-page 中生效
   =========================================== */

.ecommerce-page .cart-container {
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 30px;
}

.ecommerce-page .cart-header {
    background: #f8f8f8;
    border-bottom: 1px solid #e6e6e6;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ecommerce-page .cart-header h2 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.ecommerce-page .cart-count {
    color: #666;
    font-size: 14px;
}

.ecommerce-page .cart-table-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: #fafafa;
    border-bottom: 1px solid #e6e6e6;
    font-weight: bold;
    color: #333;
}

.ecommerce-page .cart-table-header .col-select {
    width: 60px;
    text-align: center;
}

.ecommerce-page .cart-table-header .col-product {
    flex: 1;
    min-width: 300px;
}

.ecommerce-page .cart-table-header .col-price {
    width: 120px;
    text-align: center;
}

.ecommerce-page .cart-table-header .col-quantity {
    width: 150px;
    text-align: center;
}

.ecommerce-page .cart-table-header .col-total {
    width: 120px;
    text-align: center;
}

.ecommerce-page .cart-table-header .col-action {
    width: 100px;
    text-align: center;
}

.ecommerce-page .cart-item {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.ecommerce-page .cart-item:last-child {
    border-bottom: none;
}

.ecommerce-page .cart-item .col-select {
    width: 60px;
    text-align: center;
}

.ecommerce-page .cart-item .col-product {
    flex: 1;
    min-width: 300px;
}

.ecommerce-page .cart-item .col-price {
    width: 120px;
    text-align: center;
}

.ecommerce-page .cart-item .col-quantity {
    width: 150px;
    text-align: center;
}

.ecommerce-page .cart-item .col-total {
    width: 120px;
    text-align: center;
}

.ecommerce-page .cart-item .col-action {
    width: 100px;
    text-align: center;
}

.ecommerce-page .product-info {
    display: flex;
    align-items: center;
}

.ecommerce-page .product-info img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 15px;
}

.ecommerce-page .product-details h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #333;
}

.ecommerce-page .product-details h4 a {
    color: #333;
    text-decoration: none;
}

.ecommerce-page .product-details h4 a:hover {
    color: #1E9FFF;
}

.ecommerce-page .spec-info {
    margin: 0;
    font-size: 12px;
    color: #999;
}

.ecommerce-page .item-price {
    color: #ff5722;
    font-size: 16px;
    font-weight: bold;
}

.ecommerce-page .quantity-control {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ecommerce-page .quantity-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #666;
}

.ecommerce-page .quantity-btn:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.ecommerce-page .quantity-input {
    width: 60px;
    height: 30px;
    border: 1px solid #ddd;
    border-left: none;
    border-right: none;
    text-align: center;
    font-size: 14px;
}

.ecommerce-page .item-total {
    color: #ff5722;
    font-size: 16px;
    font-weight: bold;
}

.ecommerce-page .remove-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 14px;
}

.ecommerce-page .remove-btn:hover {
    color: #ff5722;
}

.ecommerce-page .cart-summary {
    background: #f8f8f8;
    border-top: 1px solid #e6e6e6;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ecommerce-page .summary-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ecommerce-page .total-amount {
    font-size: 18px;
    color: #333;
}

.ecommerce-page .total-amount .amount {
    color: #ff5722;
    font-weight: bold;
    font-size: 20px;
}

.ecommerce-page .empty-cart {
    text-align: center;
    padding: 80px 20px;
    color: #999;
}

.ecommerce-page .empty-cart-content p {
    margin: 20px 0;
    font-size: 16px;
}

/* ===========================================
   订单列表页面样式 - 只在 .ecommerce-page 中生效
   =========================================== */

.ecommerce-page .order-list-container {
    background: #fff;
}

.ecommerce-page .order-filter-section {
    margin-bottom: 20px;
}

.ecommerce-page .filter-tabs {
    display: flex;
    border-bottom: 1px solid #e6e6e6;
}

.ecommerce-page .filter-tab {
    padding: 15px 20px;
    text-decoration: none;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.ecommerce-page .filter-tab:hover,
.ecommerce-page .filter-tab.active {
    color: #1E9FFF;
    border-bottom-color: #1E9FFF;
}

.ecommerce-page .order-search-section {
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f8f8;
    border-radius: 4px;
}

.ecommerce-page .search-form {
    display: flex;
    gap: 10px;
    max-width: 400px;
}

.ecommerce-page .search-form input {
    flex: 1;
}

.ecommerce-page .order-item {
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    margin-bottom: 20px;
    overflow: hidden;
}

.ecommerce-page .order-header {
    background: #f8f8f8;
    padding: 15px 20px;
    border-bottom: 1px solid #e6e6e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ecommerce-page .order-info {
    display: flex;
    gap: 20px;
    align-items: center;
}

.ecommerce-page .order-no {
    font-weight: bold;
    color: #333;
}

.ecommerce-page .order-time {
    color: #999;
    font-size: 14px;
}

.ecommerce-page .order-status .status-text {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    color: #fff;
}

.ecommerce-page .status-pending { background: #FF9800; }
.ecommerce-page .status-paid { background: #2196F3; }
.ecommerce-page .status-shipped { background: #9C27B0; }
.ecommerce-page .status-completed { background: #4CAF50; }
.ecommerce-page .status-cancelled { background: #9E9E9E; }

.ecommerce-page .order-content {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.ecommerce-page .order-products {
    flex: 1;
    margin-right: 20px;
}

.ecommerce-page .product-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.ecommerce-page .product-item:last-child {
    margin-bottom: 0;
}

.ecommerce-page .product-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 15px;
}

.ecommerce-page .product-item .product-info {
    flex: 1;
}

.ecommerce-page .product-item .product-name {
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
}

.ecommerce-page .product-item .product-spec {
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
}

.ecommerce-page .product-item .product-price {
    font-size: 14px;
    color: #ff5722;
}

.ecommerce-page .more-products {
    color: #999;
    font-size: 14px;
    text-align: center;
    padding: 10px;
}

.ecommerce-page .order-summary {
    text-align: right;
}

.ecommerce-page .order-amount {
    margin-bottom: 15px;
}

.ecommerce-page .order-amount .amount {
    color: #ff5722;
    font-size: 18px;
    font-weight: bold;
}

.ecommerce-page .order-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.ecommerce-page .order-footer {
    padding: 15px 20px;
    background: #fafafa;
    border-top: 1px solid #e6e6e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ecommerce-page .receiver-info {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 14px;
}

.ecommerce-page .order-detail-link a {
    color: #1E9FFF;
    text-decoration: none;
    font-size: 14px;
}

.ecommerce-page .order-detail-link a:hover {
    text-decoration: underline;
}

/* ===========================================
   支付页面样式 - 只在 .ecommerce-page 中生效
   =========================================== */

.ecommerce-page .payment-container {
    background: #fff;
    max-width: 800px;
    margin: 0 auto;
}

.ecommerce-page .section-header {
    background: #f8f8f8;
    padding: 15px 20px;
    border-bottom: 1px solid #e6e6e6;
    margin-bottom: 20px;
}

.ecommerce-page .section-header h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ecommerce-page .order-summary-section,
.ecommerce-page .payment-method-section {
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    margin-bottom: 30px;
}

.ecommerce-page .order-summary-content {
    padding: 20px;
}

.ecommerce-page .order-info {
    margin-bottom: 20px;
}

.ecommerce-page .info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.ecommerce-page .info-item:last-child {
    border-bottom: none;
}

.ecommerce-page .info-item label {
    color: #666;
    font-weight: normal;
}

.ecommerce-page .info-item .amount {
    color: #ff5722;
    font-weight: bold;
}

.ecommerce-page .payment-methods {
    padding: 20px;
}

.ecommerce-page .payment-method-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.ecommerce-page .payment-method-item:hover {
    border-color: #1E9FFF;
    background: #f8fafe;
}

.ecommerce-page .payment-method-item.selected {
    border-color: #1E9FFF;
    background: #f0f8ff;
}

.ecommerce-page .payment-method-item:last-child {
    margin-bottom: 0;
}

.ecommerce-page .method-icon {
    width: 40px;
    height: 40px;
    margin-right: 15px;
}

.ecommerce-page .method-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ecommerce-page .method-info {
    flex: 1;
}

.ecommerce-page .method-name {
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.ecommerce-page .method-desc {
    font-size: 12px;
    color: #999;
}

.ecommerce-page .method-check {
    color: #1E9FFF;
    font-size: 18px;
    opacity: 0;
    transition: opacity 0.3s;
}

.ecommerce-page .payment-method-item.selected .method-check {
    opacity: 1;
}

.ecommerce-page .payment-amount-section {
    text-align: center;
    margin-bottom: 30px;
}

.ecommerce-page .amount-display {
    font-size: 18px;
    color: #333;
}

.ecommerce-page .amount-value {
    color: #ff5722;
    font-size: 24px;
    font-weight: bold;
    margin-left: 10px;
}

.ecommerce-page .payment-action-section {
    text-align: center;
    margin-bottom: 30px;
}

.ecommerce-page .payment-action-section .layui-btn {
    margin: 0 10px;
    width: 150px;
}

/* ===========================================
   通用样式 - 只在 .ecommerce-page 中生效
   =========================================== */

.ecommerce-page .ecommerce-breadcrumb {
    padding: 15px 0;
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
}

.ecommerce-page .ecommerce-breadcrumb a {
    color: #1E9FFF;
    text-decoration: none;
}

.ecommerce-page .ecommerce-breadcrumb a:hover {
    text-decoration: underline;
}

.ecommerce-page .loading {
    color: #999;
    text-align: center;
    padding: 20px;
}

.ecommerce-page .empty-data {
    color: #999;
    text-align: center;
    padding: 50px;
}

.ecommerce-page .load-error {
    color: #ff5722;
    font-size: 14px;
    text-align: center;
    padding: 10px;
}

.ecommerce-page .loading-products {
    color: #999;
    font-size: 14px;
    text-align: center;
    padding: 20px;
}

.ecommerce-page .pagination-container {
    text-align: center;
    margin-top: 30px;
}

/* ===========================================
   响应式设计 - 只在 .ecommerce-page 中生效
   =========================================== */

@media (max-width: 768px) {
    .ecommerce-page .cart-table-header,
    .ecommerce-page .cart-item {
        padding: 10px;
    }
    
    .ecommerce-page .cart-table-header .col-product,
    .ecommerce-page .cart-item .col-product {
        min-width: 200px;
    }
    
    .ecommerce-page .product-info {
        flex-direction: column;
        text-align: center;
    }
    
    .ecommerce-page .product-info img {
        margin: 0 0 10px 0;
    }
    
    .ecommerce-page .order-content {
        flex-direction: column;
    }
    
    .ecommerce-page .order-summary {
        text-align: left;
        margin-top: 20px;
    }
    
    .ecommerce-page .order-actions {
        justify-content: flex-start;
    }
    
    .ecommerce-page .payment-container {
        margin: 0 10px;
    }
}

/* ===========================================
   订单结算页面样式 - 只在 .ecommerce-page 中生效
   =========================================== */

.ecommerce-page .checkout_container {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
}

/* 订单结算页面各个区块通用样式 */
.ecommerce-page .address_section,
.ecommerce-page .order_items_section,
.ecommerce-page .delivery_section,
.ecommerce-page .payment_section,
.ecommerce-page .coupon_section,
.ecommerce-page .remarks_section,
.ecommerce-page .cost_section,
.ecommerce-page .submit_section {
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    margin-bottom: 20px;
    overflow: hidden;
}

.ecommerce-page .address_section h3,
.ecommerce-page .order_items_section h3,
.ecommerce-page .delivery_section h3,
.ecommerce-page .payment_section h3,
.ecommerce-page .coupon_section h3,
.ecommerce-page .remarks_section h3 {
    background: #f8f8f8;
    border-bottom: 1px solid #e6e6e6;
    padding: 15px 20px;
    margin: 0;
    font-size: 16px;
    color: #333;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.ecommerce-page .address_section h3 i,
.ecommerce-page .order_items_section h3 i,
.ecommerce-page .delivery_section h3 i,
.ecommerce-page .payment_section h3 i,
.ecommerce-page .coupon_section h3 i,
.ecommerce-page .remarks_section h3 i {
    margin-right: 8px;
    color: #1E9FFF;
}

/* 收货地址区块样式 */
.ecommerce-page .address_list {
    padding: 20px;
}

.ecommerce-page .address_item {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.ecommerce-page .address_item:hover {
    border-color: #1E9FFF;
    background: #f8fafe;
}

.ecommerce-page .address_item.selected {
    border-color: #1E9FFF;
    background: #f0f8ff;
    position: relative;
}

.ecommerce-page .address_item.selected::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #1E9FFF;
}

.ecommerce-page .address_item:last-child {
    margin-bottom: 0;
}

.ecommerce-page .address_info {
    flex: 1;
}

.ecommerce-page .consignee_info {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.ecommerce-page .consignee_info .name {
    font-size: 16px;
    color: #333;
    font-weight: 500;
    margin-right: 15px;
}

.ecommerce-page .consignee_info .phone {
    font-size: 14px;
    color: #666;
    margin-right: 10px;
}

.ecommerce-page .default_tag {
    background: #ff5722;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.ecommerce-page .address_detail {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.ecommerce-page .address_actions {
    margin-left: 15px;
}

.ecommerce-page .edit_address {
    background: none;
    border: 1px solid #1E9FFF;
    color: #1E9FFF;
    padding: 5px 15px;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.ecommerce-page .edit_address:hover {
    background: #1E9FFF;
    color: #fff;
}

.ecommerce-page .add_address {
    padding: 20px;
    text-align: center;
    border-top: 1px solid #f0f0f0;
}

.ecommerce-page .no_address {
    text-align: center;
    color: #999;
    padding: 40px 20px;
    font-size: 14px;
}

/* 商品信息区块样式 */
.ecommerce-page .order_items {
    padding: 20px;
}

.ecommerce-page .order_item {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    margin-bottom: 15px;
}
.ecommerce-page .order_items  .header{
    padding: 0 !important;
    border:  none;
    margin: 0;
}
.ecommerce-page .order_items  .header .item_image{
    height: 50px;
}
.ecommerce-page .order_items .header .item_price{
    font-size: 14px;
    color: #666;
    font-weight: 500;
    text-align: center;

}
.ecommerce-page .order_items .header .item_total{

    text-align: center !important;
    color: #666;
    font-weight: 500;
    font-size: 14px;

}

.ecommerce-page .order_item:last-child {
    margin-bottom: 0;
}

.ecommerce-page .item_image {
    width: 80px;
    height: 80px;
    margin-right: 15px;
    border-radius: 4px;
    overflow: hidden;
}

.ecommerce-page .item_image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ecommerce-page .item_info {
    flex: 1;
    margin-right: 15px;
}

.ecommerce-page .item_info h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #333;
    line-height: 1.4;
    font-weight: 500;
}

.ecommerce-page .item_info .spec {
    color: #999;
    font-size: 12px;
    margin: 0;
}

.ecommerce-page .item_price {
    color: #ff5722;
    font-size: 16px;
    font-weight: bold;
    min-width: 120px;
    margin-right: 15px;
}

.ecommerce-page .item_quantity {
    color: #666;
    font-size: 14px;
    min-width: 80px;
    margin-right: 15px;
}

.ecommerce-page .item_total {
    color: #ff5722;
    font-size: 16px;
    font-weight: bold;
    min-width: 100px;
    text-align: center;

}

/* 商品库存信息样式 */
.ecommerce-page .stock {
    color: #666;
    font-size: 14px;
    margin: 5px 0;
}

.ecommerce-page .stock-warning {
    color: #ff5722;
    font-size: 14px;
    margin: 5px 0;
    font-weight: bold;
}

/* 配送方式和支付方式区块样式 */
.ecommerce-page .delivery_options,
.ecommerce-page .payment_options {
    padding: 20px;
}
.ecommerce-page .delivery_options label,
.ecommerce-page .payment_options label {
    float: left;
    display: inline;
    margin-right: 10px;

}

.ecommerce-page .delivery_options .layui-radio,
.ecommerce-page .payment_options .layui-radio {
    display: block;
    margin-bottom: 15px;
    padding: 12px 15px;
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    transition: all 0.3s;
    cursor: pointer;
}

.ecommerce-page .delivery_options .layui-radio:hover,
.ecommerce-page .payment_options .layui-radio:hover {
    border-color: #1E9FFF;
    background: #f8fafe;
}

.ecommerce-page .delivery_options .layui-radio:last-child,
.ecommerce-page .payment_options .layui-radio:last-child {
   
}

.ecommerce-page .payment_options .layui-radio span {
    display: flex;
    align-items: center;
}

.ecommerce-page .payment_options .layui-radio img {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

/* 优惠券区块样式 */
.ecommerce-page .coupon_select {
    padding: 20px;
    display: flex;
    align-items: center;
}

.ecommerce-page .coupon_select select {
    flex: 1;
    margin-right: 15px;
}

.ecommerce-page .coupon_discount {
    color: #ff5722;
    font-size: 16px;
    font-weight: bold;
    min-width: 80px;
    text-align: right;
}

/* 订单备注区块样式 */
.ecommerce-page .remarks_section textarea {
    margin: 20px;
    width: calc(100% - 40px);
    resize: vertical;
    min-height: 80px;
}

/* 费用明细区块样式 */
.ecommerce-page .cost_section {
    padding: 20px;
    background: #fafafa;
}

.ecommerce-page .cost_item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
    color: #666;
}

.ecommerce-page .cost_item span:last-child {
    color: #333;
    font-weight: 500;
}

.ecommerce-page .cost_total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0 5px 0;
    border-top: 1px solid #e6e6e6;
    margin-top: 10px;
    font-size: 16px;
    font-weight: bold;
}

.ecommerce-page .cost_total .total_amount {
    color: #ff5722;
    font-size: 20px;
}

/* 提交订单区块样式 */
.ecommerce-page .submit_section {
    padding: 30px;
    text-align: center;
    background: #fff;
    border: none;
}

.ecommerce-page .submit_section .layui-btn {
    width: 200px;
    height: 50px;
    font-size: 16px;
    border-radius: 25px;
}

/* 地址编辑弹窗样式调整 */
.ecommerce-page #address_form .layui-form-item {
    margin-bottom: 20px;
}

.ecommerce-page #address_form .layui-input-block select {
    width: 32%;
    display: inline-block;
    margin-right: 2%;
}

.ecommerce-page #address_form .layui-input-block select:last-child {
    margin-right: 0;
}


/* 响应式设计 - 订单结算页面 */
@media (max-width: 768px) {
    .ecommerce-page .order_item {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }
    
    .ecommerce-page .item_image {
        width: 60px;
        height: 60px;
        margin: 0 0 10px 0;
    }
    
    .ecommerce-page .item_info {
        margin: 0 0 10px 0;
    }
    
    .ecommerce-page .item_price,
    .ecommerce-page .item_quantity,
    .ecommerce-page .item_total {
        margin: 5px 0;
        text-align: left;
        min-width: auto;
    }
    
    .ecommerce-page .address_item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ecommerce-page .address_actions {
        margin: 10px 0 0 0;
    }
    
    .ecommerce-page .coupon_select {
        flex-direction: column;
        align-items: stretch;
    }
    
    .ecommerce-page .coupon_select select {
        margin: 0 0 10px 0;
    }
    
    .ecommerce-page .coupon_discount {
        text-align: center;
    }
    
    .ecommerce-page #address_form .layui-input-block select {
        width: 100%;
        margin: 0 0 10px 0;
    }
}