/**
 * Custom Cart Page Styles
 * Version: 1.0
 */

/* Main container styles */
.custom-cart-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px 40px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Breadcrumb navigation */
.cart-breadcrumb {
    font-size: 14px;
    color: #777;
    margin-bottom: 20px;
}

.cart-breadcrumb a {
    color: #000;
    text-decoration: none;
}

.cart-breadcrumb a:hover {
    text-decoration: underline;
}

/* Main title */
.cart-main-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 30px;
    color: #000;
    text-transform: uppercase;
}

/* Cart table styles */
.shop_table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    background-color: #fff;
}

.shop_table th {
    background-color: #1a1a1a;
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    padding: 15px 10px;
    text-align: left;
}

.shop_table td {
    padding: 15px 10px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
}

/* Product thumbnail */
.product-thumbnail img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

/* Product name */
.product-name a {
    color: #000;
    font-weight: 500;
    text-decoration: none;
    font-size: 16px;
}

.product-name a:hover {
    color: #666;
}

/* Dispatch time */
.product-dispatch {
    color: #333;
    font-size: 14px;
}

/* Quantity controls */
.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 120px;
    margin: 0 auto;
}

.quantity-button {
    width: 30px;
    height: 30px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    color: #555;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.quantity-button.minus {
    border-radius: 4px 0 0 4px;
}

.quantity-button.plus {
    border-radius: 0 4px 4px 0;
}

.quantity-button:hover {
    background-color: #e9e9e9;
}

.quantity .qty {
    width: 40px;
    height: 30px;
    border-radius: 0;
    border-left: none;
    border-right: none;
    text-align: center;
    margin: 0;
    padding: 0;
}

/* Product price and subtotal */
.product-price,
.product-subtotal {
    font-weight: 500;
    color: #ff0000;
    text-align: center;
}

/* Remove button */
.product-remove {
    text-align: center;
}

.product-remove a.remove {
    color: #000 !important;
    font-size: 16px;
    text-decoration: none;
    background: transparent;
    transition: all 0.2s;
}

.product-remove a.remove:hover {
    color: #ff0000 !important;
}

/* Bottom sections layout */
.cart-bottom-sections {
    display: flex;
    flex-wrap: wrap;
    margin-top: 30px;
    gap: 30px;
}

.cart-left-section {
    flex: 1;
    min-width: 300px;
}

.cart-right-section {
    flex: 1;
    min-width: 300px;
}

/* Shipping method area */
.shipping-method {
    margin-bottom: 30px;
}

.shipping-method h2 {
    font-size: 30px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #000;
    text-transform: uppercase;
}

.shipping-country {
    margin-bottom: 20px;
}

.shipping-country label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    font-size: 12px;
}

.shipping-country select {
    width: 100%;
    padding: 10px;
    border: 1px solid #181818;
    border-radius: 4px;
    background: #f5f5f5;
}

.shipping-methods {
    border: 1px solid #dddddd00;
    border-radius: 4px;
    padding: 0;
}

.shipping-methods ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.shipping-methods li {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px 15px;
    border: 1px solid #cf0;
    border-radius: 4px;
    background: #CCFF001A;
    position: relative;
    justify-content: space-between;
}

.shipping-methods li.active {
    background-color: #f9f9f9;
    border-color: #ccc;
    border: 1px solid #cf0;
    background: #CCFF001A
}

.shipping-method-name {
    flex: 1;
    font-weight: 500;
    color: #333;
    margin-left: 10px;
    font-size: 12px !important;
}

.shipping-method-price {
    font-weight: 200;
    color: #333;
    font-size: 12px !important;
    text-align: center;
    position: absolute;
    left: 25%;
    transform: translateX(0);
    min-width: 70px;
}

/* 开关样式 */
.shipping-methods li input[type="radio"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    position: relative;
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background-color: #ccc;
    margin: 0;
    outline: none;
    cursor: pointer;
    transition: background-color 0.3s;
    border: none;
    float: right;
    margin-left: auto;
    order: 3; /* 确保开关在最右侧 */
}

.shipping-methods li input[type="radio"]:checked {
    background-color: #ccff00;
}

.shipping-methods li input[type="radio"]::before {
    content: "✕";
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: white;
    top: 3px;
    left: 3px;
    transition: transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    color: #666;
    font-weight: bold;
}

.shipping-methods li input[type="radio"]:checked::before {
    content: "✓";
    transform: translateX(20px);
    color: #333;
}

/* 删除之前添加的 √ 和 X 标识 */
.shipping-methods li input[type="radio"]::after {
    content: none;
}

.shipping-methods li input[type="radio"]:checked::after {
    content: none;
}

.shipping-methods label {
    flex: 1;
    cursor: pointer;
    margin-right: 10px;
}

/* Payment method area */
.payment-method {
    margin-bottom: 30px;
}

/* 新添加的payment-section样式 */
.payment-section {
    margin-bottom: 30px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    margin-top: 20px;
}

.payment-section h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #000;
    text-transform: uppercase;
}

.payment-method h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #000;
    text-transform: uppercase;
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.payment-option {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.payment-option.selected {
    border-color: #ccc;
    background-color: #f9f9f9;
}

/* Payment icon styles */
.payment-icon {
    height: 30px;
    margin-right: 15px;
    display: flex;
    align-items: center;
}

.payment-icon svg {
    max-width: 80px;
    height: 30px;
}

.payment-option span {
    flex: 1;
    font-weight: 500;
}

.payment-toggle {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 50%;
    position: relative;
}

.payment-toggle.active::after {
    content: "";
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: #000;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Update cart button */
.cart-actions {
    margin-top: 20px;
}

.update-cart {
    background-color: #f5f5f5;
    color: #333;
    font-weight: 500;
    padding: 12px 20px;
    border-radius: 4px;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
}

.update-cart:hover {
    background-color: #eee;
}

/* Coupon area */
.coupon-codes {
    margin-bottom: 30px;
}

.coupon-codes h2 {
    font-size: 30px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #000;
    text-transform: uppercase;
}

.coupon {
    display: flex;
    gap: 0px;
    margin-top: 62px;
}

.coupon .input-text {
    flex: 1;
    padding: 10px;
    border: 1px solid #000000;
    border-radius: 0px;
    background: #f5f5f5;
}

.coupon .button {
    background-color: #000;
    color: #fff;
    font-weight: 500;
    padding: 0 20px;
    border-radius: 0px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
}

.coupon .button:hover {
    background-color: #333;
}

/* Order summary area */
.cart-summary {
    background-color: #f5f5f5;
    border: 1px solid #181818;
    border-radius: 4px;
    padding: 20px;
}

.cart-summary h2 {
    font-size: 30px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #000;
    text-transform: uppercase;
}

.summary-table {
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.summary-label {
    font-weight: 500;
    color: #333;
}

.summary-value {
    font-weight: 500;
    color: #ff0000;
}

.total-row {
    border-top: 1px solid #080808;
    padding-top: 15px;
    margin-top: 15px;
}

.total-row .summary-label,
.total-row .summary-value {
    font-weight: 600;
    font-size: 18px;
}

/* Free shipping notice */
.free-shipping-notice {
    margin: 15px 0;
    font-size: 14px;
    color: #666;
    text-align: center;
}

/* Checkout button */
.wc-proceed-to-checkout {
    margin-top: 20px;
}

.checkout-button {
    background-color: #8bc34a !important;
    color: #000 !important;
    font-size: 16px;
    font-weight: 600;
    padding: 15px 20px;
    border-radius: 0;
    display: block;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
    width: 100%;
    border: none;
    text-transform: uppercase;
}

.checkout-button:hover {
    background-color: #7cb342 !important;
}

/* Empty cart styles */
.cart-empty {
    background-color: #f8f9fa;
    padding: 40px 20px;
    border-radius: 4px;
    text-align: center;
    margin: 30px auto;
    max-width: 900px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.cart-empty-message {
    font-size: 24px;
    color: #555;
    margin-bottom: 30px;
}

.cart-empty-suggestions {
    margin: 30px 0;
}

.cart-empty-suggestions p {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
}

.cart-empty-products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.cart-empty-product {
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 15px;
    transition: all 0.3s;
    background-color: white;
}

.cart-empty-product:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.cart-empty-product a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.cart-empty-product img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 10px;
}

.cart-empty-product h4 {
    font-size: 16px;
    color: #333;
    margin: 10px 0;
    height: 40px;
    overflow: hidden;
}

.cart-empty-product .price {
    color: #ff0000;
    font-weight: 500;
    display: block;
    margin-top: 10px;
}

.cart-empty .return-to-shop {
    margin-top: 30px;
}

.cart-empty .return-to-shop .button {
    background-color: #000;
    color: white;
    font-size: 16px;
    padding: 12px 30px;
    border-radius: 4px;
    transition: all 0.3s;
    display: inline-block;
    font-weight: 500;
    text-decoration: none;
    text-transform: uppercase;
}

.cart-empty .return-to-shop .button:hover {
    background-color: #333;
}

/* Responsive styles */
@media (max-width: 768px) {
    .cart-main-title {
        font-size: 24px;
    }
    
    .shop_table {
        display: block;
        width: 100%;
        overflow-x: auto;
    }
    
    .cart-bottom-sections {
        flex-direction: column;
    }
    
    .cart-left-section,
    .cart-right-section {
        width: 100%;
    }
    
    .coupon {
        flex-direction: column;
    }
    
    .coupon .input-text,
    .coupon .button {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .cart-empty-products {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .shop_table td, 
    .shop_table th {
        padding: 10px 5px;
        font-size: 13px;
    }
    
    .product-thumbnail img {
        width: 50px;
        height: 50px;
    }
    
    .product-name a {
        font-size: 14px;
    }
    
    .quantity .qty {
        width: 30px;
    }
    
    .cart-empty-products {
        grid-template-columns: 1fr;
    }
}

/* 标准WooCommerce运费表格样式 */
.shipping-methods-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.shipping-methods-table tr {
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.shipping-methods-table tr:hover {
    background-color: #f9f9f9;
}

.shipping-methods-table tr.active {
    background-color: #f5f5f5;
}

.shipping-methods-table td {
    padding: 12px 8px;
    vertical-align: middle;
}

.shipping-methods-table .shipping-method-radio {
    width: 30px;
}

.shipping-methods-table .shipping-method-name {
    font-weight: 500;
}

.shipping-methods-table .shipping-method-price {
    text-align: right;
    font-weight: 600;
    color: #333;
}

.package-details {
    font-size: 0.9em;
    color: #666;
    background-color: #f8f8f8;
}

/* 保持更新按钮样式一致 */
.woocommerce-shipping-calculator button {
    background-color: #333;
    color: #fff;
    padding: 10px 15px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    transition: background-color 0.3s;
}

.woocommerce-shipping-calculator button:hover {
    background-color: #555;
}

/* 确保运费计算器样式与网站协调 */
.woocommerce-shipping-calculator {
    margin-top: 15px;
}

.woocommerce-shipping-calculator p {
    margin-bottom: 10px;
}

.woocommerce-shipping-calculator .form-row {
    margin-bottom: 10px;
}

.woocommerce-shipping-calculator input,
.woocommerce-shipping-calculator select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
} 