/**
 * UD 購物車頁面樣式
 * 支援多個預約項目管理、大人小孩分別計價
 */

/* 購物車主要布局 */
.cart-section {
	margin-top: 50px;
    background: var(--ud-bg-light);
    min-height: 80vh;
}

/* 空購物車狀態 */
.empty-cart {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(46, 139, 123, 0.1);
}

.empty-cart-content {
    max-width: 400px;
    margin: 0 auto;
}

.empty-cart-icon {
    font-size: 4rem;
    color: var(--ud-text-secondary);
    margin-bottom: 1.5rem;
}

.empty-cart h4 {
    color: var(--ud-text-primary);
    margin-bottom: 1rem;
}

.empty-cart p {
    margin-bottom: 2rem;
}

/* 購物車項目列表 */
.cart-items {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(46, 139, 123, 0.1);
    overflow: hidden;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid var(--ud-bg-section);
    background: var(--ud-bg-light);
}

.cart-header h4 {
    margin: 0;
    color: var(--ud-text-primary);
}

.cart-items-container {
    padding: 1rem;
}

/* 購物車項目卡片 */
.cart-item {
    border: 2px solid #E9ECEF;
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.cart-item:hover {
    border-color: var(--ud-primary-light);
    box-shadow: 0 4px 15px rgba(46, 139, 123, 0.1);
}

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

.cart-item-content {
    display: flex;
    padding: 1.5rem;
}

.cart-item-image {
    position: relative;
    width: 120px;
    height: 120px;
    margin-right: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

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

.cart-item-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--ud-primary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.cart-item-title {
    margin: 0;
    color: var(--ud-text-primary);
    font-weight: 600;
    font-size: 1.1rem;
}

.cart-item-remove {
    padding: 0.25rem 0.5rem;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.cart-item-datetime,
.cart-item-guests,
.cart-item-duration {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--ud-text-secondary);
}

.cart-item-datetime i,
.cart-item-guests i,
.cart-item-duration i {
    color: var(--ud-primary);
}

.cart-item-pricing {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

/* 客人定價與數量控制 */
.guest-pricing {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.adult-pricing,
.child-pricing {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-width: 250px;
    padding: 0.75rem;
    background: var(--ud-bg-light);
    border-radius: 8px;
    border: 1px solid #E9ECEF;
}

.guest-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.guest-type {
    font-size: 0.9rem;
    color: var(--ud-text-secondary);
    min-width: 40px;
    font-weight: 500;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-controls .btn {
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
}

.quantity-value {
    min-width: 32px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--ud-text-primary);
}

.guest-price {
    font-weight: 600;
    color: var(--ud-primary);
    font-size: 0.95rem;
    min-width: 80px;
    text-align: right;
}

.cart-item-total {
    text-align: right;
}

.total-price {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--ud-primary);
}

.cart-item-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--ud-bg-section);
    background: var(--ud-bg-light);
}

/* 購物車摘要側邊欄 */
.cart-summary-sidebar {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.summary-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 15px rgba(46, 139, 123, 0.1);
}

.summary-section:last-child {
    margin-bottom: 0;
}

.summary-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--ud-text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--ud-bg-section);
}

.summary-subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ud-text-primary);
    margin-bottom: 1rem;
}

.summary-content {
    space-y: 0.75rem;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.summary-line.subtotal {
    font-weight: 600;
    color: var(--ud-text-primary);
}

.summary-line.total {
    font-size: 1.2rem;
    padding-top: 1rem;
}

.summary-line.total strong {
    color: var(--ud-primary);
}

/* 優惠券輸入 */
.promo-code-input {
    margin-bottom: 1rem;
}

.promo-message {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    padding: 0.5rem;
    border-radius: 4px;
}

.promo-message.text-success {
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid var(--ud-available);
}

.promo-message.text-danger {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid var(--ud-full);
}

/* 聯絡資訊表單 */
.contact-info-form .form-label {
    font-weight: 600;
    color: var(--ud-text-primary);
    margin-bottom: 0.5rem;
}

.contact-info-form .form-control {
    border: 2px solid #E9ECEF;
    border-radius: 8px;
    padding: 0.75rem;
    transition: border-color 0.3s ease;
}

.contact-info-form .form-control:focus {
    border-color: var(--ud-primary);
    box-shadow: 0 0 0 0.2rem rgba(46, 139, 123, 0.25);
}

/* 操作按鈕 */
.summary-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.summary-actions .btn {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
}

.quick-actions {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 1rem;
}

.quick-actions .btn {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.85rem;
}

/* 推薦商品區域 */
.recommended-section {
    padding: 3rem 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--ud-text-primary);
    text-align: center;
    margin-bottom: 2rem;
}

.product-recommendation-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(46, 139, 123, 0.1);
    transition: transform 0.3s ease;
}

.product-recommendation-card:hover {
    transform: translateY(-5px);
}

.recommendation-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.recommendation-content {
    padding: 1.5rem;
}

.recommendation-content h6 {
    margin-bottom: 0.5rem;
    color: var(--ud-text-primary);
}

.recommendation-content .price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ud-primary);
    margin-bottom: 1rem;
}

/* 響應式設計 */
@media (max-width: 992px) {
    .cart-summary-sidebar {
        position: static;
        margin-top: 2rem;
    }
    
    .summary-section {
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .cart-item-content {
        flex-direction: column;
        padding: 1rem;
    }
    
    .cart-item-image {
        width: 100%;
        height: 200px;
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .cart-item-pricing {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .adult-pricing,
    .child-pricing {
        min-width: auto;
    }
    
    .cart-item-total {
        text-align: center;
        padding: 1rem;
        background: var(--ud-bg-light);
        border-radius: 8px;
    }
    
    .cart-item-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .cart-item-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .quick-actions {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .cart-section {
        padding: 2rem 0;
    }
    
    .cart-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .summary-section {
        padding: 1rem;
    }
    
    .cart-item-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .summary-actions .btn {
        padding: 1rem;
        font-size: 1rem;
    }
}

/* 動畫效果 */
@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.cart-item {
    animation: slideInFromRight 0.3s ease-out;
}

.summary-section {
    animation: slideInFromRight 0.3s ease-out;
}

/* 載入狀態 */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--ud-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 成功/錯誤狀態 */
.alert-success {
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid var(--ud-available);
    color: var(--ud-available);
}

.alert-danger {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid var(--ud-full);
    color: var(--ud-full);
}

.alert-info {
    background: rgba(46, 139, 123, 0.1);
    border: 1px solid var(--ud-primary);
    color: var(--ud-primary);
} 

/* ===== 購物車頁面樣式 ===== */

/* ✅ Toast 通知自定義樣式 */
.toast-container {
    z-index: 9999 !important;
}

.toast {
    min-width: 350px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: none;
    backdrop-filter: blur(10px);
}

.toast.bg-success {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
}

.toast.bg-danger {
    background: linear-gradient(135deg, #dc3545, #e74c3c) !important;
}

.toast.bg-warning {
    background: linear-gradient(135deg, #ffc107, #f39c12) !important;
}

.toast.bg-info {
    background: linear-gradient(135deg, #17a2b8, #3498db) !important;
}

.toast-header {
    font-weight: 600;
    font-size: 0.95rem;
}

.toast-body {
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Toast 確認對話框按鈕樣式 */
.toast .btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 0.375rem;
    font-weight: 500;
}

.toast .btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    border: none;
    color: white;
}

.toast .btn-danger:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
    transform: translateY(-1px);
}

.toast .btn-secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    border: none;
    color: white;
}

.toast .btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268, #495057);
    transform: translateY(-1px);
}

/* 購物車項目樣式 */ 