﻿:root {
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-soft: rgba(37, 99, 235, 0.1);
    --primary-dark: #1d4ed8;
    --secondary: #7c3aed;
    --success: #10b981;
    --danger: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.1);
    --warning: #f59e0b;
    --info: #3b82f6;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-900: #111827;
    --radius-full: 9999px;
    --radius-xl: 24px;
    --radius-lg: 16px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 20px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 12px 30px rgba(0, 0, 0, 0.15);
    --shadow-2xl: 0 20px 40px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.simple-cart-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: white;
    padding: 1.5rem 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    margin-top: 6rem;
}

.cart-title {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .cart-title i {
        background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

.cart-badge {
    background: var(--primary-soft);
    color: var(--primary-dark);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .cart-badge i {
        color: var(--primary);
    }

.cart-empty {
    text-align: center;
    padding: 5rem 2rem;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    animation: fadeInUp 0.5s ease;
}

.cart-empty-icon {
    width: 120px;
    height: 120px;
    background: var(--primary-soft);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    animation: pulse 2s infinite;
}

    .cart-empty-icon i {
        font-size: 3rem;
        color: var(--primary);
    }

.cart-empty h3 {
    font-size: 2rem;
    color: var(--gray-900);
    margin-bottom: 1rem;
    font-weight: 700;
}

.cart-empty p {
    color: var(--gray-600);
    margin-bottom: 2.5rem;
    font-size: 1.125rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.btn-shop {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1.125rem;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    border: none;
    cursor: pointer;
}

    .btn-shop:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-xl);
        filter: brightness(1.1);
    }

.cart-items {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    margin-bottom: 2rem;
    animation: fadeInUp 0.5s ease;
}

.cart-item {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 2rem;
    padding: 2rem;
    border-bottom: 1px solid var(--gray-200);
    transition: var(--transition);
    background: white;
}

    .cart-item:hover {
        background: var(--gray-50);
    }

    .cart-item:last-child {
        border-bottom: none;
    }

.cart-item-image {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 2px solid var(--gray-200);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.cart-item:hover .cart-item-image {
    border-color: var(--primary-light);
    transform: scale(1.02);
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.cart-item:hover .cart-item-image img {
    transform: scale(1.1);
}

.cart-item-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

    .cart-item-details h3 {
        font-size: 1.25rem;
        font-weight: 700;
        color: var(--gray-900);
        margin-bottom: 0.5rem;
    }

.cart-item-options {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.option-tag {
    background: var(--gray-100);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    color: var(--gray-700);
    font-size: 0.75rem;
    font-weight: 500;
}

.cart-item-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

    .cart-item-price small {
        font-size: 0.875rem;
        color: var(--gray-500);
        font-weight: normal;
    }

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 1rem;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    padding: 0.25rem;
    box-shadow: var(--shadow-sm);
}

.quantity-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: white;
    color: var(--gray-700);
    font-size: 1rem;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

    .quantity-btn:hover:not(:disabled) {
        background: var(--primary);
        color: white;
        transform: scale(1.1);
        box-shadow: var(--shadow-md);
    }

    .quantity-btn:disabled {
        opacity: 0.3;
        cursor: not-allowed;
        background: var(--gray-200);
    }

.quantity-value {
    font-weight: 700;
    min-width: 40px;
    text-align: center;
    color: var(--gray-900);
    font-size: 1.125rem;
}

.remove-item {
    background: none;
    border: 1px solid var(--danger);
    color: var(--danger);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .remove-item:hover {
        background: var(--danger);
        color: white;
        border-color: var(--danger);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    }

.cart-summary {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 2rem;
    animation: fadeInUp 0.5s ease 0.1s both;
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-200);
}

    .summary-header h3 {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--gray-900);
    }

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px dashed var(--gray-200);
    color: var(--gray-700);
}

    .summary-row.grand-total {
        background: linear-gradient(135deg, var(--primary-soft) 0%, #f0f4ff 100%);
        padding: 1.25rem 1.5rem;
        border-radius: var(--radius-lg);
        margin: 1rem 0 1.5rem;
        border: none;
        color: var(--primary-dark);
        font-size: 1.75rem;
    }

.checkout-btn {
    width: 100%;
    padding: 1.25rem;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

    .checkout-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: var(--transition);
    }

    .checkout-btn:hover::before {
        left: 100%;
    }

    .checkout-btn:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-xl);
        filter: brightness(1.1);
    }

    .checkout-btn i {
        font-size: 1.5rem;
    }

.clear-cart-btn {
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    width: auto;
}

    .clear-cart-btn:hover {
        background: var(--danger-light);
        color: var(--danger);
        border-color: var(--danger);
        transform: translateY(-2px);
    }

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    max-width: 450px;
    width: 90%;
    box-shadow: var(--shadow-2xl);
    animation: slideUp 0.3s ease;
    text-align: center;
}

.modal-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-soft);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

    .modal-icon i {
        font-size: 2.5rem;
        color: var(--primary);
    }

.modal-content h3 {
    font-size: 1.75rem;
    color: var(--gray-900);
    margin-bottom: 1rem;
    font-weight: 700;
}

.modal-content p {
    color: var(--gray-600);
    margin-bottom: 2rem;
    font-size: 1.125rem;
    line-height: 1.6;
}

.order-summary {
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
}

    .order-summary h4 {
        color: var(--gray-900);
        font-size: 1.125rem;
        margin-bottom: 1rem;
        font-weight: 600;
    }

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.95rem;
}

    .order-item:last-child {
        border-bottom: none;
    }

.order-item-name {
    color: var(--gray-700);
    flex: 1;
}

.order-item-qty {
    color: var(--gray-600);
    margin: 0 1rem;
    font-size: 0.875rem;
}

.order-item-price {
    color: var(--gray-900);
    font-weight: 600;
}

.order-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--gray-300);
    font-weight: 700;
    color: var(--gray-900);
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.modal-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

    .modal-btn.cancel {
        background: var(--gray-100);
        color: var(--gray-700);
    }

        .modal-btn.cancel:hover {
            background: var(--gray-200);
            transform: translateY(-2px);
        }

    .modal-btn.confirm {
        background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
        color: white;
    }

        .modal-btn.confirm:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-lg);
            filter: brightness(1.1);
        }

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    color: white;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 2000;
    animation: slideIn 0.3s ease;
    font-weight: 500;
}

.notification-success {
    background: var(--success);
}

.notification-error {
    background: var(--danger);
}

.notification-warning {
    background: var(--warning);
}

.notification-info {
    background: var(--info);
}

/* ===== 动画 ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.3);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(37, 99, 235, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .cart-item {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1rem;
        padding: 1.5rem;
    }

    .cart-item-image {
        margin: 0 auto;
    }

    .cart-item-actions {
        align-items: center;
    }

    .cart-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .modal-buttons {
        flex-direction: column;
    }

    .summary-row.grand-total {
        font-size: 1.25rem;
    }
}

@media (max-width: 576px) {
    .simple-cart-container {
        padding: 0 1rem;
    }

    .cart-header {
        padding: 1rem;
        margin-top: 4rem;
    }

    .cart-title {
        font-size: 1.5rem;
    }

    .cart-empty h3 {
        font-size: 1.5rem;
    }

    .btn-shop {
        padding: 0.75rem 2rem;
        font-size: 1rem;
    }

    .cart-item-price {
        font-size: 1.25rem;
    }

    .checkout-btn {
        padding: 1rem;
        font-size: 1rem;
    }

    .modal-content {
        padding: 1.5rem;
    }

        .modal-content h3 {
            font-size: 1.5rem;
        }
}

.container-fluid.m-0.p-0 {
    margin: 0;
    padding: 0;
}
