.hentry .entry-content a:hover {
  text-decoration: transparent underline !important;
}

.content-area {
  margin-block: 0;
}

.cart-page {
  background: #f8f7f4;
  padding-block: 56px 80px;
  row-gap: 32px !important;
  align-items: flex-start;

  .cart-page__title {
    grid-column: 1/-1;
    grid-row: 1;
  }

  .cart-page__items {
    grid-column: 1/7;
    grid-row: 2;

    .cart-table__col--subtotal {
      white-space: nowrap;
    }
  }

  .cart-page__summary {
    grid-column: 8/-1;
    grid-row: 2;
    display: flex;
    padding: 16px 24px;
    flex-direction: column;
    gap: 24px;
    background: white;

    @media (max-width: 1024px) {
      grid-column: 1/-1;
      grid-row: 3;
    }
  }

  .cart-summary__actions .checkout-button {
    width: 100%;
    text-align: center;
  }

  @media (max-width: 1024px) {
    .cart-page__summary {
      grid-column: 1/-1;
      padding: 16px;
    }
  }

  /* Largeurs colonnes (2-col) */
  .cart-table {
    width: 100%;
    border-collapse: collapse;
    /* Allow columns to size to content so Total can be as small as possible */
    table-layout: auto;
  }

  .cart-table thead th {
    text-align: left;
    font-weight: 600;
    padding: 0 0 16px;
    border-bottom: 1px solid #bbb;
    color: #2c2b2b;
    font-size: 14px;
    background: initial;
    color: var(--NOIR-CF, #2c2b2b);
    font-family: 'Neutra Text TF';
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: 140%; /* 19.6px */

    &:last-of-type {
      text-align: right;
    }
  }

  .cart-table__cell {
    padding: 24px 0;
    border-bottom: 1px solid #bbb;
  }

  /* Contenu produit */
  .cart-table__cell--product .cart-item__product {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 16px;
  }

  .cart-item__media img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: unset;
  }

  .cart-item__summary {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .cart-item__title a {
    color: inherit;
    text-decoration: none !important;
  }

  .cart-item__title a:hover {
    text-decoration: underline;
  }

  .cart-item__meta {
    color: #6c6a6a;
    font-size: 14px;
  }

  /* Prix unitaire + contrôles dans la colonne produit */
  .cart-item__description,
  .cart-item__price {
    color: rgba(0, 0, 0, 0.4);
    font-family: 'Neutra Text';
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: 120%; /* 16.8px */
  }

  .cart-item__controls {
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .cart-item__remove {
    padding: 3px 0 0;
  }

  .cart-item__remove .remove:hover {
    background: #2c2b2b;
    color: #fff;
  }

  /* Colonne total alignée à droite */
  .cart-table__cell--subtotal {
    text-align: right;
    color: #2c2b2b;
    font-weight: 600;
    white-space: nowrap;
  }

  /* Responsive (stack) */
  @media (max-width: 768px) {
    .cart-table thead {
      display: none;
    }
    .cart-table,
    .cart-table tbody,
    .cart-table tr,
    .cart-table td {
      display: block;
      width: 100%;
    }

    .cart-table__row {
      padding: 24px 0;
      border-bottom: 1px solid #bbb;
    }

    .cart-table__cell {
      border: 0;
      padding: 6px 0;
    }

    .cart-table__cell--product .cart-item__product {
      grid-template-columns: 72px 1fr;
    }

    .cart-table__cell--subtotal {
      text-align: left;
      margin-top: 8px;
    }
  }
}

.woocommerce:has(.wc-empty-cart-message) {
  padding-block:32px 56px;
  display: flex;
  flex-direction: column;
  gap:32px;

  .woocommerce-notices-wrapper {
    display: none;
  }
}

.wc-empty-cart-message {
  background: #1b7a37;
  display: flex;
  height: 41px;
  padding: 0px 32px 0 32px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  align-self: stretch;

  .cart-empty.woocommerce-info {
    all:unset;
    display: flex;
    gap: 1ch;
    align-items: center;
    color: white;

    &::before {
      position: initial;
      top: unset;
      left: unset;
    }
  }

}

.return-to-shop {
  text-align: center;

  .button.wc-backward {
    opacity: 1 !important;
    position: relative;
    border: none;
    outline: 0;
    background: 0 0;
    cursor: pointer;
    display: inline-flex;
    padding: 0.85714286rem 1.71428571rem;
    justify-content: center;
    align-items: center;
    gap: 0.71428571rem;
    text-decoration: none !important;
    transition: background-color 0.3s ease, color 0.3s ease,
      border-color 0.3s ease;
    border: 1px solid #000;
    font-size: 1rem;
    font-style: normal;
    font-weight: 500;
    line-height: 120%;
    background-color: #fff !important;
    color: #000 !important;

    @media (hover: hover) {
      &:hover {
        background-color: #000 !important;
        color: #fff !important;
      }
    }

    &:focus-visible {
      background-color: #000 !important;
      color: #fff !important;
    }
  }
}

/* Shared cart-summary component (used on cart and checkout pages) */
.cart-summary,
.cart_summary {
  display: flex;
  flex-direction: column;
  gap: 24px;

  > #cart-summary-heading,
  > h2 {
    margin: 0;
    color: var(--NOIR-CF, #2c2b2b);
    font-family: 'Neutra Text TF';
    font-size: 18px;
    font-style: normal;
    font-weight: 600;
    line-height: 120%;
    text-transform: none;
  }
}

.cart-summary__coupon,
.cart_summary__coupon {
  border-top: 1px solid #dedddc;
  border-bottom: 1px solid #dedddc;

  summary {
    padding-block: 24px;
    color: var(--NOIR-CF, #2c2b2b);
    font-variant-numeric: lining-nums proportional-nums;
    font-family: 'Neutra Text';
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;

    span[class^='icon-'] {
      transition: transform 0.3s ease;
    }
  }

  /* Open state */
  &[open] {
    summary span[class^='icon-'] {
      transform: rotate(-180deg);
    }
  }

  /* Form wrapper */
  .cart-summary__coupon__form__wrapper,
  .cart_summary__coupon__form__wrapper {
    padding-block: 12px;
    display: flex;
    justify-content: space-between;
    gap: 16px;

    input {
      background: initial;
      flex: 1;
    }
  }
}

.cart-summary__rows,
.cart_summary__rows {
  display: flex;
  flex-direction: column;

  .cart-summary__rows__subtotal,
  .cart_summary__rows__subtotal {
    padding-block: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;

    .cart-summary__label,
    .cart_summary__label {
      font-size: 16px;
    }
  }
}

.cart-summary__row,
.cart_summary__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.cart-summary__label,
.cart_summary__label {
  color: rgba(0, 0, 0, 0.6);
  line-height: 140%;

  &--strong {
    font-weight: 700;
    color: var(--NOIR-CF, #2c2b2b);
  }

  &--product {
    font-weight: 500;
    color: var(--NOIR-CF, #2c2b2b);

    a {
      color: inherit;
      text-decoration: none;

      &:hover {
        text-decoration: underline;
      }
    }
  }
}

.cart-summary__value,
.cart_summary__value {
  color: var(--NOIR-CF, #2c2b2b);
  font-weight: 600;
  white-space: nowrap;

  &--strong {
    font-weight: 700;
  }

  &--line-total {
    font-weight: 600;
  }
}

.cart-summary__row--total,
.cart_summary__row--total {
  font-size: 22px;
  padding-block: 24px 8px;
  border-top: 1px solid #bbb;
}

.cart-summary__actions .checkout-button {
  width: 100%;
  text-align: center;
}

.cart-menu {
  position: relative;

  .cart__count {
    position: absolute;
    top: 8px;
    left: 28px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background-color: var(--ROUGE-CF, #d0021b);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    pointer-events: none;

    &.is-hide {
      display: none;
    }
  }
}
