/*
 * AMUI v2.0.0
 * Koszyk w stylu marketplace: prosty, intencyjny i zbliżony logiką do Allegro,
 * ale bez kopiowania identyfikacji wizualnej 1:1.
 */

:root {
  --amui-v200-orange: var(--amui-accent, #ff5a00);
  --amui-v200-orange-dark: var(--amui-accent-dark, #e65000);
  --amui-v200-teal: #00796b;
  --amui-v200-text: var(--amui-text, #1f2937);
  --amui-v200-muted: var(--amui-muted, #64748b);
  --amui-v200-line: var(--amui-line, #e5e7eb);
  --amui-v200-bg: #f3f4f6;
  --amui-v200-card: #ffffff;
  --amui-v200-green: #078a35;
  --amui-v200-shadow: 0 16px 42px rgba(15, 23, 42, .08);
}

/* =========================================================
   KOSZYK – nadpisanie starszej warstwy v1.9.0
   ========================================================= */
body.woocommerce-cart .amui-cart-hero,
body.woocommerce-cart .amui-cart-list-head,
body.woocommerce-cart .amui-cart-next-steps,
body.woocommerce-cart .amui-cart-side-intro {
  display: none !important;
}

body.woocommerce-cart #content,
body.woocommerce-cart .site-content,
body.woocommerce-cart .ast-container,
body.woocommerce-cart .content-area,
body.woocommerce-cart .entry-content {
  background: transparent !important;
}

body.woocommerce-cart .entry-content > .woocommerce,
body.woocommerce-cart .ast-woocommerce-container > .woocommerce,
body.woocommerce-cart #primary .woocommerce {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 410px) !important;
  gap: 20px !important;
  align-items: start !important;
  padding: 8px 0 24px !important;
}

body.woocommerce-cart .woocommerce-notices-wrapper,
body.woocommerce-cart .woocommerce-message,
body.woocommerce-cart .woocommerce-info,
body.woocommerce-cart .woocommerce-error,
body.woocommerce-cart .return-to-shop,
body.woocommerce-cart .cart-empty {
  grid-column: 1 / -1 !important;
}

body.woocommerce-cart form.woocommerce-cart-form {
  grid-column: 1 !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

body.woocommerce-cart .cart-collaterals {
  grid-column: 2 !important;
  position: sticky !important;
  top: 92px !important;
  width: auto !important;
  margin: 0 !important;
}

/* Pasek: cały koszyk + menu usuwania */
.amui-cart-selection-bar,
.amui-cart-delivery-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
  padding: 16px 24px;
  border: 1px solid rgba(226, 232, 240, .9);
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, .02);
}

.amui-cart-selection-bar {
  min-height: 70px;
  border-radius: 0;
}

.amui-cart-delivery-group {
  min-height: 78px;
  margin-bottom: 0;
  border-bottom: 0;
}

.amui-cart-all-toggle,
.amui-cart-delivery-toggle,
.amui-cart-item-toggle {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 0 !important;
  color: var(--amui-v200-text);
  font-size: 20px;
  line-height: 1.2;
  font-weight: 500;
  cursor: pointer;
}

.amui-cart-all-toggle input,
.amui-cart-delivery-toggle input,
.amui-cart-item-toggle input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.amui-cart-fake-check {
  position: relative;
  display: inline-flex;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--amui-v200-orange);
  border-radius: 2px;
  background: #ffffff;
}

.amui-cart-all-toggle input:checked + .amui-cart-fake-check::after,
.amui-cart-delivery-toggle input:checked + .amui-cart-fake-check::after,
.amui-cart-item-toggle input:checked + .amui-cart-fake-check::after {
  content: "";
  width: 11px;
  height: 6px;
  margin-top: -2px;
  border-left: 2px solid var(--amui-v200-orange);
  border-bottom: 2px solid var(--amui-v200-orange);
  transform: rotate(-45deg);
}

.amui-cart-all-toggle strong,
.amui-cart-delivery-toggle strong {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -.01em;
}

.amui-cart-delivery-note {
  color: var(--amui-v200-muted);
  font-size: 13px;
  font-weight: 700;
}

.amui-cart-remove-menu {
  position: relative;
  display: inline-flex;
  margin-left: auto;
}

.amui-cart-remove-toggle {
  display: inline-flex !important;
  align-items: center !important;
  gap: 12px !important;
  min-height: 44px !important;
  padding: 0 12px !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--amui-v200-teal) !important;
  box-shadow: none !important;
  font-size: 18px !important;
  font-weight: 850 !important;
  letter-spacing: .16em !important;
}

.amui-cart-remove-toggle:hover,
.amui-cart-remove-toggle:focus {
  background: rgba(0, 121, 107, .07) !important;
  color: var(--amui-v200-teal) !important;
}

.amui-cart-remove-toggle i {
  display: block;
  width: 15px;
  height: 15px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-3px);
}

.amui-cart-remove-menu.is-open .amui-cart-remove-toggle i {
  transform: rotate(225deg) translate(-1px, -2px);
}

.amui-cart-remove-dropdown {
  position: absolute;
  z-index: 50;
  top: calc(100% + 4px);
  right: 0;
  width: 260px;
  border: 1px solid rgba(15, 23, 42, .35);
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .16);
}

.amui-cart-remove-dropdown[hidden] {
  display: none !important;
}

.amui-cart-remove-action {
  display: flex !important;
  width: 100% !important;
  min-height: 50px !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 16px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  color: var(--amui-v200-teal) !important;
  box-shadow: none !important;
  font-size: 17px !important;
  font-weight: 900 !important;
  letter-spacing: .13em !important;
}

.amui-cart-remove-action + .amui-cart-remove-action {
  border-top: 1px solid rgba(15, 23, 42, .16) !important;
}

.amui-cart-remove-action:hover,
.amui-cart-remove-action:focus {
  background: rgba(0, 121, 107, .06) !important;
  color: var(--amui-v200-teal) !important;
}

/* Tabela koszyka jako sekcja dostawy */
body.woocommerce-cart table.shop_table.cart,
body.woocommerce-cart table.shop_table.cart tbody {
  display: block !important;
  width: 100% !important;
  border: 0 !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  background: transparent !important;
}

body.woocommerce-cart table.shop_table.cart thead {
  display: none !important;
}

body.woocommerce-cart table.shop_table.cart tbody tr.cart_item {
  position: relative !important;
  display: grid !important;
  grid-template-columns: minmax(220px, 250px) minmax(0, 1fr) 170px 170px 46px !important;
  gap: 18px !important;
  align-items: center !important;
  width: 100% !important;
  min-height: 188px !important;
  grid-template-rows: minmax(0, 1fr) auto !important;
  margin: 0 !important;
  padding: 20px 28px !important;
  border: 1px solid rgba(226, 232, 240, .9) !important;
  border-top: 0 !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  box-shadow: none !important;
  transition: background-color .14s ease !important;
}

body.woocommerce-cart table.shop_table.cart tbody tr.cart_item:hover {
  border-color: rgba(226, 232, 240, .9) !important;
  background: #fffdfb !important;
  box-shadow: none !important;
  transform: none !important;
}

body.woocommerce-cart table.shop_table.cart tbody tr.cart_item td {
  display: block !important;
  width: auto !important;
  min-width: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  text-align: left !important;
  vertical-align: middle !important;
}

body.woocommerce-cart table.shop_table.cart .product-thumbnail {
  grid-column: 1 !important;
  grid-row: 1 / span 2 !important;
}

body.woocommerce-cart table.shop_table.cart .product-name {
  grid-column: 2 !important;
  grid-row: 1 !important;
  align-self: start !important;
}

body.woocommerce-cart table.shop_table.cart .product-price {
  grid-column: 2 !important;
  grid-row: 2 !important;
  align-self: end !important;
  margin-top: 0 !important;
}

body.woocommerce-cart table.shop_table.cart .product-quantity {
  grid-column: 3 !important;
  grid-row: 1 / span 2 !important;
  justify-self: center !important;
}

body.woocommerce-cart table.shop_table.cart .product-subtotal {
  grid-column: 4 !important;
  grid-row: 1 / span 2 !important;
  justify-self: end !important;
  color: var(--amui-v200-text) !important;
  font-size: 28px !important;
  font-weight: 750 !important;
  letter-spacing: -.03em !important;
}

body.woocommerce-cart table.shop_table.cart .product-remove {
  grid-column: 5 !important;
  grid-row: 1 / span 2 !important;
  justify-self: end !important;
}

body.woocommerce-cart .amui-cart-thumb-wrap {
  display: grid;
  grid-template-columns: 32px minmax(132px, 160px);
  gap: 24px;
  align-items: center;
}

body.woocommerce-cart .amui-cart-item-toggle {
  align-self: center;
  gap: 0;
}

body.woocommerce-cart .amui-cart-thumb-media {
  display: grid;
  place-items: center;
  width: 160px;
  height: 132px;
  background: #ffffff;
}

body.woocommerce-cart table.cart img,
body.woocommerce-cart table.shop_table.cart .product-thumbnail img,
body.woocommerce-cart .amui-cart-thumb-media img {
  width: 160px !important;
  height: 132px !important;
  max-width: 160px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  object-fit: contain !important;
}

body.woocommerce-cart table.shop_table.cart .product-name a {
  display: block !important;
  max-width: 580px !important;
  color: var(--amui-v200-text) !important;
  font-size: 18px !important;
  line-height: 1.32 !important;
  font-weight: 500 !important;
  letter-spacing: -.015em !important;
  text-decoration: none !important;
}

body.woocommerce-cart table.shop_table.cart .product-name a:hover {
  color: var(--amui-v200-orange-dark) !important;
}

body.woocommerce-cart table.shop_table.cart .product-name::after {
  content: "Dostawa i płatność w koszyku";
  display: block;
  width: fit-content;
  margin-top: 12px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--amui-v200-muted);
  font-size: 13px;
  font-weight: 500;
}

body.woocommerce-cart table.shop_table.cart .product-price::before,
body.woocommerce-cart table.shop_table.cart .product-quantity::before,
body.woocommerce-cart table.shop_table.cart .product-subtotal::before {
  display: none !important;
  content: none !important;
}

body.woocommerce-cart table.shop_table.cart .product-price {
  color: var(--amui-v200-muted) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

body.woocommerce-cart table.shop_table.cart .product-price::after {
  content: " cena/szt.";
  color: var(--amui-v200-muted);
  font-weight: 500;
}

/* Ilość – prosty kontroler jak w marketplace */
body.woocommerce-cart table.shop_table.cart .quantity {
  display: inline-flex !important;
  align-items: center !important;
  height: 52px !important;
  border: 1px solid #9ca3af !important;
  border-radius: 0 !important;
  overflow: hidden !important;
  background: #ffffff !important;
}

body.woocommerce-cart table.shop_table.cart .quantity .qty {
  width: 70px !important;
  min-height: 52px !important;
  height: 52px !important;
  padding: 0 !important;
  border: 0 !important;
  border-left: 1px solid #9ca3af !important;
  border-right: 1px solid #9ca3af !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  color: var(--amui-v200-text) !important;
  text-align: center !important;
  font-size: 16px !important;
  font-weight: 700 !important;
}

body.woocommerce-cart table.shop_table.cart .amui-qty-btn {
  width: 52px !important;
  min-height: 52px !important;
  height: 52px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  color: var(--amui-v200-teal) !important;
  box-shadow: none !important;
  font-size: 31px !important;
  font-weight: 300 !important;
  line-height: 1 !important;
}

body.woocommerce-cart table.shop_table.cart .amui-qty-btn:hover {
  background: rgba(0, 121, 107, .06) !important;
  color: var(--amui-v200-teal) !important;
}

body.woocommerce-cart table.shop_table.cart .product-remove a.remove {
  display: inline-flex !important;
  width: 44px !important;
  height: 44px !important;
  align-items: center !important;
  justify-content: center !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #737373 !important;
  font-size: 0 !important;
  text-decoration: none !important;
}

body.woocommerce-cart table.shop_table.cart .product-remove a.remove::before {
  content: "🗑";
  font-size: 27px;
  line-height: 1;
  filter: grayscale(1);
  opacity: .75;
}

body.woocommerce-cart table.shop_table.cart .product-remove a.remove:hover::before {
  opacity: 1;
}

/* Kupon i aktualizacja koszyka – mniejszy, nie odciąga od finalizacji */
body.woocommerce-cart table.shop_table.cart tbody tr:not(.cart_item),
body.woocommerce-cart table.shop_table.cart tbody tr:not(.cart_item) td.actions {
  display: block !important;
  width: 100% !important;
}

body.woocommerce-cart table.shop_table.cart td.actions {
  margin: 14px 0 0 !important;
  padding: 16px !important;
  border: 1px dashed rgba(255, 90, 0, .28) !important;
  border-radius: 0 !important;
  background: #fff8f3 !important;
}

body.woocommerce-cart table.shop_table.cart td.actions .coupon {
  display: grid !important;
  grid-template-columns: auto minmax(160px, 1fr) auto !important;
  gap: 10px !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 620px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

body.woocommerce-cart table.shop_table.cart td.actions .coupon::before {
  content: "Kod rabatowy" !important;
  color: var(--amui-v200-text) !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

body.woocommerce-cart table.shop_table.cart td.actions .coupon label {
  display: none !important;
}

body.woocommerce-cart table.shop_table.cart td.actions .coupon .input-text {
  width: 100% !important;
  min-height: 44px !important;
  border-radius: 0 !important;
  border: 1px solid rgba(203, 213, 225, .95) !important;
  background: #ffffff !important;
}

body.woocommerce-cart table.shop_table.cart td.actions .button,
body.woocommerce-cart table.shop_table.cart td.actions button[name="update_cart"] {
  min-height: 44px !important;
  border-radius: 0 !important;
  font-weight: 850 !important;
}

body.woocommerce-cart table.shop_table.cart td.actions .coupon .button {
  background: #ffffff !important;
  color: var(--amui-v200-orange-dark) !important;
  border: 1px solid rgba(255, 90, 0, .35) !important;
}

body.woocommerce-cart table.shop_table.cart td.actions button[name="update_cart"] {
  float: right !important;
  margin: 0 !important;
  background: #1f2937 !important;
  color: #ffffff !important;
}

.amui-cart-allegro-hint {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 0;
}

.amui-cart-allegro-hint > div {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 6px 10px;
  align-items: start;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, .9);
}

.amui-cart-allegro-hint > div > span {
  grid-row: 1 / span 2;
  font-size: 21px;
}

.amui-cart-allegro-hint strong {
  color: var(--amui-v200-text);
  font-size: 13px;
  font-weight: 900;
}

.amui-cart-allegro-hint small {
  color: var(--amui-v200-muted);
  font-size: 12px;
  line-height: 1.35;
}

/* Podsumowanie po prawej */
body.woocommerce-cart .cart_totals {
  overflow: hidden !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

body.woocommerce-cart .cart_totals h2 {
  display: none !important;
}

body.woocommerce-cart .cart_totals table.shop_table {
  margin: 0 !important;
  padding: 22px 30px 0 !important;
  border: 0 !important;
  border-collapse: collapse !important;
  background: transparent !important;
}

body.woocommerce-cart .cart_totals table.shop_table tr {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 14px !important;
  align-items: baseline !important;
  padding: 0 0 16px !important;
  border: 0 !important;
}

body.woocommerce-cart .cart_totals table.shop_table tr.order-total {
  margin-top: 2px !important;
  padding-top: 20px !important;
  border-top: 1px solid rgba(226, 232, 240, .95) !important;
}

body.woocommerce-cart .cart_totals table.shop_table th,
body.woocommerce-cart .cart_totals table.shop_table td {
  display: block !important;
  width: auto !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--amui-v200-text) !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  text-align: left !important;
}

body.woocommerce-cart .cart_totals table.shop_table td {
  text-align: right !important;
  color: #475569 !important;
  font-weight: 500 !important;
}

body.woocommerce-cart .cart_totals .order-total th {
  align-self: center !important;
}

body.woocommerce-cart .cart_totals .order-total strong,
body.woocommerce-cart .cart_totals .order-total .amount {
  color: #455a64 !important;
  font-size: 34px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  letter-spacing: -.04em !important;
}

body.woocommerce-cart .wc-proceed-to-checkout {
  padding: 0 30px 22px !important;
}

body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
  display: flex !important;
  width: 100% !important;
  min-height: 50px !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--amui-v200-orange) !important;
  color: #ffffff !important;
  box-shadow: none !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  letter-spacing: .16em !important;
  text-transform: uppercase !important;
}

body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover,
body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:focus {
  background: var(--amui-v200-orange-dark) !important;
  transform: none !important;
}

body.woocommerce-cart .wc-proceed-to-checkout::after {
  content: "KONTYNUUJ ZAKUPY";
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  color: var(--amui-v200-teal);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .16em;
}

body.woocommerce-cart .amui-cart-confidence {
  display: grid !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 30px 24px !important;
}

body.woocommerce-cart .amui-cart-confidence__item {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 9px;
  align-items: start;
  padding: 10px 0;
  border-top: 1px solid rgba(226, 232, 240, .75);
  color: var(--amui-v200-muted);
  font-size: 12px;
  line-height: 1.35;
}

body.woocommerce-cart .amui-cart-confidence__item strong {
  display: block;
  color: var(--amui-v200-text);
  font-size: 13px;
  font-weight: 850;
}

body.woocommerce-cart .woocommerce-shipping-destination,
body.woocommerce-cart .woocommerce-shipping-calculator,
body.woocommerce-cart .cart_totals .shipping-calculator-button {
  font-size: 12px !important;
  color: var(--amui-v200-muted) !important;
}

/* Pusty koszyk */
body.woocommerce-cart .cart-empty.woocommerce-info {
  padding: 34px !important;
  border: 1px solid rgba(255, 90, 0, .18) !important;
  border-radius: 0 !important;
  background: #fffaf6 !important;
  color: var(--amui-v200-text) !important;
  font-size: 18px !important;
  font-weight: 800 !important;
}

/* =========================================================
   CHECKOUT – delikatna spójność z nowym koszykiem
   ========================================================= */
body.woocommerce-checkout:not(.woocommerce-order-received) .amui-checkout-hero {
  border-radius: 0 !important;
  box-shadow: none !important;
}

body.woocommerce-checkout #order_review,
body.woocommerce-checkout #order_review_heading,
body.woocommerce-checkout #customer_details .col-1,
body.woocommerce-checkout #customer_details .col-2,
body.woocommerce-checkout .woocommerce-billing-fields,
body.woocommerce-checkout .woocommerce-shipping-fields,
body.woocommerce-checkout .woocommerce-additional-fields {
  border-radius: 0 !important;
}

/* =========================================================
   RESPONSYWNOŚĆ
   ========================================================= */
@media (max-width: 1180px) {
  body.woocommerce-cart table.shop_table.cart tbody tr.cart_item {
    grid-template-columns: minmax(190px, 220px) minmax(0, 1fr) 150px 46px !important;
    gap: 14px !important;
  }

  body.woocommerce-cart table.shop_table.cart .product-thumbnail { grid-column: 1 !important; grid-row: 1 / span 3 !important; }
  body.woocommerce-cart table.shop_table.cart .product-name { grid-column: 2 !important; grid-row: 1 !important; }
  body.woocommerce-cart table.shop_table.cart .product-price { grid-column: 2 !important; grid-row: 2 !important; margin-top: 0 !important; }
  body.woocommerce-cart table.shop_table.cart .product-quantity { grid-column: 3 !important; grid-row: 1 / span 3 !important; }
  body.woocommerce-cart table.shop_table.cart .product-subtotal { grid-column: 2 !important; grid-row: 3 !important; justify-self: start !important; font-size: 24px !important; }
  body.woocommerce-cart table.shop_table.cart .product-remove { grid-column: 4 !important; grid-row: 1 / span 3 !important; }

  body.woocommerce-cart .amui-cart-thumb-wrap { grid-template-columns: 30px 140px; gap: 16px; }
  body.woocommerce-cart .amui-cart-thumb-media,
  body.woocommerce-cart table.cart img,
  body.woocommerce-cart table.shop_table.cart .product-thumbnail img,
  body.woocommerce-cart .amui-cart-thumb-media img {
    width: 140px !important;
    height: 116px !important;
    max-width: 140px !important;
  }
}

@media (max-width: 981px) {
  body.woocommerce-cart .entry-content > .woocommerce,
  body.woocommerce-cart .ast-woocommerce-container > .woocommerce,
  body.woocommerce-cart #primary .woocommerce {
    display: block !important;
  }

  body.woocommerce-cart .cart-collaterals {
    position: relative !important;
    top: auto !important;
    margin-top: 18px !important;
  }
}

@media (max-width: 760px) {
  .amui-cart-selection-bar,
  .amui-cart-delivery-group {
    padding: 14px 16px;
  }

  .amui-cart-all-toggle strong,
  .amui-cart-delivery-toggle strong {
    font-size: 17px;
  }

  .amui-cart-remove-toggle {
    font-size: 14px !important;
    letter-spacing: .12em !important;
  }

  .amui-cart-delivery-note {
    display: none;
  }

  body.woocommerce-cart table.shop_table.cart tbody tr.cart_item {
    grid-template-columns: 98px minmax(0, 1fr) 40px !important;
    gap: 10px 12px !important;
    min-height: 0 !important;
    padding: 16px !important;
  }

  body.woocommerce-cart table.shop_table.cart .product-thumbnail {
    grid-column: 1 !important;
    grid-row: 1 / span 4 !important;
  }

  body.woocommerce-cart table.shop_table.cart .product-name {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  body.woocommerce-cart table.shop_table.cart .product-price {
    grid-column: 2 !important;
    grid-row: 2 !important;
    margin-top: 0 !important;
  }

  body.woocommerce-cart table.shop_table.cart .product-quantity {
    grid-column: 2 / span 2 !important;
    grid-row: 3 !important;
    justify-self: start !important;
  }

  body.woocommerce-cart table.shop_table.cart .product-subtotal {
    grid-column: 2 / span 2 !important;
    grid-row: 4 !important;
    justify-self: start !important;
    font-size: 23px !important;
  }

  body.woocommerce-cart table.shop_table.cart .product-remove {
    grid-column: 3 !important;
    grid-row: 1 !important;
  }

  body.woocommerce-cart .amui-cart-thumb-wrap {
    grid-template-columns: 24px 74px;
    gap: 8px;
  }

  body.woocommerce-cart .amui-cart-fake-check {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
  }

  body.woocommerce-cart .amui-cart-thumb-media,
  body.woocommerce-cart table.cart img,
  body.woocommerce-cart table.shop_table.cart .product-thumbnail img,
  body.woocommerce-cart .amui-cart-thumb-media img {
    width: 74px !important;
    height: 74px !important;
    max-width: 74px !important;
  }

  body.woocommerce-cart table.shop_table.cart .product-name a {
    font-size: 15px !important;
  }

  body.woocommerce-cart table.shop_table.cart .quantity,
  body.woocommerce-cart table.shop_table.cart .quantity .qty,
  body.woocommerce-cart table.shop_table.cart .amui-qty-btn {
    min-height: 44px !important;
    height: 44px !important;
  }

  body.woocommerce-cart table.shop_table.cart .amui-qty-btn {
    width: 44px !important;
    font-size: 25px !important;
  }

  body.woocommerce-cart table.shop_table.cart .quantity .qty {
    width: 56px !important;
  }

  body.woocommerce-cart table.shop_table.cart td.actions,
  body.woocommerce-cart table.shop_table.cart td.actions .coupon {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  body.woocommerce-cart table.shop_table.cart td.actions button,
  body.woocommerce-cart table.shop_table.cart td.actions .button,
  body.woocommerce-cart table.shop_table.cart td.actions input {
    width: 100% !important;
  }

  .amui-cart-allegro-hint {
    grid-template-columns: 1fr;
  }

  body.woocommerce-cart .cart_totals table.shop_table,
  body.woocommerce-cart .wc-proceed-to-checkout,
  body.woocommerce-cart .amui-cart-confidence {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }
}

@media (max-width: 480px) {
  .amui-cart-selection-bar {
    align-items: flex-start;
  }

  .amui-cart-remove-dropdown {
    right: -6px;
    width: min(260px, calc(100vw - 34px));
  }

  body.woocommerce-cart table.shop_table.cart tbody tr.cart_item {
    grid-template-columns: 1fr 38px !important;
  }

  body.woocommerce-cart table.shop_table.cart .product-thumbnail,
  body.woocommerce-cart table.shop_table.cart .product-name,
  body.woocommerce-cart table.shop_table.cart .product-price,
  body.woocommerce-cart table.shop_table.cart .product-quantity,
  body.woocommerce-cart table.shop_table.cart .product-subtotal {
    grid-column: 1 / -1 !important;
  }

  body.woocommerce-cart table.shop_table.cart .product-remove {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  body.woocommerce-cart .amui-cart-thumb-wrap {
    grid-template-columns: 24px 1fr;
  }

  body.woocommerce-cart .amui-cart-thumb-media,
  body.woocommerce-cart table.cart img,
  body.woocommerce-cart table.shop_table.cart .product-thumbnail img,
  body.woocommerce-cart .amui-cart-thumb-media img {
    width: 100% !important;
    max-width: 180px !important;
    height: 120px !important;
    justify-self: center;
  }
}
