/* 購物車圖標樣式 */
.cart-icon {
    position: relative;
}

.cart-icon a {
    color: #333;
    transition: color 0.3s ease;
}

.cart-icon a:hover {
    color: #007bff;
}

.cart-count {
    min-width: 18px;
    height: 18px;
    font-size: 0.7rem;
    line-height: 1;
    padding: 2px 4px;
    display: none; /* 預設隱藏，當有商品時才顯示 */
}

.cart-count.show {
    display: inline-block !important;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .cart-icon {
        margin-right: 10px;
    }
    
    .cart-count {
        font-size: 0.6rem;
        min-width: 16px;
        height: 16px;
    }
}

/* 購物車頁面樣式 */
.cart-page .quantity-input {
    border-left: 0;
    border-right: 0;
    background-color: #fff;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

.cart-page .quantity-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    border-color: #007bff;
    background-color: #f8f9ff;
}

/* 美化數量按鈕組 */
.cart-page .input-group {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.cart-page .input-group:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

/* 數量按鈕樣式 */
.cart-page .quantity-minus,
.cart-page .quantity-plus {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cart-page .quantity-minus:hover,
.cart-page .quantity-plus:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.cart-page .quantity-minus:active,
.cart-page .quantity-plus:active {
    transform: scale(0.95);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

/* 減號按鈕特殊樣式 */
.cart-page .quantity-minus {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.cart-page .quantity-minus:hover {
    background: linear-gradient(135deg, #ff5252 0%, #e53e3e 100%);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

/* 加號按鈕特殊樣式 */
.cart-page .quantity-plus {
    background: linear-gradient(135deg, #51cf66 0%, #40c057 100%);
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.cart-page .quantity-plus:hover {
    background: linear-gradient(135deg, #47c363 0%, #37b24d 100%);
    box-shadow: 0 4px 12px rgba(81, 207, 102, 0.4);
}

/* 數量輸入框美化 */
.cart-page .quantity-input {
    border: 2px solid #e9ecef;
    height: 40px;
    font-size: 1rem;
    min-width: 60px;
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
}

.cart-page .quantity-input:focus {
    border-color: #007bff;
    background: #ffffff;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 按鈕波紋效果 */
.cart-page .quantity-minus::before,
.cart-page .quantity-plus::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.cart-page .quantity-minus:active::before,
.cart-page .quantity-plus:active::before {
    width: 30px;
    height: 30px;
}

/* 禁用狀態樣式 */
.cart-page .quantity-minus:disabled,
.cart-page .quantity-plus:disabled {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    cursor: not-allowed;
    opacity: 0.6;
}

.cart-page .quantity-minus:disabled:hover,
.cart-page .quantity-plus:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* 購物車空狀態樣式 */
.cart-empty {
    padding: 60px 20px;
}

.cart-empty .ali-icon {
    font-size: 4rem;
    color: #6c757d;
    margin-bottom: 20px;
}

/* 購物車商品圖片樣式 */
.cart-item-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

/* 購物車總計區域 */
.cart-summary {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.cart-summary .total-price {
    font-size: 1.25rem;
    font-weight: bold;
    color: #28a745;
}

/* 移動端優化 */
@media (max-width: 768px) {
    .cart-page .input-group {
        width: 100px !important;
    }
    
    .cart-page .quantity-minus,
    .cart-page .quantity-plus {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .cart-page .quantity-input {
        height: 35px;
        min-width: 50px;
        font-size: 0.9rem;
    }
} 