/* Journi treatment for the stateful WooCommerce pages. */
:root {
  --journi-commerce-cream: #faf7f5;
  --journi-commerce-chocolate: #4b2918;
  --journi-commerce-ink: #080808;
  --journi-commerce-green: #163b02;
  --journi-commerce-muted: #757170;
  --journi-commerce-line: rgb(75 41 24 / 18%);
}

body.woocommerce-cart,
body.woocommerce-checkout,
body.woocommerce-account,
body.single-product {
  background: var(--journi-commerce-cream);
  color: var(--journi-commerce-ink);
}

.woocommerce-cart > .site-container,
.woocommerce-checkout > .site-container,
.woocommerce-account > .site-container {
  min-height: 70vh;
}

.woocommerce-cart .woocommerce,
.woocommerce-checkout .woocommerce,
.woocommerce-account .woocommerce {
  color: var(--journi-commerce-ink);
  font-family: 'Inter', sans-serif;
}

.woocommerce-cart h1,
.woocommerce-checkout h1,
.woocommerce-account h1,
.woocommerce .cart_totals h2 {
  color: var(--journi-commerce-ink);
  font-family: 'Manrope', sans-serif;
  font-weight: 300;
  letter-spacing: -0.025em;
}

.woocommerce-cart h1 {
  color: var(--journi-commerce-green);
}

.woocommerce-cart h1,
.woocommerce-checkout h1,
.woocommerce-account h1 {
  font-size: clamp(2.25rem, 4vw, 3.625rem);
  line-height: 1.08;
}

.woocommerce table.shop_table {
  overflow: hidden;
  border: 1px solid var(--journi-commerce-line);
  border-radius: 2rem;
  background: rgb(255 255 255 / 28%);
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
  border-color: var(--journi-commerce-line);
  padding: 1.25rem;
  color: var(--journi-commerce-ink);
}

.woocommerce table.shop_table th {
  font-weight: 500;
}

.woocommerce table.shop_table .product-thumbnail img {
  width: 6rem;
  border-radius: 1rem;
}

.woocommerce table.shop_table .product-name a {
  color: var(--journi-commerce-ink);
  font-size: 1rem;
}

.woocommerce a.remove {
  color: var(--journi-commerce-chocolate) !important;
}

.woocommerce a.remove:hover {
  background: var(--journi-commerce-chocolate);
  color: #fff !important;
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  border: 1px solid var(--journi-commerce-line);
  border-top-width: 1px;
  border-radius: 1.5rem;
  background: #f2e9e4;
  color: var(--journi-commerce-ink);
}

.woocommerce-message::before,
.woocommerce-info::before {
  color: var(--journi-commerce-chocolate);
}

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 3rem;
  border-radius: 1rem;
  background: var(--journi-commerce-chocolate);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.25;
  transition: background 300ms ease, color 300ms ease, transform 300ms ease;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover {
  background: #000;
  color: #fff;
  transform: translateY(-1px);
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
  display: flex;
  min-height: 4rem;
  padding: 0.75rem 2rem;
  background: var(--journi-commerce-chocolate);
  font-size: 1.25rem;
  font-weight: 400;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button::after {
  content: '→';
  font-size: 1.25em;
  line-height: 1;
}

.woocommerce-cart .woocommerce-message .button {
  padding-inline: 1.5rem;
}

.woocommerce-cart .cart_totals {
  color: var(--journi-commerce-ink);
}

.woocommerce-cart .cart_totals h2 {
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
}

.woocommerce .quantity .qty,
.woocommerce-cart table.cart td.actions .coupon .input-text {
  border: 1px solid var(--journi-commerce-line);
  border-radius: 9999px;
  background: #fff;
  color: var(--journi-commerce-ink);
}

.woocommerce-cart table.cart td.actions .coupon .input-text {
  width: 11rem;
  min-height: 3rem;
  padding: 0.75rem 1rem;
}

.woocommerce-cart table.cart td.actions .coupon .input-text::placeholder {
  color: var(--journi-commerce-muted);
}

.woocommerce button.button:disabled,
.woocommerce button.button:disabled[disabled] {
  background: #c9b9b0;
  color: #fff;
  opacity: 1;
}

/* WooCommerce Cart Block: mirror the live two-column layout, but use the
   chocolate button treatment from the landing-page CTAs. */
.woocommerce-cart .wp-block-woocommerce-cart {
  color: var(--journi-commerce-green);
}

.woocommerce-cart .wc-block-cart-items,
.woocommerce-cart .wc-block-cart__totals-title,
.woocommerce-cart .wc-block-components-totals-wrapper {
  border-color: rgb(22 59 2 / 22%);
}

.woocommerce-cart .wc-block-cart-item__image img {
  width: 5rem;
  border-radius: 0.75rem;
}

.woocommerce-cart .wc-block-components-product-name,
.woocommerce-cart .wc-block-components-product-price,
.woocommerce-cart .wc-block-cart-item__total,
.woocommerce-cart .wc-block-components-totals-item__label,
.woocommerce-cart .wc-block-components-totals-item__value,
.woocommerce-cart .wc-block-components-shipping-rates-control__package-title {
  color: var(--journi-commerce-green);
}

.woocommerce-cart .wc-block-components-product-name {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
}

.woocommerce-cart .wc-block-cart__submit-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 4rem;
  border-radius: 1rem;
  background: var(--journi-commerce-chocolate);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.25;
  transition: background 300ms ease, transform 300ms ease;
}

.woocommerce-cart .wc-block-cart__submit-button::after {
  content: '→';
  font-size: 1.25em;
  line-height: 1;
}

.woocommerce-cart .wc-block-cart__submit-button:hover {
  background: #000;
  color: #fff;
  transform: translateY(-1px);
}

.woocommerce-cart .wc-block-components-totals-coupon__form input {
  border-color: var(--journi-commerce-line);
  border-radius: 1rem;
  background: #fff;
}

.woocommerce-cart .wc-block-components-totals-coupon__button {
  border-radius: 1rem;
  background: var(--journi-commerce-chocolate);
  color: #fff;
}

/* Product detail page. The purchase area uses the same warm surfaces and
   rounded cards as the landing page, while remaining fully WooCommerce-backed. */
.single-product .site-container.pt-36 {
  padding-top: calc(var(--journi-header-clearance) + 4rem);
}

.single-product .product > .site-container,
.single-product .site-container.pt-36 {
  max-width: 81.5rem;
}

.single-product section[id^='product-buy-box-'] {
  margin-bottom: 2rem;
  border-radius: 3.125rem;
}

.single-product section[id^='product-buy-box-'] product-buy-box {
  max-width: 70rem;
  gap: clamp(2rem, 5vw, 5rem);
}

.single-product section[id^='product-buy-box-'] product-buy-box > div:first-child {
  min-height: 34rem;
  overflow: hidden;
  border-radius: 2rem;
  background: #d6b18c;
}

.single-product section[id^='product-buy-box-'] product-buy-box > div:first-child > div {
  inset: 0;
  height: 100%;
  max-height: none;
  aspect-ratio: auto !important;
}

.single-product section[id^='product-buy-box-'] product-buy-box > div:last-child {
  align-self: center;
  padding-block: 1rem;
}

.single-product section[id^='product-buy-box-'] h2 {
  max-width: 34rem;
  color: var(--journi-commerce-ink);
  font-size: clamp(2.5rem, 4.5vw, 4.5rem);
  letter-spacing: -0.045em;
}

.single-product section[id^='product-buy-box-'] [role='radiogroup'] label {
  border: 1px solid rgb(75 41 24 / 12%);
  box-shadow: none;
  transition: border-color 200ms ease, background 200ms ease, transform 200ms ease;
}

.single-product section[id^='product-buy-box-'] [role='radiogroup'] label:has(input:checked) {
  border-color: var(--journi-commerce-chocolate);
  background: #fffaf7;
  transform: translateY(-1px);
}

.single-product section[id^='product-buy-box-'] [data-buy-cta] {
  min-height: 4rem;
  padding-inline: 2rem;
  border-radius: 1rem;
  font-size: 1.25rem;
}

.single-product section[id^='product-buy-box-'] [data-buy-feedback]:empty {
  display: none;
}

.single-product .woocommerce-tabs {
  margin-top: 1rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid rgb(75 41 24 / 10%);
  border-radius: 2rem;
  background: rgb(255 255 255 / 38%);
}

.single-product .woocommerce-tabs ul.tabs {
  margin-bottom: 2rem;
}

.single-product .woocommerce-tabs .panel {
  max-width: 52rem;
  color: var(--journi-commerce-ink);
  font-size: 1rem;
  line-height: 1.65;
}

@media (max-width: 1023px) {
  .single-product section[id^='product-buy-box-'] {
    border-radius: 2rem;
    padding: 1.5rem;
  }

  .single-product section[id^='product-buy-box-'] product-buy-box > div:first-child {
    min-height: 28rem;
  }
}

@media (max-width: 768px) {
  .woocommerce table.shop_table_responsive tr td,
  .woocommerce-page table.shop_table_responsive tr td {
    padding: 0.75rem 1rem;
  }

  .woocommerce-cart table.cart td.actions .coupon {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
  }

  .woocommerce-cart table.cart td.actions .coupon .input-text {
    width: 100%;
  }
}
