/* ----------------------------------------------------------------------------------------
* Cart Page Styles - Atelier de Ngoundji
* ---------------------------------------------------------------------------------------- */

/* Styles pour la page panier */
#cart-page-wrapper {
    font-family: var(--font-family, 'Poppins', Arial, sans-serif);
    color: #333;
}

/* Styles pour les étapes du processus d'achat */
.cart-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.cart-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.cart-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #e0e0e0;
    z-index: 1;
}

.step {
    position: relative;
    z-index: 2;
    background-color: #fff;
    padding: 0 15px;
    font-weight: 500;
    color: #888;
}

.step.active {
    color: var(--primary-color);
    font-weight: 700;
}

.step-number {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    background-color: #e0e0e0;
    color: #fff;
    margin-right: 10px;
}

.step.active .step-number {
    background-color: var(--primary-color);
}

/* Styles pour la carte de progression de livraison */
.shipping-progress-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-bottom: 30px;
}

.shipping-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.shipping-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
}

.shipping-title i {
    margin-right: 10px;
}

.shipping-remaining {
    font-weight: 500;
    color: #555;
}

.progress-container {
    height: 15px;
    background-color: #f0f0f0;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 10px;
    width: 0%;
    transition: width 1s ease-in-out, background 1s ease-in-out;
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shine 2s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.delivery-icon {
    position: absolute;
    top: -7px;
    left: 0%;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: left 1s ease-in-out, background-color 0.5s ease, transform 0.5s ease;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.shipping-info {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    font-size: 0.9rem;
    color: #777;
}

.shipping-info-item {
    display: flex;
    align-items: center;
}

.shipping-info-item i {
    margin-right: 8px;
    color: var(--primary-color);
}

/* Styles pour le tableau du panier */
.cart-table-section {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-bottom: 30px;
}

.empty-cart-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    text-align: center;
}

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

.empty-cart-container h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #555;
}

.empty-cart-container p {
    color: #888;
    margin-bottom: 20px;
}

.btn-shop-now {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 10px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s;
}

.btn-shop-now:hover {
    background-color: var(--accent-color);
    color: white;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    margin-bottom: 20px;
}

.cart-table thead th {
    padding: 10px 8px;
    font-weight: 600;
    color: #555;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.9rem;
    text-align: left;
}

.cart-item {
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.cart-item:hover {
    background-color: #f9f9f9;
}

.cart-item td {
    padding: 12px 8px;
    background-color: transparent;
    vertical-align: middle;
}

/* Suppression des bordures arrondies */

.product-info {
    display: flex;
    align-items: center;
    max-width: 350px;
    gap: 8px;
}

.product-image {
    flex-shrink: 0;
    width: 100px;
}

.product-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.product-details {
    flex: 1;
}

.product-name {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 2px 0;
    color: #333;
    line-height: 1.2;
}

.product-sku {
    font-size: 0.75rem;
    color: #888;
    margin: 0;
}

.quantity-control {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    max-width: 90px;
}

.qty-btn {
    width: 35px;
    height: 35px;
    border: 1px solid #e0e0e0;
    background-color: #f8f8f8;
    color: #555;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

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

.qty-input {
    width: 100px;
    height: 35px;
    text-align: center;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    margin: 0 2px;
    font-size: 0.8rem;
    padding: 0;
}

.price-col {
    font-weight: 500;
    color: #333;
    text-align: right;
}

.subtotal-col {
    font-weight: 600;
    color: #ff6b00;
    text-align: right;
}

.remove-item-btn {
    background: none;
    border: none;
    color: #ff5252;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-item-btn:hover {
    background-color: rgba(255, 82, 82, 0.1);
    transform: scale(1.1);
}

.cart-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    padding-top: 15px;
}

.btn-continue-shopping, .btn-update-cart {
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.btn-continue-shopping {
    background-color: #f5f5f5;
    color: #555;
    border: 1px solid #e0e0e0;
}

.btn-continue-shopping:hover {
    background-color: #e0e0e0;
}

.btn-update-cart {
    background-color: #ff6b00;
    color: white;
    border: none;
    cursor: pointer;
}

.btn-update-cart:hover {
    background-color: #444;
}

/* Styles pour le résumé de la commande */
.cart-summary-section {
    margin-bottom: 30px;
}

.summary-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-bottom: 20px;
}

.summary-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    color: #555;
}

.summary-value {
    font-weight: 500;
}

.shipping-value {
    color: #888;
    font-style: italic;
    font-size: 0.9rem;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    font-size: 1.1rem;
    font-weight: 600;
}

.total-value {
    color: var(--primary-color);
}

.summary-actions {
    margin-top: 25px;
}

.btn-checkout {
    display: block;
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 12px 20px;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 20px;
    transition: background-color 0.2s;
}

.btn-checkout:hover {
    background-color: var(--accent-color);
    color: white;
}

.payment-methods {
    text-align: center;
    font-size: 0.9rem;
    color: #888;
}

.payment-icons {
    margin-top: 10px;
    font-size: 1.5rem;
    color: #555;
}

.payment-icons i {
    margin: 0 5px;
}

.promo-code-section {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    padding: 20px;
}

.promo-code-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px 0;
}

.promo-code-form {
    display: flex;
}

#promo-code-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px 0 0 5px;
    font-size: 0.9rem;
}

.btn-apply-promo {
    background-color: #555;
    color: white;
    border: none;
    padding: 0 15px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-apply-promo:hover {
    background-color: #444;
}

/* Animation pour la rotation de l'icône de livraison */
@keyframes truckRoll {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(-15deg) scale(1.1); }
    50% { transform: rotate(0deg) scale(1.2); }
    75% { transform: rotate(15deg) scale(1.1); }
    100% { transform: rotate(0deg); }
}

/* Animation de splash pour l'effet cadeau */
@keyframes giftSplash {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7); }
    50% { transform: scale(1.5); box-shadow: 0 0 0 10px rgba(40, 167, 69, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}

/* Styles pour le bouton de mise à jour du panier */
.btn-update-cart {
    background-color: #f0f0f0;
    color: #888;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-update-cart.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-update-cart.active {
    background-color: var(--primary-color);
    color: white;
}

/* Responsive design */
@media (max-width: 992px) {
    .shipping-info {
        flex-direction: column;
    }
    
    .shipping-info-item {
        margin-bottom: 10px;
    }
}

@media (max-width: 768px) {
    .cart-steps {
        flex-wrap: wrap;
    }
    
    .step {
        margin-bottom: 10px;
        flex-basis: 50%;
    }
    
    .product-info {
        flex-direction: column;
        text-align: center;
    }
    
    .product-image {
        margin-right: 0;
        margin-bottom: 10px;
    }
}
@media (max-width: 576px) {
    .cart-table {
        width: 800px;
    }
}
