/* ==========================================================================
   EGR Car Shop — Cart page
   Source of truth: doc/egr-html-prototype/cart.html,
   doc/egr-html-prototype/assets/css/cart.css and the measured screenshots in
   docs/screenshots/cart/ (1512×828 desktop, 390 mobile).

   Scope: body.egr-cart-page. Nothing here reaches the homepage, archives,
   single product, checkout or the header/footer Elements.

   The page is the WooCommerce Cart Block. Its markup is rendered by
   WooCommerce/iAPI, so every rule below styles existing WooCommerce classes;
   no cart behaviour (pricing, coupons, stock, totals) is reimplemented.
   ========================================================================== */

.egr-cart-page {
  --egr-cart-ink: #212121;
  --egr-cart-black: #000000;
  --egr-cart-muted: #888888;
  --egr-cart-label: #5a5a5a;
  --egr-cart-price: #9b3c44;
  --egr-cart-border: #e5e5e5;
  --egr-cart-control-border: #767676;
  --egr-cart-btn-bg: #212121;
  --egr-cart-btn-text: #ffffff;

  background-color: #ffffff;
  color: var(--egr-cart-ink);
  font-family: var(--egr-font-body, "Work Sans", Arial, sans-serif);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Page shell — prototype is a 1160px container with 40px inner padding.
   GP's default 1200px container and right sidebar are replaced here.
   -------------------------------------------------------------------------- */
.egr-cart-page .site-content,
.egr-cart-page #primary,
.egr-cart-page #main {
  margin: 0;
  padding: 0;
}

.egr-cart-page .content-area,
.egr-cart-page #primary {
  width: 100%;
  max-width: none;
}

.egr-cart-page .grid-container {
  box-sizing: border-box;
  max-width: 1160px;
  padding-left: 0;
  padding-right: 0;
}

.egr-cart-page .inside-article {
  box-sizing: border-box;
  padding-top: 0;
  background: #ffffff;
}

.egr-cart-page .entry-header {
  padding: 103px 0 0;
  margin: 0;
  text-align: center;
}

.egr-cart-page .entry-title {
  margin: 0;
  padding: 0;
  color: var(--egr-cart-black);
  font-family: inherit;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.egr-cart-page .entry-content {
  margin: 0;
  padding-top: 0;
}

/* The prototype puts 102px between the title block and the table header. */
.egr-cart-page .wp-block-woocommerce-cart {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  margin-top: 0;
}

.egr-cart-page.egr-cart-empty .wp-block-woocommerce-cart {
  margin-top: 37px;
}

/* --------------------------------------------------------------------------
   Cart column header
   Printed by inc/woocommerce/cart.php before the block because the block's
   own header has three columns while the prototype has five. The six tracks
   match the row grid below exactly: 478 Item / 218 Price / 151 Qty /
   198 Remove / remaining Total.
   -------------------------------------------------------------------------- */
.egr-cart-page .egr-cart-head {
  display: grid;
  margin-top: 102px;
  grid-template-columns: minmax(0, 215fr) minmax(0, 263fr) minmax(0, 218fr) minmax(0, 151fr) minmax(0, 198fr) minmax(0, 35fr);
  align-items: center;
  height: 51px;
  border-top: 1px solid var(--egr-cart-border);
  border-bottom: 1px solid var(--egr-cart-border);
  color: var(--egr-cart-black);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.egr-cart-page .egr-cart-head__item {
  grid-column: 1 / span 2;
}

.egr-cart-page .egr-cart-head__price {
  grid-column: 3;
}

.egr-cart-page .egr-cart-head__qty {
  grid-column: 4;
}

.egr-cart-page .egr-cart-head__remove {
  grid-column: 5;
}

.egr-cart-page .egr-cart-head__total {
  grid-column: 6;
  justify-self: end;
}

.egr-cart-page .egr-cart-head[hidden] {
  display: none;
}

/* --------------------------------------------------------------------------
   Cart table
   WooCommerce's table becomes the prototype's five-column row. The native
   <thead> stays in the DOM for screen readers but is visually hidden; the
   heading above is decorative and aria-hidden.
   -------------------------------------------------------------------------- */
.egr-cart-page .wc-block-cart-items {
  display: block;
  width: 100%;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.egr-cart-page .wc-block-cart-items thead {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.egr-cart-page .wc-block-cart-items tbody {
  display: block;
  width: 100%;
}

.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row {
  display: grid;
  grid-template-columns: minmax(0, 215fr) minmax(0, 263fr) minmax(0, 218fr) minmax(0, 151fr) minmax(0, 198fr) minmax(0, 35fr);
  column-gap: 0;
  align-items: start;
  min-height: 181px;
  padding: 20px 0 30px;
  border-bottom: 1px solid var(--egr-cart-border);
}

.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row > td {
  padding: 0;
  border: 0;
  vertical-align: top;
}

/* Image: absolutely positioned inside the item column so it does not
   dictate the row height (prototype row is 181px, image box 150px). */
.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-cart-item__image {
  position: relative;
  grid-column: 1;
  grid-row: 1 / span 2;
}

.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-cart-item__image > a {
  position: absolute;
  top: 0;
  /* Prototype offset is 54px. Keep the 150px image inside a shrinking
     column on tablet widths instead of letting it overlap the product name. */
  width: min(150px, calc(100% - 12px));
  height: auto;
  aspect-ratio: 1 / 1;
  left: max(0px, min(54px, calc(100% - 161px)));
  display: block;
}

.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-cart-item__image img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  object-fit: contain;
}

/* Product cell dissolves so its children can take their own grid tracks. */
.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-cart-item__product,
.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-cart-item__wrap,
.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-cart-item__quantity {
  display: contents;
}

.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-cart-item__wrap > .wc-block-components-product-name {
  grid-column: 2;
  grid-row: 1;
  max-width: 195px;
  padding-top: 1px;
  color: var(--egr-cart-ink);
  font-size: 14px;
  font-weight: 400;
  line-height: 21px;
  overflow-wrap: break-word;
  text-decoration: none;
}

.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-cart-item__wrap > .wc-block-components-product-name:hover,
.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-cart-item__wrap > .wc-block-components-product-name:focus {
  color: var(--egr-cart-ink);
}

.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-cart-item__prices {
  grid-column: 3;
  grid-row: 1;
  padding: 3px 0 0 23px;
  color: var(--egr-cart-price);
  font-size: 14px;
  font-weight: 400;
  line-height: 21px;
  white-space: nowrap;
}

.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-cart-item__prices .wc-block-components-product-price {
  display: block;
  color: var(--egr-cart-price);
  font-size: 14px;
  line-height: 21px;
}

/* The prototype prints one price per row. Keep WooCommerce's current price
   and hide the struck-through regular price in this column. */
.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-cart-item__prices del,
.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-cart-item__prices .wc-block-components-product-price__regular {
  display: none;
}

.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-cart-item__prices ins,
.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-cart-item__prices .wc-block-components-product-price__value {
  color: var(--egr-cart-price);
  font-weight: 400;
  text-decoration: none;
}

/* Product short description is not a variation. The prototype shows only
   the selected variation line, so the block's description block is hidden
   and variation details are styled like the "Size: …" line. */
.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-components-product-metadata {
  grid-column: 2;
  grid-row: 2;
  padding-top: 6px;
  color: var(--egr-cart-muted);
  font-size: 13px;
  line-height: 21px;
}

.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-components-product-metadata__description {
  display: none;
}

.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-components-product-metadata .wc-block-components-product-details,
.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-components-product-metadata .wc-block-components-product-details__name,
.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-components-product-metadata .wc-block-components-product-details__value {
  margin: 0;
  color: var(--egr-cart-muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 21px;
}

.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-components-quantity-selector {
  grid-column: 4;
  grid-row: 1;
  display: flex;
  gap: 5px;
  width: auto;
  padding: 1px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-components-quantity-selector__button,
.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-components-quantity-selector__input {
  box-sizing: border-box;
  width: 28px;
  height: 28px;
  margin: 0;
  border: 1px solid var(--egr-cart-control-border);
  border-radius: 0;
  background: #ffffff;
  color: var(--egr-cart-ink);
  font-family: inherit;
  font-size: 14px;
  line-height: 1;
  text-align: center;
}

.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-components-quantity-selector__input {
  width: 40px;
  flex: 0 0 40px;
  appearance: textfield;
  -moz-appearance: textfield;
}

.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-components-quantity-selector__input::-webkit-outer-spin-button,
.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-components-quantity-selector__input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-components-quantity-selector__button {
  display: flex;
  flex: 0 0 28px;
  align-items: center;
  justify-content: center;
  opacity: 1;
  cursor: pointer;
}

.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-components-quantity-selector__button:disabled {
  color: var(--egr-cart-ink);
  opacity: 1;
  cursor: default;
}

.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-cart-item__remove-link {
  position: relative;
  grid-column: 5;
  grid-row: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin: 4px 0 0 34px;
  padding: 0;
  border: 1px solid #6b6b6b;
  border-radius: 50%;
  background: transparent;
  color: #6b6b6b;
  text-decoration: none;
  cursor: pointer;
}

.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-cart-item__remove-link svg {
  display: none;
}

/* The prototype draws an 18px close-circle icon with a centred ×. Two absolute
   strokes avoid the optical offset of the Arial × glyph, which sat about 1px
   above the circle's centre. */
.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-cart-item__remove-link::before,
.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-cart-item__remove-link::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 1px;
  background: currentColor;
  text-decoration: none;
}

.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-cart-item__remove-link::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-cart-item__remove-link::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-cart-item__total {
  grid-column: 6;
  grid-row: 1;
  justify-self: end;
  padding-top: 3px;
  color: var(--egr-cart-price);
  font-size: 14px;
  line-height: 21px;
  white-space: nowrap;
}

.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-cart-item__total-price-and-sale-badge-wrapper {
  display: block;
}

.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-cart-item__total .wc-block-components-product-price,
.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-cart-item__total .wc-block-components-product-price__value {
  color: var(--egr-cart-price);
  font-size: 14px;
  line-height: 21px;
}

/* The prototype has no "Save $x" badge on the row total. */
.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-cart-item__total .wc-block-components-product-badge {
  display: none;
}

/* --------------------------------------------------------------------------
   Two-column lower area: related products left, totals right.
   WooCommerce puts both inside .wc-block-components-sidebar-layout. The main
   column is dissolved so the table can span both columns on row 1 while the
   cross-sell collection and the totals share row 2.
   -------------------------------------------------------------------------- */
.egr-cart-page .wc-block-components-sidebar-layout.wc-block-cart {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 294px;
  column-gap: 36px;
  align-items: start;
  margin-bottom: 60px;
}

.egr-cart-page .wc-block-cart__main {
  display: contents;
}

.egr-cart-page .wc-block-cart-items {
  grid-column: 1 / -1;
  grid-row: 1;
}

.egr-cart-page .wc-block-cart__sidebar {
  grid-column: 2;
  grid-row: 2;
  width: 294px;
  padding-top: 36px;
}

.egr-cart-page .wp-block-woocommerce-product-collection {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  margin-bottom: 0;
  padding-top: 48px;
}

/* Cross-sells render an empty notices region before the heading. It has no
   height but keeps a 24px bottom margin, and its alignwide class makes it
   wider than the column. Normalise it to the column. */
.egr-cart-page .wp-block-woocommerce-product-collection .wc-block-components-notices {
  box-sizing: border-box;
  width: auto;
  max-width: 100%;
  margin: 0;
}

/* --------------------------------------------------------------------------
   Related product (WooCommerce cross-sells)
   ========================================================================== */
.egr-cart-page .wp-block-woocommerce-product-collection > h2 {
  /* The block saves margin-bottom:1rem inline; the prototype uses 30px. */
  margin: 0 0 30px !important;
  color: var(--egr-cart-black);
  font-size: 22px;
  font-weight: 700;
  line-height: 26px;
  text-align: left;
}

.egr-cart-page .wc-block-product-template {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  margin: 0;
  padding: 0 12px;
  list-style: none;
}

.egr-cart-page .wc-block-product {
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.egr-cart-page .wc-block-components-product-image {
  display: block;
  margin: 0;
  padding-bottom: 100%;
  position: relative;
  overflow: hidden;
  background: #fcfcfc;
}

.egr-cart-page .wc-block-components-product-image > a {
  position: absolute;
  inset: 0;
  display: block;
}

.egr-cart-page .wc-block-components-product-image img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: contain;
}

.egr-cart-page .wc-block-components-product-sale-badge {
  display: none;
}

/* WordPress prints .has-medium-font-size with !important in its global
   styles, so the prototype's 13px / two-line card title needs !important to
   win. The cross-sell heading margin (30px desktop / 20px mobile) overrides
   the block-saved 1rem inline margin; those are the only other !important
   uses. */
.egr-cart-page .wc-block-product .wp-block-post-title {
  display: -webkit-box !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  max-height: 39px;
  overflow: hidden;
  margin: 12px 0 0;
  color: #999999;
  font-size: 13px !important;
  font-weight: 400;
  line-height: 19.5px !important;
  text-align: left !important;
}

.egr-cart-page .wc-block-product .wp-block-post-title a {
  color: inherit;
  text-decoration: none;
}

.egr-cart-page .wc-block-product .wp-block-woocommerce-product-price {
  margin-top: 4px;
  color: var(--egr-cart-price);
  font-size: 14px;
  line-height: 21px;
  text-align: left;
}

.egr-cart-page .wc-block-product .wp-block-woocommerce-product-price .woocommerce-Price-amount {
  color: var(--egr-cart-price);
}

.egr-cart-page .wc-block-product .wp-block-woocommerce-product-price del {
  color: var(--egr-cart-muted);
  font-size: 12px;
}

/* The prototype's recommendation rail is browse-only; the product title is
   the link. Add-to-cart stays available on the product page itself. */
.egr-cart-page .wc-block-product .wp-block-woocommerce-product-button {
  display: none;
}

/* --------------------------------------------------------------------------
   Totals sidebar
   ========================================================================== */
.egr-cart-page .wc-block-cart__totals-title,
.egr-cart-page .wp-block-woocommerce-cart-accepted-payment-methods-block,
.egr-cart-page .wp-block-woocommerce-cart-express-payment-block {
  display: none;
}

.egr-cart-page .wc-block-components-totals-wrapper {
  margin: 0;
  padding: 0;
  border: 0;
}

.egr-cart-page .wc-block-components-totals-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0;
  color: var(--egr-cart-label);
  font-size: 14px;
  line-height: 16px;
}

.egr-cart-page .wc-block-components-totals-item__label {
  color: inherit;
}

.egr-cart-page .wc-block-components-totals-item__value,
.egr-cart-page .wc-block-components-totals-item__value .wc-block-components-formatted-money-amount {
  color: var(--egr-cart-price);
  font-size: inherit;
  line-height: inherit;
  white-space: nowrap;
}

.egr-cart-page .wc-block-components-totals-footer-item {
  margin-top: 36px;
  color: var(--egr-cart-ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 20px;
}

.egr-cart-page .wc-block-components-totals-footer-item .wc-block-components-totals-item__label {
  font-weight: 700;
}

.egr-cart-page .wc-block-components-totals-footer-item .wc-block-components-totals-item__value,
.egr-cart-page .wc-block-components-totals-footer-item .wc-block-formatted-money-amount {
  color: var(--egr-cart-price);
  font-size: 16px;
  font-weight: 700;
}

/* Coupon panel: the prototype has no coupon row, but WooCommerce coupons are
   part of the required cart. It sits above the totals in prototype type. */
.egr-cart-page .wc-block-components-totals-coupon {
  margin: 0 0 20px;
  border: 0;
}

.egr-cart-page .wc-block-components-totals-coupon .wc-block-components-panel__button {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 0 0 16px;
  border: 0;
  border-bottom: 1px solid var(--egr-cart-border);
  background: transparent;
  color: var(--egr-cart-ink);
  font-size: 14px;
  font-weight: 400;
  line-height: 21px;
  cursor: pointer;
}

.egr-cart-page .wc-block-components-totals-coupon .wc-block-components-panel__button-icon {
  width: 18px;
  height: 18px;
  margin: 0;
  fill: currentColor;
}

.egr-cart-page .wc-block-components-totals-coupon__form {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 16px 0 0;
}

/* WooCommerce's text-input component wraps the actual <input> in a div and
   floats the label inside it. Style the real field, not the wrapper. */
.egr-cart-page .wc-block-components-totals-coupon__input {
  box-sizing: border-box;
  flex: 1 1 auto;
  min-width: 0;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.egr-cart-page .wc-block-components-totals-coupon__input input {
  box-sizing: border-box;
  width: 100%;
  height: 42px;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--egr-cart-control-border);
  border-radius: 0;
  background: #ffffff;
  color: var(--egr-cart-ink);
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
}

/* WooCommerce's label acts as the placeholder: centred while the field is
   empty, small against the top edge once focused or filled. Its defaults
   assume a 50px input, so both positions are restated for this 42px field. */
body.egr-cart-page .wc-block-cart .wc-block-components-totals-coupon__input label {
  top: 50%;
  left: 10px;
  color: var(--egr-cart-muted);
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
  transform: translateY(-50%);
  transform-origin: top left;
}

body.egr-cart-page .wc-block-cart .wc-block-components-totals-coupon__input.is-active label {
  top: 5px;
  transform: scale(0.82);
}

body.egr-cart-page .wc-block-cart .wc-block-components-totals-coupon__input.is-active input {
  padding: 17px 10px 3px;
}

.egr-cart-page .wc-block-components-totals-coupon__input.has-error input {
  border-color: #b32d2e;
}

.egr-cart-page .wc-block-components-totals-coupon__button {
  box-sizing: border-box;
  flex: 0 0 auto;
  width: auto;
  height: 42px;
  margin: 0;
  padding: 0 14px;
  border: 0;
  border-radius: 0;
  background: var(--egr-cart-btn-bg);
  color: var(--egr-cart-btn-text);
  font-family: inherit;
  font-size: 14px;
  line-height: 42px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}

.egr-cart-page .wc-block-components-totals-coupon__button:hover,
.egr-cart-page .wc-block-components-totals-coupon__button:focus {
  background: var(--egr-cart-btn-bg);
  color: var(--egr-cart-btn-text);
}

.egr-cart-page .wc-block-components-totals-coupon__button:disabled {
  opacity: 0.6;
}

.egr-cart-page .wc-block-components-totals-coupon .wc-block-components-validation-error {
  margin: 8px 0 0;
  color: #b32d2e;
  font-size: 12px;
  line-height: 18px;
}

.egr-cart-page .wc-block-components-totals-coupon .wc-block-components-validation-error p {
  display: flex;
  gap: 6px;
  margin: 0;
}

.egr-cart-page .wc-block-components-totals-coupon .wc-block-components-validation-error svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  fill: currentColor;
}

/* Static note from the prototype. The USD part cannot be bolded through
   generated content, but the wording and position are exact. */
.egr-cart-page .wc-block-cart__sidebar .wp-block-woocommerce-cart-order-summary-block::after {
  content: "Shipping & taxes calculated at checkout.\A Orders will be processed in USD";
  display: block;
  margin-top: 26px;
  color: #666666;
  font-size: 12px;
  font-style: italic;
  line-height: 18px;
  text-align: right;
  white-space: pre-line;
}

.egr-cart-page .wc-block-cart__submit {
  margin: 26px 0 0;
}

.egr-cart-page .wc-block-cart__submit-container {
  padding: 0;
}

.egr-cart-page .wc-block-cart__submit-button {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  height: 50px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--egr-cart-btn-bg);
  color: var(--egr-cart-btn-text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 50px;
  letter-spacing: 0.05em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}

.egr-cart-page .wc-block-cart__submit-button:hover,
.egr-cart-page .wc-block-cart__submit-button:focus {
  background: var(--egr-cart-btn-bg);
  color: var(--egr-cart-btn-text);
}

/* --------------------------------------------------------------------------
   Empty cart
   ========================================================================== */
.egr-cart-page .wp-block-woocommerce-empty-cart-block {
  text-align: center;
}

.egr-cart-page .wc-block-cart__empty-cart__title {
  margin: 0;
  color: #3d4246;
  font-size: 16px;
  font-weight: 400;
  line-height: 21px;
  text-align: center;
}

.egr-cart-page .wp-block-woocommerce-empty-cart-block .wp-block-buttons {
  margin-top: 31px;
  justify-content: center;
}

.egr-cart-page .wp-block-woocommerce-empty-cart-block .wp-block-button__link {
  display: inline-block;
  height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 0;
  background: var(--egr-cart-btn-bg);
  color: var(--egr-cart-btn-text);
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 38px;
  text-decoration: none;
}

.egr-cart-page .wp-block-woocommerce-empty-cart-block .wp-block-button__link:hover,
.egr-cart-page .wp-block-woocommerce-empty-cart-block .wp-block-button__link:focus {
  background: var(--egr-cart-btn-bg);
  color: var(--egr-cart-btn-text);
}

/* The prototype's empty state is a single message and button. */
.egr-cart-page .wp-block-woocommerce-empty-cart-block .wp-block-spacer,
.egr-cart-page .wp-block-woocommerce-empty-cart-block > h2:not(.wc-block-cart__empty-cart__title),
.egr-cart-page .wp-block-woocommerce-empty-cart-block .wp-block-woocommerce-product-new {
  display: none;
}

/* --------------------------------------------------------------------------
   Notices and loading feedback
   ========================================================================== */
.egr-cart-page .wc-block-components-notice-banner {
  border-radius: 0;
  font-size: 14px;
  line-height: 21px;
}

.egr-cart-page .wc-block-components-notice-banner__content a {
  color: inherit;
  text-decoration: underline;
}

.egr-cart-page .wc-block-components-notices {
  margin: 0 0 24px;
}

.egr-cart-page .wc-block-components-notices:empty {
  margin: 0;
}

.egr-cart-page .wc-block-components-spinner {
  border-color: var(--egr-cart-ink);
}

/* WooCommerce and GP add dark inset / blue focus rings to form controls and
   block buttons. The prototype's controls have no hover or mouse-focus border
   change, so remove those shadows. Keyboard focus still gets the visible
   outline below. */
.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-components-quantity-selector__button:hover,
.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-components-quantity-selector__button:focus,
.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-components-quantity-selector__input:hover,
.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-components-quantity-selector__input:focus,
.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-cart-item__remove-link:hover,
.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-cart-item__remove-link:focus,
.egr-cart-page .wc-block-cart .wc-block-components-totals-coupon__input input:hover,
.egr-cart-page .wc-block-cart .wc-block-components-totals-coupon__input input:focus,
body.egr-cart-page .wc-block-cart .wc-block-components-totals-coupon__button.wc-block-components-button:hover,
body.egr-cart-page .wc-block-cart .wc-block-components-totals-coupon__button.wc-block-components-button:focus,
body.egr-cart-page .wc-block-cart .wc-block-components-totals-coupon .wc-block-components-panel__button:hover,
body.egr-cart-page .wc-block-cart .wc-block-components-totals-coupon .wc-block-components-panel__button:focus,
body.egr-cart-page .wc-block-cart .wc-block-cart__submit-button.wc-block-components-button:hover,
body.egr-cart-page .wc-block-cart .wc-block-cart__submit-button.wc-block-components-button:focus,
body.egr-cart-page .wp-block-woocommerce-empty-cart-block .wp-block-button__link:hover,
body.egr-cart-page .wp-block-woocommerce-empty-cart-block .wp-block-button__link:focus {
  box-shadow: none;
}

.egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-components-quantity-selector__input:focus,
.egr-cart-page .wc-block-cart .wc-block-components-totals-coupon__input:not(.has-error) input:focus {
  border-color: var(--egr-cart-control-border);
}

/* Visible focus for every interactive element. */
.egr-cart-page a:focus-visible,
.egr-cart-page button:focus-visible,
.egr-cart-page input:focus-visible,
.egr-cart-page [role="button"]:focus-visible {
  outline: 2px solid var(--egr-cart-ink);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Responsive — prototype breakpoint is 767.98px, with 390 and 321 refinements.
   The table becomes a card: product on top, quantity/total, then remove/price.
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
  .egr-cart-page .grid-container {
    max-width: 540px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .egr-cart-page .inside-article {
    padding-left: 0;
    padding-right: 0;
  }

  .egr-cart-page .entry-header {
    padding-top: 40px;
  }

  .egr-cart-page .entry-title {
    font-size: 26px;
  }

  .egr-cart-page .wp-block-woocommerce-cart {
    margin-top: 30px;
  }

  .egr-cart-page.egr-cart-empty .wp-block-woocommerce-cart {
    margin-top: 37px;
  }

  .egr-cart-page .egr-cart-head {
    display: none;
  }

  .egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row {
    /* Media / text / trailing amount. The quantity control spans the media
       and text columns, matching the prototype's "qty | total" row. */
    grid-template-columns: 78px minmax(0, 1fr) auto;
    column-gap: 12px;
    row-gap: 14px;
    min-height: 0;
    padding: 18px 0;
  }

  .egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-cart-item__image {
    grid-column: 1;
    grid-row: 1;
    width: 78px;
    height: 78px;
  }

  .egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-cart-item__image > a {
    position: static;
    width: 78px;
    height: 78px;
  }

  .egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-cart-item__wrap > .wc-block-components-product-name {
    grid-column: 2 / -1;
    grid-row: 1;
    max-width: none;
    min-width: 0;
    padding-top: 0;
    overflow-wrap: break-word;
  }

  .egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-components-product-metadata {
    grid-column: 2 / -1;
    grid-row: 2;
    min-width: 0;
    padding-top: 4px;
  }

  .egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-components-quantity-selector {
    grid-column: 1 / span 2;
    grid-row: 3;
    justify-self: start;
    align-self: center;
    padding-top: 0;
  }

  .egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-cart-item__total {
    grid-column: 3;
    grid-row: 3;
    align-self: center;
    padding-top: 0;
  }

  .egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-cart-item__remove-link {
    grid-column: 1;
    grid-row: 4;
    align-self: center;
    margin: 0;
  }

  .egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-cart-item__prices {
    grid-column: 3;
    grid-row: 4;
    align-self: center;
    justify-self: end;
    padding: 0;
  }

  .egr-cart-page .wc-block-cart__sidebar {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    margin-bottom: 0;
    padding-top: 4px;
  }

  .egr-cart-page .wp-block-woocommerce-product-collection {
    grid-column: 1;
    grid-row: 3;
    padding-top: 8px;
  }

  .egr-cart-page .wp-block-woocommerce-product-collection > h2 {
    margin-bottom: 20px !important;
    font-size: 18px;
  }

  .egr-cart-page .wc-block-product-template {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0;
  }

  .egr-cart-page .wc-block-components-sidebar-layout.wc-block-cart {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 24px;
    margin-bottom: 40px;
  }

  .egr-cart-page .wc-block-cart__submit-button {
    max-width: none;
  }

  .egr-cart-page .wc-block-cart__sidebar .wp-block-woocommerce-cart-order-summary-block::after {
    text-align: right;
  }
}

@media (max-width: 390px) {
  .egr-cart-page .entry-header {
    padding-top: 32px;
  }

  .egr-cart-page .entry-title {
    font-size: 24px;
  }

  .egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row {
    grid-template-columns: 66px minmax(0, 1fr) auto;
  }

  .egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-cart-item__image,
  .egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-cart-item__image > a {
    width: 66px;
    height: 66px;
  }

  .egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-cart-item__wrap > .wc-block-components-product-name {
    font-size: 12px;
    line-height: 18px;
  }

  .egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-components-product-metadata,
  .egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-components-product-metadata .wc-block-components-product-details,
  .egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-components-product-metadata .wc-block-components-product-details__name,
  .egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-components-product-metadata .wc-block-components-product-details__value {
    font-size: 12px;
    line-height: 18px;
  }

  .egr-cart-page .wc-block-product-template {
    gap: 10px;
  }
}

@media (max-width: 321px) {
  .egr-cart-page .grid-container {
    padding-left: 10px;
    padding-right: 10px;
  }

  .egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row {
    grid-template-columns: 58px minmax(0, 1fr) auto;
    column-gap: 8px;
  }

  .egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-cart-item__image,
  .egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-cart-item__image > a {
    width: 58px;
    height: 58px;
  }

  .egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-components-quantity-selector__button {
    width: 24px;
    flex-basis: 24px;
  }

  .egr-cart-page .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row .wc-block-components-quantity-selector__input {
    width: 32px;
    flex-basis: 32px;
  }
}
