/* 购物车容器 */
.shopping-cart-container {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 30%;
    z-index: 1000;
    font-family: Arial, sans-serif;
    pointer-events: none;
}

.shopping-cart-container * {
    pointer-events: auto;
}

/* 购物车按钮 - 收缩状态 */
.cart-toggle-btn {
    position: absolute;
    top: 200px;
    right: 0;
    background-color: var(--fx-clr-pr-1);
    color: white;
    padding: 15px 10px;
    border-radius: 5px 0px 0px 5px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    z-index: 1001;
}

#customRequirementToggle {
    top: 400px;
}

.cart-toggle-btn:hover {
    background-color: var(--fx-clr-pr-2);
}

.cart-text {
    font-size: 12px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    margin-bottom: 10px;
}

.cart-icon {
    font-size: 20px;
    margin-bottom: 10px;
}

.cart-count {
    background-color: #0056b3;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* 购物车面板 - 展开状态 */
.cart-panel {
    width: 100%;
    height: 100%;
    background-color: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.3);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.cart-panel.show {
    transform: translateX(0);
}

/* 购物车头部 */
.cart-header {
    background-color: #f8f9fa;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #dee2e6;
}

.cart-header h5 {
    margin: 0;
    font-weight: bold;
}

.close-cart {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-cart:hover {
    color: #000;
}

/* 购物车主体 */
.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

/* 购物车项目 */
.cart-items {
    flex: 1;
    margin-bottom: 20px;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.item-info {
    flex: 1;
}

.item-info .item-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.item-info .item-details {
    font-size: 14px;
    color: #666;
}

.item-quantity {
    display: flex;
    align-items: center;
    margin: 0 15px;
}

.quantity-btn {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
}

.quantity-btn:hover {
    background-color: #e9ecef;
}

.quantity-value {
    margin: 0 10px;
    min-width: 30px;
    text-align: center;
}

.remove-item {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 24px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-item:hover {
    color: #a71e2a;
}

.empty-cart-message {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 40px 0;
}

/* 购物车表单 */
.cart-form {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #dee2e6;
}

.cart-form h6 {
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: bold;
}

.form-label {
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    margin-bottom: 15px;
    box-sizing: border-box;
}

.btn-primary {
    background-color: var(--fx-clr-pr-1);
    border: none;
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.w-100 {
    width: 100%;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .shopping-cart-container {
        width: 40%;
    }
}

@media (max-width: 992px) {
    .shopping-cart-container {
        width: 50%;
    }
}

@media (max-width: 768px) {
    .shopping-cart-container {
        width: 70%;
    }
    
    .cart-toggle-btn {
        top: 20%;
        padding: 10px 8px;
    }
    
    .cart-text {
        font-size: 10px;
    }
    
    .cart-icon {
        font-size: 16px;
    }
    
    .cart-count {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
}

@media (max-width: 576px) {
    .shopping-cart-container {
        width: 90%;
    }
    
    .cart-body {
        padding: 15px;
    }
    
    .cart-form {
        padding: 15px;
    }
}