/* R4P Suite v2 visual integration and storefront legibility fixes. */

/* Checkout progress: keep all three states readable on dark and light themes. */
.progress-bar {
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
}

.progress-step {
  color: var(--c-text-secondary);
  font-size: max(var(--text-small), .82rem);
  font-weight: 700;
}

.progress-step.completed {
  color: var(--c-text-primary);
}

.cart-page-section .progress-bar {
  margin-bottom: 2rem;
}

.cart-page-section .page-title-forge {
  margin: 0 0 1.75rem;
}

/* Cart hierarchy and contrast. */
.woocommerce-cart-form__contents thead th,
.wc-cart-wrapper table.shop_table thead th {
  color: var(--c-text-primary) !important;
  font-size: .78rem !important;
  font-weight: 800 !important;
}

.woocommerce-cart-form__contents th.product-thumbnail,
.woocommerce-cart-form__contents td.product-thumbnail {
  max-width: 112px !important;
  min-width: 112px !important;
  width: 112px !important;
}

.woocommerce-cart-form__contents td.product-thumbnail {
  padding-left: 10px !important;
  padding-right: 10px !important;
}

.woocommerce-cart-form__contents td.product-thumbnail a {
  display: block;
}

.woocommerce-cart-form__contents td.product-thumbnail img {
  height: 84px !important;
  max-width: none !important;
  object-fit: contain;
  width: 84px !important;
}

.woocommerce-cart-form__contents td.product-name a {
  color: var(--c-text-primary) !important;
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  line-height: 1.35;
}

.cart-qty-control {
  align-items: center;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  display: inline-flex;
  overflow: hidden;
}

.woocommerce-cart .cart-qty-control .quantity {
  display: inline-grid !important;
  grid-template-columns: 38px 48px 38px;
  margin: 0 !important;
}

.woocommerce-cart .cart-qty-control .minus,
.woocommerce-cart .cart-qty-control .plus {
  align-items: center;
  appearance: none;
  background: var(--c-surface-2) !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--c-brand) !important;
  cursor: pointer;
  display: flex !important;
  font-size: 1.15rem !important;
  font-weight: 900;
  height: 40px;
  justify-content: center;
  margin: 0 !important;
  min-height: 40px;
  padding: 0 !important;
  width: 38px;
  text-decoration: none !important;
}

.woocommerce-cart .cart-qty-control .minus:hover,
.woocommerce-cart .cart-qty-control .minus:focus-visible,
.woocommerce-cart .cart-qty-control .plus:hover,
.woocommerce-cart .cart-qty-control .plus:focus-visible {
  background: var(--c-brand) !important;
  color: #111 !important;
  outline: none !important;
}

.woocommerce-cart .cart-qty-control input.qty {
  border: 0 !important;
  border-left: 1px solid var(--c-border) !important;
  border-radius: 0 !important;
  border-right: 1px solid var(--c-border) !important;
  box-shadow: none !important;
  height: 40px !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: center;
  width: 48px !important;
}

.woocommerce-cart-form__contents .cart-footer-cell {
  display: table-cell !important;
  padding: 0 !important;
  width: 100% !important;
}

.woocommerce-cart-form__contents .cart-footer-cell::before {
  content: none !important;
  display: none !important;
}

.cart-footer-content {
  align-items: center;
  box-sizing: border-box;
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  padding: 1.1rem 1.25rem 1.25rem;
  width: 100%;
}

.cart-footer-content .cart-footer-actions {
  order: 1;
}

.cart-footer-content .cart-footer-total {
  margin-left: auto;
  order: 2;
  text-align: right;
}

/* Compact footer: same content, less unused vertical space. */
.site-footer {
  margin-top: 3rem;
}

.site-footer .footer-inner {
  gap: 2rem;
  padding-bottom: 1.75rem;
  padding-top: 2.25rem;
}

.site-footer .footer-brand {
  gap: .7rem;
}

.site-footer .footer-tagline {
  line-height: 1.45;
  margin: 0;
}

.site-footer .footer-cols {
  gap: 1.15rem;
}

.site-footer .footer-col-title {
  margin-bottom: .7rem;
}

.site-footer .footer-col ul {
  gap: .32rem;
}

.site-footer .footer-col address {
  line-height: 1.55;
  margin-bottom: .65rem;
}

.site-footer .footer-col address p {
  margin: 0 0 .2rem;
}

.site-footer .footer-bar {
  padding: .65rem 0;
}

@media (max-width: 700px) {
  .woocommerce-cart-form__contents tr.cart_item td::before {
    color: var(--c-text-primary) !important;
    font-weight: 800 !important;
  }

  .cart-footer-content {
    align-items: stretch;
    flex-direction: column;
  }

  .cart-footer-content .cart-footer-total {
    margin-left: 0;
    order: -1;
    text-align: left;
  }

  .woocommerce-cart-form__contents td.product-thumbnail img {
    height: 76px !important;
    width: 76px !important;
  }

  .site-footer .footer-inner {
    gap: 1.5rem;
    padding: 2rem 1rem 1.5rem;
  }
}
