/* Cart (Impulse layout), checkout (Shopify-checkout look) and order received pages. Mobile first. Account: account.css */

.wc-page-shell.section { margin-top: var(--home-section-space); }
.wc-page-shell .section-header { margin-bottom: 0; }
.wc-page-shell .page-title { margin-bottom: 10px; }
.page-content > .woocommerce > .woocommerce-notices-wrapper:empty { display: none; }

/* Shared: quantity stepper (cart page; same look as the drawer) */
.qty-stepper {
  display: inline-flex;
  align-items: stretch;
  height: 34px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}
.qty-stepper__btn { width: 28px; padding: 0; border: 0; background: none; font-size: 18px; line-height: 1; }
.qty-stepper .qty {
  width: 24px;
  height: auto;
  padding: 0;
  border: 0;
  background: none;
  font-size: 16px;
  font-weight: 400;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}
.qty-stepper .qty::-webkit-inner-spin-button, .qty-stepper .qty::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* ======================================================================
 * Cart page
 * ==================================================================== */
.cart-page__continue { margin: 0 0 50px; text-align: center; }
.cart-page__continue .text-link {
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--color-text) 15%, transparent);
}

.woocommerce-cart-form .shop_table,
.woocommerce-cart-form .shop_table tbody { display: block; width: 100%; border: 0; }
.woocommerce-cart-form .shop_table thead { display: none; }
.woocommerce-cart-form .cart_item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  grid-template-areas:
    "thumb name name"
    "thumb qty total"
    "thumb remove remove";
  align-items: start;
  column-gap: 17px;
  padding: 10px 0 20px;
}
.woocommerce-cart-form .cart_item td { display: block; padding: 0; border: 0; text-align: left; }
.woocommerce-cart-form .product-thumbnail { grid-area: thumb; }
.woocommerce-cart-form .product-thumbnail img { width: 150px; height: 150px; object-fit: cover; }
.woocommerce-cart-form .product-name { grid-area: name; margin-bottom: 10px; }
.woocommerce-cart-form .product-name > a { display: block; margin-bottom: 8px; font-size: 19px; line-height: 1.4; }
.woocommerce-cart-form .cart_item td.product-price { display: none; } /* unit price: the reference shows the line price only */
.woocommerce-cart-form .product-quantity { grid-area: qty; }
.woocommerce-cart-form .product-subtotal { grid-area: total; align-self: center; text-align: right; }
.woocommerce-cart-form .product-remove { grid-area: remove; }
.cart-item-remove { display: inline-block; padding-block: 2px; font-size: var(--fs-base); }
.cart-item-remove:hover { text-decoration: underline; text-underline-offset: 3px; }
.woocommerce-cart-form .actions { display: block; padding: 0; border: 0; }
.woocommerce-cart-form tbody > tr:last-child { display: block; }
.js .woocommerce-cart-form button[name="update_cart"] { display: none; } /* wc-pages.js updates on change */

dl.variation { margin: 0; line-height: 1.4; }
dl.variation dt { display: inline; font-weight: var(--fw-bold); }
dl.variation dd { display: inline; margin: 0 0 0 4px; }
dl.variation dd::after { content: ""; display: block; }
dl.variation dd p { display: inline; margin: 0; }

.cart-collaterals { margin-top: 10px; }
.cart_totals > h2 { display: none; }
.cart_totals table { width: 100%; border-collapse: collapse; }
.cart_totals th, .cart_totals td { padding: 0 0 15px; border: 0; font-weight: var(--fw-body); }
.cart_totals th { text-align: left; }
.cart_totals td { text-align: right; }
/* Only the subtotal, like the reference ("…calculated at checkout") */
.cart_totals .order-total, .cart_totals .tax-rate, .cart_totals .tax-total, .cart_totals .shipping { display: none; }
.wc-proceed-to-checkout .checkout-button { display: flex; width: calc(100% - 12px); }
.cart-totals__note { margin: 20px 0 0; font-size: var(--fs-small); text-align: center; }

.cart-empty.woocommerce-info { border: 0; background: none; font-size: var(--fs-base); text-align: center; }
.return-to-shop { text-align: center; }

@media (min-width: 769px) {
  .ci-cart-page .page-content > .woocommerce {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 476px;
    column-gap: 100px;
    align-items: start;
  }
  .ci-cart-page .page-content > .woocommerce > :not(.woocommerce-cart-form, .cart-collaterals) { grid-column: 1 / -1; }
  .woocommerce-cart-form .cart_item { column-gap: 22px; }
  .cart-collaterals { margin-top: 0; padding: 30px; background: var(--color-section-alt); }
  .qty-stepper { height: 37px; }
}

/* ======================================================================
 * Checkout (Shopify-checkout look)
 * ==================================================================== */
.ci-checkout-page {
  font-family: var(--checkout-font);
  font-size: 14px;
  letter-spacing: normal;
  line-height: 1.5;
  -webkit-font-smoothing: auto;
}
.ci-checkout-page h3 {
  margin: 0 0 14px;
  font-family: var(--checkout-font);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: normal;
  line-height: 1.3;
  text-transform: none;
}
.ci-checkout-page .wc-page-shell { max-width: none; margin: 0; padding: 0; }
.ci-checkout-page .site-main { min-height: 0; }

body.ci-checkout-page { background: var(--color-surface); } /* white form column (Shopify checkout); the summary sidebar is --checkout-sidebar */
.checkout-header { border-bottom: 1px solid var(--checkout-border); background: var(--color-surface); }
.checkout-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1020px;
  margin: 0 auto;
  padding: 18px 17px;
}
.checkout-header__logo img { width: var(--logo-w-mobile); }
.checkout-header__cart { display: inline-flex; padding: 6px; color: var(--checkout-accent); }

.checkout-footer { padding: 20px 17px 30px; border-top: 1px solid var(--checkout-border); }
.checkout-footer__menu { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.checkout-footer__menu a { font-size: 13px; text-decoration: underline; text-underline-offset: 2px; }

/* Layout: on mobile the order summary is a collapsible bar on top (wc-pages.js) */
form.checkout { display: flex; flex-direction: column; }
form.checkout > * { min-width: 0; }
form.checkout #order_review_heading { order: -2; margin: 0; }
form.checkout #order_review { order: -1; }
/* Every other child (ours or a plugin's, e.g. Stripe's express checkout buttons) sits in the padded form column */
form.checkout > :not(#order_review, #order_review_heading) { padding-inline: 17px; }
form.checkout > :not(#order_review, #order_review_heading):first-child { padding-top: 24px; }

.summary-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 16px 17px;
  border: 0;
  border-bottom: 1px solid var(--checkout-border);
  background: var(--checkout-sidebar);
  font: inherit;
  font-size: 15px;
  text-align: left;
}
.summary-toggle .icon { width: 12px; height: 12px; stroke-width: 6px; transition: transform 0.2s ease; }
.summary-toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }
.summary-toggle__total { margin-left: auto; font-size: 18px; font-weight: 600; }
.js form.checkout #order_review:not(.is-open) { display: none; }
form.checkout #order_review { padding: 20px 17px; border-bottom: 1px solid var(--checkout-border); background: var(--checkout-sidebar); }

#customer_details { padding-top: 24px; }
#customer_details .col-1, #customer_details .col-2 { width: auto; float: none; }
#customer_details .col-2 { margin-top: 10px; }
.woocommerce-billing-fields__field-wrapper,
.woocommerce-shipping-fields__field-wrapper,
.woocommerce-additional-fields__field-wrapper { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 12px; }
.ci-checkout-page .form-row { grid-column: 1 / -1; margin: 0 0 12px; padding: 0; }
.ci-checkout-page .form-row-first { grid-column: 1; }
.ci-checkout-page .form-row-last { grid-column: 2; }
.ci-checkout-page .form-row label { display: block; margin-bottom: 4px; color: var(--checkout-muted); font-size: 13px; }
/* Top-aligned: plugin consent labels wrap over several lines (CusRev's review-invite opt-in) */
.ci-checkout-page .form-row label.checkbox, .ci-checkout-page .woocommerce-form__label-for-checkbox { display: flex; align-items: flex-start; gap: 8px; color: inherit; font-size: 14px; }
.ci-checkout-page .woocommerce-form__label-for-checkbox input { flex: none; margin-top: 1px; }
.ci-checkout-page .required { color: var(--checkout-muted); text-decoration: none; }
.ci-checkout-page .optional { color: var(--checkout-muted); }
.ci-checkout-page input[type="text"], .ci-checkout-page input[type="email"], .ci-checkout-page input[type="tel"],
.ci-checkout-page input[type="password"], .ci-checkout-page input[type="number"], .ci-checkout-page select, .ci-checkout-page textarea {
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid var(--checkout-border);
  border-radius: var(--checkout-radius);
  background: var(--color-surface);
  font-family: var(--checkout-font);
  font-size: 16px; /* no iOS zoom */
  font-weight: 400;
  letter-spacing: normal;
}
.ci-checkout-page input:focus-visible, .ci-checkout-page select:focus-visible, .ci-checkout-page textarea:focus-visible {
  outline: 0;
  border-color: var(--checkout-accent);
  box-shadow: 0 0 0 1px var(--checkout-accent);
}
.ci-checkout-page input[type="checkbox"], .ci-checkout-page input[type="radio"] { accent-color: var(--checkout-accent); width: 18px; height: 18px; margin: 0; }
#ship-to-different-address { margin: 10px 0 14px; font-size: 16px; }
.woocommerce-additional-fields > h3 { display: none; }

/* Errors
   Field errors: highlighted field + message under it (wc-pages.js moves them out of the top list).
   General errors: banner above the checkout. */
.ci-checkout-page { --error-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 0a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm1 15H9v-2h2v2zm0-4H9V5h2v6z'/%3E%3C/svg%3E"); }
.ci-checkout-page .form-row.woocommerce-invalid > label { color: var(--checkout-error-text); }
.ci-checkout-page .form-row.woocommerce-invalid input.input-text,
.ci-checkout-page .form-row.woocommerce-invalid select,
.ci-checkout-page .form-row.woocommerce-invalid textarea {
  border-color: var(--checkout-error);
  background: color-mix(in srgb, var(--checkout-error) 4%, var(--color-surface));
  box-shadow: 0 0 0 3px var(--checkout-error-ring);
}
.ci-checkout-page .form-row.woocommerce-invalid input:focus-visible,
.ci-checkout-page .form-row.woocommerce-invalid select:focus-visible,
.ci-checkout-page .form-row.woocommerce-invalid textarea:focus-visible {
  border-color: var(--checkout-error);
  box-shadow: 0 0 0 1px var(--checkout-error), 0 0 0 4px var(--checkout-error-ring);
}
.ci-checkout-page .form-row.woocommerce-invalid input[type="checkbox"] { outline: 2px solid var(--checkout-error); outline-offset: 2px; }
.checkout-inline-error-message {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 7px 0 0;
  color: var(--checkout-error-text);
  font-size: 13px;
  line-height: 1.4;
  animation: ci-error-in 0.2s ease-out;
}
.checkout-inline-error-message::before {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 1px;
  background: currentColor;
  -webkit-mask: var(--error-icon) center / contain no-repeat;
  mask: var(--error-icon) center / contain no-repeat;
}
.checkout-inline-error-message strong { font-weight: 600; }
@keyframes ci-error-in { from { opacity: 0; transform: translateY(-4px); } }

.checkout-errors { max-width: 1100px; margin: 24px auto 0; padding-inline: 17px; }
.ci-checkout-page .woocommerce-notices-wrapper .woocommerce-error,
.checkout-errors .woocommerce-error {
  position: relative;
  margin: 0 0 12px;
  padding: 14px 18px 14px 48px;
  border: 1px solid color-mix(in srgb, var(--checkout-error) 55%, transparent);
  border-radius: var(--checkout-radius);
  background: color-mix(in srgb, var(--checkout-error) 8%, var(--color-surface));
  color: var(--checkout-error-text);
  font-size: 14px;
  line-height: 1.45;
  list-style: none;
  animation: ci-error-in 0.25s ease-out;
}
.ci-checkout-page .woocommerce-notices-wrapper .woocommerce-error::before,
.checkout-errors .woocommerce-error::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 18px;
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: var(--error-icon) center / contain no-repeat;
  mask: var(--error-icon) center / contain no-repeat;
}
.checkout-errors .woocommerce-error li + li { margin-top: 6px; }
.checkout-errors .woocommerce-error a { color: inherit; text-decoration: underline; }
/* Focus is set by script for screen readers (the group is also role=alert); no visible ring needed. */
.checkout-errors .woocommerce-error:focus { outline: none; }
@media (prefers-reduced-motion: reduce) {
  .checkout-inline-error-message, .checkout-errors .woocommerce-error { animation: none; }
}

/* Payment */
.woocommerce-checkout-payment { padding-top: 14px; padding-bottom: 10px; }
.woocommerce-checkout-payment::before { content: ""; display: block; margin-bottom: 16px; border-top: 1px solid var(--checkout-border); }
.wc_payment_methods { margin: 0 0 20px; border: 1px solid var(--checkout-border); border-radius: var(--checkout-radius); overflow: hidden; list-style: none; }
.wc_payment_method { border-top: 1px solid var(--checkout-border); }
.wc_payment_method:first-child { border-top: 0; }
.wc_payment_method > label { display: inline-flex; align-items: center; gap: 10px; margin: 0; padding: 15px 0; font-weight: 500; cursor: pointer; }
.ci-checkout-page .wc_payment_method > input { margin: 0 0 0 15px; vertical-align: middle; } /* beats the generic radio reset */
.wc_payment_method > label img { max-height: 22px; width: auto; display: inline; }
/* relative: gateways put absolutely positioned helpers in here (Stripe's invisible full-width style probe
   input would otherwise be sized against the viewport and make the page scroll sideways). */
.wc_payment_method .payment_box { position: relative; padding: 15px; background: var(--checkout-sidebar); border-top: 1px solid var(--checkout-border); color: var(--checkout-muted); }
.wc_payment_method .payment_box p:last-child { margin-bottom: 0; }
/* Gateways wrap their fields in a <fieldset> (Stripe: #wc-stripe-upe-form): no browser groove border around the card form */
.wc_payment_method .payment_box fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.woocommerce-checkout-payment .woocommerce-info { margin: 0 0 20px; }
.woocommerce-privacy-policy-text, .woocommerce-terms-and-conditions-wrapper { margin-bottom: 16px; color: var(--checkout-muted); font-size: 13px; }
.woocommerce-privacy-policy-text a { text-decoration: underline; }
.ci-checkout-page #place_order {
  display: flex;
  width: 100%;
  min-height: 56px;
  margin: 0;
  color: var(--checkout-button-text);
  font-family: var(--checkout-font);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
}
.ci-checkout-page #place_order::before { transform: none; border-radius: var(--checkout-radius); --btn-bg: var(--checkout-button); --btn-border: var(--checkout-button); }

/* Order summary */
.woocommerce-checkout-review-order-table { width: 100%; border-collapse: collapse; }
.woocommerce-checkout-review-order-table thead { display: none; }
.woocommerce-checkout-review-order-table td, .woocommerce-checkout-review-order-table th { padding: 6px 0; border: 0; font-weight: 400; text-align: left; vertical-align: middle; }
.woocommerce-checkout-review-order-table td:last-child, .woocommerce-checkout-review-order-table tfoot td { text-align: right; }
.woocommerce-checkout-review-order-table .cart_item td { padding-block: 8px; }
.summary-item { display: flex; align-items: center; gap: 14px; }
.summary-item__media { position: relative; flex: none; }
.summary-item__img { width: 64px; height: 64px; border: 1px solid var(--checkout-border); border-radius: 8px; background: var(--color-surface); object-fit: cover; }
.summary-item__qty {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--checkout-accent);
  color: var(--checkout-button-text);
  font-size: 12px;
  font-weight: 600;
  line-height: 21px;
  text-align: center;
}
.summary-item__name { font-weight: 500; }
.woocommerce-checkout-review-order-table dl.variation { margin: 4px 0 0 78px; color: var(--checkout-muted); font-size: 12px; }
.woocommerce-checkout-review-order-table dl.variation dt { font-weight: 400; }
.woocommerce-checkout-review-order-table .order-total th, .woocommerce-checkout-review-order-table .order-total td { padding-top: 12px; font-size: 19px; font-weight: 600; }
.woocommerce-checkout-review-order-table .woocommerce-shipping-methods { margin: 0; list-style: none; text-align: right; }
.woocommerce-checkout-review-order-table .woocommerce-shipping-methods li { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.checkout-coupon-row td { padding: 14px 0 !important; }
.checkout-coupon { display: flex; gap: 10px; }
.checkout-coupon .input-text { flex: 1; min-width: 0; }
.checkout-coupon__apply {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--checkout-border);
  border-radius: var(--checkout-radius);
  background: var(--checkout-field-muted);
  color: var(--checkout-muted-on-field);
  font: 600 14px var(--checkout-font);
}
.checkout-coupon:focus-within .checkout-coupon__apply, .checkout-coupon__apply:hover { border-color: var(--checkout-button); background: var(--checkout-button); color: var(--checkout-button-text); }
.checkout-coupon__message { margin: 8px 0 0; font-size: 13px; text-align: left; }
.checkout-coupon__message.is-error { color: var(--checkout-error-text); }
.woocommerce-remove-coupon { margin-left: 4px; font-size: 12px; text-decoration: underline; }
.ci-checkout-page .blockUI.blockOverlay { background: var(--color-surface) !important; opacity: 0.6 !important; }

@media (min-width: 769px) {
  .checkout-header__inner { padding: 20px 0px; }
  .checkout-header__logo img { width: var(--logo-w-desktop); }
  .checkout-errors { margin-top: 30px; padding-inline: 20px; }
  /* Two columns; the sidebar colour runs to the right edge of the screen */
  body.ci-checkout-page:not(.ci-checkout-page--single) {
    background: linear-gradient(to right, var(--color-surface) 50%, var(--checkout-border) 50%, var(--checkout-border) calc(50% + 1px), var(--checkout-sidebar) calc(50% + 1px));
  }
  /* Everything but the summary stacks in the left column, including plugin output we don't know about
     (e.g. Stripe's express checkout buttons + "— OR —" before the customer details). The auto rows collapse
     when unused; the last 1fr row takes the extra height when the sticky summary is the taller column. */
  form.checkout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: repeat(12, auto) 1fr;
    max-width: 1100px;
    margin: 0 auto;
  }
  form.checkout > :not(#order_review, #order_review_heading) {
    grid-column: 1;
    justify-self: end;
    width: 100%;
    max-width: 540px;
    padding: 0 40px 0 20px;
  }
  form.checkout > :not(#order_review, #order_review_heading):first-child { padding-top: 40px; }
  form.checkout #customer_details:not(:first-child) { padding-top: 24px; }
  form.checkout #order_review_heading { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  form.checkout #order_review,
  .js form.checkout #order_review:not(.is-open) {
    display: block;
    grid-column: 2;
    grid-row: 1 / -1;
    position: sticky;
    top: 0;
    width: 100%;
    max-width: 480px;
    padding: 40px 20px 40px 40px;
    border: 0;
    background: none;
  }
  /* Footer links sit under the left column (single-column pages: centred) */
  .checkout-footer { max-width: 1100px; margin: 0 auto; padding: 20px 17px 40px; }
  .ci-checkout-page:not(.ci-checkout-page--single) .checkout-footer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 0; border: 0; }
  .ci-checkout-page:not(.ci-checkout-page--single) .checkout-footer nav {
    grid-column: 1;
    justify-self: end;
    width: 100%;
    max-width: 540px;
    padding: 20px 40px 40px 20px;
    border-top: 1px solid var(--checkout-border);
  }
}

/* Order received / order pay: single column */
.ci-checkout-page--single .page-content { max-width: 720px; margin: 0 auto; padding: 30px 17px 60px; }
.woocommerce-thankyou-order-received { margin-bottom: 20px; font-size: 21px; font-weight: 600; }
.woocommerce-order-overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 0 0 30px; list-style: none; }
.woocommerce-order-overview li { padding: 12px 14px; border: 1px solid var(--checkout-border); border-radius: var(--checkout-radius); color: var(--checkout-muted); font-size: 13px; }
.woocommerce-order-overview li strong { display: block; color: var(--color-text); font-size: 15px; }
.ci-checkout-page--single h2 { font-family: var(--checkout-font); font-size: 19px; font-weight: 600; text-transform: none; }
.ci-checkout-page--single .shop_table { width: 100%; margin-bottom: 30px; border-collapse: collapse; }
.ci-checkout-page--single .shop_table th, .ci-checkout-page--single .shop_table td { padding: 10px 0; border-bottom: 1px solid var(--checkout-border); text-align: left; }
.ci-checkout-page--single .shop_table td:last-child, .ci-checkout-page--single .shop_table tfoot td { text-align: right; }
.woocommerce-order > p { margin-bottom: 24px; }
.wc-item-meta { margin: 4px 0 0; padding: 0; color: var(--checkout-muted); font-size: 13px; list-style: none; }
.wc-item-meta li > *, .wc-item-meta p { display: inline; margin: 0; }
.wc-item-meta strong { font-weight: 400; }
.ci-checkout-page--single .summary-item + .wc-item-meta { margin-left: 78px; } /* under the name, next to the thumbnail */
.woocommerce-customer-details address { padding: 14px; border: 1px solid var(--checkout-border); border-radius: var(--checkout-radius); font-style: normal; }
