/* Page Panier Styles */

/* Cart Page */
.cart-page {
    background-color: #1a1a1a;
    padding: 80px 0;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 60px;
}

.page-header h1 {
    color: #fff;
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 20px;
}

.page-header p {
    color: #ccc;
    font-size: 18px;
}

/* Cart Content */
.cart-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

/* Cart Items Section */
.cart-items-container {
    background-color: #2a2a2a;
    padding: 30px;
    border-radius: 12px;
}

/* Cart Item */
.cart-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid #333;
    margin-bottom: 20px;
}

.item-image {
    width: 120px;
    height: 120px;
    background-color: #333;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.item-image .no-image {
    color: #666;
    font-size: 48px;
}

.item-details {
    flex: 1;
}

.item-details h3 {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.item-details .size {
    color: #ccc;
    font-size: 14px;
    margin-bottom: 5px;
}

.item-details .price {
    color: #FFDD03;
    font-weight: 600;
}

/* Item Controls */
.item-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-minus,
.quantity-plus {
    width: 30px;
    height: 30px;
    background-color: #333;
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.quantity-minus:hover,
.quantity-plus:hover {
    background-color: #444;
}

.quantity-input {
    width: 60px;
    padding: 8px;
    background-color: #333;
    border: none;
    border-radius: 4px;
    color: #fff;
    text-align: center;
}

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

.item-total-price {
    color: #FFDD03;
    font-size: 18px;
    font-weight: 700;
}

.remove-item {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 14px;
    margin-top: 5px;
    transition: color 0.3s ease;
}

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

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 40px;
    color: #ccc;
}

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

/* Cart Actions */
.cart-actions {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.cart-actions a {
    flex: 1;
    background-color: transparent;
    color: #FFDD03;
    border: 2px solid #FFDD03;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

.cart-actions a:hover {
    background-color: #FFDD03;
    color: #000;
}

/* Order Summary */
.order-summary-section {
    /* Sticky positioning for summary */
}

.order-summary-container {
    background-color: #2a2a2a;
    padding: 30px;
    border-radius: 12px;
    height: fit-content;
}

.order-summary-container h3 {
    color: #FFDD03;
    font-size: 24px;
    margin-bottom: 30px;
}

/* Summary Details */
.summary-details {
    margin-bottom: 30px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.summary-row span:first-child {
    color: #ccc;
}

.summary-row span:last-child {
    color: #fff;
    font-weight: 600;
}

.summary-row.total {
    padding-top: 15px;
    border-top: 1px solid #333;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 700;
}

.summary-row.total span:first-child {
    color: #fff;
}

.summary-row.total span:last-child {
    color: #FFDD03;
}

/* Checkout Actions */
.checkout-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.checkout-actions a {
    background-color: #FFDD03;
    color: #000;
    padding: 18px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s ease;
}

.checkout-actions a:hover {
    background-color: #e6c700;
}

/* Security Info */
.security-info {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.security-info div {
    color: #ccc;
    font-size: 14px;
    text-align: center;
    line-height: 1.5;
}

/* Empty Cart State */
.empty-cart {
    text-align: center;
    padding: 60px 20px;
    display: none;
}

.empty-cart .icon {
    font-size: 64px;
    margin-bottom: 30px;
}

.empty-cart h2 {
    color: #fff;
    font-size: 32px;
    margin-bottom: 20px;
}

.empty-cart p {
    color: #ccc;
    font-size: 18px;
    margin-bottom: 30px;
}

.empty-cart a {
    background-color: #FFDD03;
    color: #000;
    padding: 18px 40px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.empty-cart a:hover {
    background-color: #e6c700;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

.success-modal {
    border-top: 4px solid #28a745;
}

.error-modal {
    border-top: 4px solid #dc3545;
}

.confirm-modal {
    border-top: 4px solid #ffc107;
}

.modal-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.modal-content h3 {
    margin: 0 0 15px 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.modal-content p {
    margin: 0 0 25px 0;
    color: #666;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.modal-btn.primary {
    background-color: #FFDD03;
    color: #000;
}

.modal-btn.primary:hover {
    background-color: #e6c700;
}

.modal-btn.secondary {
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

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

/* Animations */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .cart-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cart-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .item-image {
        width: 100px;
        height: 100px;
    }
    
    .item-controls {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .cart-items-container,
    .order-summary-container {
        padding: 20px;
    }
    
    .page-header h1 {
        font-size: 32px;
    }
    
    .modal-content {
        margin: 20px;
        padding: 20px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .cart-actions {
        flex-direction: column;
    }
}

/* ===================================
   Checkout Modal Styles
   =================================== */

.checkout-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.checkout-modal-content {
    background: #2a2a2a;
    border-radius: 20px;
    padding: 40px;
    max-width: 900px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
}

.close-modal:hover {
    color: #FF6B35;
    transform: rotate(90deg);
}

.checkout-modal-content h2 {
    color: #fff;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
}

.checkout-modal-content > p {
    color: #ccc;
    font-size: 16px;
    text-align: center;
    margin-bottom: 40px;
}

.checkout-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.checkout-option {
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.checkout-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FF6B35, #FF8C42);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.checkout-option:hover {
    border-color: #FF6B35;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.3);
}

.checkout-option:hover::before {
    transform: scaleX(1);
}

.checkout-option .option-icon {
    font-size: 50px;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.checkout-option:hover .option-icon {
    transform: scale(1.2);
}

.checkout-option h3 {
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.checkout-option p {
    color: #999;
    font-size: 14px;
    margin: 0;
}

/* Responsive pour le modal */
@media (max-width: 768px) {
    .checkout-modal-content {
        padding: 30px 20px;
    }
    
    .checkout-modal-content h2 {
        font-size: 24px;
    }
    
    .checkout-options {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .checkout-option {
        padding: 25px 15px;
    }
    
    .close-modal {
        font-size: 30px;
        top: 15px;
        right: 20px;
    }
}
