/**
 * Modern Cart Design - 2025
 * Design épuré, moderne et responsive
 */

:root {
    --primary-color: #FF3200;
    --primary-hover: #e62d00;
    --text-dark: #1a1a1a;
    --text-gray: #6b7280;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --card-radius: 16px;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* ======================
   Global Layout
   ====================== */
#cart .cart-grid {
    margin-top: 2rem;
    margin-bottom: 4rem;
    gap: 0;
}

/* ======================
   Left Column - Product List
   ====================== */
.cart-container {
    background: #fff;
    border: none;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    padding: 2.5rem;
    margin-bottom: 2rem;
}

.cart-container .card-block h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 2rem;
    border-bottom: none;
    letter-spacing: -0.5px;
}

.cart-overview .cart-item {
    border-bottom: 1px solid var(--border-color);
    padding: 2.5rem 0;
    transition: background-color 0.2s;
}

.cart-overview .cart-item:last-child {
    border-bottom: none;
}

/* Product Image */
.product-line-grid-left img {
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.product-line-grid-left img:hover {
    transform: scale(1.02);
}

/* Product Info */
.product-line-grid-body .product-line-info {
    margin-bottom: 0.75rem;
}

.product-line-grid-body .product-line-info a.label {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.2s;
    line-height: 1.4;
}

.product-line-grid-body .product-line-info a.label:hover {
    color: var(--primary-color);
}

.product-line-info .value {
    color: var(--text-gray);
    font-size: 0.95rem;
    background: #f3f4f6;
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
    margin-top: 4px;
}

.product-line-info .label {
    font-weight: 600;
    color: var(--text-dark);
    margin-right: 6px;
}

/* Price & Quantity */
.product-line-grid-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    height: 100%;
}

.product-line-grid-right .qty {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 4px;
    display: flex;
    align-items: center;
    width: fit-content;
    background: #fff;
    transition: border-color 0.2s;
}

.product-line-grid-right .qty:hover {
    border-color: var(--primary-color);
}

.product-line-grid-right .qty .input-group-btn-vertical {
    display: flex;
    flex-direction: column;
}

.product-line-grid-right .qty .js-cart-line-product-quantity {
    border: none;
    font-weight: 700;
    color: var(--text-dark);
    width: 40px;
    text-align: center;
    font-size: 1rem;
}

.product-line-grid-right .qty .btn-touchspin {
    color: var(--text-gray);
    padding: 0px 10px;
}

.product-line-grid-right .qty .btn-touchspin:hover {
    color: var(--primary-color);
}

.product-line-grid-right .product-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.product-line-grid-right .cart-line-product-actions .remove-from-cart {
    color: var(--text-gray);
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f3f4f6;
    margin-top: 1rem;
}

.product-line-grid-right .cart-line-product-actions .remove-from-cart:hover {
    background: #fee2e2;
    color: #ef4444;
}

/* ======================
   Right Column - Summary
   ====================== */
.cart-summary {
    background: #fff;
    border: none;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    padding: 2rem;
    position: sticky;
    top: 2rem;
}

.cart-summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    font-size: 1rem;
    color: var(--text-gray);
}

.cart-summary-line .label {
    color: var(--text-gray);
}

.cart-summary-line .value {
    font-weight: 600;
    color: var(--text-dark);
}

.cart-summary-line.cart-total {
    background: #fff9f8;
    padding: 1.5rem;
    border-radius: 0 0 var(--card-radius) var(--card-radius);
    border-top: 2px solid rgba(255, 50, 0, 0.1);
}

@media (min-width:768px){

    .cart-summary-line.cart-total {margin: 0.5rem -2rem 1rem;}
    
}

.cart-summary-line.cart-total .label {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-dark);
}

.cart-summary-line.cart-total .value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-color);
}

/* Checkout Button */
.checkout .btn-primary {
    width: 100%;
    background: var(--primary-color);
    color: white;
    font-weight: 700;
    padding: 1.25rem;
    /* border-radius: 12px; */
    border: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 50, 0, 0.25);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 1rem;
}

.checkout .btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 50, 0, 0.35);
}

/* Promo Code */
.promo-code {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px dashed var(--border-color);
}

.promo-code .alert-danger {
    background: #fee2e2;
    color: #ef4444;
    border: none;
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.promo-input {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    width: 100%;
    transition: border-color 0.2s;
    font-family: inherit;
}

.promo-input:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Continue Shopping */
.label[href*="index"] {
    display: inline-flex;
    align-items: center;
    margin-top: 2rem;
    color: var(--text-gray);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.label[href*="index"]:hover {
    color: var(--primary-color);
    background: #fff5f3;
}

.label[href*="index"] i {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

/* Reassurance */
.blockreassurance_product {
    display: none;
}

/* ======================
   Responsive
   ====================== */
@media (max-width: 991px) {
    /* Colonnes empilées sur tablette */
    .cart-grid {
        display: block;
    }
    .cart-grid-body,
    .cart-grid-right {
        width: 100%;
        max-width: 100%;
        padding: 0;
    }
    .cart-grid-body {
        margin-bottom: 2rem;
    }
    .cart-summary {
        position: static;
        margin-top: 0;
    }
}

@media (max-width: 767px) {
    /* Padding global plus compact */
    .cart-container {
        padding: 1.25rem;
    }
    .cart-container .separator { display: none; }
    .cart-container .card-block h1 {
        font-size: 1.4rem;
        text-align: center;
        margin-bottom: 1rem;
    }
    /* Items */
    .cart-overview .cart-item { padding: 1rem 0; }
    /* Image au-dessus, centrée */
    .product-line-grid-left {
        margin-bottom: 0.75rem;
        text-align: center;
        padding-right: 0 !important;
    }
    .product-line-grid-left img {
        max-width: 110px;
        width: 100%;
        height: auto;
    }
    /* Infos produit centrées */
    .product-line-grid-body {
        text-align: center;
        margin-bottom: 0.75rem;
        padding: 0 !important;
    }
    .product-line-grid-body .product-line-info a.label {
        font-size: 1.05rem;
        line-height: 1.3;
    }
    /* Prix, quantité et actions sur une ligne */
    .product-line-grid-right {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        width: 100%;
        padding: 0 !important;
        margin-top: 0.5rem;
    }
    .product-line-grid-right .product-price {
        margin-bottom: 0;
        order: 2;
        font-size: 1.1rem;
    }
    .product-line-grid-right .qty { order: 1; }
    .product-line-grid-right .qty .js-cart-line-product-quantity { width: 36px; }
    .product-line-grid-right .qty .btn-touchspin { padding: 0 8px; }
    .product-line-grid-right .cart-line-product-actions .remove-from-cart {
        margin-top: 0;
        order: 3;
    }
    /* Résumé passe en bloc plein largeur */
    .cart-summary { padding: 1.25rem; }
    .cart-summary-line { font-size: 0.95rem; }
    .cart-summary-line.cart-total .value { font-size: 1.4rem; }
    .checkout .btn-primary {
        padding: 1rem;
        font-size: 1rem;
    }
}

/* ======================
   Mobile-specific Cart Styles
   ====================== */
@media (max-width: 767px) {
  /* Center and adjust product image */
  .product-line-grid-left {
    text-align: center;
    margin-bottom: 1rem;
  }

  .product-line-grid-left img {
    max-width: 100px;
    height: auto;
    margin: 0 auto;
  }

  /* Improve product details layout */
  .product-line-grid-body {
    text-align: left;
    padding: 0;
  }

  .product-line-grid-body .product-line-info {
    margin-bottom: 0.5rem;
  }

  .product-line-grid-body .product-line-info .label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
  }

  .product-line-grid-body .product-line-info .value {
    font-size: 0.9rem;
    color: var(--text-gray);
    background: var(--bg-light);
    padding: 6px 12px;
    border-radius: 8px;
    display: inline-block;
    margin-top: 4px;
  }

  /* Align quantity and price */
  .product-line-grid-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
  }

  .product-line-grid-right .qty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
  }

  .product-line-grid-right .product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
  }

  .product-line-grid-right .cart-line-product-actions {
    margin-top: 1rem;
  }

  /* Adjust cart summary */
  .cart-summary {
    padding: 1.5rem;
    margin-top: 1rem;
  }

  .cart-summary-line {
    font-size: 1rem;
    margin-bottom: 1rem;
  }

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

  .checkout .btn-primary {
    padding: 1rem;
    font-size: 1rem;
    border-radius: var(--card-radius);
  }

  /* Adjust spacing */
  .cart-container {
    padding: 1.5rem;
  }

  .cart-overview .cart-item {
    padding: 1.5rem 0;
  }
}

@media (min-width: 1200px) {
    .page-cart #wrapper .container {
        width: 1344px !important;


    }
}