/**
 * FileToAI - Cart & Checkout Styles
 * Styles pour le panier et le checkout
 */

/* ===== CART SECTION ===== */
.cart-section {
    padding: 100px 0 80px;
    min-height: 70vh;
    background: var(--bg-light);
}

.cart-header {
    text-align: center;
    margin-bottom: 50px;
}

.cart-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 10px;
}

.cart-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* ===== CART CONTENT ===== */
.cart-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    margin-bottom: 40px;
}

/* ===== CART ITEMS ===== */
.cart-items-container {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto auto auto;
    gap: 20px;
    align-items: center;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 15px;
    transition: all 0.3s;
}

.cart-item:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.cart-item-image {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

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

.cart-item-details h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 5px;
}

.cart-item-category {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.cart-item-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

/* ===== QUANTITY CONTROLS ===== */
.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    background: var(--white);
    border-radius: 4px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.qty-input {
    width: 50px;
    height: 32px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
}

.cart-item-total {
    min-width: 80px;
    text-align: right;
}

.cart-item-total p {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-main);
}

.cart-item-remove {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-light);
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.cart-item-remove:hover {
    background: #ef4444;
    color: var(--white);
    transform: rotate(90deg);
}

/* ===== EMPTY CART ===== */
.empty-cart {
    text-align: center;
    padding: 80px 20px;
}

.empty-cart-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-cart h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
}

.empty-cart p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* ===== CART SIDEBAR ===== */
.cart-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cart-summary-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.cart-summary-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 20px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
}

.cart-summary-row.savings {
    color: var(--success);
    font-weight: 600;
}

.cart-summary-row.total {
    border-bottom: none;
    padding-top: 20px;
    margin-top: 10px;
    border-top: 2px solid var(--border);
    font-size: 1.3rem;
    font-weight: 700;
}

.cart-summary-card .btn {
    margin-top: 20px;
}

.btn-block {
    width: 100%;
    display: block;
}

/* ===== CART BENEFITS ===== */
.cart-benefits {
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 25px;
}

.cart-benefits h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 15px;
}

.cart-benefits ul {
    list-style: none;
}

.cart-benefits li {
    padding: 8px 0;
    color: var(--text-main);
    font-size: 0.95rem;
}

/* ===== SECURE BADGE ===== */
.cart-secure {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.secure-badge {
    display: flex;
    align-items: center;
    gap: 15px;
}

.secure-icon {
    font-size: 2rem;
}

.secure-badge strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text-main);
    margin-bottom: 3px;
}

.secure-badge p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

/* ===== CART CONTINUE ===== */
.cart-continue {
    text-align: center;
    padding-top: 20px;
}

/* ===== CART NOTIFICATION ===== */
.cart-notification {
    position: fixed;
    top: 100px;
    right: -400px;
    z-index: 99999;
    transition: right 0.3s ease;
    pointer-events: none;
}

.cart-notification.show {
    right: 20px;
}

.cart-notification-content {
    background: var(--success);
    color: var(--white);
    padding: 15px 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-notification-icon {
    font-size: 1.5rem;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-notification-text {
    font-weight: 600;
    font-size: 0.95rem;
}

/* ===== CART COUNT BADGE ===== */
.cart-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

/* ===== CHECKOUT SECTION ===== */
.checkout-section {
    padding: 100px 0 80px;
    background: var(--bg-light);
}

.checkout-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
}

.checkout-form {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
}

.checkout-form h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 30px;
}

.form-section {
    margin-bottom: 35px;
}

.form-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ===== ORDER SUMMARY ===== */
.order-summary {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.order-summary h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 20px;
}

.order-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

.order-item-image {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

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

.order-item-details {
    flex: 1;
}

.order-item-details h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 5px;
}

.order-item-details p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.order-item-price {
    font-weight: 700;
    color: var(--primary);
}

/* ===== PAYMENT METHODS ===== */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.payment-method {
    position: relative;
    cursor: pointer;
}

.payment-method input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.payment-method-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all 0.3s;
    background: var(--white);
}

.payment-method input[type="radio"]:checked + .payment-method-content {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.payment-method:hover .payment-method-content {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.payment-icon {
    font-size: 1.5rem;
}

.card-fields {
    margin-top: 20px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .cart-content,
    .checkout-content {
        grid-template-columns: 1fr;
    }

    .cart-sidebar,
    .order-summary {
        position: static;
    }
}

@media (max-width: 768px) {
    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: 15px;
    }

    .cart-item-quantity,
    .cart-item-total {
        grid-column: 2;
    }

    .cart-item-remove {
        position: absolute;
        top: 10px;
        right: 10px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .checkout-form {
        padding: 25px;
    }
}
