/* Il testo completo rimane nella card; il modal lo mostra a richiesta. */
body.post-type-archive-product .tia-shop-product-modal__content > p[data-modal-description] {
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 3 !important;
  overflow: hidden !important;
}

body.post-type-archive-product .tia-shop-product-modal.is-description-expanded .tia-shop-product-modal__content > p[data-modal-description] {
  display: block !important;
  -webkit-line-clamp: unset !important;
  overflow: visible !important;
}

body.post-type-archive-product .tia-shop-product-modal__description-toggle {
  display: inline-block;
  margin: 6px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #a74931;
  font: 700 13px/1.35 Inter, Arial, sans-serif;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

body.post-type-archive-product .tia-shop-product-modal__description-toggle[hidden] {
  display: none !important;
}

body.post-type-archive-product .tia-shop-product-modal__description-toggle:focus-visible {
  outline: 2px solid #cf5a3b;
  outline-offset: 3px;
}

@media (max-width: 767px) {
  body.post-type-archive-product .tia-shop-product-modal__content > p[data-modal-description] {
    -webkit-line-clamp: 2 !important;
  }

  body.post-type-archive-product .tia-shop-product-modal.is-description-expanded .tia-shop-product-modal__panel {
    height: calc(100dvh - 20px) !important;
    max-height: calc(100dvh - 20px) !important;
    grid-template-rows: clamp(118px, 22dvh, 170px) minmax(0, 1fr) !important;
    overflow: hidden !important;
  }

  body.post-type-archive-product .tia-shop-product-modal.is-description-expanded .tia-shop-product-modal__content {
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
  }

  body.post-type-archive-product .tia-shop-product-modal.is-description-expanded .tia-shop-product-modal__content > p[data-modal-description] {
    flex: 0 0 auto;
  }

  body.post-type-archive-product .tia-shop-product-modal.is-description-expanded .tia-shop-product-modal__add {
    position: sticky !important;
    bottom: 0;
    z-index: 2;
    flex: 0 0 auto;
    margin-top: auto !important;
  }

  body.post-type-archive-product .tia-shop-product-modal__description-toggle {
    font-size: 12px;
  }
}
