/* Product-page refinements. Desktop continues to use the captured styles. */
@media (max-width: 767px) {
  @font-face {
    font-family: "XIMU Product Sans";
    src: url("../assets/xtfurn.com/cf-fonts/v/inter/5.2.8/latin/wght/normal.woff2") format("woff2");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
  }

  body.single-xt_product.xt-rebuild {
    background: #f8f6f1 !important;
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important;
  }

  body.single-xt_product.xt-rebuild .b2b-custom-wrapper {
    padding-top: 0 !important;
    background: #f8f6f1 !important;
  }

  body.single-xt_product.xt-rebuild .b2b-elementor-widget,
  body.single-xt_product.xt-rebuild .b2b-elementor-widget :is(button, input, select, textarea) {
    font-family: "XIMU Product Sans", Arial, sans-serif !important;
  }

  body.single-xt_product.xt-rebuild .xtr-product-detail {
    padding-left: max(24px, env(safe-area-inset-left, 0px)) !important;
    padding-right: max(24px, env(safe-area-inset-right, 0px)) !important;
    color: #26342c !important;
  }

  body.single-xt_product.xt-rebuild .xtr-product-detail .woocommerce-breadcrumb {
    gap: 4px !important;
    margin-bottom: 18px !important;
    font-size: 11px !important;
    line-height: 1.5 !important;
  }

  body.single-xt_product.xt-rebuild .xtr-product-detail .woocommerce-breadcrumb a::after {
    margin-left: 5px !important;
  }

  body.single-xt_product.xt-rebuild .xtr-product-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 24px !important;
    margin-bottom: 32px !important;
  }

  body.single-xt_product.xt-rebuild .xtr-product-gallery {
    position: relative !important;
    top: auto !important;
    min-width: 0 !important;
  }

  body.single-xt_product.xt-rebuild #b2b-main-img-container {
    aspect-ratio: 3 / 2 !important;
    border-radius: 8px !important;
    background: #f1f1ec !important;
    box-shadow: none !important;
  }

  body.single-xt_product.xt-rebuild #b2b-main-img-container > #b2b-main-image {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
  }

  body.single-xt_product.xt-rebuild #b2b-main-prev,
  body.single-xt_product.xt-rebuild #b2b-main-next {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    color: #26342c !important;
    background: rgba(255, 255, 255, 0.94) !important;
    box-shadow: 0 1px 5px rgba(38, 52, 44, 0.1) !important;
    transform: translateY(-50%) !important;
  }

  body.single-xt_product.xt-rebuild #b2b-main-prev {
    left: 8px !important;
  }

  body.single-xt_product.xt-rebuild #b2b-main-next {
    right: 8px !important;
  }

  body.single-xt_product.xt-rebuild #b2b-main-prev svg,
  body.single-xt_product.xt-rebuild #b2b-main-next svg {
    width: 20px !important;
    height: 20px !important;
  }

  body.single-xt_product.xt-rebuild .xtr-product-gallery > :has(> #thumb-container) {
    margin-top: 12px !important;
  }

  body.single-xt_product.xt-rebuild #thumb-container {
    display: flex !important;
    gap: 9px !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 3px 2px 6px !important;
    overflow-x: auto !important;
    overscroll-behavior-x: contain;
    scroll-padding-inline: 2px;
    scroll-snap-type: x proximity;
  }

  body.single-xt_product.xt-rebuild #thumb-container > .thumb-btn {
    flex: 0 0 72px !important;
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    height: 72px !important;
    min-height: 72px !important;
    aspect-ratio: 1 !important;
    margin: 0 !important;
    padding: 3px !important;
    border-width: 2px !important;
    border-style: solid !important;
    border-radius: 5px !important;
    background: #f1f1ec !important;
    box-shadow: none !important;
    opacity: 1 !important;
    scroll-snap-align: start;
  }

  body.single-xt_product.xt-rebuild #thumb-container > .thumb-btn[aria-current="true"],
  body.single-xt_product.xt-rebuild #thumb-container > .thumb-btn.border-brand {
    border-color: #28684f !important;
  }

  body.single-xt_product.xt-rebuild #thumb-container > .thumb-btn > img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 2px !important;
    object-fit: contain !important;
    opacity: 1 !important;
  }

  body.single-xt_product.xt-rebuild .xtr-product-summary {
    display: flex !important;
    flex-direction: column !important;
    gap: 22px !important;
    min-width: 0 !important;
  }

  body.single-xt_product.xt-rebuild .xtr-product-summary > * {
    order: 4;
    min-width: 0;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  body.single-xt_product.xt-rebuild .xtr-product-summary > .xtr-product-heading {
    order: 0;
  }

  body.single-xt_product.xt-rebuild .xtr-product-summary > .xtr-product-facts {
    order: 1;
  }

  body.single-xt_product.xt-rebuild .xtr-product-summary > .xtr-product-pricing {
    order: 2;
  }

  body.single-xt_product.xt-rebuild .xtr-product-summary > .b2b-short-desc {
    order: 3;
    color: #576158 !important;
    font-size: 16px !important;
    line-height: 1.65 !important;
    overflow-wrap: anywhere;
  }

  body.single-xt_product.xt-rebuild .xtr-product-heading {
    position: relative !important;
    padding: 0 0 16px !important;
    border-bottom: 1px solid #dce0d8 !important;
  }

  body.single-xt_product.xt-rebuild .xtr-product-title-row {
    display: block !important;
    width: 100% !important;
    margin: 0 0 12px !important;
  }

  body.single-xt_product.xt-rebuild .xtr-product-title-row h1 {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    color: #26342c !important;
    font-size: 26px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.025em !important;
    text-overflow: clip !important;
    text-transform: none !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    -webkit-line-clamp: unset !important;
  }

  body.single-xt_product.xt-rebuild .xtr-product-sku-row {
    min-height: 44px !important;
    padding-right: 56px !important;
    gap: 8px !important;
    align-items: center !important;
    color: #60695f !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
  }

  body.single-xt_product.xt-rebuild .xtr-product-sku-row > span {
    max-width: 100%;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #60695f !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  body.single-xt_product.xt-rebuild #b2b-share-btn {
    position: absolute !important;
    right: 0 !important;
    bottom: 16px !important;
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #dce0d8 !important;
    border-radius: 4px !important;
    background: transparent !important;
    color: #28684f !important;
    box-shadow: none !important;
    transform: none !important;
  }

  body.single-xt_product.xt-rebuild .xtr-product-facts {
    padding: 0 0 22px !important;
    border: 0 !important;
    border-bottom: 1px solid #dce0d8 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body.single-xt_product.xt-rebuild .xtr-product-facts-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 18px 20px !important;
  }

  body.single-xt_product.xt-rebuild .xtr-product-fact,
  body.single-xt_product.xt-rebuild .xtr-product-fact-copy {
    display: block !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body.single-xt_product.xt-rebuild .xtr-product-fact-icon {
    display: none !important;
  }

  body.single-xt_product.xt-rebuild .xtr-product-fact-label,
  body.single-xt_product.xt-rebuild .xtr-product-fact-value {
    display: block !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  body.single-xt_product.xt-rebuild .xtr-product-fact-label {
    margin: 0 0 4px !important;
    color: #60695f !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
  }

  body.single-xt_product.xt-rebuild .xtr-product-fact-value {
    margin: 0 !important;
    color: #26342c !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
  }

  body.single-xt_product.xt-rebuild .xtr-product-pricing > h3 {
    margin: 0 0 10px !important;
    color: #60695f !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
  }

  body.single-xt_product.xt-rebuild .xtr-product-tiers {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-top: 1px solid #dce0d8 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body.single-xt_product.xt-rebuild .xtr-product-tier {
    position: relative !important;
    display: flex !important;
    flex: none !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px 8px !important;
    min-width: 0 !important;
    min-height: 52px !important;
    padding: 12px 0 !important;
    border-bottom: 1px solid #dce0d8 !important;
    border-radius: 0 !important;
    background: transparent !important;
    text-align: left !important;
    box-shadow: none !important;
    transform: none !important;
  }

  body.single-xt_product.xt-rebuild .xtr-product-tier-quantity {
    order: 1;
    margin: 0 !important;
    color: #576158 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 1.45 !important;
    letter-spacing: 0 !important;
    white-space: normal !important;
  }

  body.single-xt_product.xt-rebuild .xtr-product-tier-amount {
    order: 3;
    margin: 0 0 0 auto !important;
    color: #26342c !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    font-variant-numeric: tabular-nums;
    line-height: 1.2 !important;
    overflow-wrap: anywhere;
  }

  body.single-xt_product.xt-rebuild .xtr-product-tier-badge {
    position: static !important;
    order: 2;
    display: inline-flex !important;
    flex: 0 0 auto;
    align-items: center;
    min-height: 20px;
    margin: 0 !important;
    padding: 3px 5px !important;
    border: 0 !important;
    border-radius: 2px !important;
    background: #e7eee6 !important;
    color: #28684f !important;
    font-size: 9px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    letter-spacing: 0.025em !important;
    white-space: nowrap !important;
    box-shadow: none !important;
    transform: none !important;
  }

  body.single-xt_product.xt-rebuild .xtr-product-shipping {
    align-items: flex-start !important;
    gap: 7px !important;
    margin-top: 12px !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #60695f !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    white-space: normal !important;
    box-shadow: none !important;
    transform: none !important;
  }

  body.single-xt_product.xt-rebuild .xtr-product-shipping > span {
    min-width: 0;
    line-height: inherit !important;
    overflow-wrap: anywhere;
  }

  body.single-xt_product.xt-rebuild #b2b-quote-trigger,
  body.single-xt_product.xt-rebuild #b2b-mobile-quote-btn {
    min-height: 48px !important;
    border: 1px solid #28684f !important;
    border-radius: 4px !important;
    background: #28684f !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    box-shadow: none !important;
  }

  body.single-xt_product.xt-rebuild #b2b-mobile-sticky-cta {
    padding: 12px max(16px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)) !important;
    border-top: 1px solid #dce0d8 !important;
    background: #f8f6f1 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  body.single-xt_product.xt-rebuild #b2b-mobile-sticky-cta a[href^="https://wa.me/"] {
    flex: 0 0 48px;
    width: 48px !important;
    min-width: 48px !important;
    height: 48px !important;
    padding: 0 !important;
    border-radius: 4px !important;
    box-shadow: none !important;
  }

  body.single-xt_product.xt-rebuild #b2b-quote-wrapper {
    padding: 16px max(12px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)) !important;
  }

  body.single-xt_product.xt-rebuild #b2b-quote-wrapper > div {
    padding: 52px 20px 24px !important;
    border-radius: 8px !important;
  }

  body.single-xt_product.xt-rebuild #b2b-quote-close {
    top: 8px !important;
    right: 8px !important;
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
  }

  body.single-xt_product.xt-rebuild #b2b-quote-modal input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  body.single-xt_product.xt-rebuild #b2b-quote-modal select,
  body.single-xt_product.xt-rebuild #b2b-quote-modal textarea {
    min-height: 44px !important;
    max-width: 100% !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
  }

  body.single-xt_product.xt-rebuild #b2b-quote-modal textarea {
    min-height: 112px !important;
  }

  body.single-xt_product.xt-rebuild .xtr-product-detail :is(button, a, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid #28684f !important;
    outline-offset: 3px !important;
  }

  body.single-xt_product.xt-rebuild #b2b-main-img-container:focus-visible {
    outline-offset: -3px !important;
  }

  body.single-xt_product.xt-rebuild #xtm-drawer:not(.xtm-open) {
    visibility: hidden !important;
    pointer-events: none !important;
    box-shadow: none !important;
  }

  body.single-xt_product.xt-rebuild #xtm-prod-mobile {
    height: 68px !important;
  }

  body.single-xt_product.xt-rebuild #xtm-prod-mobile .xtm-header-shell {
    background: #f8f6f1 !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  body.single-xt_product.xt-rebuild #xtm-prod-mobile .xtm-header-main {
    height: 68px !important;
    min-height: 68px !important;
    padding-left: max(16px, env(safe-area-inset-left, 0px)) !important;
    padding-right: max(16px, env(safe-area-inset-right, 0px)) !important;
    grid-template-columns: 44px minmax(0, 1fr) 44px !important;
    gap: 0 !important;
  }

  body.single-xt_product.xt-rebuild #xtm-prod-mobile .xtm-logo,
  body.single-xt_product.xt-rebuild #xtm-prod-mobile .xtm-logo img {
    width: 124px !important;
    max-width: 124px !important;
    height: 53px !important;
    max-height: 53px !important;
    object-fit: contain !important;
  }

  body.single-xt_product.xt-rebuild #xtm-prod-mobile .xtm-logo {
    align-items: center !important;
    justify-content: center !important;
  }

  body.single-xt_product.xt-rebuild #xtm-prod-mobile .xtm-menu-toggle {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #26342c !important;
  }

  body.single-xt_product.xt-rebuild #xtm-prod-mobile .xtm-header-actions,
  body.single-xt_product.xt-rebuild #xtm-prod-mobile .xtm-cart-shortcode,
  body.single-xt_product.xt-rebuild #xtm-prod-mobile .xtm-cart-shortcode .xt-header-btn {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  body.single-xt_product.xt-rebuild #xtm-prod-mobile .xtm-cart-shortcode .elementor,
  body.single-xt_product.xt-rebuild #xtm-prod-mobile .xtm-cart-shortcode .e-con,
  body.single-xt_product.xt-rebuild #xtm-prod-mobile .xtm-cart-shortcode .e-con-inner,
  body.single-xt_product.xt-rebuild #xtm-prod-mobile .xtm-cart-shortcode .elementor-widget,
  body.single-xt_product.xt-rebuild #xtm-prod-mobile .xtm-cart-shortcode .elementor-widget-container,
  body.single-xt_product.xt-rebuild #xtm-prod-mobile .xtm-cart-shortcode .elementor-shortcode {
    width: 100% !important;
    max-width: 44px !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 0 !important;
  }

  body.single-xt_product.xt-rebuild #xtm-prod-mobile .xtm-cart-shortcode .xt-header-btn {
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
  }

  body.single-xt_product.xt-rebuild #xtm-prod-mobile .xt-header-icon-wrapper i {
    font-size: 24px !important;
    color: #26342c !important;
  }

  /* Keep the functional quote control, its accessible name and live count. */
  body.single-xt_product.xt-rebuild #xtm-prod-mobile .xt-header-btn .xt-btn-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }
}

@media (max-width: 359px) {
  body.single-xt_product.xt-rebuild .xtr-product-detail {
    padding-left: max(20px, env(safe-area-inset-left, 0px)) !important;
    padding-right: max(20px, env(safe-area-inset-right, 0px)) !important;
  }

  body.single-xt_product.xt-rebuild .xtr-product-title-row h1 {
    font-size: 24px !important;
  }

  body.single-xt_product.xt-rebuild #thumb-container > .thumb-btn {
    flex-basis: 64px !important;
    width: 64px !important;
    min-width: 64px !important;
    max-width: 64px !important;
    height: 64px !important;
    min-height: 64px !important;
  }

  body.single-xt_product.xt-rebuild .xtr-product-facts-grid {
    column-gap: 16px !important;
  }

  body.single-xt_product.xt-rebuild .xtr-product-tier-amount {
    font-size: 19px !important;
  }

  body.single-xt_product.xt-rebuild #xtm-prod-mobile,
  body.single-xt_product.xt-rebuild #xtm-prod-mobile .xtm-header-main {
    height: 64px !important;
    min-height: 64px !important;
  }

  body.single-xt_product.xt-rebuild #xtm-prod-mobile .xtm-header-main {
    padding-left: max(12px, env(safe-area-inset-left, 0px)) !important;
    padding-right: max(12px, env(safe-area-inset-right, 0px)) !important;
  }
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  body.single-xt_product.xt-rebuild .xtr-product-detail *,
  body.single-xt_product.xt-rebuild .xtr-product-detail *::before,
  body.single-xt_product.xt-rebuild .xtr-product-detail *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
