/* Cart and checkout.
   ---------------------------------------------------------------------------
   Scope: every rule is prefixed with the body class WooCommerce sets
   (.woocommerce-cart / .woocommerce-checkout) plus this file's own wrapper
   (.ip-cart / .ip-checkout). That is not decoration — it is how these rules win:

     - WooCommerce ships woocommerce.css, woocommerce-layout.css and
       woocommerce-smallscreen.css, which float the cart collaterals, the
       col2-set columns and the .form-row halves;
     - assets/css/woocommerce.css is enqueued AFTER this file (see
       inc/enqueue.php), so a rule here that merely ties on specificity loses.

   The two extra classes buy the specificity instead of !important. Nothing in
   this file uses !important, and nothing styles a bare div, button, input, img,
   iframe or label inside the checkout — only WooCommerce's own class names. A
   third-party block injected into the shipping section (the BOX NOW locker
   picker is the one we are expecting) therefore keeps its own look, and no
   overflow/z-index trap here can clip its map or modal.

   Colours, spacing, radii, shadows and fonts come from tokens.css only. */

.woocommerce-cart,
.woocommerce-checkout {
}

/* The cart and checkout pages are rendered by page.php, whose .ip-prose caps
   reading width at 70ch. Release it for these two pages only. */
.woocommerce-cart .ip-prose,
.woocommerce-checkout .ip-prose {
  max-width: none;
}

/* ===========================================================================
   CART — layout
   =========================================================================== */

.ip-cart {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 366px);
  gap: var(--ip-s6);
  align-items: start;
}

/* Anything unexpected in here goes full width rather than squeezing a column. */
.ip-cart > * { grid-column: 1 / -1; }
.ip-cart > .ip-cart__main { grid-column: 1; grid-row: 1; min-width: 0; }

/* .cart-collaterals must stay in the DOM where woocommerce_cart_collaterals
   put it; display:contents lifts its children into this grid so the totals can
   sit in the right column and the cross-sells can span the full width. */
.woocommerce-cart .ip-cart .cart-collaterals { display: contents; }
.woocommerce-cart .ip-cart .cart-collaterals > * { grid-column: 1 / -1; }
.woocommerce-cart .ip-cart .cart-collaterals .cross-sells { width: auto; float: none; }
.woocommerce-cart .ip-cart .cart-collaterals .cart_totals {
  grid-column: 2;
  grid-row: 1;
  width: auto;
  float: none;
  position: sticky;
  top: var(--ip-co-sticky);
}

/* ===========================================================================
   CART — line items
   =========================================================================== */

.ip-cart .ip-cart__main {
  background: var(--ip-surface);
  border-radius: var(--ip-r-lg);
  box-shadow: var(--ip-shadow-sm);
  padding: var(--ip-s5);
}

.woocommerce-cart .ip-cart table.shop_table.cart {
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: none;
  border-collapse: collapse;
}

.woocommerce-cart .ip-cart table.shop_table.cart thead th {
  font-family: var(--ip-font-body);
  font-size: var(--ip-fs-xs);
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--ip-ink-3);
  text-align: left;
  padding: 0 var(--ip-s3) var(--ip-s3);
  border: 0;
  border-bottom: 1px solid var(--ip-line);
}

.woocommerce-cart .ip-cart table.shop_table.cart tbody td {
  padding: var(--ip-s4) var(--ip-s3);
  border: 0;
  border-bottom: 1px solid var(--ip-line);
  vertical-align: middle;
  background: none;
}

.woocommerce-cart .ip-cart table.shop_table.cart th.product-remove,
.woocommerce-cart .ip-cart table.shop_table.cart td.product-remove { width: 48px; padding-left: 0; }
.woocommerce-cart .ip-cart table.shop_table.cart th.product-thumbnail,
.woocommerce-cart .ip-cart table.shop_table.cart td.product-thumbnail { width: 96px; }
.woocommerce-cart .ip-cart table.shop_table.cart th.product-price,
.woocommerce-cart .ip-cart table.shop_table.cart td.product-price { text-align: right; white-space: nowrap; }
.woocommerce-cart .ip-cart table.shop_table.cart th.product-quantity,
.woocommerce-cart .ip-cart table.shop_table.cart td.product-quantity { width: 160px; }
.woocommerce-cart .ip-cart table.shop_table.cart th.product-subtotal,
.woocommerce-cart .ip-cart table.shop_table.cart td.product-subtotal {
  text-align: right;
  white-space: nowrap;
  padding-right: 0;
}

/* Thumbnail. WooCommerce pins cart images to 32px; this wins on class count. */
.woocommerce-cart .ip-cart table.shop_table.cart td.product-thumbnail img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: var(--ip-r);
  background: var(--ip-surface);
  box-shadow: none;
}

.woocommerce-cart .ip-cart td.product-name { font-size: var(--ip-fs-base); }
.woocommerce-cart .ip-cart td.product-name a {
  font-weight: 600;
  color: var(--ip-ink);
  line-height: 1.45;
}
.woocommerce-cart .ip-cart td.product-name a:hover { color: var(--ip-red); }
.woocommerce-cart .ip-cart td.product-name .variation,
.woocommerce-cart .ip-cart td.product-name dl.variation {
  margin: var(--ip-s1) 0 0;
  font-size: var(--ip-fs-sm);
  color: var(--ip-ink-2);
}
.woocommerce-cart .ip-cart td.product-name .backorder_notification {
  margin: var(--ip-s2) 0 0;
  font-size: var(--ip-fs-sm);
  color: var(--ip-warn);
}

.woocommerce-cart .ip-cart td.product-price { color: var(--ip-ink-2); }
.woocommerce-cart .ip-cart td.product-subtotal {
  font-size: var(--ip-fs-md);
  font-weight: 800;
  color: var(--ip-ink);
}

/* Remove control */
.woocommerce-cart .ip-cart td.product-remove a.remove {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--ip-r-pill);
  color: var(--ip-ink-3);
  background: none;
  font-size: var(--ip-fs-md);
  line-height: 1;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.woocommerce-cart .ip-cart td.product-remove a.remove:hover {
  background: var(--ip-tint-warm);
  color: var(--ip-red);
}

/* ===========================================================================
   CART — quantity stepper
   Shared component with the product page (assets/css/product.css styles
   .ip-qty__btn there). Restated here so the cart does not depend on that file,
   and scoped so nothing leaks back onto the product page.
   =========================================================================== */

.woocommerce-cart .ip-cart .ip-qty {
  display: inline-flex;
  align-items: center;
  float: none;
  margin: 0;
  padding: var(--ip-s1);
  border: 1.5px solid var(--ip-line-input);
  border-radius: var(--ip-r-pill);
  background: var(--ip-surface);
}
.woocommerce-cart .ip-cart .ip-qty__btn {
  width: 40px;
  height: 40px;
  flex: none;
  place-items: center;
  border: 0;
  padding: 0;
  background: none;
  border-radius: var(--ip-r-pill);
  color: var(--ip-ink);
  font-size: var(--ip-fs-md);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.woocommerce-cart .ip-cart .ip-qty__btn:hover {
  background: var(--ip-tint-warm);
  color: var(--ip-red);
}
.woocommerce-cart .ip-cart .ip-qty .qty {
  width: 52px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  text-align: center;
  font-size: var(--ip-fs-md);
  font-weight: 700;
  color: var(--ip-ink);
}

/* The − / + buttons stay hidden until cart/cart.php's script marks <html>, so
   nothing dead is ever shown; until then the native spinners are the control,
   which is why they are only suppressed under .ip-js. */
.woocommerce-cart .ip-cart .ip-qty__btn[data-ip-qty] { display: none; }
.ip-js .woocommerce-cart .ip-cart .ip-qty__btn[data-ip-qty] { display: grid; }
.ip-js .woocommerce-cart .ip-cart .ip-qty .qty {
  -moz-appearance: textfield;
  appearance: textfield;
}
.ip-js .woocommerce-cart .ip-cart .ip-qty .qty::-webkit-outer-spin-button,
.ip-js .woocommerce-cart .ip-cart .ip-qty .qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ===========================================================================
   CART — actions row (coupon + update)
   =========================================================================== */

.woocommerce-cart .ip-cart table.shop_table.cart td.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--ip-s3);
  padding: var(--ip-s5) 0 0;
  border-bottom: 0;
  text-align: left;
}
.woocommerce-cart .ip-cart table.shop_table.cart td.actions .coupon {
  display: flex;
  align-items: center;
  gap: var(--ip-s2);
  float: none;
  text-align: left;
}
.woocommerce-cart .ip-cart table.shop_table.cart td.actions .coupon .input-text {
  float: none;
  width: 180px;
  margin: 0;
  padding: var(--ip-s3) var(--ip-s4);
  border: 1.5px solid var(--ip-line-input);
  border-radius: var(--ip-r-pill);
  background: var(--ip-surface);
  font-size: var(--ip-fs-sm);
  box-sizing: border-box;
}
.woocommerce-cart .ip-cart table.shop_table.cart td.actions .coupon .input-text:focus {
  border-color: var(--ip-red);
  outline: none;
}
.woocommerce-cart .ip-cart table.shop_table.cart td.actions .coupon-error-notice {
  flex: 1 1 100%;
  font-size: var(--ip-fs-sm);
  color: var(--ip-red);
}
.woocommerce-cart .ip-cart table.shop_table.cart td.actions .button[disabled] {
  opacity: 0.45;
  cursor: default;
}

/* ===========================================================================
   CART — order summary card
   =========================================================================== */

.woocommerce-cart .ip-cart .cart_totals {
  background: var(--ip-surface);
  border-radius: var(--ip-r-lg);
  box-shadow: var(--ip-shadow-sm);
  padding: var(--ip-s5);
}
.woocommerce-cart .ip-cart .cart_totals h2 {
  font-family: var(--ip-font-display);
  font-size: var(--ip-fs-lg);
  margin: 0 0 var(--ip-s4);
}
.woocommerce-cart .ip-cart .cart_totals table.shop_table {
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: none;
  border-collapse: collapse;
}
.woocommerce-cart .ip-cart .cart_totals table.shop_table th,
.woocommerce-cart .ip-cart .cart_totals table.shop_table td {
  width: auto;
  padding: var(--ip-s3) 0;
  border: 0;
  border-bottom: 1px solid var(--ip-line);
  vertical-align: top;
  font-size: var(--ip-fs-base);
  line-height: 1.5;
}
.woocommerce-cart .ip-cart .cart_totals table.shop_table th {
  font-family: var(--ip-font-body);
  font-weight: 500;
  color: var(--ip-ink-2);
  text-align: left;
}
.woocommerce-cart .ip-cart .cart_totals table.shop_table td { text-align: right; }
.woocommerce-cart .ip-cart .cart_totals table.shop_table tr.order-total th,
.woocommerce-cart .ip-cart .cart_totals table.shop_table tr.order-total td {
  border-bottom: 0;
  padding-top: var(--ip-s4);
  font-size: var(--ip-fs-md);
  font-weight: 800;
  color: var(--ip-ink);
}
.woocommerce-cart .ip-cart .cart_totals table.shop_table tr.cart-discount td { color: var(--ip-ok); }
.woocommerce-cart .ip-cart .cart_totals table.shop_table small { color: var(--ip-ink-3); }

/* Shipping choices inside the summary */
.woocommerce-cart .ip-cart .cart_totals ul#shipping_method,
.woocommerce-cart .ip-cart .cart_totals ul.woocommerce-shipping-methods {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: left;
}
.woocommerce-cart .ip-cart .cart_totals ul#shipping_method li,
.woocommerce-cart .ip-cart .cart_totals ul.woocommerce-shipping-methods li {
  margin: 0 0 var(--ip-s2);
  padding: 0;
  font-size: var(--ip-fs-sm);
  line-height: 1.5;
}
.woocommerce-cart .ip-cart .cart_totals .woocommerce-shipping-destination {
  margin: var(--ip-s2) 0 0;
  font-size: var(--ip-fs-sm);
  color: var(--ip-ink-2);
  text-align: left;
}
.woocommerce-cart .ip-cart .cart_totals .shipping-calculator-button {
  font-size: var(--ip-fs-sm);
  font-weight: 700;
  color: var(--ip-red);
}

.woocommerce-cart .ip-cart .cart_totals .wc-proceed-to-checkout {
  padding: var(--ip-s4) 0 0;
}
.woocommerce-cart .ip-cart .cart_totals .wc-proceed-to-checkout a.button.alt.checkout-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
  padding: var(--ip-s4) var(--ip-s5);
  border: 2px solid transparent;
  border-radius: var(--ip-r-pill);
  background: var(--ip-red);
  color: var(--ip-ink-invert);
  box-shadow: var(--ip-shadow-cta);
  font-size: var(--ip-fs-md);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}
.woocommerce-cart .ip-cart .cart_totals .wc-proceed-to-checkout a.button.alt.checkout-button:hover {
  background: var(--ip-red-dark);
  color: var(--ip-ink-invert);
}

/* ===========================================================================
   Reassurance row — shared by the cart summary and the checkout pay button
   =========================================================================== */

.ip-trust {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ip-trust__item {
  display: flex;
  align-items: center;
  gap: var(--ip-s3);
  margin: 0;
}
.ip-trust__icon {
  flex: none;
  display: grid;
  place-items: center;
  color: var(--ip-red);
}
.ip-trust__body { display: flex; flex-direction: column; }
.ip-trust__title {
  font-size: var(--ip-fs-sm);
  font-weight: 700;
  color: var(--ip-ink);
  line-height: 1.35;
}
.ip-trust__sub {
  font-size: var(--ip-fs-xs);
  color: var(--ip-ink-2);
  line-height: 1.35;
}

/* Compact variant: one short line per promise, under the cart summary. */
.ip-trust--mini {
  display: flex;
  flex-direction: column;
  gap: var(--ip-s2);
  margin-top: var(--ip-s4);
  padding-top: var(--ip-s4);
  border-top: 1px solid var(--ip-line);
}
.ip-trust--mini .ip-trust__icon { width: 20px; height: 20px; }
.ip-trust--mini .ip-trust__title { font-weight: 500; color: var(--ip-ink-2); }

/* Full variant: one promise per line with a sub-label, under the pay button.
   It stays a stack at every width — the checkout side column is 400px at most,
   and three columns of this copy wrap badly in it. */
.ip-trust--full {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--ip-s3);
  margin: var(--ip-s4) 0 0;
  padding: var(--ip-s4) 0 0;
  border-top: 1px solid var(--ip-line);
}
.ip-trust--full .ip-trust__item { align-items: center; gap: var(--ip-s3); }
.ip-trust--full .ip-trust__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--ip-r-sm);
  background: var(--ip-tint-warm);
}

/* ===========================================================================
   CART — empty state
   =========================================================================== */

.ip-cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--ip-s4);
  max-width: 48ch;
  margin-inline: auto;
  padding: var(--ip-s8) var(--ip-s5);
  background: var(--ip-surface);
  border-radius: var(--ip-r-lg);
  box-shadow: var(--ip-shadow-sm);
  text-align: center;
}
.ip-cart-empty__art {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: var(--ip-r-pill);
  background: var(--ip-tint-yellow);
  color: var(--ip-yellow-ink);
}
.ip-cart-empty__title { margin: 0; font-size: var(--ip-fs-xl); }
.ip-cart-empty__text { margin: 0; color: var(--ip-ink-2); }
.ip-cart-empty .wc-empty-cart-message { width: 100%; }
.ip-cart-empty .cart-empty {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: var(--ip-ink-2);
  font-size: var(--ip-fs-base);
}
.ip-cart-empty .cart-empty::before { display: none; }
.ip-cart-empty .return-to-shop { margin: 0; }

/* ===========================================================================
   CHECKOUT — layout
   =========================================================================== */

.ip-checkout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
  gap: var(--ip-s6);
  align-items: start;
}
.ip-checkout > .ip-checkout__main { min-width: 0; }
.ip-checkout > .ip-checkout__side { min-width: 0; }

.woocommerce-checkout .ip-checkout__main {
  display: flex;
  flex-direction: column;
  gap: var(--ip-s5);
}

/* Billing and shipping stack in the left column instead of floating side by
   side; the #customer_details / .col2-set / .col-1 / .col-2 markup is kept
   exactly as WooCommerce writes it. */
.woocommerce-checkout .ip-checkout #customer_details.col2-set {
  display: flex;
  flex-direction: column;
  gap: var(--ip-s5);
  width: auto;
}
.woocommerce-checkout .ip-checkout .col2-set .col-1,
.woocommerce-checkout .ip-checkout .col2-set .col-2 {
  float: none;
  width: auto;
  display: flex;
  flex-direction: column;
  gap: var(--ip-s5);
}

/* ===========================================================================
   CHECKOUT — section cards
   =========================================================================== */

.woocommerce-checkout .ip-checkout .ip-co-sec {
  background: var(--ip-surface);
  border-radius: var(--ip-r-lg);
  box-shadow: var(--ip-shadow-sm);
  padding: var(--ip-s5);
}
.woocommerce-checkout .ip-checkout .ip-co-sec--sub {
  box-shadow: none;
  background: var(--ip-surface-alt);
  border: 1.5px solid var(--ip-line);
}
.ip-co-sec__head {
  display: flex;
  align-items: center;
  gap: var(--ip-s3);
  margin-bottom: var(--ip-s4);
}
.ip-co-sec__step {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: var(--ip-r-pill);
  background: var(--ip-red);
  color: var(--ip-ink-invert);
  font-family: var(--ip-font-display);
  font-size: var(--ip-fs-sm);
  font-weight: 700;
}
.woocommerce-checkout .ip-checkout .ip-co-sec__title,
.woocommerce-checkout .ip-checkout h3#order_review_heading {
  font-family: var(--ip-font-display);
  font-size: var(--ip-fs-lg);
  margin: 0;
}
.woocommerce-checkout .ip-checkout h3#order_review_heading { margin-bottom: var(--ip-s4); }

/* "Αποστολή σε άλλη διεύθυνση;" — an h3 in WooCommerce's markup, but it is a
   control, so it is not dressed as a heading. */
.woocommerce-checkout .ip-checkout h3.ip-co-toggle {
  font-family: var(--ip-font-body);
  font-size: var(--ip-fs-base);
  font-weight: 500;
  letter-spacing: 0;
  float: none;
  clear: none;
  margin: 0 0 var(--ip-s4);
  padding: var(--ip-s3) var(--ip-s4);
  border: 1.5px solid var(--ip-line);
  border-radius: var(--ip-r);
  background: var(--ip-surface-alt);
}
/* The row's own padding is the tap target here, so the label does not add more. */
.woocommerce-checkout .ip-checkout h3.ip-co-toggle label.ip-check {
  min-height: 0;
  padding-block: 0;
  align-items: center;
}

/* ===========================================================================
   CHECKOUT — form controls
   WooCommerce's own sheet reaches these at (0,3,2); the form.checkout prefix
   lifts these rules above it without !important.
   =========================================================================== */

form.checkout .ip-checkout .woocommerce-billing-fields__field-wrapper,
form.checkout .ip-checkout .woocommerce-shipping-fields__field-wrapper,
form.checkout .ip-checkout .woocommerce-additional-fields__field-wrapper,
form.checkout .ip-checkout .create-account {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--ip-s4);
}
/* Unknown rows span the full width; only WooCommerce's explicit halves pair up. */
form.checkout .ip-checkout .woocommerce-billing-fields__field-wrapper > *,
form.checkout .ip-checkout .woocommerce-shipping-fields__field-wrapper > *,
form.checkout .ip-checkout .woocommerce-additional-fields__field-wrapper > *,
form.checkout .ip-checkout .create-account > * { grid-column: 1 / -1; }
form.checkout .ip-checkout .form-row.form-row-first,
form.checkout .ip-checkout .form-row.form-row-last { grid-column: span 1; }

form.checkout .ip-checkout .form-row,
form.checkout .ip-checkout .form-row-first,
form.checkout .ip-checkout .form-row-last,
form.checkout .ip-checkout .form-row-wide {
  float: none;
  width: auto;
  margin: 0;
  padding: 0;
}
/* Float clearers are redundant in a grid and would open empty rows. */
form.checkout .ip-checkout .clear { display: none; }

form.checkout .ip-checkout .form-row label {
  display: block;
  margin-bottom: var(--ip-s2);
  font-size: var(--ip-fs-sm);
  font-weight: 600;
  color: var(--ip-ink);
}
form.checkout .ip-checkout .form-row label.checkbox,
form.checkout .ip-checkout .form-row label.ip-check {
  display: flex;
  align-items: flex-start;
  gap: var(--ip-s2);
  margin: 0;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
}
form.checkout .ip-checkout .form-row .required {
  color: var(--ip-red);
  text-decoration: none;
  border: 0;
}
form.checkout .ip-checkout .form-row .optional { color: var(--ip-ink-3); font-weight: 500; }

form.checkout .ip-checkout .form-row input.input-text,
form.checkout .ip-checkout .form-row textarea,
form.checkout .ip-checkout .form-row select,
form.checkout .ip-checkout .select2-container .select2-selection--single {
  width: 100%;
  min-height: 46px;
  padding: var(--ip-s3) var(--ip-s4);
  border: 1.5px solid var(--ip-line-input);
  border-radius: var(--ip-r-sm);
  background: var(--ip-surface);
  color: var(--ip-ink);
  font-size: var(--ip-fs-base);
  box-sizing: border-box;
  transition: border-color .15s ease;
}
form.checkout .ip-checkout .form-row textarea {
  min-height: 96px;
  line-height: 1.55;
  resize: vertical;
}
form.checkout .ip-checkout .form-row input.input-text:focus,
form.checkout .ip-checkout .form-row textarea:focus,
form.checkout .ip-checkout .form-row select:focus { border-color: var(--ip-red); }
form.checkout .ip-checkout .form-row input.input-text::placeholder,
form.checkout .ip-checkout .form-row textarea::placeholder { color: var(--ip-ink-3); }

form.checkout .ip-checkout .form-row input[type="checkbox"],
form.checkout .ip-checkout .form-row input[type="radio"] {
  width: 20px;
  height: 20px;
  margin: 0;
  flex: none;
  accent-color: var(--ip-red);
}

/* Checkbox rows. .ip-check also covers the labels WooCommerce puts outside a
   .form-row, such as the "Αποστολή σε άλλη διεύθυνση;" toggle. The whole label
   is the hit area, so it carries the 44px target rather than the 20px box. */
form.checkout .ip-checkout label.ip-check {
  display: flex;
  align-items: flex-start;
  gap: var(--ip-s3);
  min-height: 44px;
  margin: 0;
  padding-block: var(--ip-s2);
  font-size: var(--ip-fs-base);
  font-weight: 500;
  color: var(--ip-ink);
  line-height: 1.5;
  cursor: pointer;
}
form.checkout .ip-checkout label.ip-check input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  flex: none;
  accent-color: var(--ip-red);
}

/* Validation states. checkout.js toggles these classes on the .form-row. */
form.checkout .ip-checkout .form-row.woocommerce-invalid input.input-text,
form.checkout .ip-checkout .form-row.woocommerce-invalid select,
form.checkout .ip-checkout .form-row.woocommerce-invalid textarea { border-color: var(--ip-red); }
form.checkout .ip-checkout .form-row.woocommerce-validated input.input-text,
form.checkout .ip-checkout .form-row.woocommerce-validated select { border-color: var(--ip-ok); }
form.checkout .ip-checkout .checkout-inline-error-message {
  display: block;
  margin-top: var(--ip-s1);
  font-size: var(--ip-fs-sm);
  color: var(--ip-red);
}

/* ===========================================================================
   CHECKOUT — login and coupon prompts (above the form)
   =========================================================================== */

.woocommerce-checkout .woocommerce-form-login-toggle,
.woocommerce-checkout .woocommerce-form-coupon-toggle { margin-bottom: var(--ip-s4); }

.woocommerce-checkout form.woocommerce-form-login.ip-login,
.woocommerce-checkout form.checkout_coupon.ip-coupon {
  margin: 0 0 var(--ip-s5);
  padding: var(--ip-s5);
  border: 1.5px solid var(--ip-line);
  border-radius: var(--ip-r-lg);
  background: var(--ip-surface);
}
.woocommerce-checkout form.woocommerce-form-login.ip-login .form-row,
.woocommerce-checkout form.checkout_coupon.ip-coupon .form-row {
  float: none;
  width: auto;
  margin: 0 0 var(--ip-s3);
  padding: 0;
}
.woocommerce-checkout form.woocommerce-form-login.ip-login label,
.woocommerce-checkout form.checkout_coupon.ip-coupon label {
  display: block;
  margin-bottom: var(--ip-s2);
  font-size: var(--ip-fs-sm);
  font-weight: 600;
}
.woocommerce-checkout form.woocommerce-form-login.ip-login input.input-text,
.woocommerce-checkout form.checkout_coupon.ip-coupon input.input-text {
  width: 100%;
  min-height: 46px;
  padding: var(--ip-s3) var(--ip-s4);
  border: 1.5px solid var(--ip-line-input);
  border-radius: var(--ip-r-sm);
  background: var(--ip-surface);
  box-sizing: border-box;
}
/* The login form is printed on woocommerce_before_checkout_form, i.e. outside
   form.checkout, so the .ip-check rules above do not reach it. */
.woocommerce-checkout form.woocommerce-form-login.ip-login label.ip-check {
  display: flex;
  align-items: center;
  gap: var(--ip-s3);
  min-height: 44px;
  margin: 0;
  font-size: var(--ip-fs-base);
  font-weight: 500;
  cursor: pointer;
}
.woocommerce-checkout form.woocommerce-form-login.ip-login label.ip-check input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  flex: none;
  accent-color: var(--ip-red);
}
.woocommerce-checkout form.woocommerce-form-login.ip-login .lost_password {
  margin: var(--ip-s2) 0 0;
  font-size: var(--ip-fs-sm);
}
.woocommerce-checkout form.woocommerce-form-login.ip-login .woocommerce-form-login__rememberme {
  margin-bottom: var(--ip-s3);
}

/* ===========================================================================
   CHECKOUT — order review
   =========================================================================== */

.woocommerce-checkout .ip-checkout__side {
  display: flex;
  flex-direction: column;
  gap: var(--ip-s4);
  background: var(--ip-surface);
  border-radius: var(--ip-r-lg);
  box-shadow: var(--ip-shadow-sm);
  padding: var(--ip-s5);
}
.woocommerce-checkout .ip-checkout #order_review.woocommerce-checkout-review-order {
  display: flex;
  flex-direction: column;
  gap: var(--ip-s5);
}

.woocommerce-checkout .ip-checkout table.shop_table.woocommerce-checkout-review-order-table {
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: none;
  border-collapse: collapse;
}
.woocommerce-checkout .ip-checkout table.woocommerce-checkout-review-order-table thead th {
  font-family: var(--ip-font-body);
  font-size: var(--ip-fs-xs);
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--ip-ink-3);
  text-align: left;
  padding: 0 0 var(--ip-s3);
  border: 0;
  border-bottom: 1px solid var(--ip-line);
}
.woocommerce-checkout .ip-checkout table.woocommerce-checkout-review-order-table thead th.product-total { text-align: right; }

.woocommerce-checkout .ip-checkout table.woocommerce-checkout-review-order-table tbody td {
  padding: var(--ip-s3) 0;
  border: 0;
  border-bottom: 1px solid var(--ip-line);
  vertical-align: top;
  font-size: var(--ip-fs-sm);
  line-height: 1.5;
}
.woocommerce-checkout .ip-checkout table.woocommerce-checkout-review-order-table tbody td.product-name {
  display: flex;
  align-items: flex-start;
  gap: var(--ip-s3);
}
.woocommerce-checkout .ip-checkout table.woocommerce-checkout-review-order-table tbody td.product-total {
  text-align: right;
  white-space: nowrap;
  font-weight: 700;
}
.ip-review__thumb { flex: none; width: 48px; }
.woocommerce-checkout .ip-checkout .ip-review__thumb img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: var(--ip-r-sm);
  background: var(--ip-surface);
  box-shadow: none;
}
.ip-review__body { min-width: 0; }
.woocommerce-checkout .ip-checkout .ip-review__body .product-quantity {
  color: var(--ip-ink-2);
  font-weight: 700;
  white-space: nowrap;
}
.woocommerce-checkout .ip-checkout .ip-review__body dl.variation {
  margin: var(--ip-s1) 0 0;
  font-size: var(--ip-fs-xs);
  color: var(--ip-ink-2);
}

.woocommerce-checkout .ip-checkout table.woocommerce-checkout-review-order-table tfoot th,
.woocommerce-checkout .ip-checkout table.woocommerce-checkout-review-order-table tfoot td {
  padding: var(--ip-s3) 0;
  border: 0;
  border-bottom: 1px solid var(--ip-line);
  font-size: var(--ip-fs-base);
  line-height: 1.5;
  vertical-align: top;
}
.woocommerce-checkout .ip-checkout table.woocommerce-checkout-review-order-table tfoot th {
  font-family: var(--ip-font-body);
  font-weight: 500;
  color: var(--ip-ink-2);
  text-align: left;
}
.woocommerce-checkout .ip-checkout table.woocommerce-checkout-review-order-table tfoot td { text-align: right; }
.woocommerce-checkout .ip-checkout table.woocommerce-checkout-review-order-table tfoot tr.order-total th,
.woocommerce-checkout .ip-checkout table.woocommerce-checkout-review-order-table tfoot tr.order-total td {
  border-bottom: 0;
  padding-top: var(--ip-s4);
  font-size: var(--ip-fs-md);
  font-weight: 800;
  color: var(--ip-ink);
}
.woocommerce-checkout .ip-checkout table.woocommerce-checkout-review-order-table tfoot tr.cart-discount td { color: var(--ip-ok); }

/* Shipping method choices in the review */
.woocommerce-checkout .ip-checkout table.woocommerce-checkout-review-order-table ul#shipping_method,
.woocommerce-checkout .ip-checkout table.woocommerce-checkout-review-order-table ul.woocommerce-shipping-methods {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: left;
}
.woocommerce-checkout .ip-checkout table.woocommerce-checkout-review-order-table ul#shipping_method li,
.woocommerce-checkout .ip-checkout table.woocommerce-checkout-review-order-table ul.woocommerce-shipping-methods li {
  margin: 0 0 var(--ip-s2);
  padding: 0;
  font-size: var(--ip-fs-sm);
  line-height: 1.5;
}
.woocommerce-checkout .ip-checkout table.woocommerce-checkout-review-order-table .woocommerce-shipping-destination {
  margin: var(--ip-s2) 0 0;
  font-size: var(--ip-fs-sm);
  color: var(--ip-ink-2);
  text-align: left;
}

/* ===========================================================================
   CHECKOUT — payment
   =========================================================================== */

.woocommerce-checkout .ip-checkout #payment.woocommerce-checkout-payment {
  background: var(--ip-surface-alt);
  border: 1.5px solid var(--ip-line);
  border-radius: var(--ip-r-lg);
  padding: var(--ip-s4);
}
.ip-co-sec__head--payment { margin-bottom: var(--ip-s3); }

.woocommerce-checkout .ip-checkout #payment.woocommerce-checkout-payment ul.payment_methods {
  margin: 0;
  padding: 0;
  border: 0;
  list-style: none;
  text-align: left;
}
.woocommerce-checkout .ip-checkout #payment.woocommerce-checkout-payment ul.payment_methods li.wc_payment_method {
  margin: 0 0 var(--ip-s2);
  padding: 0;
  line-height: 1.5;
  font-weight: 400;
  border-radius: var(--ip-r);
  background: var(--ip-surface);
  border: 1.5px solid var(--ip-line);
  transition: border-color .15s ease;
}
.woocommerce-checkout .ip-checkout #payment.woocommerce-checkout-payment ul.payment_methods li.wc_payment_method:hover {
  border-color: var(--ip-line-strong);
}
.woocommerce-checkout .ip-checkout #payment.woocommerce-checkout-payment ul.payment_methods li.wc_payment_method > label {
  display: flex;
  align-items: center;
  gap: var(--ip-s3);
  min-height: 44px;
  margin: 0;
  padding: var(--ip-s3) var(--ip-s4) var(--ip-s3) 0;
  font-size: var(--ip-fs-base);
  font-weight: 600;
  color: var(--ip-ink);
  cursor: pointer;
}
.woocommerce-checkout .ip-checkout #payment.woocommerce-checkout-payment ul.payment_methods li.wc_payment_method input.input-radio {
  width: 20px;
  height: 20px;
  flex: none;
  margin: 0 0 0 var(--ip-s4);
  accent-color: var(--ip-red);
}
/* The gateway's own logo, when it ships one. */
.woocommerce-checkout .ip-checkout #payment.woocommerce-checkout-payment ul.payment_methods li.wc_payment_method label img {
  max-height: 24px;
  width: auto;
  margin: 0 0 0 auto;
  float: none;
  box-shadow: none;
}
.woocommerce-checkout .ip-checkout #payment.woocommerce-checkout-payment ul.payment_methods li.wc_payment_method div.payment_box {
  width: auto;
  margin: 0;
  /* Lines up under the label text: radio margin + radio + label gap. */
  padding: 0 var(--ip-s4) var(--ip-s4) calc(var(--ip-s4) + 20px + var(--ip-s3));
  border-radius: 0;
  background: none;
  color: var(--ip-ink-2);
  font-size: var(--ip-fs-sm);
  line-height: 1.55;
}
.woocommerce-checkout .ip-checkout #payment.woocommerce-checkout-payment ul.payment_methods li.wc_payment_method div.payment_box::before { display: none; }
.woocommerce-checkout .ip-checkout #payment.woocommerce-checkout-payment ul.payment_methods li.wc_payment_method div.payment_box p:last-child { margin-bottom: 0; }
.woocommerce-checkout .ip-checkout #payment.woocommerce-checkout-payment ul.payment_methods li.woocommerce-notice { padding: 0; border: 0; background: none; }

.woocommerce-checkout .ip-checkout #payment.woocommerce-checkout-payment div.form-row.place-order {
  margin: 0;
  padding: var(--ip-s4) 0 0;
}
.woocommerce-checkout .ip-checkout #payment .woocommerce-terms-and-conditions-wrapper {
  float: none;
  margin: 0 0 var(--ip-s4);
  padding: 0;
  text-align: left;
  font-size: var(--ip-fs-sm);
  color: var(--ip-ink-2);
}
.woocommerce-checkout .ip-checkout #payment .woocommerce-terms-and-conditions-wrapper .form-row {
  float: none;
  width: auto;
  margin: 0;
  padding: 0;
}
.woocommerce-checkout .ip-checkout #payment .woocommerce-terms-and-conditions-wrapper label.checkbox {
  display: flex;
  align-items: flex-start;
  gap: var(--ip-s3);
  min-height: 44px;
  margin: 0;
  padding-block: var(--ip-s2);
  font-size: var(--ip-fs-sm);
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
}
.woocommerce-checkout .ip-checkout #payment .woocommerce-terms-and-conditions-wrapper input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  flex: none;
  accent-color: var(--ip-red);
}

.woocommerce-checkout .ip-checkout #payment #place_order {
  float: none;
  width: 100%;
  margin: 0;
}
.woocommerce-checkout .ip-checkout #payment noscript { display: block; font-size: var(--ip-fs-sm); }

/* ===========================================================================
   BUTTONS
   assets/css/woocommerce.css paints every WooCommerce `.button` yellow and it
   loads after this file, so .ip-btn--primary / --outline / --ghost on their own
   would lose. The four buttons this feature owns are restated here at a higher
   specificity; .ip-btn still supplies the flex box, gap and transition.
   =========================================================================== */

.woocommerce-cart .ip-cart-empty .return-to-shop a.button,
.woocommerce-checkout .ip-checkout #payment #place_order {
  padding: var(--ip-s4) var(--ip-s6);
  border: 2px solid transparent;
  border-radius: var(--ip-r-pill);
  background: var(--ip-red);
  color: var(--ip-ink-invert);
  box-shadow: var(--ip-shadow-cta);
  font-size: var(--ip-fs-md);
  font-weight: 700;
  line-height: 1.2;
}
.woocommerce-cart .ip-cart-empty .return-to-shop a.button:hover,
.woocommerce-checkout .ip-checkout #payment #place_order:hover {
  background: var(--ip-red-dark);
  color: var(--ip-ink-invert);
}

/* Secondary: update cart, apply coupon, log in, update totals. */
.woocommerce-cart .ip-cart table.shop_table.cart td.actions button.button,
.woocommerce-checkout .ip-checkout form.ip-login button.button,
.woocommerce-checkout form.checkout_coupon.ip-coupon button.button,
.woocommerce-checkout .ip-checkout #payment button[name="woocommerce_checkout_update_totals"] {
  padding: var(--ip-s3) var(--ip-s5);
  border: 2px solid var(--ip-ink);
  border-radius: var(--ip-r-pill);
  background: none;
  color: var(--ip-ink);
  box-shadow: none;
  font-size: var(--ip-fs-sm);
  font-weight: 700;
  line-height: 1.2;
}
.woocommerce-cart .ip-cart table.shop_table.cart td.actions button.button:hover,
.woocommerce-checkout .ip-checkout form.ip-login button.button:hover,
.woocommerce-checkout form.checkout_coupon.ip-coupon button.button:hover,
.woocommerce-checkout .ip-checkout #payment button[name="woocommerce_checkout_update_totals"]:hover {
  background: var(--ip-ink);
  color: var(--ip-ink-invert);
}
/* "Ενημέρωση καλαθιού" is the one that commits a change, so it reads red. */
.woocommerce-cart .ip-cart table.shop_table.cart td.actions button.button[name="update_cart"] {
  border-color: var(--ip-red);
  color: var(--ip-red);
}
.woocommerce-cart .ip-cart table.shop_table.cart td.actions button.button[name="update_cart"]:hover {
  background: var(--ip-red);
  color: var(--ip-ink-invert);
}

/* ===========================================================================
   Third-party slot (BOX NOW locker picker and friends)
   Only the slot is styled. Whatever lands inside keeps its own styling, and
   nothing here clips it: no overflow, no transform, no z-index.
   =========================================================================== */

.ip-co-slot { margin-top: var(--ip-s4); }
.ip-co-slot:empty { display: none; margin: 0; }

/* ===========================================================================
   Responsive
   =========================================================================== */

@media (max-width: 1100px) {
  .ip-cart { grid-template-columns: minmax(0, 1fr) minmax(280px, 320px); gap: var(--ip-s5); }
  .ip-checkout { grid-template-columns: minmax(0, 1fr) minmax(300px, 340px); gap: var(--ip-s5); }
}

@media (max-width: 1000px) {
  /* One column. The summary follows the items, before the cross-sells. */
  .ip-cart { display: flex; flex-direction: column; gap: var(--ip-s5); }
  .ip-cart > .ip-cart__main { order: 0; }
  .woocommerce-cart .ip-cart .cart-collaterals .cart_totals { order: 1; position: static; }
  .woocommerce-cart .ip-cart .cart-collaterals > *:not(.cart_totals) { order: 2; }

  .ip-checkout { display: flex; flex-direction: column; gap: var(--ip-s5); }
}

@media (max-width: 860px) {
  .ip-cart .ip-cart__main { padding: var(--ip-s4); }

  /* The table becomes a stack of cards. WooCommerce's own responsive sheet is
     not involved: cart.php leaves off the shop_table_responsive class. */
  .woocommerce-cart .ip-cart table.shop_table.cart,
  .woocommerce-cart .ip-cart table.shop_table.cart tbody { display: block; width: 100%; }
  .woocommerce-cart .ip-cart table.shop_table.cart thead { display: none; }
  .woocommerce-cart .ip-cart table.shop_table.cart tbody tr { display: block; }

  .woocommerce-cart .ip-cart table.shop_table.cart tbody tr.woocommerce-cart-form__cart-item {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) auto;
    grid-template-areas:
      "thumb name   remove"
      "thumb price  price"
      "thumb qty    total";
    column-gap: var(--ip-s3);
    row-gap: var(--ip-s2);
    align-items: center;
    padding: var(--ip-s4) 0;
    border-bottom: 1px solid var(--ip-line);
  }
  .woocommerce-cart .ip-cart table.shop_table.cart tbody tr.woocommerce-cart-form__cart-item td {
    display: block;
    width: auto;
    padding: 0;
    border: 0;
  }
  .woocommerce-cart .ip-cart table.shop_table.cart td.product-thumbnail { grid-area: thumb; align-self: start; }
  .woocommerce-cart .ip-cart table.shop_table.cart td.product-name { grid-area: name; }
  .woocommerce-cart .ip-cart table.shop_table.cart td.product-remove { grid-area: remove; justify-self: end; }
  .woocommerce-cart .ip-cart table.shop_table.cart td.product-price { grid-area: price; text-align: left; }
  .woocommerce-cart .ip-cart table.shop_table.cart td.product-quantity { grid-area: qty; }
  .woocommerce-cart .ip-cart table.shop_table.cart td.product-subtotal { grid-area: total; }

  .woocommerce-cart .ip-cart table.shop_table.cart td.product-thumbnail img { width: 76px; height: 76px; }

  .woocommerce-cart .ip-cart table.shop_table.cart td.product-price::before,
  .woocommerce-cart .ip-cart table.shop_table.cart td.product-subtotal::before {
    content: attr(data-title) ": ";
    color: var(--ip-ink-2);
    font-size: var(--ip-fs-sm);
    font-weight: 500;
  }

  /* 44px touch targets. */
  .woocommerce-cart .ip-cart td.product-remove a.remove { width: 44px; height: 44px; }
  .woocommerce-cart .ip-cart .ip-qty__btn { width: 44px; height: 44px; }
  .woocommerce-cart .ip-cart .ip-qty .qty { width: 46px; }

  .woocommerce-cart .ip-cart table.shop_table.cart td.actions {
    display: block;
    padding-top: var(--ip-s4);
  }
  .woocommerce-cart .ip-cart table.shop_table.cart td.actions .coupon {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: var(--ip-s3);
  }
  .woocommerce-cart .ip-cart table.shop_table.cart td.actions .coupon .input-text { flex: 1 1 140px; width: auto; }
  .woocommerce-cart .ip-cart table.shop_table.cart td.actions .button { width: 100%; }

  form.checkout .ip-checkout .woocommerce-billing-fields__field-wrapper,
  form.checkout .ip-checkout .woocommerce-shipping-fields__field-wrapper,
  form.checkout .ip-checkout .woocommerce-additional-fields__field-wrapper,
  form.checkout .ip-checkout .create-account { grid-template-columns: minmax(0, 1fr); }
  form.checkout .ip-checkout .form-row.form-row-first,
  form.checkout .ip-checkout .form-row.form-row-last { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .woocommerce-checkout .ip-checkout .ip-co-sec,
  .woocommerce-checkout .ip-checkout__side { padding: var(--ip-s4); }
  .ip-cart-empty { padding: var(--ip-s6) var(--ip-s4); }

  /* At 375px the "qty | total" row cannot hold both: the stepper has a
     ~145px min-content width and the subtotal is nowrap and carries an
     injected data-title prefix, against roughly 223px of usable track.
     The stepper overflowed and pushed horizontal scroll onto the page.
     Two columns, quantity and total on their own rows, removes it. */
  .woocommerce-cart .ip-cart table.shop_table.cart tbody tr.woocommerce-cart-form__cart-item {
    grid-template-columns: 64px minmax(0, 1fr);
    grid-template-areas:
      "thumb name"
      "thumb price"
      "qty   total";
  }
  .woocommerce-cart .ip-cart table.shop_table.cart td.product-remove {
    grid-area: name; justify-self: end; align-self: start;
    position: relative; z-index: 1; /* it shares the name cell: keep the × on top so a tap removes the item */
  }
  .woocommerce-cart .ip-cart table.shop_table.cart tbody tr.woocommerce-cart-form__cart-item td.product-name { padding-right: 48px; } /* room for the × */
  .woocommerce-cart .ip-cart table.shop_table.cart td.product-quantity { grid-area: qty; }
  .woocommerce-cart .ip-cart table.shop_table.cart td.product-subtotal {
    grid-area: total; white-space: normal; justify-self: end;
  }
  .woocommerce-cart .ip-cart .ip-qty__btn { width: 40px; height: 40px; }
  .woocommerce-cart .ip-cart .ip-qty .qty { width: 40px; }
  .woocommerce-cart .ip-cart table.shop_table.cart td.product-thumbnail img { width: 64px; height: 64px; }
  .woocommerce-cart .ip-cart td.product-name { font-size: var(--ip-fs-sm); }
}
