/* WooCommerce's own cart, checkout and account forms (classic shortcodes, kept so Paystack's checkout runs unchanged),
   dressed in the storefront's tokens: ink text on the sand ground, saffron actions, square buttons. */
.udg-wc { padding: 40px var(--gutter) 14vh; color: var(--ink); }
/* the bag and checkout run edge to edge between the page's gutters, under the page head's left edge (WooCommerce's
   block-theme sheet held them to a centred 1000px, so on a wide screen the table stood 185px in from the heading) */
.udg-wc .woocommerce.woocommerce { max-width: none; margin-inline: 0; font-size: 16px; }
.udg-wc a:not(.button):not(.btn) { color: var(--link); text-underline-offset: 3px; }
.udg-wc h2, .udg-wc h3 { font: 500 clamp(22px, 2vw, 28px)/1.1 var(--font-serif); text-transform: none; letter-spacing: -.01em; margin: 0 0 16px; }

.udg-wc .button, .udg-wc button.button, .udg-wc input.button, .udg-wc #place_order, .udg-wc .checkout-button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 22px;
  border: 1.5px solid var(--ink); border-radius: var(--radius); background: transparent; color: var(--ink);
  font: 600 15px/1 var(--font); letter-spacing: .02em; text-decoration: none; cursor: pointer; transition: background .2s, color .2s, transform .1s; }
.udg-wc .button:hover { background: var(--ink); color: var(--on-dark); }
.udg-wc .button:active { transform: translateY(1px); }
.udg-wc .button.alt, .udg-wc #place_order, .udg-wc .checkout-button { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.udg-wc .button.alt:hover, .udg-wc #place_order:hover, .udg-wc .checkout-button:hover { background: var(--ink); border-color: var(--ink); color: var(--accent); }
.udg-wc .button:disabled, .udg-wc .button[disabled] { opacity: .45; cursor: not-allowed; }
.udg-wc :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.udg-wc input.input-text, .udg-wc select, .udg-wc textarea, .udg-wc .select2-selection {
  min-height: 48px; padding: 12px 14px; border: 1px solid var(--field-line); border-radius: var(--radius);
  background: rgba(255,253,252,.5); font: 400 16px var(--font); color: var(--ink); box-sizing: border-box; }
.udg-wc .form-row { margin: 0 0 16px; padding: 0; }
.udg-wc .form-row label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.udg-wc .required { color: var(--ink); text-decoration: none; }

/* WooCommerce reuses class names the storefront already styles (.cart, .actions, .qty, .notes): reset them here */
.udg-wc table.cart { display: table; padding: 0; gap: 0; grid-template-columns: none; }
.udg-wc table.cart td.actions { display: table-cell; margin: 0; }
.udg-wc input.qty { display: inline-block; margin-top: 0; }
.udg-wc .form-row.notes { display: block; padding: 0; gap: 0; }
.udg-wc table.cart td.actions .coupon { display: inline-flex; gap: 12px; align-items: center; }
.udg-wc table.cart td.actions .coupon .input-text { width: 12rem; }
.udg-wc table.cart td.actions > .button { float: right; }

/* WooCommerce's notice banners in the storefront's voice */
.udg-wc .wc-block-components-notice-banner { margin: 0 0 24px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 0; background: var(--surface); color: var(--ink); font-size: 15px; }
.udg-wc .wc-block-components-notice-banner.is-error { border-color: #A3341F; }
.udg-wc .wc-block-components-notice-banner > svg { display: none; }
.udg-wc #ship-to-different-address { font: 600 16px/1.3 var(--font); }
.udg-wc #ship-to-different-address label { display: flex; gap: 10px; align-items: center; min-height: 44px; cursor: pointer; }

/* cart table */
.udg-wc table.shop_table { width: 100%; border: 0; border-top: 1.5px solid var(--ink); border-collapse: collapse; border-radius: 0; }
.udg-wc table.shop_table th, .udg-wc table.shop_table td { padding: 18px 12px 18px 0; border: 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; background: none; }
.udg-wc table.shop_table th { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.udg-wc table.cart img { width: 80px; aspect-ratio: 3 / 4; object-fit: cover; background: var(--surface); }
.udg-wc table.cart .product-name a { font: 500 19px/1.15 var(--font-serif); text-decoration: none; color: var(--ink); }
.udg-wc table.cart td.actions { padding-top: 24px; }
.udg-wc .quantity .qty { width: 72px; min-height: 44px; text-align: center; }
.udg-wc a.remove { display: inline-grid; place-items: center; width: 44px; height: 44px; color: var(--muted) !important; font-size: 22px; text-decoration: none; border-radius: 0; }
.udg-wc a.remove:hover { background: var(--ink); color: var(--on-dark) !important; }
.udg-wc .cart-collaterals .cart_totals { float: none; width: auto; max-width: 26rem; margin-left: auto; margin-top: 40px; padding: 28px; background: var(--surface); }
.udg-wc .wc-proceed-to-checkout { padding-bottom: 0; }
.udg-wc .wc-proceed-to-checkout .checkout-button { width: 100%; margin-bottom: 0; font-size: 16px; }

/* checkout */
.udg-wc form.checkout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 26rem); gap: 48px var(--gutter); align-items: start; }
.udg-wc form.checkout { grid-template-rows: auto 1fr; }
.udg-wc form.checkout > .col2-set { grid-column: 1; grid-row: 1 / span 2; width: auto; }
.udg-wc form.checkout > #order_review_heading, .udg-wc form.checkout > #order_review { grid-column: 2; }
.udg-wc form.checkout > #order_review_heading { grid-row: 1; margin: 0; }
.udg-wc form.checkout > #order_review { grid-row: 2; align-self: start; position: sticky; top: calc(var(--header-height, var(--head-h)) + var(--admin-offset, 0px) + 24px); padding: 28px; background: var(--surface); }
.udg-wc form.checkout > .woocommerce-NoticeGroup { grid-column: 1 / -1; }
.udg-wc .col2-set .col-1, .udg-wc .col2-set .col-2 { float: none; width: auto; }
.udg-wc #payment { background: transparent; border-radius: 0; }
.udg-wc #payment ul.payment_methods { padding: 0 0 16px; border-bottom: 1px solid var(--line); }
.udg-wc #payment div.payment_box { background: var(--bg); color: var(--ink); border-radius: 0; }
.udg-wc #payment div.payment_box::before { border-bottom-color: var(--bg); }
.udg-wc #place_order { width: 100%; font-size: 16px; }

/* notices */
.udg-wc .woocommerce-message, .udg-wc .woocommerce-info, .udg-wc .woocommerce-error {
  margin: 0 0 24px; padding: 16px 20px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); list-style: none; }
.udg-wc .woocommerce-error { border-color: #A3341F; }
.udg-wc .woocommerce-message::before, .udg-wc .woocommerce-info::before, .udg-wc .woocommerce-error::before { display: none; }

/* account */
.udg-wc .woocommerce-MyAccount-navigation ul { list-style: none; padding: 0; border-top: 1.5px solid var(--ink); }
.udg-wc .woocommerce-MyAccount-navigation li a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.udg-wc .woocommerce-MyAccount-navigation li.is-active a { font-weight: 600; }

@media (max-width: 900px) {
  .udg-wc form.checkout { grid-template-columns: minmax(0, 1fr); }
  .udg-wc form.checkout { grid-template-rows: none; }
  .udg-wc form.checkout > .col2-set, .udg-wc form.checkout > #order_review_heading, .udg-wc form.checkout > #order_review { grid-column: 1; grid-row: auto; position: static; }
  .udg-wc table.cart td.actions > .button { float: none; width: 100%; }
  .udg-wc .cart-collaterals .cart_totals { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { .udg-wc .button { transition: none; } }

/* Keep the piece visible beside its details in WooCommerce's mobile cart. */
@media (max-width: 768px) {
  .udg-wc table.cart tr.cart_item { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 0 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
  .udg-wc table.cart tr.cart_item td { grid-column: 2; padding: 8px 0; border: 0; }
  .udg-wc table.cart tr.cart_item td.product-thumbnail { display: block; grid-column: 1; grid-row: 1 / span 4; padding-top: 0; }
  .udg-wc table.cart .product-thumbnail img { width: 64px; }
  .udg-wc table.cart tr.cart_item td.product-name { grid-row: 1; padding: 0 30px 12px 0; text-align: left !important; }
  .udg-wc table.cart .product-name a { font: 600 14px/1.4 var(--font); }
  .udg-wc table.cart tr.cart_item td.product-remove { position: absolute; top: 10px; right: -10px; padding: 0; }
  .udg-wc table.cart :is(.product-thumbnail, .product-name, .product-remove)::before { display: none; }
  .udg-wc table.cart tr.cart_item :is(.product-price, .product-quantity, .product-subtotal) { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; }
  .udg-wc table.cart td.actions .coupon { display: flex; width: 100%; gap: 8px; margin-bottom: 8px; }
  .udg-wc table.cart td.actions .coupon .input-text { flex: 1; width: 0; min-width: 0; margin: 0; }
  .udg-wc table.cart td.actions .coupon .button { width: auto; flex: none; padding-inline: 12px; }
}

/* Production's checkout shipping guard (mu-plugin) prints this when the chosen county has no delivery rate */
.udg-wc .udg-shipping-unavailable { margin: 12px 0; padding: 12px 14px; border: 1px solid #A3341F; background: var(--bg); color: var(--ink); font-size: 15px; }

/* the torn page reveal stays off here: forms and payment fields should not slide */
@view-transition { navigation: none; }
