/* TavrizCo visual identity for WooCommerce Cart + Checkout
   WPVibe draft-only. Palette taken from the live homepage global styles.
   Scoped strictly to WooCommerce cart and checkout pages. */
body:is(.woocommerce-cart,.woocommerce-checkout,.page-id-8,.page-id-9) {
  --tv-ink: #142b3c;
  --tv-navy: #102b3e;
  --tv-amber: #efb64a;
  --tv-paper: #f7f6f2;
  --tv-teal: #146b65;
  --tv-muted: #566571;
  --tv-line: #dce2e5;
  color: var(--tv-ink) !important;
  background: var(--tv-paper) !important;
  font-family: Tahoma, sans-serif !important;
}
body:is(.woocommerce-cart,.woocommerce-checkout,.page-id-8,.page-id-9) .wp-site-blocks {
  background: var(--tv-paper);
}
body:is(.woocommerce-cart,.woocommerce-checkout,.page-id-8,.page-id-9) .wp-site-blocks > main {
  padding-block: clamp(18px, 3vw, 34px) 48px !important;
  margin-top: 0 !important;
}
body:is(.woocommerce-cart,.woocommerce-checkout,.page-id-8,.page-id-9) :is(h1,h2,h3,h4,.wp-block-post-title) {
  color: var(--tv-ink) !important;
  font-family: Tahoma, sans-serif !important;
  line-height: 1.65 !important;
}
body:is(.woocommerce-cart,.woocommerce-checkout,.page-id-8,.page-id-9) :is(a,.wc-block-components-product-name) {
  color: var(--tv-teal);
}
body:is(.woocommerce-cart,.woocommerce-checkout,.page-id-8,.page-id-9) :is(input,select,textarea,button) {
  font-family: Tahoma, sans-serif;
}
body:is(.woocommerce-cart,.woocommerce-checkout,.page-id-8,.page-id-9) :is(button,input,select,textarea,a):focus-visible {
  outline: 3px solid #ae6912 !important;
  outline-offset: 3px;
}
/* Brand treatment across Cart and Checkout */
body:is(.woocommerce-cart,.page-id-8) .wp-block-woocommerce-cart.alignwide,
body:is(.woocommerce-checkout,.page-id-9) .wp-block-woocommerce-checkout.alignwide {
  box-sizing: border-box;
  width: min(1180px,calc(100% - 32px)) !important;
  max-width: 1180px !important;
  margin-inline: auto !important;
}
body:is(.woocommerce-cart,.page-id-8) .wc-block-cart-items__row {
  border-color: var(--tv-line) !important;
}
body:is(.woocommerce-cart,.page-id-8) .wc-block-cart-items__row .wc-block-components-product-name {
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
body:is(.woocommerce-cart,.page-id-8) .wc-block-cart-item__image img {
  border-radius: 10px !important;
  background: #fff;
}
body:is(.woocommerce-cart,.page-id-8) .wc-block-cart-items__row .wc-block-components-product-metadata__description {
  color: var(--tv-muted) !important;
}
body:is(.woocommerce-cart,.woocommerce-checkout,.page-id-8,.page-id-9) :is(.wc-block-components-product-price,.wc-block-components-totals-item__value,.wc-block-cart-item__total-price-and-sale-badge-wrapper) {
  color: var(--tv-ink) !important;
  font-weight: 700 !important;
}
body:is(.woocommerce-cart,.woocommerce-checkout,.page-id-8,.page-id-9) :is(.wc-block-components-order-summary,.wc-block-cart__sidebar .wc-block-components-totals-wrapper,.wc-block-checkout__sidebar .wc-block-components-totals-wrapper) {
  border-color: var(--tv-line) !important;
}
/* Coupon, qty, and secondary actions */
body:is(.woocommerce-cart,.woocommerce-checkout,.page-id-8,.page-id-9) .wc-block-components-quantity-selector {
  border: 1px solid var(--tv-line) !important;
  background: #fff !important;
  border-radius: 9px !important;
  overflow: hidden;
}
body:is(.woocommerce-cart,.woocommerce-checkout,.page-id-8,.page-id-9) .wc-block-components-quantity-selector :is(button,input) {
  min-height: 40px;
  color: var(--tv-ink) !important;
}
body:is(.woocommerce-cart,.woocommerce-checkout,.page-id-8,.page-id-9) :is(.wc-block-components-panel__button,.wc-block-components-totals-coupon__button) {
  color: var(--tv-teal) !important;
}
body:is(.woocommerce-cart,.woocommerce-checkout,.page-id-8,.page-id-9) :is(.wc-block-cart__submit-button,.wc-block-components-checkout-place-order-button,.wc-block-components-button.contained) {
  background: var(--tv-amber) !important;
  border: 1px solid var(--tv-amber) !important;
  color: var(--tv-navy) !important;
  border-radius: 9px !important;
  font-size: 15px !important;
  line-height: 1.5 !important;
  font-weight: 700 !important;
  min-height: 52px !important;
  box-shadow: none !important;
}
body:is(.woocommerce-cart,.woocommerce-checkout,.page-id-8,.page-id-9) :is(.wc-block-cart__submit-button,.wc-block-components-checkout-place-order-button,.wc-block-components-button.contained):hover {
  background: #f6c66e !important;
  border-color: #f6c66e !important;
}
/* Checkout inputs + panels */
body:is(.woocommerce-checkout,.page-id-9) :is(.wc-block-components-text-input input,.wc-block-components-combobox-control input,.wc-block-components-select .wc-block-components-select__select,.wc-block-components-textarea) {
  border: 1px solid var(--tv-line) !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: var(--tv-ink) !important;
  box-shadow: none !important;
  font-size: 14px !important;
  max-width: 100% !important;
}
body:is(.woocommerce-checkout,.page-id-9) :is(.wc-block-components-text-input input,.wc-block-components-combobox-control input,.wc-block-components-select .wc-block-components-select__select) {
  height: 53px !important;
  min-height: 53px !important;
}
body:is(.woocommerce-checkout,.page-id-9) :is(.wc-block-components-text-input,.wc-block-components-combobox,.wc-block-components-select) {
  margin-bottom: 12px !important;
}
body:is(.woocommerce-checkout,.page-id-9) :is(.wc-block-components-text-input label,.wc-block-components-combobox-control label,.wc-block-components-select .wc-block-components-select__label) {
  color: var(--tv-muted) !important;
  font-size: 12px !important;
}
body:is(.woocommerce-checkout,.page-id-9) :is(.wc-block-components-checkout-step__heading,.wc-block-components-checkout-step__title) {
  color: var(--tv-ink) !important;
  font-size: 19px !important;
  font-weight: 700 !important;
}
body:is(.woocommerce-checkout,.page-id-9) :is(.wc-block-components-checkbox__input,.wc-block-components-radio-control__input) {
  accent-color: var(--tv-teal) !important;
}
body:is(.woocommerce-checkout,.page-id-9) .wc-block-components-checkout-step {
  border-color: var(--tv-line) !important;
}
/* Phone-sized layout: calm warm paper + white product/order cards. */
@media (max-width: 767px) {
  body:is(.woocommerce-cart,.woocommerce-checkout,.page-id-8,.page-id-9) .wp-site-blocks > main {
    padding-top: 12px !important;
    padding-bottom: 25px !important;
  }
  body:is(.woocommerce-cart,.page-id-8) .wc-block-cart-items__row {
    background: #fff !important;
    border: 1px solid var(--tv-line) !important;
    border-radius: 12px !important;
    box-shadow: 0 6px 20px rgba(20,43,60,.035) !important;
    outline: 0 !important;
  }
  body:is(.woocommerce-cart,.page-id-8) .wc-block-cart-item__image img {
    background: #fff;
  }
  body:is(.woocommerce-cart,.page-id-8) .wc-block-cart-item__product .wc-block-components-product-name {
    font-size: 14px !important;
    line-height: 1.75 !important;
    font-weight: 700 !important;
  }
  body:is(.woocommerce-cart,.page-id-8) .wc-block-cart-item__product .wc-block-components-product-metadata__description {
    font-size: 12px !important;
  }
  body:is(.woocommerce-cart,.page-id-8) .wc-block-cart-items__row > .wc-block-cart-item__total {
    border-top: 1px solid var(--tv-line) !important;
  }
  body:is(.woocommerce-checkout,.page-id-9) .wc-block-components-checkout-step {
    padding: 15px 14px !important;
    margin-bottom: 12px !important;
    border: 1px solid var(--tv-line) !important;
    border-radius: 12px !important;
    background: #fff !important;
  }
  body:is(.woocommerce-checkout,.page-id-9) :is(.wc-block-components-checkout-step__heading,.wc-block-components-checkout-step__title) {
    font-size: 17px !important;
  }
  body:is(.woocommerce-checkout,.page-id-9) :is(.wc-block-components-text-input input,.wc-block-components-combobox-control input,.wc-block-components-select .wc-block-components-select__select) {
    height: 50px !important;
    min-height: 50px !important;
  }
  body:is(.woocommerce-checkout,.page-id-9) .wc-block-components-checkout-step__container {
    margin-top: 12px !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  body:is(.woocommerce-cart,.woocommerce-checkout,.page-id-8,.page-id-9) *,
  body:is(.woocommerce-cart,.woocommerce-checkout,.page-id-8,.page-id-9) *::before,
  body:is(.woocommerce-cart,.woocommerce-checkout,.page-id-8,.page-id-9) *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* Mobile checkout order summary: full-width description instead of squeezed text.
   Only layout/typography changes; WooCommerce totals and calculations are unchanged. */
@media (max-width: 767px) {
  body:is(.woocommerce-checkout,.page-id-9) .wc-block-checkout__sidebar,
  body:is(.woocommerce-checkout,.page-id-9) .wc-block-components-order-summary,
  body:is(.woocommerce-checkout,.page-id-9) .wc-block-components-order-summary__content,
  body:is(.woocommerce-checkout,.page-id-9) .wc-block-components-order-summary__content .wc-block-components-order-summary-item {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  body:is(.woocommerce-checkout,.page-id-9) .wc-block-components-order-summary-item {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas: "image" "description" "total" !important;
    gap: 10px !important;
    padding: 14px 10px !important;
    align-items: start !important;
    text-align: right !important;
    direction: rtl !important;
  }
  body:is(.woocommerce-checkout,.page-id-9) .wc-block-components-order-summary-item__image {
    grid-area: image !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    display: block !important;
    width: min(180px, 100%) !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    margin: 0 auto !important;
    position: relative !important;
  }
  body:is(.woocommerce-checkout,.page-id-9) .wc-block-components-order-summary-item__image img {
    display: block !important;
    width: 100% !important;
    max-width: 180px !important;
    height: auto !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    margin-inline: auto !important;
  }
  body:is(.woocommerce-checkout,.page-id-9) .wc-block-components-order-summary-item__description {
    grid-area: description !important;
    grid-column: 1 !important;
    grid-row: 2 !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    text-align: right !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    writing-mode: horizontal-tb !important;
  }
  body:is(.woocommerce-checkout,.page-id-9) .wc-block-components-order-summary-item__description :is(.wc-block-components-product-name,.wc-block-components-product-price,.wc-block-components-product-metadata,.wc-block-components-product-metadata__description,p) {
    display: block !important;
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
    writing-mode: horizontal-tb !important;
  }
  body:is(.woocommerce-checkout,.page-id-9) .wc-block-components-order-summary-item__description .wc-block-components-product-name {
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.8 !important;
  }
  body:is(.woocommerce-checkout,.page-id-9) .wc-block-components-order-summary-item__description .wc-block-components-product-metadata__description {
    color: var(--tv-muted) !important;
    font-size: 12px !important;
    line-height: 1.85 !important;
    max-height: none !important;
    overflow: visible !important;
    margin: 6px 0 !important;
  }
  body:is(.woocommerce-checkout,.page-id-9) .wc-block-components-order-summary-item__total-price {
    grid-area: total !important;
    grid-column: 1 !important;
    grid-row: 3 !important;
    display: block !important;
    justify-self: stretch !important;
    width: 100% !important;
    border-top: 1px solid var(--tv-line) !important;
    padding-top: 10px !important;
    text-align: left !important;
    font-size: 15px !important;
  }
  body:is(.woocommerce-checkout,.page-id-9) .wc-block-components-order-summary-item__quantity {
    background: var(--tv-navy) !important;
    color: #fff !important;
  }
}
