/* SANVELLA Cart Drawer */
/* Main cart page */
body.woocommerce-cart:not(.woocommerce-order-received) .site-content {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto !important;
    padding: clamp(48px, 6vw, 80px) 40px clamp(80px, 9vw, 120px) !important;
}

body.woocommerce-cart:not(.woocommerce-order-received) .content-area,
body.woocommerce-cart:not(.woocommerce-order-received) .site-main,
body.woocommerce-cart:not(.woocommerce-order-received) .ast-article-single,
body.woocommerce-cart:not(.woocommerce-order-received) .woocommerce {
    width: 100%;
    margin: 0;
}

body.woocommerce-cart:not(.woocommerce-order-received) .entry-header {
    margin: 0;
    padding-bottom: 22px;
    border-bottom: 1px solid #dfe3e7;
}

body.woocommerce-cart:not(.woocommerce-order-received) .entry-title {
    margin: 0;
    color: #16191d;
    font-family: var(--heading-font);
    font-size: clamp(38px, 4vw, 52px);
    font-weight: 500;
    line-height: 1.05;
}

body.woocommerce-cart .wc-empty-cart-message {
    max-width: 640px;
    margin: 0 auto;
    padding: clamp(72px, 9vw, 112px) 24px 0;
}

body.woocommerce-cart .cart-empty.woocommerce-info {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #30363d;
    font-size: clamp(18px, 2vw, 22px);
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
}

body.woocommerce-cart .cart-empty.woocommerce-info::before {
    display: none;
}

body.woocommerce-cart .return-to-shop {
    margin: 28px 0 0;
    padding: 0 0 clamp(72px, 9vw, 112px);
    text-align: center;
}

body.woocommerce-cart .return-to-shop .button.wc-backward {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 176px !important;
    min-height: 48px !important;
    padding: 14px 28px;
    border: 1px solid #16191d;
    border-radius: 0;
    background: #16191d;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color 0.2s ease, color 0.2s ease;
}

body.woocommerce-cart .return-to-shop .button.wc-backward:hover {
    background: #fff;
    color: #16191d;
}

body.woocommerce-cart .return-to-shop .button.wc-backward:focus-visible {
    outline: 2px solid #16191d;
    outline-offset: 4px;
}

body.woocommerce-cart .woocommerce:has(.woocommerce-cart-form) {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.75fr);
    gap: 36px 48px;
    align-items: start;
    padding-top: 40px;
}

body.woocommerce-cart .woocommerce-notices-wrapper {
    grid-column: 1 / -1;
}

body.woocommerce-cart .woocommerce-message,
body.woocommerce-cart .woocommerce-info,
body.woocommerce-cart .woocommerce-error {
    margin: 0;
    padding: 16px 20px 16px 48px;
    border: 0;
    border-left: 2px solid #16191d;
    background: #f5f6f7;
    color: #30363d;
    font-size: 14px;
    line-height: 1.6;
}

body.woocommerce-cart .woocommerce-message::before,
body.woocommerce-cart .woocommerce-info::before,
body.woocommerce-cart .woocommerce-error::before {
    top: 16px;
    left: 18px;
    color: #4f5761;
}

body.woocommerce-cart .woocommerce-message .wc-forward {
    display: none;
}

body.woocommerce-cart .woocommerce-cart-form {
    grid-column: 1;
}

body.woocommerce-cart table.shop_table {
    margin: 0;
    border: 0;
    border-collapse: collapse;
    border-spacing: 0;
    background: #fff;
}

body.woocommerce-cart table.cart {
    table-layout: fixed;
}

body.woocommerce-cart table.shop_table th,
body.woocommerce-cart table.shop_table td {
    border: 0;
}

body.woocommerce-cart table.cart thead th {
    padding: 0 12px 14px;
    border-bottom: 1px solid #dfe3e7;
    color: #69717b;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0;
    text-align: left;
    text-transform: uppercase;
}

body.woocommerce-cart table.cart .cart_item td {
    padding: 24px 12px;
    border-bottom: 1px solid #dfe3e7;
    color: #30363d;
    font-size: 14px;
    text-align: left;
    vertical-align: middle;
}

body.woocommerce-cart table.cart .product-remove {
    width: 36px;
    padding-left: 0;
}

body.woocommerce-cart table.cart .product-thumbnail {
    width: 116px;
}

body.woocommerce-cart table.cart .product-price,
body.woocommerce-cart table.cart .product-quantity,
body.woocommerce-cart table.cart .product-subtotal {
    width: 92px;
}

body.woocommerce-cart table.cart .product-remove a.remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #69717b;
}

body.woocommerce-cart table.cart .product-remove a.remove:hover {
    background: transparent;
    color: #16191d;
}

body.woocommerce-cart table.cart .product-thumbnail img {
    display: block;
    width: 96px !important;
    max-width: 96px !important;
    height: 96px;
    object-fit: cover;
    background: #f5f6f7;
}

body.woocommerce-cart table.cart .product-name {
    min-width: 220px;
}

body.woocommerce-cart table.cart .product-name a {
    color: #16191d;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.55;
    text-decoration: none;
}

body.woocommerce-cart table.cart .product-name a:hover {
    color: #59616b;
}

body.woocommerce-cart table.cart .product-price,
body.woocommerce-cart table.cart .product-subtotal {
    white-space: nowrap;
}

body.woocommerce-cart table.cart .quantity .qty {
    width: 68px;
    min-height: 44px;
    padding: 10px;
    border: 1px solid #b9c0c8;
    border-radius: 0;
    background: #fff;
    color: #16191d;
    text-align: center;
}

body.woocommerce-cart table.cart td.actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 0 0;
}

body.woocommerce-cart table.cart td.actions .coupon {
    display: flex;
    align-items: stretch;
}

body.woocommerce-cart table.cart td.actions .coupon .input-text {
    width: 180px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #b9c0c8;
    border-radius: 0;
    background: #fff;
    color: #16191d;
}

body.woocommerce-cart table.cart td.actions .button {
    min-width: 132px !important;
    min-height: 44px !important;
    padding: 12px 18px;
    border: 1px solid #16191d;
    border-radius: 0;
    background: #fff;
    color: #16191d;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

body.woocommerce-cart table.cart td.actions .button:hover:not(:disabled) {
    background: #16191d;
    color: #fff;
}

body.woocommerce-cart table.cart td.actions .button:disabled {
    border-color: #dfe3e7;
    color: #9aa1a9;
    cursor: not-allowed;
}

body.woocommerce-cart .cart-collaterals {
    grid-column: 2;
    width: 100%;
}

body.woocommerce-cart .cart-collaterals .cart_totals {
    float: none;
    width: 100%;
    padding: 28px;
    border: 1px solid #b9c0c8;
    background: #fff;
}

body.woocommerce-cart .cart_totals h2 {
    margin: 0 0 24px;
    color: #16191d;
    font-family: var(--heading-font);
    font-size: 32px;
    font-weight: 500;
    line-height: 1.1;
}

body.woocommerce-cart .cart_totals table th,
body.woocommerce-cart .cart_totals table td {
    padding: 14px 0;
    border-bottom: 1px solid #dfe3e7;
    color: #30363d;
    font-size: 14px;
    text-align: left;
}

body.woocommerce-cart .cart_totals table td {
    text-align: right;
}

body.woocommerce-cart .cart_totals .order-total th,
body.woocommerce-cart .cart_totals .order-total td {
    border-bottom: 0;
    color: #16191d;
    font-size: 16px;
}

body.woocommerce-cart .wc-proceed-to-checkout {
    padding: 24px 0 0;
}

body.woocommerce-cart .wc-proceed-to-checkout .checkout-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px !important;
    margin: 0;
    padding: 15px 24px;
    border: 1px solid #16191d;
    border-radius: 0;
    background: #16191d;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
}

body.woocommerce-cart .wc-proceed-to-checkout .checkout-button:hover {
    background: #fff;
    color: #16191d;
}

@media (max-width: 960px) {
    body.woocommerce-cart .woocommerce:has(.woocommerce-cart-form) {
        grid-template-columns: minmax(0, 1fr);
    }

    body.woocommerce-cart .woocommerce-cart-form,
    body.woocommerce-cart .cart-collaterals {
        grid-column: 1;
    }
}

@media (max-width: 768px) {
    body.woocommerce-cart:not(.woocommerce-order-received) .site-content {
        padding: 36px 20px 72px !important;
    }

    body.woocommerce-cart:not(.woocommerce-order-received) .entry-header {
        padding-bottom: 18px;
    }

    body.woocommerce-cart .wc-empty-cart-message {
        padding: 64px 8px 0;
    }

    body.woocommerce-cart .return-to-shop {
        margin-top: 24px;
        padding-bottom: 64px;
    }

    body.woocommerce-cart .woocommerce:has(.woocommerce-cart-form) {
        gap: 32px;
        padding-top: 28px;
    }

    body.woocommerce-cart .woocommerce-message,
    body.woocommerce-cart .woocommerce-info,
    body.woocommerce-cart .woocommerce-error {
        padding: 14px 16px 14px 42px;
        font-size: 13px;
    }

    body.woocommerce-cart .woocommerce-message::before,
    body.woocommerce-cart .woocommerce-info::before,
    body.woocommerce-cart .woocommerce-error::before {
        top: 14px;
        left: 14px;
    }

    body.woocommerce-cart table.cart,
    body.woocommerce-cart table.cart tbody {
        display: block;
        width: 100%;
    }

    body.woocommerce-cart table.cart thead {
        display: none;
    }

    body.woocommerce-cart table.cart tr.cart_item {
        position: relative;
        display: grid;
        grid-template-columns: 92px minmax(0, 1fr);
        grid-template-areas:
            'thumbnail name'
            'thumbnail price'
            'thumbnail quantity';
        column-gap: 18px;
        padding: 24px 32px 24px 0;
        border-top: 1px solid #dfe3e7;
        border-bottom: 1px solid #dfe3e7;
    }

    body.woocommerce-cart table.shop_table_responsive tr.cart_item td {
        display: block;
        width: auto;
        padding: 0;
        border: 0;
        text-align: left !important;
    }

    body.woocommerce-cart table.shop_table_responsive tr.cart_item td::before {
        display: none;
        content: none;
    }

    body.woocommerce-cart table.cart .product-remove {
        position: absolute;
        top: 18px;
        right: 0;
        z-index: 1;
    }

    body.woocommerce-cart table.cart .product-thumbnail {
        grid-area: thumbnail;
    }

    body.woocommerce-cart table.cart .product-thumbnail img {
        width: 92px !important;
        max-width: 92px !important;
        height: 92px;
    }

    body.woocommerce-cart table.cart .product-name {
        grid-area: name;
        min-width: 0;
        padding-right: 8px;
    }

    body.woocommerce-cart table.cart .product-name a {
        font-size: 14px;
        line-height: 1.45;
    }

    body.woocommerce-cart table.cart .product-price {
        grid-area: price;
        margin-top: 8px;
        color: #59616b;
    }

    body.woocommerce-cart table.cart .product-quantity {
        display: flex !important;
        align-items: center;
        grid-area: quantity;
        gap: 12px;
        margin-top: 14px;
    }

    body.woocommerce-cart table.shop_table_responsive tr.cart_item td.product-quantity::before {
        display: inline-block;
        flex: 0 0 auto;
        margin: 0;
        color: #69717b;
        content: attr(data-title);
        font-size: 12px;
        font-weight: 500;
        line-height: 1;
    }

    body.woocommerce-cart table.cart .product-subtotal {
        display: none !important;
    }

    body.woocommerce-cart table.cart tbody > tr:last-child,
    body.woocommerce-cart table.cart td.actions {
        display: block;
        width: 100%;
    }

    body.woocommerce-cart table.cart td.actions {
        padding-top: 24px;
    }

    body.woocommerce-cart table.cart td.actions .coupon {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        width: 100%;
    }

    body.woocommerce-cart table.cart td.actions .coupon .input-text {
        width: 100%;
    }

    body.woocommerce-cart table.cart td.actions > .button {
        width: 100%;
        margin-top: 12px;
    }

    body.woocommerce-cart .cart-collaterals .cart_totals {
        padding: 24px;
    }

    body.woocommerce-cart .cart_totals h2 {
        font-size: 30px;
    }
}

/* ============================================
   订单成功页面 - Order Received Page
   ============================================ */

.woocommerce-order-received {
    background: #ffffff;
}

body.woocommerce-order-received .site-content {
    max-width: 900px !important;
    margin: 0 auto !important;
    padding: 80px 40px 80px !important;
}

body.woocommerce-order-received .site-main {
    padding-top: 0 !important;
}

/* 成功消息 */
.woocommerce-order-received .woocommerce-notice {
    background: #f0f8f4;
    border-left: 4px solid #4caf50;
    padding: 20px 30px;
    margin-bottom: 30px;
    font-size: 16px;
    color: #2e7d32;
    border-radius: 0;
}

/* 隐藏原有的卡片式订单概览 */
.woocommerce-order-overview {
    display: none !important;
}

/* 创建简洁的订单信息区域 */
.order-info-summary {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    padding: 30px;
    margin-bottom: 40px;
}

.order-info-summary h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.order-info-summary .info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.order-info-summary .info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.order-info-summary .info-label {
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.order-info-summary .info-value {
    font-size: 16px;
    color: #1a1a1a;
    font-weight: 500;
}

/* 打印按钮区域 */
.order-print-section {
    text-align: center;
    margin: 40px 0 50px;
}

.order-print-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: #1a1a1a;
    color: #ffffff;
    border: none;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.order-print-button:hover {
    background: #a8c8e4;
    color: #1a1a1a;
}

.order-print-button i {
    font-size: 16px;
}

/* 订单详情区域 */
.woocommerce-order-details {
    margin-bottom: 50px;
}

.woocommerce-order-details h2 {
    font-size: 20px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 25px;
    padding: 15px 20px;
    border: 1px solid #1a1a1a !important;
    border-top: 1px solid #1a1a1a !important;
    border-right: 1px solid #1a1a1a !important;
    border-bottom: 1px solid #1a1a1a !important;
    border-left: 1px solid #1a1a1a !important;
    background: #ffffff;
}

.woocommerce-table--order-details {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
    border: 1px solid #e5e5e5 !important;
}

.woocommerce-table--order-details thead th {
    background: #f9f9f9 !important;
    padding: 15px !important;
    text-align: left !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border: none !important;
    border-bottom: 2px solid #e5e5e5 !important;
}

.woocommerce-table--order-details tbody td {
    padding: 20px 15px !important;
    border: none !important;
    border-bottom: 1px solid #f0f0f0 !important;
    vertical-align: top !important;
}

.woocommerce-table--order-details tbody tr:last-child td {
    border-bottom: none !important;
}

.woocommerce-table--order-details tfoot th,
.woocommerce-table--order-details tfoot td {
    padding: 15px !important;
    border: none !important;
    border-top: 2px solid #e5e5e5 !important;
    font-weight: 500 !important;
}

.woocommerce-table--order-details tfoot tr:last-child th,
.woocommerce-table--order-details tfoot tr:last-child td {
    font-size: 18px !important;
    font-weight: 600 !important;
    padding-top: 20px !important;
}

/* 隐藏默认的账单地址容器 */
.woocommerce-customer-details:not(:has(.woocommerce-table--customer-details)) {
    display: none !important;
}

/* 账单地址 */
.woocommerce-customer-details {
    margin-top: 50px;
}

.woocommerce-customer-details h2 {
    font-size: 20px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 25px;
    padding: 15px 20px;
    border: 1px solid #1a1a1a !important;
    border-top: 1px solid #1a1a1a !important;
    border-right: 1px solid #1a1a1a !important;
    border-bottom: 1px solid #1a1a1a !important;
    border-left: 1px solid #1a1a1a !important;
    background: #ffffff;
}

/* 账单地址表格样式 */
.woocommerce-table--customer-details {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e5e5e5 !important;
    margin-bottom: 0;
}

.woocommerce-table--customer-details tbody tr {
    border-bottom: 1px solid #f0f0f0;
}

.woocommerce-table--customer-details tbody tr:last-child {
    border-bottom: none;
}

.woocommerce-table--customer-details th {
    background: #f9f9f9 !important;
    padding: 15px !important;
    text-align: left !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border: none !important;
    width: 30%;
    vertical-align: top;
}

.woocommerce-table--customer-details th i {
    margin-right: 8px;
    color: #a8c8e4;
    font-size: 14px;
}

.woocommerce-table--customer-details td {
    padding: 20px 15px !important;
    border: none !important;
    vertical-align: top !important;
    font-size: 15px;
    color: #333;
    line-height: 1.6;
}

/* 侧边购物车抽屉在 footer 中全局输出，因此基础样式必须全局可用。 */
.cart-drawer {
    position: fixed;
    inset: 0;
    z-index: 1000000;
    display: none;
    pointer-events: none;
}

.cart-drawer.active {
    display: block;
    pointer-events: auto;
}

.cart-drawer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
    pointer-events: none;
}

.cart-drawer.active .cart-drawer-overlay {
    opacity: 1;
    pointer-events: auto;
}

.cart-drawer-container {
    position: absolute;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 90vw;
    height: 100%;
    background: #fff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    z-index: 1;
    pointer-events: auto;
}

.cart-drawer.active .cart-drawer-container {
    transform: translateX(0);
}

.cart-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.cart-drawer-title {
    margin: 0;
    font-size: 24px;
    font-weight: 400;
    font-style: italic;
    color: #1a1a1a;
}

.cart-drawer-close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.cart-drawer-close:hover {
    background: rgba(0, 0, 0, 0.05);
}

.cart-drawer-close svg {
    color: #333;
}

.cart-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-drawer-body::-webkit-scrollbar {
    width: 6px;
}

.cart-drawer-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.cart-drawer-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.cart-drawer-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.cart-drawer-item {
    display: flex;
    gap: 15px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.cart-drawer-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.cart-drawer-item-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 6px;
    background: #f8f8f8;
}

.cart-drawer-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-drawer-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cart-drawer-item-title {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: #1a1a1a;
}

.cart-drawer-item-title a {
    color: #1a1a1a;
    text-decoration: none;
}

.cart-drawer-item-title a:hover {
    color: #666;
}

.cart-drawer-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-drawer-item-quantity-label {
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #666;
}

.cart-drawer-item-qty-controls {
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.cart-drawer-item-qty-controls button {
    width: 28px;
    height: 28px;
    border: none;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: background 0.2s ease;
}

.cart-drawer-item-qty-controls button:hover {
    background: #f5f5f5;
}

.cart-drawer-item-qty-controls input {
    width: 40px;
    height: 28px;
    border: none;
    border-right: 1px solid #e0e0e0;
    border-left: 1px solid #e0e0e0;
    font-size: 13px;
    text-align: center;
    -moz-appearance: textfield;
}

.cart-drawer-item-qty-controls input::-webkit-outer-spin-button,
.cart-drawer-item-qty-controls input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-drawer-item-price {
    font-size: 15px;
    font-weight: 500;
    color: #1a1a1a;
}

.cart-drawer-empty {
    padding: 60px 20px;
    text-align: center;
}

.cart-drawer-empty-icon {
    margin-bottom: 20px;
    font-size: 48px;
    color: #ccc;
}

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

.cart-drawer-empty a {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    background: #1a1a1a;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-decoration: none;
    text-transform: uppercase;
    transition: background 0.3s ease;
}

.cart-drawer-empty a:hover {
    background: #333;
}

.cart-drawer-footer {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    background: #fff;
}

.cart-drawer-subtotal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.cart-drawer-subtotal-label {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #1a1a1a;
}

.cart-drawer-subtotal-amount {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.cart-drawer-note {
    margin: 0 0 15px;
    font-size: 12px;
    line-height: 1.5;
    color: #666;
}

.cart-drawer-checkout-btn {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    padding: 16px;
    border-radius: 6px;
    background: #1a1a1a;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    transition: background 0.3s ease;
}

.cart-drawer-checkout-btn:hover {
    background: #333;
}

.cart-drawer-inquiry-btn {
    display: block;
    width: 100%;
    margin-bottom: 0;
    padding: 16px;
    border: none;
    border-radius: 6px;
    background: #555;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-align: center;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s ease;
}

.cart-drawer-inquiry-btn:hover {
    background: #777;
}

.cart-drawer-view-cart {
    display: block;
    width: 100%;
    padding: 12px;
    color: #1a1a1a;
    font-size: 13px;
    text-align: center;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.cart-drawer-view-cart:hover {
    color: #666;
}

@media (max-width: 768px) {
    .cart-drawer-container {
        width: 100%;
        max-width: 100%;
    }
}

/* 打印样式 */
@media print {
    /* 设置打印页面边距为0，去除浏览器页头页脚 */
    @page {
        margin: 0;
        size: A4 portrait;
    }
    
    /* 防止分页 */
    html, body {
        height: auto !important;
        overflow: visible !important;
    }
    
    /* 彻底隐藏所有不需要的元素 */
    header,
    header.site-header,
    footer,
    footer.site-footer,
    .sanvella-footer,
    #wpadminbar,
    .top-notice-bar,
    #announcement-bar,
    .cart-drawer,
    .order-print-section,
    .order-print-button,
    .woocommerce-notice,
    .woocommerce-notice--success,
    .woocommerce-thankyou-order-received,
    .order-info-summary,
    banner,
    nav,
    nav.main-navigation,
    .site-navigation,
    contentinfo,
    .woocommerce-order-overview {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }
    
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    html, body {
        background: white !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        display: block !important;
    }
    
    body {
        font-size: 8pt !important;
        line-height: 1.25 !important;
    }
    
    .site, .site-content, article, .entry-content {
        padding: 10mm !important;
        margin: 0 !important;
        max-width: 100% !important;
        display: block !important;
    }
    
    /* 让订单详情成为第一个元素 */
    .woocommerce-order-details {
        display: block !important;
        margin: 0 0 2mm 0 !important;
        padding: 0 !important;
    }
    
    .woocommerce-customer-details {
        display: block !important;
        margin: 5mm 0 0 0 !important;
        padding: 0 !important;
    }
    
    /* 隐藏没有表格的账单地址（WooCommerce默认的） */
    .woocommerce-customer-details:not(:has(table)) {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }
    
    /* 标题 */
    .woocommerce-order-details h2,
    .woocommerce-customer-details h2 {
        font-size: 10pt !important;
        font-weight: bold !important;
        border: 1px solid #333 !important;
        padding: 1.5mm 2mm !important;
        margin-top: 0 !important;
        margin-bottom: 1.5mm !important;
        display: block !important;
        letter-spacing: 0.2px !important;
    }
    
    /* 订单详情和账单地址区域 */
    .woocommerce-order-details,
    .woocommerce-customer-details {
        margin-bottom: 3mm;
    }
    
    /* 表格 */
    table {
        width: 100% !important;
        border-collapse: collapse !important;
        margin-bottom: 3mm !important;
        border: 1px solid #ddd !important;
        display: table !important;
    }
    
    table thead,
    table tbody,
    table tfoot {
        display: table-row-group !important;
    }
    
    table tr {
        display: table-row !important;
        line-height: 1.25 !important;
    }
    
    table th,
    table td {
        display: table-cell !important;
    }
    
    table th {
        background: #f5f5f5 !important;
        padding: 1.5mm 2mm !important;
        text-align: left !important;
        font-size: 8pt !important;
        font-weight: bold !important;
        border-bottom: 1px solid #ddd !important;
    }
    
    table td {
        padding: 1.5mm 2mm !important;
        font-size: 8pt !important;
        border-bottom: 1px solid #eee !important;
        line-height: 1.2 !important;
    }
    
    table tfoot th,
    table tfoot td {
        border-top: 1px solid #ddd !important;
        font-weight: bold !important;
        background: #f9f9f9 !important;
        font-size: 9pt !important;
    }
    
    /* 链接 */
    a {
        color: black;
        text-decoration: none;
    }
}
