/**
 * CBD Cart page styles
 * Cohérent avec le mini-cart — Couleurs : vert #004437 — jaune #FFD517
 */

/* =========================================================================
   Layout global
   ========================================================================= */
#checkout-cart-page #main,
body#cart #main {
  padding-top: 0;
}

body#cart .cart-grid {
  gap: 24px;
}

body#cart .cart-grid-body {
  padding-right: 12px;
}

body#cart .cart-grid-right {
  padding-left: 12px;
}

/* =========================================================================
   Carte produits (colonne gauche)
   ========================================================================= */
body#cart .cart-container {
  background: #fff;
  border: none;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 68, 55, 0.06);
  overflow: hidden;
  margin-bottom: 0;
}

body#cart .cart-container > .card-block {
  padding: 20px 24px;
  background: #004437;
}

body#cart .cart-container > .card-block .h1,
body#cart .cart-container > .card-block h1 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #BFD0CD !important;
  font-family: var(--cbd-font, inherit);
}

body#cart .cart-container > hr.separator {
  display: none;
}

/* =========================================================================
   Jauge livraison gratuite — page panier
   ========================================================================= */
.cbd-cart-freeship {
  padding: 16px 24px;
  background: rgba(0, 68, 55, 0.04);
  border-bottom: 1px solid rgba(0, 68, 55, 0.08);
}

.cbd-cart-freeship-text {
  margin: 0 0 8px;
  font-size: 0.8125rem;
  color: #004437;
  font-weight: 600;
  font-family: var(--cbd-font, inherit);
  display: flex;
  align-items: center;
  gap: 6px;
}

.cbd-cart-freeship-text svg {
  width: 16px;
  height: 16px;
  fill: #004437;
  flex-shrink: 0;
}

.cbd-cart-freeship-bar {
  height: 10px;
  background: rgba(0, 68, 55, 0.12);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 6px;
  position: relative;
}

.cbd-cart-freeship-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #004437 0%, #00695c 50%, #004437 100%);
  background-size: 200% 100%;
  border-radius: 5px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  animation: cbd-cart-gauge-shimmer 2s ease-in-out infinite;
  position: relative;
}

.cbd-cart-freeship-bar-fill::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: cbd-cart-gauge-shine 2s ease-in-out infinite;
  border-radius: 5px;
}

@keyframes cbd-cart-gauge-shimmer {
  0%, 100% { background-position: 0% 0%; }
  50% { background-position: 100% 0%; }
}

@keyframes cbd-cart-gauge-shine {
  0% { background-position: 200% 0%; }
  100% { background-position: -200% 0%; }
}

.cbd-cart-freeship-remaining {
  margin: 0;
  font-size: 0.8125rem;
  color: #004437;
  font-family: var(--cbd-font, inherit);
}

.cbd-cart-freeship-remaining strong {
  font-weight: 700;
}

.cbd-cart-freeship-done {
  margin: 0;
  font-size: 0.875rem;
  color: #004437;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--cbd-font, inherit);
}

.cbd-cart-freeship-done .cbd-cart-freeship-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: #004437;
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  flex-shrink: 0;
}

/* =========================================================================
   Liste produits
   ========================================================================= */
body#cart .cart-items {
  list-style: none;
  margin: 0;
  padding: 0;
}

body#cart .cart-item {
  padding: 0;
  border-bottom: 1px solid #e8e8e8;
}

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

/* Product line */
body#cart .product-line-grid {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  transition: background 0.15s;
}

body#cart .product-line-grid:hover {
  background: rgba(0, 68, 55, 0.02);
}

body#cart .product-line-grid-left {
  flex-shrink: 0;
  width: auto;
  padding: 0;
  float: none;
}

body#cart .product-line-grid-left .product-image {
  display: block;
  width: 90px;
  height: 90px;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid #f0f0f0;
}

body#cart .product-line-grid-left .product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body#cart .product-line-grid-body {
  flex: 1;
  min-width: 0;
  padding: 0;
  float: none;
  width: auto;
}

body#cart .product-line-grid-body .product-line-info a.label {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #004437;
  text-decoration: none;
  margin-bottom: 4px;
  line-height: 1.35;
  font-family: var(--cbd-font, inherit);
}

body#cart .product-line-grid-body .product-line-info a.label:hover {
  text-decoration: underline;
}

body#cart .product-line-grid-body .product-line-info.product-price {
  margin-bottom: 4px;
}

body#cart .product-line-grid-body .product-line-info.product-price .current-price .price {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #3D3D3D;
  font-family: var(--cbd-font, inherit);
}

body#cart .product-line-grid-body .product-line-info.product-price .product-discount .regular-price {
  font-size: 0.8125rem;
  color: #999;
  text-decoration: line-through;
}

body#cart .product-line-grid-body .product-line-info.product-price .discount {
  font-size: 0.75rem;
  background: rgba(255, 213, 23, 0.25);
  color: #004437;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

body#cart .product-line-grid-body br {
  display: none;
}

/* Attributes */
body#cart .product-line-grid-body .product-line-info span.label {
  font-size: 0.8125rem;
  color: #666;
  font-weight: 400;
}

body#cart .product-line-grid-body .product-line-info span.value {
  font-size: 0.8125rem;
  color: #3D3D3D;
  font-weight: 600;
}

/* Actions colonne droite */
body#cart .product-line-grid-right {
  flex-shrink: 0;
  width: auto;
  padding: 0;
  float: none;
  display: flex;
  align-items: center;
  gap: 16px;
}

body#cart .product-line-grid-right > .row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  flex-wrap: nowrap;
  width: auto;
}

body#cart .product-line-grid-right .col-xs-4.hidden-md-up {
  display: none !important;
}

body#cart .product-line-grid-right .col-md-10 {
  width: auto;
  flex: none;
  padding: 0;
}

body#cart .product-line-grid-right .col-md-10 > .row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: nowrap;
  margin: 0;
}

/* Quantity: use the mini-cart style */
body#cart .product-line-grid-right .qty {
  width: auto;
  padding: 0;
  flex: none;
}

body#cart .bootstrap-touchspin {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: none;
  width: auto;
  float: none;
}

body#cart .bootstrap-touchspin .input-group-btn-vertical {
  display: none !important;
}

body#cart .bootstrap-touchspin .btn.bootstrap-touchspin-down,
body#cart .bootstrap-touchspin .btn.bootstrap-touchspin-up {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 36px;
  border: none;
  background: rgba(0, 68, 55, 0.06);
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  color: #004437;
  font-weight: 700;
  transition: background 0.15s;
  position: static;
  border-radius: 0;
  margin: 0;
}

body#cart .bootstrap-touchspin .btn.bootstrap-touchspin-down:hover,
body#cart .bootstrap-touchspin .btn.bootstrap-touchspin-up:hover {
  background: rgba(0, 68, 55, 0.15);
}

body#cart .js-cart-line-product-quantity {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 36px;
  border: none !important;
  border-radius: 0;
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 600;
  background: #fff;
  color: #004437;
  font-family: var(--cbd-font, inherit);
  -moz-appearance: textfield;
}

body#cart .js-cart-line-product-quantity::-webkit-outer-spin-button,
body#cart .js-cart-line-product-quantity::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Quantity with +/- wrapper */
.cbd-cart-qty-wrap {
  display: inline-flex;
  align-items: center;
  border: 1px solid #004437;
  border-radius: 6px;
  overflow: hidden;
}

.cbd-cart-qty-btn {
  width: 32px;
  height: 36px;
  border: none;
  background: rgba(0, 68, 55, 0.06);
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  color: #004437;
  font-weight: 700;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cbd-cart-qty-btn:hover {
  background: rgba(0, 68, 55, 0.15);
}

.cbd-cart-qty-input {
  width: 40px;
  height: 36px;
  border: none;
  border-left: 1px solid #004437;
  border-right: 1px solid #004437;
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 600;
  background: #fff;
  color: #004437;
  font-family: var(--cbd-font, inherit);
  -moz-appearance: textfield;
}

.cbd-cart-qty-input::-webkit-outer-spin-button,
.cbd-cart-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Product total price */
body#cart .product-line-grid-right .price {
  width: auto;
  padding: 0;
  flex: none;
}

body#cart .product-line-grid-right .product-price {
  white-space: nowrap;
}

body#cart .product-line-grid-right .product-price strong {
  font-size: 1rem;
  font-weight: 700;
  color: #004437;
  font-family: var(--cbd-font, inherit);
}

/* Remove button */
body#cart .product-line-grid-right .col-md-2 {
  width: auto;
  padding: 0;
  flex: none;
}

body#cart .remove-from-cart {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(0, 68, 55, 0.04);
  color: #999;
  transition: all 0.2s;
  text-decoration: none;
}

body#cart .remove-from-cart:hover {
  background: rgba(204, 0, 0, 0.08);
  color: #c00;
}

body#cart .remove-from-cart .material-icons {
  font-size: 20px;
  float: none;
}

body#cart .product-line-grid .clearfix {
  display: none;
}

/* Gift */
body#cart .gift-quantity {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #004437;
  border-radius: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #004437;
}

/* =========================================================================
   Continue shopping link
   ========================================================================= */
body#cart .cart-grid-body > a.label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 16px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #004437;
  text-decoration: none;
  transition: color 0.15s;
  font-family: var(--cbd-font, inherit);
}

body#cart .cart-grid-body > a.label:hover {
  text-decoration: underline;
}

body#cart .cart-grid-body > a.label .material-icons {
  font-size: 18px;
}

/* =========================================================================
   Carte résumé (colonne droite)
   ========================================================================= */
body#cart .cart-summary {
  background: #fff;
  border: none;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 68, 55, 0.06);
  overflow: hidden;
  position: sticky;
  top: 100px;
}

/* Subtotals */
body#cart .cart-detailed-subtotals {
  padding: 20px 24px 12px;
}

body#cart .cart-summary-line {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  clear: none;
}

body#cart .cart-summary-line::after {
  display: none !important;
}

body#cart .cart-summary-line .label {
  float: none !important;
  flex: 1;
  text-align: left;
}

body#cart .cart-summary-line .value {
  float: none !important;
  flex-shrink: 0;
  text-align: right;
  margin-left: auto;
}

body#cart .cart-detailed-subtotals .cart-summary-line {
  padding: 6px 0;
  font-size: 0.875rem;
  color: #3D3D3D;
  font-family: var(--cbd-font, inherit);
}

body#cart .cart-detailed-subtotals .cart-summary-line .label {
  font-weight: 500;
  color: #666;
}

body#cart .cart-detailed-subtotals .cart-summary-line .value {
  font-weight: 600;
  color: #3D3D3D;
}

body#cart .cart-detailed-subtotals .cart-summary-line .value small {
  font-size: 0.75rem;
  color: #666;
}

/* Total */
body#cart .cart-summary-totals {
  padding: 0 24px;
}

body#cart .cart-summary-totals .cart-summary-line.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0 0;
  border-top: 2px solid #004437;
  margin-top: 8px;
  margin-bottom: 0;
}

body#cart .cart-summary-totals .cart-total .label {
  font-size: 1rem;
  font-weight: 700;
  color: #004437;
  font-family: var(--cbd-font, inherit);
  flex: 1;
  text-align: left;
}

body#cart .cart-summary-totals .cart-total .value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #004437;
  font-family: var(--cbd-font, inherit);
  flex-shrink: 0;
  text-align: right;
  margin-left: auto;
}

/* Tax line */
body#cart .cart-summary-totals .cart-summary-line:not(.cart-total) {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  padding-bottom: 10px;
}

body#cart .cart-summary-totals .cart-summary-line:not(.cart-total) .label.sub,
body#cart .cart-summary-totals .cart-summary-line:not(.cart-total) .value.sub {
  font-size: 0.8125rem;
  color: #666;
}

/* =========================================================================
   Voucher / Promo code
   ========================================================================= */
body#cart .block-promo {
  padding: 0 24px;
  border-top: 1px solid #e8e8e8;
}

body#cart .promo-code-button.display-promo {
  padding: 12px 0;
  margin: 0;
}

body#cart .promo-code-button a.collapse-button {
  font-size: 0.875rem;
  font-weight: 600;
  color: #004437;
  text-decoration: underline;
  font-family: var(--cbd-font, inherit);
}

body#cart .promo-code-button a.collapse-button:hover {
  text-decoration: none;
}

body#cart .promo-code {
  padding: 0 0 16px;
}

body#cart .promo-code form {
  display: flex;
  gap: 8px;
}

body#cart .promo-code .promo-input {
  flex: 1;
  height: 40px;
  border: 1px solid #004437;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 0.875rem;
  font-family: var(--cbd-font, inherit);
  color: #004437;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

body#cart .promo-code .promo-input:focus {
  border-color: #004437;
  box-shadow: 0 0 0 2px rgba(0, 68, 55, 0.12);
}

body#cart .promo-code .promo-input::placeholder {
  color: #999;
}

body#cart .promo-code form button.btn {
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  background: #004437;
  color: #fff;
  border: none;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--cbd-font, inherit);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s;
}

body#cart .promo-code form button.btn:hover {
  background: #00332a;
}

body#cart .promo-name {
  padding: 8px 0;
  margin: 0;
  list-style: none;
}

body#cart .promo-name .cart-summary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 0.875rem;
}

body#cart .promo-name .cart-summary-line .label {
  color: #004437;
  font-weight: 600;
}

body#cart .block-promo .promo-highlighted {
  padding: 8px 0 4px;
  font-size: 0.8125rem;
  color: #004437;
  font-weight: 600;
}

body#cart .js-discount.promo-discounts {
  padding: 0 0 8px;
  margin: 0;
  list-style: none;
}

body#cart .promo-discounts .cart-summary-line {
  padding: 4px 0;
  font-size: 0.8125rem;
}

body#cart .promo-discounts .code {
  background: rgba(255, 213, 23, 0.25);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  color: #004437;
  font-size: 0.75rem;
}

/* =========================================================================
   Bouton checkout
   ========================================================================= */
body#cart .cart-detailed-actions {
  padding: 16px 24px 20px;
}

body#cart .cart-detailed-actions .text-sm-center {
  text-align: center;
}

body#cart .cart-detailed-actions .btn.btn-primary {
  display: block;
  width: 100%;
  padding: 14px 20px;
  font-size: 0.9375rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-radius: 10px;
  background: #FFD517;
  border: 2px solid #FFD517;
  color: #004437;
  font-family: var(--cbd-font, inherit);
  transition: background 0.2s, border-color 0.2s;
  cursor: pointer;
}

body#cart .cart-detailed-actions .btn.btn-primary:hover:not(.disabled) {
  background: #e6c015;
  border-color: #e6c015;
}

body#cart .cart-detailed-actions .btn.btn-primary.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

body#cart .cart-detailed-actions .alert-warning {
  background: rgba(255, 213, 23, 0.15);
  border: 1px solid rgba(255, 213, 23, 0.4);
  color: #004437;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 12px;
  font-family: var(--cbd-font, inherit);
}

/* =========================================================================
   Reassurance block
   ========================================================================= */
body#cart .cart-grid-right .block-reassurance {
  margin-top: 16px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 68, 55, 0.06);
  background: #fff;
}

body#cart .blockreassurance_product span,
body#cart .block-reassurance span,
body#cart .block-reassurance .block-reassurance-item span,
body#cart .blockreassurance_product .item-product span {
  color: #3D3D3D !important;
}

body#cart .blockreassurance_product p,
body#cart .block-reassurance p {
  color: #3D3D3D !important;
}

/* =========================================================================
   Page vide (cart-empty)
   ========================================================================= */
body#cart .no-items {
  display: block;
  padding: 48px 24px;
  text-align: center;
  font-size: 1rem;
  color: #666;
  font-family: var(--cbd-font, inherit);
}

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 991px) {
  body#cart .cart-grid-body,
  body#cart .cart-grid-right {
    padding-left: 15px;
    padding-right: 15px;
  }

  body#cart .cart-summary {
    position: static;
    margin-top: 24px;
  }
}

@media (max-width: 767px) {
  body#cart .product-line-grid {
    flex-wrap: wrap;
    padding: 16px;
    gap: 12px;
  }

  body#cart .product-line-grid-left .product-image {
    width: 72px;
    height: 72px;
  }

  body#cart .product-line-grid-right {
    width: 100%;
    justify-content: space-between;
  }

  body#cart .product-line-grid-right > .row {
    width: 100%;
    justify-content: space-between;
  }

  body#cart .product-line-grid-right .col-md-10 {
    flex: 1;
  }

  body#cart .product-line-grid-right .col-md-10 > .row {
    justify-content: space-between;
  }

  body#cart .cart-container > .card-block {
    padding: 16px;
  }

  .cbd-cart-freeship {
    padding: 12px 16px;
  }

  body#cart .cart-detailed-subtotals,
  body#cart .cart-summary-totals,
  body#cart .cart-detailed-actions {
    padding-left: 16px;
    padding-right: 16px;
  }

  body#cart .block-promo {
    padding-left: 16px;
    padding-right: 16px;
  }
}
