/* ============================= */
/* PAGE PANIER - GRHTLD */
/* À charger uniquement sur is_cart() */
/* ============================= */

.grhtld-cart-page {
  padding: 92px 0 110px;
  background: var(--bg);
  color: var(--ink);
}

.grhtld-cart-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ============================= */
/* HEADER */
/* ============================= */

.grhtld-cart-head {
  max-width: 720px;
  margin-bottom: 58px;
}

.grhtld-cart-kicker {
  display: inline-flex;
  align-items: center;

  margin-bottom: 18px;

  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
}

.grhtld-cart-head h1 {
  margin: 0;

  font-family: var(--serif);
  font-size: clamp(50px, 6vw, 92px);
  line-height: .96;
  letter-spacing: -.05em;
  font-weight: 400;
  color: var(--navy);
}

.grhtld-cart-head p {
  max-width: 560px;
  margin: 24px 0 0;

  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.55;
  color: var(--ink-2);
}

/* ============================= */
/* LAYOUT */
/* ============================= */

.grhtld-cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 42px;
  align-items: start;
}

.grhtld-cart-items,
.grhtld-cart-summary-inner {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
}

.grhtld-cart-items {
  overflow: hidden;
}

/* ============================= */
/* TABLE */
/* ============================= */

.grhtld-cart-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 160px 130px;
  gap: 22px;
  align-items: center;
}

.grhtld-cart-row--head {
  padding: 18px 26px;

  background: var(--bg-2);
  border-bottom: 1px solid var(--line);

  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--navy);
}

.grhtld-cart-row--item {
  padding: 26px;
  border-bottom: 1px solid var(--line);
}

.grhtld-cart-row--item:last-child {
  border-bottom: 0;
}

.grhtld-cart-product-main {
  min-width: 0;

  display: grid;
  grid-template-columns: 28px 96px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.grhtld-cart-remove {
  display: flex;
  align-items: center;
  justify-content: center;
}

.grhtld-remove {
  width: 28px;
  height: 28px;

  display: inline-flex !important;
  align-items: center;
  justify-content: center;

  border: 1px solid var(--line);
  border-radius: 50%;

 
  color: var(--ink-3) !important;

  font-family: var(--sans);
  font-size: 20px;
  line-height: 1;
  text-decoration: none !important;

  transition:
    background .2s var(--ease),
    color .2s var(--ease),
    border-color .2s var(--ease);
}

.grhtld-remove:hover {
  background: var(--navy);
  color: #fff !important;
  border-color: var(--navy);
}

.grhtld-cart-thumb {
  width: 96px;
  height: 116px;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;

  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
}

.grhtld-cart-thumb a,
.grhtld-cart-thumb img {
  width: 100%;
  height: 100%;
  display: block;
}

.grhtld-cart-thumb img {
  object-fit: cover;
}

.grhtld-cart-product-content {
  min-width: 0;
}

.grhtld-cart-product-label {
  display: block;
  margin-bottom: 8px;

  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.grhtld-cart-product-title {
  margin: 0;

  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.08;
  font-weight: 400;
  color: var(--navy);
}

.grhtld-cart-product-title a {
  color: inherit;
  text-decoration: none;
}

.grhtld-cart-product-title a:hover {
  color: var(--gold);
}

.grhtld-cart-product-content .variation,
.grhtld-cart-product-content .backorder_notification {
  margin-top: 10px;

  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-3);
}

.grhtld-cart-price,
.grhtld-cart-subtotal {
  font-family: var(--serif);
  font-size: 21px;
  font-style: italic;
  line-height: 1;
  color: var(--ink);
}

.grhtld-cart-subtotal {
  color: var(--navy);
}

/* ============================= */
/* QUANTITÉ */
/* ============================= */

.grhtld-cart-quantity .quantity {
  height: 46px;
  width: fit-content;

  display: inline-flex !important;
  align-items: center;
  justify-content: center;

  overflow: hidden;

  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.grhtld-cart-quantity .quantity input.qty {
  width: 54px !important;
  height: 46px !important;
  min-height: 46px !important;

  margin: 0 !important;
  padding: 0 !important;

  border: 0 !important;
  background: transparent !important;

  text-align: center !important;

  font-family: var(--sans) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 46px !important;
  color: var(--ink) !important;

  appearance: textfield;
  -moz-appearance: textfield;
}

.grhtld-cart-quantity .quantity input.qty::-webkit-outer-spin-button,
.grhtld-cart-quantity .quantity input.qty::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

.grhtld-cart-quantity .grhtld-cart-qty-btn {
  width: 40px !important;
  height: 46px !important;
  min-width: 40px !important;
  min-height: 46px !important;

  margin: 0 !important;
  padding: 0 !important;

  display: inline-flex !important;
  align-items: center;
  justify-content: center;

  border: 0 !important;
  border-radius: 0 !important;

  background: transparent !important;
  color: var(--navy) !important;

  font-family: var(--sans) !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  line-height: 1 !important;

  cursor: pointer !important;
  box-shadow: none !important;

  transition:
    background .2s var(--ease),
    color .2s var(--ease);
}

.grhtld-cart-quantity .grhtld-cart-qty-btn:hover {
  background: var(--navy) !important;
  color: #fff !important;
}

/* ============================= */
/* ACTIONS */
/* ============================= */

.grhtld-cart-actions {
  padding: 24px 26px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;

  background: var(--surface);
  border-top: 1px solid var(--line);
}

.grhtld-coupon {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.grhtld-coupon input.input-text {
  min-width: 210px;
  height: 46px;

  padding: 0 16px;

  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);

  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
}

.grhtld-button,
.woocommerce .grhtld-button,
.woocommerce-page .grhtld-button {
  min-height: 46px !important;
  padding: 0 20px !important;

  display: inline-flex !important;
  align-items: center;
  justify-content: center;

  border-radius: 999px !important;

  font-family: var(--sans) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1 !important;

  cursor: pointer !important;
  text-decoration: none !important;

  transition:
    background .2s var(--ease),
    color .2s var(--ease),
    border-color .2s var(--ease),
    opacity .2s var(--ease);
}

.grhtld-button--ghost,
.woocommerce .grhtld-button--ghost {
  background: transparent !important;
  color: var(--navy) !important;
  border: 1px solid var(--navy) !important;
}

.grhtld-button--ghost:hover {
  background: var(--navy) !important;
  color: #fff !important;
}

.grhtld-button--update,
.woocommerce .grhtld-button--update {
  background: var(--navy) !important;
  color: #fff !important;
  border: 1px solid var(--navy) !important;
}

.grhtld-button--update:hover {
  background: var(--navy-dk) !important;
  border-color: var(--navy-dk) !important;
}

.grhtld-button--update:disabled,
.grhtld-button--update[disabled] {
  opacity: .45 !important;
  cursor: not-allowed !important;
}

/* ============================= */
/* RÉSUMÉ COMMANDE */
/* ============================= */

.grhtld-cart-summary {
  position: sticky;
  top: calc(var(--header-height, 96px) + 28px);
}

.grhtld-cart-summary-inner {
  padding: 30px;
}

.grhtld-cart-summary h2 {
  margin: 0 0 24px;

  font-family: var(--serif);
  font-size: 38px;
  line-height: 1.05;
  font-weight: 400;
  color: var(--navy);
}

.grhtld-cart-summary .cart-collaterals,
.grhtld-cart-summary .cart_totals {
  width: 100% !important;
  float: none !important;
}

.grhtld-cart-summary .cart_totals h2 {
  display: none;
}

.grhtld-cart-summary table.shop_table,
.grhtld-cart-summary table.shop_table tbody,
.grhtld-cart-summary table.shop_table tr,
.grhtld-cart-summary table.shop_table th,
.grhtld-cart-summary table.shop_table td {
  display: block;
  width: 100%;
  border: 0 !important;
}

.grhtld-cart-summary table.shop_table {
  margin: 0 !important;
  border-collapse: collapse !important;
}

.grhtld-cart-summary table.shop_table tr {
  padding: 16px 0;
  border-bottom: 1px solid var(--line) !important;
}

.grhtld-cart-summary table.shop_table tr:first-child {
  padding-top: 0;
}

.grhtld-cart-summary table.shop_table th {
  margin-bottom: 8px;

  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.grhtld-cart-summary table.shop_table td {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.25;
  font-weight: 400;
  color: var(--ink);
}

.grhtld-cart-summary table.shop_table .order-total td {
  font-size: 30px;
  font-style: italic;
  color: var(--navy);
}

.grhtld-cart-summary .wc-proceed-to-checkout {
  padding: 24px 0 0 !important;
}

.grhtld-cart-summary .checkout-button,
.woocommerce .grhtld-cart-summary .checkout-button {
  width: 100% !important;
  min-height: 54px !important;

  display: inline-flex !important;
  align-items: center;
  justify-content: center;

  margin: 0 !important;
  padding: 0 24px !important;

  border-radius: 999px !important;
  border: 1px solid var(--navy) !important;

  background: var(--navy) !important;
  color: #fff !important;

  font-family: var(--sans) !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  text-decoration: none !important;

  transition:
    background .2s var(--ease),
    border-color .2s var(--ease),
    transform .2s var(--ease);
}

.grhtld-cart-summary .checkout-button:hover {
  background: var(--navy-dk) !important;
  border-color: var(--navy-dk) !important;
  transform: translateY(-2px);
}

.grhtld-continue-shopping {
  width: fit-content;

  display: inline-flex;
  align-items: center;
  gap: 8px;

  margin-top: 22px;
  padding-bottom: 4px;

  border-bottom: 1px solid currentColor;

  color: var(--navy);
  text-decoration: none;

  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
}

.grhtld-continue-shopping span {
  transition: transform .2s var(--ease);
}

.grhtld-continue-shopping:hover span {
  transform: translateX(4px);
}

/* ============================= */
/* MESSAGES + PANIER VIDE */
/* ============================= */

.woocommerce-notices-wrapper {
  max-width: 1280px;
  margin: 0 auto;
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  margin: 0 0 28px !important;
  padding: 18px 22px !important;

  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  border-left: 4px solid var(--gold) !important;
  border-radius: var(--radius-l) !important;

  font-family: var(--sans) !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  color: var(--ink) !important;
}

.return-to-shop .button,
.woocommerce .return-to-shop .button {
  min-height: 50px !important;
  padding: 0 24px !important;
  margin-left: 10px !important;

  display: inline-flex !important;
  align-items: center;
  justify-content: center;

  border-radius: 999px !important;
  border: 1px solid var(--navy) !important;

  background: var(--navy) !important;
  color: #fff !important;

  font-family: var(--sans) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

/* ============================= */
/* RESPONSIVE */
/* ============================= */

@media (max-width: 1150px) {
  .grhtld-cart-layout {
    grid-template-columns: 1fr;
  }

  .grhtld-cart-summary {
    position: static;
  }

  .grhtld-cart-summary-inner {
    max-width: 560px;
  }
}

@media (max-width: 900px) {
  .grhtld-cart-row--head {
    display: none;
  }

  .grhtld-cart-row--item {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .grhtld-cart-product-main {
    grid-template-columns: 28px 88px minmax(0, 1fr);
  }

  .grhtld-cart-price,
  .grhtld-cart-quantity,
  .grhtld-cart-subtotal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    padding-left: 46px;
  }

  .grhtld-cart-price::before,
  .grhtld-cart-quantity::before,
  .grhtld-cart-subtotal::before {
    content: attr(data-title);

    font-family: var(--sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ink-3);
  }
}

@media (max-width: 760px) {
  .grhtld-cart-page {
    padding: 68px 0 82px;
  }

  .grhtld-cart-wrap {
    padding: 0 20px;
  }

  .grhtld-cart-head {
    margin-bottom: 38px;
  }

  .grhtld-cart-head h1 {
    font-size: clamp(42px, 14vw, 64px);
  }

  .grhtld-cart-head p {
    font-size: 18px;
  }

  .grhtld-cart-row--item,
  .grhtld-cart-actions,
  .grhtld-cart-summary-inner {
    padding: 22px;
  }

  .grhtld-cart-product-main {
    grid-template-columns: 26px 74px minmax(0, 1fr);
    gap: 14px;
  }

  .grhtld-cart-thumb {
    width: 74px;
    height: 92px;
  }

  .grhtld-cart-product-title {
    font-size: 21px;
  }

  .grhtld-cart-price,
  .grhtld-cart-quantity,
  .grhtld-cart-subtotal {
    padding-left: 0;
  }

  .grhtld-cart-actions {
    align-items: stretch;
  }

  .grhtld-coupon,
  .grhtld-coupon input.input-text,
  .grhtld-coupon .button,
  .grhtld-button--update {
    width: 100%;
  }
}

@media (max-width: 460px) {
  .grhtld-cart-wrap {
    padding: 0 16px;
  }

  .grhtld-cart-product-main {
    grid-template-columns: 1fr;
  }

  .grhtld-cart-remove {
    justify-content: flex-start;
  }

  .grhtld-cart-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .grhtld-cart-price,
  .grhtld-cart-quantity,
  .grhtld-cart-subtotal {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ============================= */
/* FIX BACKGROUND PADDING PANIER */
/* ============================= */

body.woocommerce-cart,
body.woocommerce-cart main.cart-page-grhtld,
body.woocommerce-cart .cart-section,
body.woocommerce-cart .grhtld-cart-page {
  background: var(--bg) !important;
}

/* ============================= */
/* FIX CROIX DANS SON BOUTON GRIS */
/* ============================= */

body.woocommerce-cart .grhtld-cart-remove {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  width: 28px !important;
  height: 28px !important;

  margin: 0 !important;
  padding: 0 !important;

  position: static !important;
  transform: none !important;
}

body.woocommerce-cart .grhtld-cart-remove .remove.grhtld-remove {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;

  margin: 0 !important;
  padding: 0 !important;

  display: grid !important;
  place-items: center !important;

  background: var(--bg) !important;
  border: 1px solid var(--line) !important;
  border-radius: 50% !important;

  color: #A00000 !important;
  text-decoration: none !important;

  font-size: 0 !important;
  line-height: 1 !important;

  position: relative !important;
  transform: none !important;
}

body.woocommerce-cart .grhtld-cart-remove .remove.grhtld-remove::before {
  content: "×" !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  width: 100% !important;
  height: 100% !important;

  font-family: var(--sans) !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  line-height: 1 !important;

  transform: translateY(-1px) !important;
}

body.woocommerce-cart .grhtld-cart-remove .remove.grhtld-remove:hover {
  background: #A00000 !important;
  color: #fff !important;
  border-color: #A00000 !important;
}