/* TShirtHub purchase flow. Keep WooCommerce's forms, validation and responsive
   state classes authoritative; this layer controls visual presentation only. */
body:is(.woocommerce-cart, .woocommerce-checkout) {
  --tsh-flow-ink: #171717;
  --tsh-flow-muted: #67635d;
  --tsh-flow-line: #e8e3db;
  --tsh-flow-paper: #faf8f4;
  --tsh-flow-radius: 20px;
  background: var(--tsh-flow-paper);
  color: var(--tsh-flow-ink);
}

body:is(.woocommerce-cart, .woocommerce-checkout) .wp-site-blocks > main {
  width: calc(100% - 64px);
  max-width: 1240px;
  padding: 44px 0 80px;
}

body:is(.woocommerce-cart, .woocommerce-checkout) .wp-block-post-content,
body:is(.woocommerce-cart, .woocommerce-checkout) .wp-block-woocommerce-page-content-wrapper {
  min-width: 0;
}

body.woocommerce-cart .wp-site-blocks > main > .wp-block-post-title {
  max-width: 100%;
  margin: 0 0 12px;
  font-size: clamp(30px, 3.2vw, 44px);
  letter-spacing: -.045em;
  line-height: 1.12;
}

.tsh-commerce-intro {
  margin: 0 0 32px;
  color: var(--tsh-flow-ink, #171717);
}

.tsh-commerce-intro > :first-child { margin-top: 0; }
.tsh-commerce-intro h1 {
  margin: 8px 0 12px;
  font-size: clamp(30px, 3.2vw, 44px);
  line-height: 1.12;
  letter-spacing: -.045em;
}
.tsh-commerce-intro p {
  max-width: 650px;
  margin: 8px 0 0;
  color: var(--tsh-flow-muted, #67635d);
  font-size: 15px;
  line-height: 1.65;
}
.tsh-commerce-intro .tsh-commerce-eyebrow {
  margin-bottom: 8px;
  color: #8a622d;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.tsh-commerce-steps { margin-top: 24px; }
.tsh-commerce-steps ol {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tsh-commerce-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--tsh-flow-muted, #67635d);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}
.tsh-commerce-steps li > span:first-child {
  display: inline-flex;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid #d9d3c9;
  border-radius: 50%;
  font-size: 11px;
}
.tsh-commerce-steps li.is-current { color: var(--tsh-flow-ink, #171717); }
.tsh-commerce-steps li.is-current > span:first-child {
  border-color: #171717;
  background: #171717;
  color: #fff;
}
.tsh-commerce-steps li.is-complete > span:first-child {
  border-color: #c9b28e;
  background: #f2eadf;
  color: #66451e;
}
.tsh-commerce-steps a { text-decoration: none; }
.tsh-commerce-steps a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* The native checkout uses a compact header to keep the customer in the flow. */
body.woocommerce-checkout .wp-site-blocks > header {
  margin: 0;
  padding: 20px 32px;
  background: #fff;
  border-bottom: 1px solid var(--tsh-flow-line);
}
body.woocommerce-checkout .wp-site-blocks > header > .wp-block-group {
  max-width: 1240px;
  margin-inline: auto;
  padding: 0;
}
body.woocommerce-checkout .wp-site-blocks > header .custom-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
body.woocommerce-checkout .wp-site-blocks > header a {
  font-size: 13px;
  font-weight: 600;
}

/* Native cart and checkout share a calm content panel and a separate summary. */
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-sidebar-layout {
  align-items: flex-start;
  margin-bottom: 0;
}
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-main,
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-sidebar {
  min-width: 0;
  box-sizing: border-box;
}
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-main {
  border: 1px solid var(--tsh-flow-line);
  border-radius: var(--tsh-flow-radius);
  background: #fff;
  padding: 28px;
}
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-sidebar {
  border: 1px solid var(--tsh-flow-line);
  border-radius: var(--tsh-flow-radius);
  background: #fff;
  padding: 24px;
}
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-title {
  color: var(--tsh-flow-ink);
  font-size: 20px;
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: -.025em;
}
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-product-name {
  color: var(--tsh-flow-ink);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.5;
  text-decoration: none;
  overflow-wrap: anywhere;
}
body:is(.woocommerce-cart, .woocommerce-checkout) a.wc-block-components-product-name:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-product-metadata {
  margin-top: 8px;
  color: var(--tsh-flow-muted);
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-product-metadata .wc-block-components-product-details {
  margin-bottom: 12px;
}
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-product-price {
  font-size: 14px;
  line-height: 1.5;
}
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-formatted-money-amount {
  font-variant-numeric: tabular-nums;
}

/* Cart table keeps native responsive transformations and item controls. */
body.woocommerce-cart .wc-block-cart-items {
  width: 100%;
  margin: 0;
}
body.woocommerce-cart .wc-block-cart-items .wc-block-cart-items__header th {
  padding: 0 0 18px;
  color: var(--tsh-flow-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
body.woocommerce-cart .wc-block-cart-items .wc-block-cart-items__row td {
  padding-top: 24px;
  padding-bottom: 24px;
  border-color: var(--tsh-flow-line);
  vertical-align: top;
}
body.woocommerce-cart .wc-block-cart-items .wc-block-cart-item__image {
  width: 112px;
  padding-right: 20px;
}
body.woocommerce-cart .wc-block-cart-items .wc-block-cart-item__image img {
  width: 92px;
  max-width: 100%;
  border: 1px solid #f0ece6;
  border-radius: 12px;
  background: var(--tsh-flow-paper);
}
body.woocommerce-cart .wc-block-cart-items .wc-block-cart-item__product {
  padding-right: 16px;
}
body.woocommerce-cart .wc-block-cart-item__total .wc-block-components-product-price {
  font-size: 15px;
  font-weight: 700;
}
body.woocommerce-cart .wc-block-cart-item__remove-link {
  min-height: 32px;
  margin-top: 6px;
  color: var(--tsh-flow-muted);
  font-size: 12px;
  text-underline-offset: 3px;
}
body.woocommerce-cart .wc-block-components-quantity-selector {
  min-height: 40px;
  border-color: #d8d1c7;
  border-radius: 8px;
  background: #fff;
}
body.woocommerce-cart .wc-block-components-quantity-selector::after {
  border-color: #d8d1c7;
  border-radius: 8px;
}
body.woocommerce-cart .wc-block-components-quantity-selector__button {
  color: var(--tsh-flow-ink);
}
body.woocommerce-cart .wc-block-components-quantity-selector__button:disabled {
  opacity: .4;
}
body.woocommerce-cart .wc-block-cart__totals-title {
  padding: 0 0 20px;
  font-size: 19px;
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: -.025em;
  text-transform: none;
}

/* Totals retain native taxes, shipping details, coupon state and error messages. */
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-totals-wrapper {
  border-color: var(--tsh-flow-line);
}
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-totals-item {
  padding: 16px 0;
  font-size: 13px;
  line-height: 1.6;
}
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-totals-item__value {
  font-weight: 650;
}
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-totals-footer-item {
  margin-top: 4px;
  padding-top: 22px;
  padding-bottom: 22px;
  font-size: 17px;
  font-weight: 750;
}
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
  font-size: 23px;
  font-weight: 750;
  letter-spacing: -.025em;
}
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-totals-coupon {
  padding: 14px 0;
}
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-totals-coupon-link {
  color: var(--tsh-flow-ink);
  font-size: 13px;
  font-weight: 600;
  text-underline-offset: 4px;
}
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-panel__button {
  padding-block: 12px;
  font-size: 13px;
  font-weight: 600;
}
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-button:not(.is-link) {
  min-height: 50px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
}
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-button:not(.is-link):not(.is-secondary) {
  background: #111;
  color: #fff;
}
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-button:not(.is-link):not(.is-secondary):hover {
  background: #303030;
}
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-button:disabled {
  opacity: .5;
  cursor: not-allowed;
}
body.woocommerce-cart .wc-block-cart__submit-container { padding: 8px 0 0; }
body.woocommerce-cart .wc-block-cart__submit-button { width: 100%; }

/* Native floating labels need their original height, line-height and padding.
   Only field surfaces are changed here; validation colors remain authoritative. */
body.woocommerce-checkout .wc-block-components-checkout-step {
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--tsh-flow-line);
}
body.woocommerce-checkout .wc-block-components-checkout-step:last-child {
  margin-bottom: 0;
  border-bottom: 0;
}
body.woocommerce-checkout .wc-block-components-checkout-step__description {
  margin-top: 8px;
  color: var(--tsh-flow-muted);
  font-size: 13px;
  line-height: 1.65;
}
body.woocommerce-checkout .wc-block-components-checkout-step__heading-content {
  font-size: 12px;
  line-height: 1.5;
}
body.woocommerce-checkout .wc-block-components-form .wc-block-components-text-input:not(.has-error) input:not(:focus),
body.woocommerce-checkout .wc-block-components-textarea:not(:focus):not([aria-invalid="true"]) {
  border-color: #d8d1c7;
}
body.woocommerce-checkout .wc-block-components-form .wc-block-components-text-input input,
body.woocommerce-checkout .wc-block-components-combobox .wc-block-components-combobox-control input,
body.woocommerce-checkout .wc-block-components-textarea,
body.woocommerce-checkout .wc-block-components-country-input select {
  border-radius: 9px;
}
body.woocommerce-checkout .wc-block-components-checkbox__label {
  font-size: 13px;
  line-height: 1.55;
}
body.woocommerce-checkout .wc-block-components-radio-control-accordion-option {
  border-color: var(--tsh-flow-line);
}
body.woocommerce-checkout .wc-block-components-checkout-return-to-cart-button {
  color: var(--tsh-flow-muted);
  font-size: 13px;
  font-weight: 600;
  text-underline-offset: 4px;
}
body.woocommerce-checkout .wc-block-checkout__terms {
  font-size: 12px;
  line-height: 1.7;
}
body.woocommerce-checkout .wc-block-checkout__terms a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
body.woocommerce-checkout .wc-block-components-order-summary-item {
  padding-block: 18px;
}
body.woocommerce-checkout .wc-block-components-order-summary-item__image img {
  border-radius: 9px;
}
body.woocommerce-checkout .wc-block-components-order-summary-item__description {
  min-width: 0;
}
body.woocommerce-checkout .wc-block-components-order-summary-item__description .wc-block-components-product-name {
  font-size: 13px;
}
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-notice-banner {
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.65;
}

/* Empty carts remain a useful, centered destination instead of an empty panel. */
body.woocommerce-cart .wp-block-woocommerce-empty-cart-block {
  padding: 44px 28px;
  border: 1px solid var(--tsh-flow-line);
  border-radius: var(--tsh-flow-radius);
  background: #fff;
}
body.woocommerce-cart .wp-block-woocommerce-empty-cart-block .wc-block-cart__empty-cart__title {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

@media (min-width: 1000px) {
  body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-sidebar-layout {
    column-gap: 28px;
    flex-wrap: nowrap;
  }
  body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-sidebar-layout > .wc-block-components-main {
    flex: 1 1 0;
    width: auto;
    margin: 0;
  }
  body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-sidebar-layout > .wc-block-components-sidebar {
    flex: 0 0 350px;
    width: 350px;
    margin: 0;
  }
  body.woocommerce-cart .wc-block-cart__sidebar { position: sticky; top: 24px; }
}

@media (max-width: 999px) {
  body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-sidebar-layout {
    flex-direction: column;
    row-gap: 24px;
  }
  body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-sidebar-layout > .wc-block-components-main,
  body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-sidebar-layout > .wc-block-components-sidebar {
    width: 100%;
    margin: 0;
  }
  body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-sidebar-layout > .wc-block-components-main,
  body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-sidebar-layout > .wc-block-components-sidebar {
    padding: 22px;
  }
}

@media (max-width: 782px) {
  body:is(.woocommerce-cart, .woocommerce-checkout) .wp-site-blocks > main {
    width: calc(100% - 40px);
    padding: 32px 0 48px;
  }
  body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-sidebar-layout {
    row-gap: 24px;
  }
  body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-sidebar-layout > .wc-block-components-main,
  body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-sidebar-layout > .wc-block-components-sidebar {
    padding: 22px;
  }
  body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-sidebar { margin-top: 0; }
  body.woocommerce-checkout .wp-site-blocks > header { padding: 16px 20px; }
  .tsh-commerce-intro { margin-bottom: 24px; }
}

@media (max-width: 520px) {
  body:is(.woocommerce-cart, .woocommerce-checkout) { --tsh-flow-radius: 16px; }
  body:is(.woocommerce-cart, .woocommerce-checkout) .wp-site-blocks > main {
    width: calc(100% - 28px);
    padding: 26px 0 40px;
  }
  body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-sidebar-layout > .wc-block-components-main,
  body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-sidebar-layout > .wc-block-components-sidebar {
    padding: 18px 16px;
  }
  body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-title { font-size: 18px; }
  body.woocommerce-checkout .wp-site-blocks > header { padding: 14px 16px; }
  body.woocommerce-checkout .wp-site-blocks > header .custom-logo { width: 38px; height: 38px; }
  .tsh-commerce-intro p { font-size: 13px; }
  .tsh-commerce-steps { margin-top: 20px; }
  .tsh-commerce-steps ol { column-gap: 18px; }
  .tsh-commerce-steps li { gap: 7px; font-size: 11px; }
  body.woocommerce-cart .wc-block-cart-items .wc-block-cart-items__row td {
    padding-top: 18px;
    padding-bottom: 18px;
  }
  body.woocommerce-cart .wc-block-cart-items .wc-block-cart-item__image {
    width: 76px;
    padding-right: 12px;
  }
  body.woocommerce-cart .wc-block-cart-items .wc-block-cart-item__image img { width: 64px; border-radius: 9px; }
  body.woocommerce-cart .wc-block-cart-items .wc-block-cart-item__product { padding-right: 0; }
  body.woocommerce-cart .wc-block-components-product-name { font-size: 13px; }
  body.woocommerce-cart .wc-block-components-product-price { font-size: 13px; }
  body.woocommerce-checkout .wc-block-components-checkout-step {
    padding-bottom: 24px;
    margin-bottom: 24px;
  }
  body.woocommerce-cart .wp-block-woocommerce-empty-cart-block { padding: 32px 18px; }
}

.tsh-commerce-back { margin: 24px 0 0; font-size: 13px; font-weight: 600; }
.tsh-commerce-back a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; text-underline-offset: 4px; }

/* The outer summary panel supplies the border; avoid a second nested box. */
body.woocommerce-checkout .wc-block-components-sidebar .wp-block-woocommerce-checkout-order-summary-block{border:0;border-radius:0}
body.woocommerce-checkout .wc-block-components-sidebar .wc-block-components-order-summary__button-text{font-size:19px;font-weight:700;letter-spacing:-.025em}
body.woocommerce-checkout .wc-block-components-sidebar .wc-block-components-order-summary__button{padding:0 0 18px}

/* A two-column item card prevents Woo's implicit total column from widening
   the table on compact phones. Product, quantity and line total remain visible. */
@media(max-width:600px){
  body.woocommerce-cart .wc-block-cart .wc-block-cart-items,
  body.woocommerce-cart .wc-block-cart .wc-block-cart-items tbody{display:block;width:100%;min-width:0}
  body.woocommerce-cart .wc-block-cart .wc-block-cart-items .wc-block-cart-items__row{display:grid;grid-template-columns:64px minmax(0,1fr);gap:12px 16px;width:100%;box-sizing:border-box;padding:18px 0}
  body.woocommerce-cart .wc-block-cart .wc-block-cart-items .wc-block-cart-item__image{grid-column:1;grid-row:1 / 3;width:auto;min-width:0;padding:0}
  body.woocommerce-cart .wc-block-cart .wc-block-cart-items .wc-block-cart-item__product{grid-column:2;grid-row:1;width:auto;min-width:0;padding:0}
  body.woocommerce-cart .wc-block-cart .wc-block-cart-items .wc-block-cart-item__total{grid-column:2;grid-row:2;width:auto;min-width:0;padding:10px 0 0;justify-content:flex-end;border-top:1px solid var(--tsh-flow-line)}
}
