/*
 * SANUMCOR Cart content presentation.
 * Scope: Cart page chrome, empty-cart recommendations, and filled-cart surfaces.
 */

body.woocommerce-cart {
  --cart-canvas: var(--sanumcor-canvas, #F5ECE0);
  --cart-surface: var(--sanumcor-surface, #FBF9F5);
  --cart-elevated: var(--sanumcor-surface-elevated, #FFFDFC);
  --cart-ink: var(--sanumcor-ink, #171916);
  --cart-muted: var(--sanumcor-muted, #59615B);
  --cart-anchor: var(--sanumcor-anchor, #26372E);
  --cart-anchor-hover: var(--sanumcor-anchor-hover, #1D2A24);
  --cart-accent: var(--sanumcor-accent, #C09334);
  --cart-border: var(--sanumcor-border, #DED3C4);
  --cart-border-strong: var(--sanumcor-border-strong, #CDBB9F);
  --cart-focus: var(--sanumcor-focus, #8A672C);
  overflow-x: hidden;
  color: var(--cart-ink);
  background: var(--cart-canvas);
}

body.woocommerce-cart *,
body.woocommerce-cart *::before,
body.woocommerce-cart *::after {
  box-sizing: border-box;
}

body.woocommerce-cart .entry-hero.page-hero-section {
  display: none;
}

body.woocommerce-cart .content-area,
body.woocommerce-cart .site-main,
body.woocommerce-cart .entry-content-wrap {
  margin-top: 0;
  margin-bottom: 0;
}

body.woocommerce-cart .site-main {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(620px, 72vh, 860px);
  padding: 0;
  background-image:
    url("../images/home/sanumcore-Sunlit-Beige-Studio.png");
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

body.woocommerce-cart .site-main:has(.sanumcor-empty-cart[hidden]) {
  background-image:
    url("../images/home/sanumcor-home-ambient-hero.png");
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

body.woocommerce-cart .content-container.site-container {
  width: 100%;
  max-width: none;
  padding: 0;
}

body.woocommerce-cart .content-bg,
body.woocommerce-cart article.entry.content-bg.single-entry,
body.woocommerce-cart .entry-content.single-content,
body.woocommerce-cart .entry-content-wrap,
body.woocommerce-cart .wp-site-blocks,
body.woocommerce-cart .wp-block-woocommerce-cart {
  background: transparent;
  box-shadow: none;
}

body.woocommerce-cart .entry-content-wrap {
  padding: 0;
}

body.woocommerce-cart .wp-block-woocommerce-cart {
  margin: 0;
}

body.woocommerce-cart .wp-block-woocommerce-empty-cart-block {
  position: relative;
  isolation: isolate;
  margin: 0;
  overflow: hidden;
  padding: clamp(30px, 5vw, 52px) 0 clamp(46px, 6.4vw, 78px);
  background: transparent;
}

body.woocommerce-cart .wp-block-woocommerce-filled-cart-block {
  position: relative;
  isolation: isolate;
  margin: 0;
  overflow: hidden;
  padding: clamp(30px, 5vw, 56px) 0 clamp(48px, 6.5vw, 82px);
  background: transparent;
}

body.woocommerce-cart .sanumcor-empty-cart,
body.woocommerce-cart .wp-block-woocommerce-filled-cart-block > div,
body.woocommerce-cart .wc-block-cart {
  width: min(100% - 40px, 1200px);
  margin-inline: auto;
}

body.woocommerce-cart .sanumcor-empty-cart-intro {
  max-width: 720px;
  margin: 0 auto clamp(24px, 4vw, 38px);
  text-align: center;
}

body.woocommerce-cart .sanumcor-empty-cart-eyebrow {
  margin: 0 0 12px;
  color: color-mix(in srgb, var(--cart-anchor) 84%, var(--cart-muted));
  font-size: clamp(0.78rem, 1.8vw, 0.92rem);
  font-weight: 760;
  letter-spacing: 0.06em;
  line-height: 1.48;
  text-transform: uppercase;
}

body.woocommerce-cart .sanumcor-empty-cart-intro h2 {
  max-width: 18.5em;
  margin: 0 auto;
  color: var(--cart-ink);
  font-size: clamp(2rem, 6.8vw, 3rem);
  font-weight: 620;
  letter-spacing: 0;
  line-height: 1.08;
}

body.woocommerce-cart .sanumcor-empty-cart-intro p:not(.sanumcor-empty-cart-eyebrow) {
  max-width: 42rem;
  margin: 14px auto 0;
  color: var(--cart-muted);
  font-size: clamp(1rem, 2vw, 1.12rem);
  line-height: 1.62;
}

body.woocommerce-cart .sanumcor-empty-cart-recommendations {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

body.woocommerce-cart .sanumcor-empty-cart-tile {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 100%;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--cart-border-strong) 72%, transparent);
  border-radius: 20px;
  background:
    linear-gradient(
      180deg,
      var(--cart-elevated) 0%,
      color-mix(in srgb, var(--cart-surface) 82%, var(--cart-canvas)) 58%,
      var(--cart-canvas) 100%
    );
  box-shadow: 0 16px 42px rgba(69, 45, 19, 0.07);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

body.woocommerce-cart .sanumcor-empty-cart-tile:hover,
body.woocommerce-cart .sanumcor-empty-cart-tile:focus-within {
  border-color: color-mix(in srgb, var(--cart-border-strong) 92%, transparent);
  box-shadow: 0 20px 52px rgba(69, 45, 19, 0.085);
  transform: translateY(-1px);
}

body.woocommerce-cart .sanumcor-empty-cart-tile__pdp-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 20px;
  text-decoration: none;
}

body.woocommerce-cart .sanumcor-empty-cart-tile-image {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 0;
  aspect-ratio: 3 / 2;
  margin: 0;
  overflow: hidden;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: color-mix(in srgb, var(--cart-canvas) 72%, var(--cart-border));
  pointer-events: none;
}

body.woocommerce-cart .sanumcor-empty-cart-tile-image img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center;
}

body.woocommerce-cart .sanumcor-empty-cart-tile-calm .sanumcor-empty-cart-tile-image img {
  object-position: 28% center;
}

body.woocommerce-cart .sanumcor-empty-cart-tile-body {
  position: relative;
  z-index: 2;
  min-width: 0;
  padding: clamp(22px, 4.8vw, 28px) clamp(20px, 4.6vw, 28px) 0;
  pointer-events: none;
}

body.woocommerce-cart .sanumcor-empty-cart-tile-body h3 {
  margin: 0 0 11px;
  color: var(--cart-ink);
  font-size: clamp(1.32rem, 5.1vw, 1.5rem);
  font-weight: 820;
  letter-spacing: 0.035em;
  line-height: 1.12;
  text-transform: uppercase;
}

body.woocommerce-cart .sanumcor-empty-cart-tile-line {
  margin: 0 0 8px;
  color: var(--cart-anchor);
  font-size: clamp(1rem, 3vw, 1.12rem);
  font-weight: 720;
  line-height: 1.38;
}

body.woocommerce-cart .sanumcor-empty-cart-tile-support {
  margin: 0;
  color: var(--cart-muted);
  font-size: 0.97rem;
  line-height: 1.62;
}

body.woocommerce-cart .sanumcor-empty-cart-tile-commerce {
  position: relative;
  z-index: 3;
  display: grid;
  gap: 14px;
  align-self: end;
  padding: 18px clamp(20px, 4.6vw, 28px) clamp(22px, 4.8vw, 28px);
}

body.woocommerce-cart .sanumcor-empty-cart-tile-price {
  display: block;
  margin: 0;
  padding: 0;
  color: var(--cart-ink);
  font-size: 1.04rem;
  font-weight: 820;
  line-height: 1.35;
}

body.woocommerce-cart .sanumcor-empty-cart-tile-actions {
  display: grid;
  min-width: 0;
}

body.woocommerce-cart .sanumcor-cart-add-to-cart,
body.woocommerce-cart .sanumcor-cart-add-to-cart.button {
  position: relative;
  z-index: 3;
  display: inline-flex;
  width: 100%;
  min-height: 50px;
  margin: 0;
  padding: 0 18px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--cart-anchor);
  border-radius: 7px;
  background: var(--cart-anchor);
  box-shadow: none;
  color: var(--sanumcor-light-text, #FFFDFC);
  font-size: 0.78rem;
  font-weight: 820;
  letter-spacing: 0.075em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  white-space: normal;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease;
}

body.woocommerce-cart .sanumcor-cart-add-to-cart:hover,
body.woocommerce-cart .sanumcor-cart-add-to-cart:focus-visible {
  border-color: var(--cart-anchor-hover);
  background: var(--cart-anchor-hover);
  color: var(--sanumcor-light-text, #FFFDFC);
}

body.woocommerce-cart .sanumcor-cart-add-to-cart.loading {
  cursor: wait;
  opacity: 0.68;
}

body.woocommerce-cart .sanumcor-cart-add-to-cart.added {
  border-color: color-mix(in srgb, var(--cart-anchor) 82%, var(--cart-accent));
  background: color-mix(in srgb, var(--cart-anchor) 82%, var(--cart-accent));
  color: var(--sanumcor-light-text, #FFFDFC);
}

body.woocommerce-cart .sanumcor-empty-cart-tile .added_to_cart {
  display: none;
}

body.woocommerce-cart .sanumcor-empty-cart-tile__pdp-link:focus-visible,
body.woocommerce-cart .sanumcor-cart-add-to-cart:focus-visible,
body.woocommerce-cart .wc-block-components-button:focus-visible,
body.woocommerce-cart .wc-block-components-quantity-selector button:focus-visible,
body.woocommerce-cart .wc-block-cart-item__remove-link:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--cart-focus) 72%, transparent);
  outline-offset: 4px;
}

body.woocommerce-cart .wc-block-cart {
  color: var(--cart-ink);
}

body.woocommerce-cart .wc-block-components-sidebar-layout {
  display: grid;
  gap: clamp(20px, 3vw, 34px);
}

body.woocommerce-cart .wc-block-components-main,
body.woocommerce-cart .wc-block-components-sidebar,
body.woocommerce-cart .wc-block-cart-items,
body.woocommerce-cart .wc-block-cart__totals-title,
body.woocommerce-cart .wc-block-components-totals-wrapper,
body.woocommerce-cart .wp-block-woocommerce-cart-order-summary-block,
body.woocommerce-cart .wc-block-components-notice-banner {
  border-color: color-mix(in srgb, var(--cart-border-strong) 62%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--cart-elevated) 90%, transparent);
  box-shadow: 0 16px 42px rgba(69, 45, 19, 0.055);
}

body.woocommerce-cart .wc-block-components-main,
body.woocommerce-cart .wc-block-components-sidebar {
  padding: clamp(18px, 3vw, 28px);
}

body.woocommerce-cart .wc-block-components-sidebar {
  padding-inline: clamp(20px, 2.8vw, 30px);
}


body.woocommerce-cart .wc-block-cart__totals-title,
body.woocommerce-cart .wc-block-components-totals-wrapper,
body.woocommerce-cart .wp-block-woocommerce-cart-order-summary-block {
  overflow: hidden;
}

body.woocommerce-cart .wc-block-cart-items__row,
body.woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row {
  border-bottom-color: color-mix(in srgb, var(--cart-border-strong) 58%, transparent);
}

body.woocommerce-cart .wc-block-components-product-name,
body.woocommerce-cart .wc-block-cart__totals-title {
  color: var(--cart-ink);
  font-weight: 820;
  letter-spacing: 0.02em;
}

body.woocommerce-cart .wc-block-components-product-metadata,
body.woocommerce-cart .wc-block-cart-item__prices,
body.woocommerce-cart .wc-block-components-totals-item__description {
  color: var(--cart-muted);
}

body.woocommerce-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__label {
  font-size: 1.08rem;
  line-height: 1.3;
}

body.woocommerce-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
  font-size: 1.16rem;
  line-height: 1.3;
}

body.woocommerce-cart .wc-block-components-quantity-selector {
  min-height: 42px;
  border: 1px solid color-mix(in srgb, var(--cart-anchor) 18%, var(--cart-border));
  border-radius: 7px;
  background: var(--cart-elevated);
}

body.woocommerce-cart .wc-block-cart-item__remove-link {
  color: var(--cart-muted);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

body.woocommerce-cart .wc-block-cart-item__remove-link:hover,
body.woocommerce-cart .wc-block-cart-item__remove-link:focus-visible {
  color: var(--cart-anchor);
}

body.woocommerce-cart .wc-block-components-button:not(.is-link),
body.woocommerce-cart .wc-block-cart__submit-button {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--cart-anchor);
  border-radius: 7px;
  background: var(--cart-anchor);
  color: var(--sanumcor-light-text, #FFFDFC);
  font-size: 0.82rem;
  font-weight: 820;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

body.woocommerce-cart .wc-block-components-button:not(.is-link):hover,
body.woocommerce-cart .wc-block-components-button:not(.is-link):focus-visible,
body.woocommerce-cart .wc-block-cart__submit-button:hover,
body.woocommerce-cart .wc-block-cart__submit-button:focus-visible {
  border-color: var(--cart-anchor-hover);
  background: var(--cart-anchor-hover);
  color: var(--sanumcor-light-text, #FFFDFC);
}

body.woocommerce-cart .wc-block-components-totals-coupon-link,
body.woocommerce-cart .wc-block-components-totals-coupon__button,
body.woocommerce-cart .wc-block-components-button.is-link {
  color: var(--cart-anchor);
}

body.woocommerce-cart .wc-block-components-text-input input,
body.woocommerce-cart .wc-block-components-totals-coupon__input input {
  min-height: 48px;
  border-color: color-mix(in srgb, var(--cart-anchor) 18%, var(--cart-border));
  border-radius: 7px;
  background: var(--cart-elevated);
}

@media (min-width: 760px) {
  body.woocommerce-cart .sanumcor-empty-cart,
  body.woocommerce-cart .wp-block-woocommerce-filled-cart-block > div,
  body.woocommerce-cart .wc-block-cart {
    width: min(100% - 64px, 1200px);
  }

  body.woocommerce-cart .sanumcor-empty-cart-recommendations {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }
}

@media (min-width: 1024px) {
  /*
   * Filled Cart desktop: Kadence's footer-on-bottom layout can stretch
   * #inner-wrap beyond the intrinsic Cart content height. Propagate that
   * available height through the Cart wrapper chain so #main's ambient
   * background reaches the footer without an exposed canvas strip.
   */
  body.woocommerce-cart:has(.sanumcor-empty-cart[hidden]) #inner-wrap,
  body.woocommerce-cart:has(.sanumcor-empty-cart[hidden]) #primary,
  body.woocommerce-cart:has(.sanumcor-empty-cart[hidden]) .content-container.site-container {
    display: flex;
    flex-direction: column;
  }

  body.woocommerce-cart:has(.sanumcor-empty-cart[hidden]) #primary,
  body.woocommerce-cart:has(.sanumcor-empty-cart[hidden]) .content-container.site-container,
  body.woocommerce-cart:has(.sanumcor-empty-cart[hidden]) #main {
    flex: 1 0 auto;
    width: 100%;
  }

  body.woocommerce-cart:has(.sanumcor-empty-cart[hidden]) .content-area {
    padding-bottom: 0;
  }
}

@media (min-width: 1080px) {
  body.woocommerce-cart .sanumcor-empty-cart-recommendations {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.woocommerce-cart .wc-block-components-sidebar-layout {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.42fr);
    align-items: start;
  }
}

@media (max-width: 520px) {
  body.woocommerce-cart .wp-block-woocommerce-empty-cart-block,
  body.woocommerce-cart .wp-block-woocommerce-filled-cart-block {
    padding-top: 28px;
  }

  body.woocommerce-cart .sanumcor-empty-cart,
  body.woocommerce-cart .wp-block-woocommerce-filled-cart-block > div,
  body.woocommerce-cart .wc-block-cart {
    width: min(100% - 32px, 520px);
  }

  body.woocommerce-cart .wc-block-components-main,
  body.woocommerce-cart .wc-block-components-sidebar {
    padding: 16px;
  }
  /* Filled Cart: deliberate mobile line-item layout. */
body.woocommerce-cart table.wc-block-cart-items {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

body.woocommerce-cart table.wc-block-cart-items thead {
  display: none;
}

body.woocommerce-cart table.wc-block-cart-items tbody,
body.woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row {
  display: block;
  width: 100%;
  min-width: 0;
}

body.woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row {
  position: relative;
  padding: 12px 0;
}

body.woocommerce-cart table.wc-block-cart-items .wc-block-cart-item__image,
body.woocommerce-cart table.wc-block-cart-items .wc-block-cart-item__product,
body.woocommerce-cart table.wc-block-cart-items .wc-block-cart-item__total {
  box-sizing: border-box;
  min-width: 0;
}

/* Thumbnail stays compact at left. */
body.woocommerce-cart table.wc-block-cart-items .wc-block-cart-item__image {
  display: block;
  float: left;
  width: 72px;
  padding: 0 12px 0 0;
}

/* Product content consumes the remaining width. */
body.woocommerce-cart table.wc-block-cart-items .wc-block-cart-item__product {
  display: block;
  width: auto;
  min-height: 72px;
  margin-left: 72px;
  padding: 0;
}

body.woocommerce-cart table.wc-block-cart-items .wc-block-components-product-name,
body.woocommerce-cart table.wc-block-cart-items .wc-block-cart-item__product {
  overflow-wrap: anywhere;
}

/* Line total stays inside the viewport instead of forming a third column. */
body.woocommerce-cart table.wc-block-cart-items .wc-block-cart-item__total {
  display: block;
  width: auto;
  margin: 4px 0 0 72px;
  padding: 0;
  text-align: right;
}



/* Clear the floated thumbnail before the next item. */
body.woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row::after {
  content: "";
  display: table;
  clear: both;
}
body.woocommerce-cart
.wc-block-components-totals-footer-item
.wc-block-components-totals-item__label {
  font-size: 1rem;
  line-height: 1.3;
}

body.woocommerce-cart
.wc-block-components-totals-footer-item
.wc-block-components-totals-item__value {
  font-size: 1.05rem;
  line-height: 1.3;
}
}
