/* MAXLUX · קופה: the IRON DOME look on WooCommerce's classic cart and checkout (the [woocommerce_cart] and
   [woocommerce_checkout] markup). Skin only: colours, fields, buttons, the summary card. The theme keeps the layout,
   so nothing here moves the columns Blocksy (or any theme) already sets. Loaded only on the cart and checkout. */
body.mxc-on {
  --mxc-cobalt: #2340E6;
  --mxc-cobalt-deep: #16289E;
  --mxc-ink: #0B1220;
  --mxc-body: #3B4453;
  --mxc-muted: #566070;
  --mxc-mist: #EEF1F6;
  --mxc-heat: #FF6A2B;
  --mxc-line: #E6EAF0;
  --mxc-line-strong: #DDE2EA;
  --mxc-error: #C8261B;
  --mxc-font: inherit;
  --mxc-dome: 50% 50% 12px 12px / 40% 40% 12px 12px;
}
/* the store is Hebrew: right to left even where the site sets the direction only in CSS (no dir on <html>) */
body.mxc-on .woocommerce { direction: rtl; font-family: var(--mxc-font); color: var(--mxc-ink); }
body.mxc-on .woocommerce h2,
body.mxc-on .woocommerce h3,
body.mxc-on #order_review_heading { margin: 0 0 14px; font-family: var(--mxc-font); font-size: 20px; font-weight: 800; line-height: 1.3; letter-spacing: -0.01em; color: var(--mxc-ink); }

/* ---------- fields ---------- */
body.mxc-on .woocommerce form .form-row { margin: 0 0 14px; padding: 0; }
body.mxc-on .woocommerce .woocommerce-billing-fields > h3 { margin-top: 24px; }
body.mxc-on .woocommerce h3#ship-to-different-address { margin: 8px 0 16px; font-size: 16px; font-weight: 600; letter-spacing: 0; }
body.mxc-on .woocommerce .screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
body.mxc-on .woocommerce form .form-row label { display: block; margin: 0 0 6px; font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--mxc-ink); }
body.mxc-on .woocommerce form .form-row label.checkbox,
body.mxc-on .woocommerce form .form-row label.woocommerce-form__label-for-checkbox { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
body.mxc-on .woocommerce form .form-row .required { color: var(--mxc-muted); border: 0; text-decoration: none; }
body.mxc-on .woocommerce form .input-text,
body.mxc-on .woocommerce form select,
body.mxc-on .woocommerce form textarea,
body.mxc-on .woocommerce .select2-container .select2-selection--single {
  box-sizing: border-box; width: 100%; min-height: 52px; margin: 0; padding: 12px 16px;
  border: 1px solid var(--mxc-line-strong); border-radius: 14px; background: #FFFFFF; box-shadow: none;
  font-family: var(--mxc-font); font-size: 16px; line-height: 1.5; color: var(--mxc-ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
body.mxc-on .woocommerce form textarea { min-height: 96px; }
body.mxc-on .woocommerce .select2-container .select2-selection__rendered { padding: 0; line-height: 26px; color: var(--mxc-ink); }
body.mxc-on .woocommerce .select2-container .select2-selection__arrow { height: 50px; }
body.mxc-on .woocommerce form .input-text:focus,
body.mxc-on .woocommerce form select:focus,
body.mxc-on .woocommerce form textarea:focus,
body.mxc-on .woocommerce .select2-container--focus .select2-selection--single { outline: none; border-color: var(--mxc-cobalt); box-shadow: 0 0 0 4px rgba(35,64,230,0.15); }
body.mxc-on .woocommerce form .woocommerce-invalid .input-text,
body.mxc-on .woocommerce form .woocommerce-invalid select { border-color: var(--mxc-error); }
body.mxc-on .woocommerce input[type="checkbox"],
body.mxc-on .woocommerce input[type="radio"] { accent-color: var(--mxc-cobalt); width: 18px; height: 18px; margin: 0; }

/* ---------- the summary card (checkout) ---------- */
body.mxc-on #order_review { box-sizing: border-box; padding: 20px; border-radius: 24px; background: var(--mxc-mist); }
@media (min-width: 900px) { body.mxc-on #order_review { padding: 28px; } }
body.mxc-on .woocommerce table.shop_table { width: 100%; margin: 0 0 16px; border: 0; border-collapse: collapse; border-radius: 0; background: transparent; }
body.mxc-on .woocommerce table.shop_table th,
body.mxc-on .woocommerce table.shop_table td { padding: 12px 0; border: 0; background: transparent; font-size: 15px; line-height: 1.45; vertical-align: middle; }
body.mxc-on .woocommerce table.shop_table th { font-weight: 500; color: var(--mxc-body); text-align: start; }
body.mxc-on .woocommerce table.shop_table td { text-align: end; color: var(--mxc-ink); }
/* the two summaries (checkout and cart totals) are lists of "label … amount" rows, not grids: a row per line, the
   label at the start, the amount at the end, and the shipping choices across the full width */
body.mxc-on .woocommerce table.woocommerce-checkout-review-order-table,
body.mxc-on .woocommerce table.woocommerce-checkout-review-order-table > tbody,
body.mxc-on .woocommerce table.woocommerce-checkout-review-order-table > tfoot,
body.mxc-on .woocommerce .cart_totals table.shop_table,
body.mxc-on .woocommerce .cart_totals table.shop_table > tbody { display: block; width: 100%; }
body.mxc-on .woocommerce table.woocommerce-checkout-review-order-table tr,
body.mxc-on .woocommerce .cart_totals table.shop_table tr { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
body.mxc-on .woocommerce table.woocommerce-checkout-review-order-table tr > *,
body.mxc-on .woocommerce .cart_totals table.shop_table tr > * { display: block; }
body.mxc-on .woocommerce table.woocommerce-checkout-review-order-table td.product-name { flex: 1 1 auto; min-width: 0; }
body.mxc-on .woocommerce .cart_totals table.shop_table td::before { display: none; }
/* the header row ("מוצר / סכום ביניים") stays for screen readers only */
body.mxc-on .woocommerce-checkout-review-order-table thead th { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
body.mxc-on .woocommerce-checkout-review-order-table tbody tr { border-bottom: 1px solid var(--mxc-line-strong); }
body.mxc-on .woocommerce-checkout-review-order-table td.product-name { text-align: start; }
body.mxc-on .woocommerce table.shop_table tr.order-total { margin-top: 4px; border-top: 1px solid var(--mxc-line-strong); }
body.mxc-on .woocommerce table.shop_table tr.order-total th,
body.mxc-on .woocommerce table.shop_table tr.order-total td { padding-top: 16px; font-size: 20px; font-weight: 800; color: var(--mxc-ink); }
body.mxc-on .woocommerce table.shop_table tr.cart-discount td { font-weight: 700; }
body.mxc-on .woocommerce .product-quantity { font-size: 13px; font-weight: 500; color: var(--mxc-muted); }

body.mxc-on .mxc-item { display: inline-flex; align-items: center; gap: 14px; vertical-align: middle; }
body.mxc-on .mxc-item__img { flex: none; display: block; width: 64px; height: 64px; overflow: hidden; border-radius: var(--mxc-dome); background: #FFFFFF; }
body.mxc-on .mxc-item__img img { display: block; width: 100%; height: 100%; margin: 0; object-fit: cover; border-radius: 0; }
body.mxc-on .mxc-item__txt { display: flex; flex-direction: column; gap: 2px; }
body.mxc-on .mxc-item__name { font-weight: 700; color: var(--mxc-ink); }
body.mxc-on .mxc-item__sub { display: block; font-size: 13px; font-weight: 400; color: var(--mxc-muted); }
body.mxc-on .mxc-chip { display: inline-flex; align-items: center; height: 28px; padding: 0 11px; border-radius: 999px; background: var(--mxc-heat); color: var(--mxc-ink); font-size: 13px; font-weight: 700; white-space: nowrap; }

/* shipping: one card per choice, the label and its price on one line */
body.mxc-on .woocommerce table.shop_table tr.woocommerce-shipping-totals,
body.mxc-on .woocommerce table.shop_table tr.woocommerce-shipping-totals th,
body.mxc-on .woocommerce table.shop_table tr.woocommerce-shipping-totals td { display: block; width: 100%; box-sizing: border-box; text-align: start; }
body.mxc-on .woocommerce table.shop_table tr.woocommerce-shipping-totals th { padding-bottom: 8px; font-weight: 700; color: var(--mxc-ink); }
body.mxc-on .woocommerce table.shop_table tr.woocommerce-shipping-totals td { padding-top: 0; }
body.mxc-on .woocommerce ul#shipping_method { display: grid; gap: 8px; width: 100%; margin: 0; padding: 0; list-style: none; }
body.mxc-on .woocommerce ul#shipping_method li { display: flex; align-items: center; gap: 10px; margin: 0; padding: 14px 16px; border: 1px solid var(--mxc-line-strong); border-radius: 14px; background: #FFFFFF; text-align: start; text-indent: 0; }
body.mxc-on .woocommerce ul#shipping_method li:has(input:checked) { border-color: var(--mxc-cobalt); box-shadow: inset 0 0 0 1px var(--mxc-cobalt); }
body.mxc-on .woocommerce ul#shipping_method li label { margin: 0; font-weight: 600; cursor: pointer; }
body.mxc-on .woocommerce .woocommerce-shipping-destination,
body.mxc-on .woocommerce .woocommerce-shipping-calculator { margin: 8px 0 0; font-size: 13px; color: var(--mxc-muted); }

/* ---------- payment ---------- */
body.mxc-on .woocommerce #payment { border-radius: 0; background: transparent; }
body.mxc-on .woocommerce #payment ul.payment_methods { margin: 0 0 16px; padding: 0; border: 0; list-style: none; }
body.mxc-on .woocommerce #payment ul.payment_methods li.wc_payment_method { margin: 0 0 8px; padding: 14px 16px; border: 1px solid var(--mxc-line-strong); border-radius: 14px; background: #FFFFFF; line-height: 1.45; }
body.mxc-on .woocommerce #payment ul.payment_methods li.wc_payment_method:has(input:checked) { border-color: var(--mxc-cobalt); box-shadow: inset 0 0 0 1px var(--mxc-cobalt); }
body.mxc-on .woocommerce #payment ul.payment_methods li.wc_payment_method > label { display: inline; margin: 0 0 0 0; font-size: 16px; font-weight: 700; color: var(--mxc-ink); cursor: pointer; }
body.mxc-on .woocommerce #payment ul.payment_methods li.wc_payment_method > label img { display: inline-block; float: none; max-height: 24px; margin: 0; margin-inline-start: 8px; vertical-align: middle; }
body.mxc-on .woocommerce #payment div.payment_box { margin: 0; padding: 6px 0 0; border-radius: 0; background: transparent; font-size: 14px; color: var(--mxc-body); }
body.mxc-on .woocommerce #payment div.payment_box::before { display: none; }
body.mxc-on .woocommerce #payment div.payment_box p:last-child { margin-bottom: 0; }
body.mxc-on .woocommerce #payment div.form-row.place-order { margin: 0; padding: 0; }
body.mxc-on .woocommerce .woocommerce-privacy-policy-text p,
body.mxc-on .woocommerce .woocommerce-terms-and-conditions-wrapper p { margin: 0 0 12px; font-size: 13px; line-height: 1.5; color: var(--mxc-muted); }
body.mxc-on .woocommerce .woocommerce-privacy-policy-text a,
body.mxc-on .woocommerce .woocommerce-terms-and-conditions-wrapper a { color: var(--mxc-ink); text-decoration: underline; }

/* ---------- the two buttons that take the money: pay (checkout) and to checkout (cart) ---------- */
body.mxc-on .woocommerce #payment #place_order,
body.mxc-on .woocommerce .wc-proceed-to-checkout a.checkout-button {
  box-sizing: border-box; display: flex; align-items: center; justify-content: center; float: none; width: 100%; min-height: 58px; margin: 0; padding: 0 20px;
  border: 0; border-radius: 999px; background: var(--mxc-cobalt); box-shadow: 0 12px 26px rgba(35,64,230,0.28);
  font-family: var(--mxc-font); font-size: clamp(16px, 4.4vw, 18px); font-weight: 700; line-height: 1.2; color: #FFFFFF; text-align: center; text-decoration: none; text-transform: none; letter-spacing: 0; white-space: nowrap;
  cursor: pointer; transition: background-color .15s ease, transform .15s ease;
}
body.mxc-on .woocommerce #payment #place_order:hover,
body.mxc-on .woocommerce .wc-proceed-to-checkout a.checkout-button:hover { background: var(--mxc-cobalt-deep); color: #FFFFFF; }
body.mxc-on .woocommerce #payment #place_order:active,
body.mxc-on .woocommerce .wc-proceed-to-checkout a.checkout-button:active { transform: translateY(1px); }
body.mxc-on .woocommerce #payment #place_order:focus-visible,
body.mxc-on .woocommerce .wc-proceed-to-checkout a.checkout-button:focus-visible { outline: 3px solid var(--mxc-cobalt); outline-offset: 3px; }
body.mxc-on .woocommerce .wc-proceed-to-checkout { padding: 8px 0 0; }

body.mxc-on .mxc-trust { display: grid; justify-items: center; gap: 10px; margin-top: 14px; text-align: center; }
body.mxc-on .mxc-trust__line { margin: 0; font-size: 13px; line-height: 1.5; color: var(--mxc-body); text-wrap: balance; }
body.mxc-on .mxc-trust__line svg { display: inline-block; margin-inline-end: 6px; vertical-align: -3px; color: var(--mxc-cobalt); }
/* payment methods are information, not buttons: a quiet line of names, in Hebrew reading order */
body.mxc-on .mxc-trust__pay { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; margin: 0; padding: 0; list-style: none; }
body.mxc-on .mxc-trust__pay li { margin: 0; padding: 0; font-size: 13px; font-weight: 600; color: var(--mxc-muted); }

/* ---------- cart page ---------- */
body.mxc-on .woocommerce table.shop_table.cart th { font-size: 13px; font-weight: 600; color: var(--mxc-muted); border-bottom: 1px solid var(--mxc-line-strong); }
body.mxc-on .woocommerce table.shop_table.cart td { padding: 16px 8px; border-bottom: 1px solid var(--mxc-line); }
body.mxc-on .woocommerce table.shop_table.cart td.product-name { text-align: start; }
body.mxc-on .woocommerce table.shop_table.cart td.product-name a { font-weight: 700; color: var(--mxc-ink); text-decoration: none; }
body.mxc-on .woocommerce table.shop_table.cart td.product-name .mxc-item__sub { margin-top: 2px; }
body.mxc-on .woocommerce table.shop_table.cart td.product-thumbnail img { display: block; width: 80px; height: 80px; object-fit: cover; border-radius: var(--mxc-dome); background: var(--mxc-mist); }
body.mxc-on .woocommerce table.shop_table.cart a.remove { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 999px; color: var(--mxc-muted) !important; font-size: 22px; line-height: 1; text-decoration: none; }
body.mxc-on .woocommerce table.shop_table.cart a.remove:hover { background: var(--mxc-mist); color: var(--mxc-ink) !important; }
body.mxc-on .woocommerce .quantity .qty { width: 72px; min-height: 44px; padding: 8px; border-radius: 12px; text-align: center; }
body.mxc-on .woocommerce table.shop_table.cart td.actions { padding-top: 16px; text-align: start; }
body.mxc-on .woocommerce table.shop_table.cart td.actions .coupon .input-text { width: auto; min-width: 160px; min-height: 44px; }
body.mxc-on .woocommerce table.shop_table.cart td.actions .button { min-height: 44px; padding: 0 20px; border: 1px solid var(--mxc-line-strong); border-radius: 999px; background: #FFFFFF; color: var(--mxc-ink); font-family: var(--mxc-font); font-size: 15px; font-weight: 700; }
body.mxc-on .woocommerce table.shop_table.cart td.actions .button:disabled { opacity: .5; }
/* on a phone each product is one row: picture, name and remove, then quantity and price (no six-column table) */
@media (max-width: 768px) {
  body.mxc-on .woocommerce table.shop_table.cart,
  body.mxc-on .woocommerce table.shop_table.cart tbody { display: block; width: 100%; }
  body.mxc-on .woocommerce table.shop_table.cart thead { display: none; }
  body.mxc-on .woocommerce table.shop_table.cart tr.cart_item { display: grid; grid-template-columns: 80px minmax(0, 1fr) auto; grid-template-areas: "img name remove" "img qty total"; align-items: center; gap: 8px 14px; padding: 16px 0; border-bottom: 1px solid var(--mxc-line); }
  body.mxc-on .woocommerce table.shop_table.cart tr.cart_item td { display: block !important; width: auto; padding: 0; border: 0; text-align: start; }
  body.mxc-on .woocommerce table.shop_table.cart tr.cart_item td::before { display: none; }
  body.mxc-on .woocommerce table.shop_table.cart td.product-thumbnail { grid-area: img; }
  body.mxc-on .woocommerce table.shop_table.cart td.product-name { grid-area: name; }
  body.mxc-on .woocommerce table.shop_table.cart td.product-remove { grid-area: remove; justify-self: end; }
  body.mxc-on .woocommerce table.shop_table.cart tr.cart_item td.product-price { display: none !important; }
  body.mxc-on .woocommerce table.shop_table.cart td.product-quantity { grid-area: qty; }
  body.mxc-on .woocommerce table.shop_table.cart td.product-subtotal { grid-area: total; justify-self: end; font-weight: 700; }
  body.mxc-on .woocommerce table.shop_table.cart tr:not(.cart_item),
  body.mxc-on .woocommerce table.shop_table.cart td.actions { display: block; width: auto; }
  body.mxc-on .woocommerce table.shop_table.cart td.actions .coupon { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
  body.mxc-on .woocommerce table.shop_table.cart td.actions .coupon .input-text { flex: 1 1 160px; }
}
body.mxc-on .woocommerce .cart-collaterals .cart_totals { box-sizing: border-box; padding: 20px; border-radius: 24px; background: var(--mxc-mist); }
@media (min-width: 900px) { body.mxc-on .woocommerce .cart-collaterals .cart_totals { padding: 28px; } }

/* ---------- phone: the order card on top, the pay button fixed at the bottom (the canvas) ---------- */
body.mxc-on .mxc-top { display: none; }
@media (max-width: 899px) {
  body.mxc-on .mxc-top:not([hidden]) { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; padding: 10px 14px; border-radius: 18px; background: var(--mxc-mist); }
  body.mxc-on .mxc-top__img { flex: none; width: 40px; height: 46px; overflow: hidden; border-radius: 20px 20px 8px 8px; background: #FFFFFF; }
  body.mxc-on .mxc-top__img img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
  body.mxc-on .mxc-top__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14px; line-height: 1.35; }
  body.mxc-on .mxc-top__txt b { font-weight: 600; }
  body.mxc-on .mxc-top__txt span { font-size: 12px; color: var(--mxc-muted); }
  body.mxc-on .mxc-top__total { font-size: 16px; font-weight: 800; white-space: nowrap; }
  /* the pay row (terms line + button) rides at the bottom of the screen: the page keeps room for it at its end, and
     keyboard focus scrolls into view above it */
  body.mxc-on:has(#place_order) { padding-bottom: 130px; }
  html:has(body.mxc-on #place_order) { scroll-padding-bottom: 130px; }
  body.mxc-on .woocommerce #payment div.form-row.place-order { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; margin: 0; padding: 12px 20px calc(16px + env(safe-area-inset-bottom)); background: #FFFFFF; border-top: 1px solid var(--mxc-line); box-shadow: 0 -10px 30px rgba(11,18,32,0.08); display: flex; flex-direction: column-reverse; gap: 8px; }
  body.mxc-on .woocommerce #payment div.form-row.place-order #place_order { margin: 0; }
  body.mxc-on .woocommerce #payment div.form-row.place-order .woocommerce-privacy-policy-text p { margin: 0; font-size: 11px; line-height: 1.4; text-align: center; }
  /* the trust line is already in the card on top; in the bar it would only make it taller */
  body.mxc-on .woocommerce #payment div.form-row.place-order .mxc-trust { display: none; }
}
