/* 购物车页面两列布局 */
.cart-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    background: #ffffff;
}

/* 两列网格布局 */
.cart-layout-grid {
    display: grid;
    grid-template-columns: 2fr 1fr; /* 左边详情占2份，右边结账占1份 */
    gap: 40px;
    align-items: start;
}

/* 左侧购物车详情区域 */
.cart-details-section {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(139, 69, 19, 0.1);
    overflow: hidden;
}

/* 右侧结账摘要区域 */
.cart-summary-section {
    background: #f5f1eb;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(139, 69, 19, 0.1);
    position: sticky; /* 右侧结账区域固定 */
    top: 20px;
}

/* 购物车表格样式 */
.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table thead th {
    background: #8b4513;
    color: #ffffff;
    padding: 20px;
    font-weight: 600;
    text-align: left;
}

.cart-table tbody td {
    padding: 20px;
    border-bottom: 1px solid #f5f1eb;
    vertical-align: middle;
}

/* 产品图片 */
.cart-product-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
}

/* 产品信息 */
.cart-product-info {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 15px;
    align-items: center;
}

.cart-product-details h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #8b4513;
    margin-bottom: 5px;
}

.cart-product-details p {
    color: #a0522d;
    font-size: 0.9rem;
}

/* 数量选择器 */
.quantity-selector {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
    max-width: 120px;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border: 2px solid #f5f1eb;
    background: #ffffff;
    color: #8b4513;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background: #dc143c;
    color: #ffffff;
    border-color: #dc143c;
}

.quantity-input {
    width: 100%;
    text-align: center;
    border: 2px solid #f5f1eb;
    border-radius: 6px;
    padding: 8px;
    font-size: 0.9rem;
}

/* 价格显示 */
.cart-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: #8b4513;
}

.cart-subtotal {
    font-size: 1.2rem;
    font-weight: 700;
    color: #dc143c;
}

/* 删除按钮 */
.remove-cart-item {
    background: #dc143c;
    color: #ffffff;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.remove-cart-item:hover {
    background: #b91c3c;
    transform: scale(1.05);
}

/* 右侧结账摘要样式 */
.cart-summary-header {
    text-align: center;
    margin-bottom: 25px;
}

.cart-summary-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #8b4513;
    margin-bottom: 8px;
}

.cart-summary-subtitle {
    color: #a0522d;
    font-size: 1rem;
}

.cart-summary-content {
    margin-bottom: 25px;
}

.cart-subtotal-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #e8dcc0;
}

.subtotal-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #8b4513;
}

.subtotal-amount {
    font-size: 1.3rem;
    font-weight: 700;
    color: #dc143c;
}

.cart-summary-note {
    text-align: center;
    margin-top: 15px;
}

.cart-summary-note p {
    color: #a0522d;
    font-size: 0.9rem;
    font-style: italic;
}

/* 结账按钮区域 */
.cart-checkout-section {
    text-align: center;
}

.checkout-button-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #dc143c 0%, #b91c3c 100%);
    color: #ffffff;
    padding: 18px 40px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 20, 60, 0.3);
    width: 100%; /* 按钮占满容器宽度 */
    justify-content: center;
}

.checkout-button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 20, 60, 0.4);
    color: #ffffff;
}

.button-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.checkout-button-primary:hover .button-icon {
    transform: translateX(3px);
}

/* 安全徽章 */
.checkout-security {
    margin-top: 20px;
}

.security-badges {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    justify-items: center;
}

.security-badge {
    background: #ffffff;
    color: #8b4513;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid #e8dcc0;
    text-align: center;
}

/* 强制两列布局 */
.cart-layout-grid {
    display: grid !important;
    grid-template-columns: 2fr 1fr !important; /* 左边详情占2份，右边结账占1份 */
    gap: 40px !important;
    align-items: start !important;
    width: 100% !important;
}

/* 左侧购物车详情区域 */
.cart-details-section {
    background: #ffffff !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 20px rgba(139, 69, 19, 0.1) !important;
    overflow: hidden !important;
    width: 100% !important;
}

/* 右侧结账摘要区域 */
.cart-summary-section {
    background: #f5f1eb !important;
    border-radius: 16px !important;
    padding: 30px !important;
    box-shadow: 0 4px 20px rgba(139, 69, 19, 0.1) !important;
    position: sticky !important; /* 右侧结账区域固定 */
    top: 20px !important;
    width: 100% !important;
    height: fit-content !important;
}

/* 确保购物车表格在左侧容器内 */
.cart-details-section .woocommerce-cart-form {
    width: 100% !important;
    margin: 0 !important;
}

/* 确保结账摘要在右侧容器内 */
.cart-summary-section {
    grid-column: 2 !important;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .cart-layout-grid {
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .cart-layout-grid {
        grid-template-columns: 1fr !important; /* 移动端改为单列 */
        gap: 20px !important;
    }
    
    .cart-summary-section {
        position: static !important; /* 移动端取消sticky */
        grid-column: 1 !important; /* 移动端占满宽度 */
        order: -1 !important; /* 移动端结账区域放在上面 */
    }
    
    .cart-page-container {
        padding: 20px 15px;
    }
    
    .cart-table thead th,
    .cart-table tbody td {
        padding: 15px 10px;
    }
    
    .cart-product-info {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .cart-product-image {
        width: 60px;
        height: 60px;
    }
    
    .cart-summary-section {
        padding: 20px;
    }
    
    .checkout-button-primary {
        padding: 15px 30px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .cart-page-header {
        padding: 20px 0;
    }
    
    .cart-page-title {
        font-size: 1.8rem;
    }
    
    .cart-table {
        font-size: 0.9rem;
    }
}

/* 隐藏购物车页面的entry-header区域 */
.cart .entry-header,
.cart .ast-no-thumbnail,
.cart .entry-title {
    display: none !important;
}

/* 或者更具体的选择器 */
body.woocommerce-cart .entry-header,
body.woocommerce-cart .ast-no-thumbnail,
body.woocommerce-cart .entry-title {
    display: none !important;
}

/* 确保隐藏后不会占用空间 */
.cart .entry-header {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* =================================================== 
   空购物车页面样式 - 优化版本 (匹配现有HTML结构)
   =================================================== */

/* 空购物车主容器 */
.cart-empty-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f9f7f4 0%, #ffffff 100%);
}

/* 空购物车内容区域 */
.cart-empty-content {
    text-align: center;
    background: #ffffff;
    padding: 60px 40px;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(139, 69, 19, 0.12);
    border: 1px solid rgba(139, 69, 19, 0.08);
    max-width: 600px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.cart-empty-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #dc143c 0%, #8b4513 100%);
}

/* 图标样式 */
.cart-empty-icon {
    display: inline-block;
    padding: 25px;
    background: linear-gradient(135deg, #f5f1eb 0%, #ffffff 100%);
    border-radius: 50%;
    margin-bottom: 30px;
    box-shadow: 0 15px 40px rgba(139, 69, 19, 0.1);
    position: relative;
}

.cart-empty-icon::after {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    background: linear-gradient(135deg, #dc143c, #8b4513);
    border-radius: 50%;
    z-index: -1;
    opacity: 0.1;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
        opacity: 0.1; 
    }
    50% { 
        transform: scale(1.05); 
        opacity: 0.2; 
    }
}

.cart-empty-icon svg {
    color: #8b4513;
    filter: drop-shadow(0 4px 12px rgba(139, 69, 19, 0.2));
    transition: transform 0.3s ease;
}

.cart-empty-icon:hover svg {
    transform: scale(1.1);
}

/* 标题样式 */
.cart-empty-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    background: linear-gradient(135deg, #8b4513 0%, #dc143c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(139, 69, 19, 0.1);
}

/* 副标题样式 */
.cart-empty-subtitle {
    font-size: 1.3rem;
    color: #a0522d;
    margin-bottom: 40px;
    line-height: 1.6;
    opacity: 0.9;
    font-weight: 400;
}

/* 按钮容器 */
.cart-empty-actions {
    margin-bottom: 50px;
}

/* 按钮样式 */
.cart-empty-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 40px;
    margin: 0 10px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 180px;
    transform: translateY(0);
}

.cart-empty-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.cart-empty-btn:hover::before {
    left: 100%;
}

.cart-empty-btn.primary {
    background: linear-gradient(135deg, #dc143c 0%, #b91c3c 100%);
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(220, 20, 60, 0.3);
    border: none;
}

.cart-empty-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(220, 20, 60, 0.4);
    color: #ffffff;
}

/* 特色功能区域 */
.cart-empty-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid rgba(139, 69, 19, 0.1);
}

.feature-item {
    text-align: center;
    padding: 25px 15px;
    background: linear-gradient(135deg, #f9f7f4 0%, #ffffff 100%);
    border-radius: 16px;
    transition: all 0.3s ease;
    border: 1px solid rgba(139, 69, 19, 0.05);
    position: relative;
    overflow: hidden;
}

.feature-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #dc143c, #8b4513);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-item:hover::before {
    transform: scaleX(1);
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(139, 69, 19, 0.12);
    background: #ffffff;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
    filter: grayscale(0);
    transition: all 0.3s ease;
}

.feature-item:hover .feature-icon {
    transform: scale(1.1);
    filter: brightness(1.2);
}

.feature-item h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #8b4513;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.feature-item:hover h3 {
    color: #dc143c;
}

.feature-item p {
    color: #a0522d;
    font-size: 0.9rem;
    line-height: 1.5;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.feature-item:hover p {
    opacity: 1;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .cart-empty-content {
        padding: 50px 30px;
    }
    
    .cart-empty-features {
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .cart-empty-container {
        padding: 40px 20px;
    }
    
    .cart-empty-content {
        padding: 40px 25px;
    }
    
    .cart-empty-title {
        font-size: 2.2rem;
    }
    
    .cart-empty-subtitle {
        font-size: 1.1rem;
    }
    
    .cart-empty-features {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 30px;
        padding-top: 30px;
    }
    
    .cart-empty-btn {
        display: block;
        margin: 10px 0;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .cart-empty-container {
        padding: 30px 15px;
    }
    
    .cart-empty-content {
        padding: 30px 20px;
    }
    
    .cart-empty-title {
        font-size: 1.9rem;
    }
    
    .cart-empty-icon {
        padding: 20px;
        margin-bottom: 25px;
    }
    
    .cart-empty-icon svg {
        width: 80px;
        height: 80px;
    }
    
    .feature-item {
        padding: 20px 15px;
    }
    
    .cart-empty-btn {
        padding: 15px 30px;
        font-size: 1rem;
    }
}

