/* Widget Panier Modern Design */
:root {
  --cart-radius: 12px;
  --cart-padding: 1.5rem;
  --cart-shadow: 0 4px 15px rgba(0,0,0,0.05);
  --cart-border: 1px solid rgba(0,0,0,0.08);
  --transition: all 0.3s ease;
}

.digi-cart-widget.modern-design {
  font-family: inherit;
  color: #333;
}

/* Sections des marques */
.cart-brand-section {
  background: #fff;
  border-radius: var(--cart-radius);
  box-shadow: var(--cart-shadow);
  border: var(--cart-border);
  margin-bottom: 2rem;
  overflow: hidden;
  transition: var(--transition);
}

.cart-brand-section:hover {
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.brand-header {
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 15px;
  color: #fff;
  font-weight: 600;
  font-size: 1.1rem;
}

.brand-logo-img {
  max-height: 40px;
  background: rgba(255,255,255,0.9);
  padding: 5px;
  border-radius: 6px;
  object-fit: contain;
}

/* Lignes de produits */
.cart-items-list {
  padding: var(--cart-padding);
}

.cart-item-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px dashed #eaeaea;
}

.cart-item-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.item-image img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #eee;
}

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

.item-name {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: #2c3e50;
}
.item-sku {
  font-size: 0.85rem;
  color: #7f8c8d;
}

.item-quantity-control {
  display: flex;
  align-items: center;
  background: #f8f9fa;
  border-radius: 50px;
  padding: 0.25rem;
  border: 1px solid #e9ecef;
}

.item-quantity-control button {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #495057;
  cursor: pointer;
  transition: var(--transition);
}

.item-quantity-control button:hover {
  background: #e9ecef;
}

.item-quantity-control input {
  width: 50px;
  text-align: center;
  border: none;
  background: transparent;
  font-weight: 600;
  -moz-appearance: textfield;
  appearance: textfield;
}

.item-quantity-control input::-webkit-outer-spin-button,
.item-quantity-control input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.item-price {
  font-weight: 700;
  font-size: 1.1rem;
  color: #2c3e50;
  min-width: 100px;
  text-align: right;
}

.item-remove {
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.1);
  border: none;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.item-remove:hover {
  background: #e74c3c;
  color: #fff;
}

/* Recap Right Sidebar */
.cart-recap-sidebar {
  position: sticky;
  top: 20px;
}

.recap-card {
  background: #f8f9fc;
  border-radius: var(--cart-radius);
  padding: var(--cart-padding);
  border: var(--cart-border);
  box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.recap-brand-item {
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  border: 1px solid #eaeaea;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.recap-brand-item h5 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #2c3e50;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.5rem;
}

.recap-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
  color: #555;
}

.recap-row.total {
  font-weight: 700;
  font-size: 1rem;
  color: #000;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed #ccc;
}

/* Progress Bars */
.recap-progress-container {
  margin-top: 0.75rem;
  font-size: 0.8rem;
}

.progress-label-wrap {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.2rem;
  font-weight: 500;
}

.progress-label-wrap.success { color: #27ae60; }
.progress-label-wrap.danger { color: #e74c3c; }
.progress-label-wrap.warning { color: #f39c12; }

.modern-progress {
  height: 8px;
  background: #ecf0f1;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.modern-progress-bar {
  height: 100%;
  border-radius: 10px;
  transition: width 0.5s ease;
}

.modern-progress-bar.bg-success { background: #27ae60; }
.modern-progress-bar.bg-danger { background: #e74c3c; }
.modern-progress-bar.bg-warning { background: #f39c12; }

/* Grand total */
.grand-total-box {
  background: #2c3e50;
  color: #fff;
  padding: 1.25rem;
  border-radius: 8px;
  margin-top: 1.5rem;
  text-align: center;
}

.grand-total-box h4 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
}

.btn-checkout {
  width: 100%;
  padding: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 8px;
  margin-top: 1rem;
  transition: all 0.3s;
}

/* Modèle Mobile "Inline Recap" */
.inline-recap {
  background: #fdfdfd;
  border-top: 1px solid #eee;
  padding: 1rem 1.5rem;
  display: none; /* Desktop */
}

@media (max-width: 991px) {
  .cart-dynamic-container.mobile-hide-right .cart-left-col {
    width: 100%;
  }
  .cart-dynamic-container.mobile-hide-right .cart-right-col {
    display: none;
  }
  .cart-dynamic-container.mobile-hide-right .inline-recap {
    display: block;
  }
}

@media (max-width: 576px) {
  .cart-item-row {
    flex-wrap: wrap;
    gap: 10px;
    position: relative;
  }
  .item-image img { width: 60px; height: 60px; }
  .item-price {
    width: 100%;
    text-align: right;
  }
  .item-remove {
    position: absolute;
    top: 0;
    right: 0;
  }
}
