/* Shared medical tests catalogue, cart and details styles. */
:is(.tamc-tests, .tamc-order, .tamc-modal, .tamc-details-modal),
:is(.tamc-tests, .tamc-order, .tamc-modal, .tamc-details-modal) *,
:is(.tamc-tests, .tamc-order, .tamc-modal, .tamc-details-modal) *::before,
:is(.tamc-tests, .tamc-order, .tamc-modal, .tamc-details-modal) *::after { box-sizing: border-box; }
:is(.tamc-tests, .tamc-order, .tamc-modal, .tamc-details-modal) { font-family: var(--tamc-font-text); color: #001b4d; }
:is(.tamc-tests, .tamc-order, .tamc-modal, .tamc-details-modal) [hidden] { display: none !important; }
.tamc-medtests-error { padding: 12px; color: #9e2222; background: #fff0f0; border-radius: 8px; font-size: 16px; grid-column: 1 / -1; }
.tamc-order input, .tamc-order textarea { min-width: 0; }
.tamc-order__item-left { min-width: 0; overflow-wrap: anywhere; }
.tamc-test-card__meta { flex-wrap: wrap; }
body.tamc-medtests-modal-open { overflow: hidden; }
body.order-tests .tamc-category-services { background: #eef2f5; }
body.order-tests .tamc-category-services__inner { width: min(1300px, calc(100% - 30px)); }
.tamc-tests button:focus-visible, .tamc-order :is(button, a, input, textarea):focus-visible { outline: 2px solid #3580cb; outline-offset: 3px; }
.tamc-tests button:disabled, .tamc-order button:disabled { opacity: .6; cursor: wait; }
.tamc-tests {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 16px;
    background: #fff;
    padding: 20px;
    border-radius: 20px;
}

.tamc-tests__cats {
  /*padding: 10px 12px;*/
}

.tamc-tests__list {
  min-width: 0;
}

.tamc-tests__cats-title { font-weight: 700; margin-bottom: 10px; }

.tamc-tests__cat {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #001b4d;
  text-decoration: none;
  border: 1px solid transparent;
  margin: 4px 0;
}

.tamc-tests__cat.is-active {
  border-color: #3580CB;
  /*background: #eef6ff;*/
  color: #3580CB;
  font-weight: 600;
}

.tamc-tests .tamc-tests__cat:is(:hover, :focus-visible) {
  color: #3580cb;
  border-color: #3580cb;
  background: #eef6ff;
}

.tamc-test-card .tamc-test-card__title:is(:hover, :focus-visible),
.tamc-order__item a:not(.tamc-order__remove):is(:hover, :focus-visible) {
  color: #3580cb;
}

/* ====== Card ====== */
.tamc-test-card {
  background: #eef6ff;
  border: 1px solid #3580CB;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  width: 100%;
}

.tamc-test-card__title {
  display: block;
  font-weight: 700;
  color: #001b4d;
  text-decoration: none;
  margin-bottom: 8px;
}

.tamc-test-card__desc { color: #4b5563; margin-bottom: 12px; }
.tamc-test-card__desc p { margin: 0; }

.tamc-test-card__meta {
  display: flex;
  gap: 14px;
  color: #001b4d;
  margin-bottom: 12px;
  align-items: center;
}

.tamc-test-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tamc-test-card__meta span::before {
  content: "";
  width: 18px;
  height: 18px;
  display: inline-block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.95;
}

/* Code icon */
.tamc-test-card__meta span:first-child::before {
  background-image: url("../../assets/svg/medical-tests/number.circle.svg");
}

/* Result icon */
.tamc-test-card__meta span:last-child::before {
  background-image: url("../../assets/svg/medical-tests/clock.svg");
}

.tamc-test-card__bottom { display: flex; align-items: center; justify-content: space-between; }

.tamc-test-card__price {
  font-weight: 700;
  color: #3580CB;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

/* ====== Add button + icons ====== */
.tamc-add {
  border: 1px solid #3580CB;
  background: #3580CB;
  color: #fff;
  border-radius: 5px;
  padding: 2px 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px !important;
  font-weight: 700;
}

.tamc-add::before {
  content: "";
  width: 18px;
  height: 18px;
  display: inline-block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  filter: brightness(0) invert(1); /* робить svg білим, якщо він темний */
  background-image: url("../../assets/svg/medical-tests/cart.svg");
}

.tamc-add.is-added {
  background: #fff;
  color: #3580CB;
}

.tamc-add.is-added::before {
  filter: none;
  background-image: url("../../assets/svg/medical-tests/checkmark.shield.svg");
}

/* Keep theme button states within the medical tests palette. */
.tamc-add:not(:disabled):is(:hover, :focus-visible),
.tamc-order__btn:not(:disabled):is(:hover, :focus-visible),
.tamc-mobile-order-btn:is(:hover, :focus-visible),
.tamc-mobile-cart:is(:hover, :focus-visible) {
  background-color: #2866a3;
  border-color: #2866a3;
  color: #fff;
}

.tamc-add.is-added:not(:disabled):is(:hover, :focus-visible) {
  background-color: #eef6ff;
  border-color: #3580cb;
  color: #3580cb;
}

.tamc-acc__head:is(:hover, :focus-visible),
.tamc-test-card__toggle:is(:hover, :focus-visible),
.tamc-tests__search-clear:is(:hover, :focus-visible) {
  background-color: #e0edfc;
  color: #2866a3;
}

/* ====== Your Order block ====== */
.tamc-order {
  background: #fff;
  border: 1px solid #e6edf5;
  border-radius: 18px;
  padding: 22px;
}

.tamc-order__title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  margin-bottom: 14px;
}

.tamc-order__title::before {
  content: "";
  width: 26px;
  height: 26px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  filter: none;
  background-image: url("../../assets/svg/medical-tests/order.svg");
}

.tamc-order__items { margin-bottom: 10px; }

.tamc-order__item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #eef2f7;
}

.tamc-order__item a { text-decoration: none; color: #001b4d; font-weight: 600; }

.tamc-order__item-right {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.tamc-order__price { color: #3580cb; font-weight: 700; white-space: nowrap; }

.tamc-order__remove {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #9aa3af;
  border: 1px solid transparent;
  font-size: 22px;
  line-height: 1;
}

.tamc-order__remove:hover {
  border-color: #e6edf5;
  background: #f6f8fb;
  color: #6b7280;
}

.tamc-order__subtotal {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 14px 0 18px;
  font-weight: 700;
}

.tamc-order__subtotal strong { font-size: 28px; }

/* ====== Form as tiles ====== */
.tamc-order__form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.tamc-order__form input,
.tamc-order__form textarea {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 14px 10px;
  background: #eef6ff;
  outline: none;
}

.tamc-order__form textarea {
  grid-column: 1 / -1;
  min-height: 120px;
  resize: vertical;
  padding-top: 16px;
  background-position: 16px 18px;
}

/* icons inside fields */
.tamc-order__form input,
.tamc-order__form textarea {
  background-repeat: no-repeat;
  background-size: 20px 20px;
  background-position: 95% center;
}

/* Confirm button */
.tamc-order__btn {
  grid-column: 1 / -1;
  width: 100%;
  border: 0;
  border-radius: 4px;
  padding: 16px 18px;
  background: #3580cb;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  margin-top: 8px;
  font-size: 20px;
}

/* ====== Typography (requested) ====== */
.tamc-tests__cats-title,
.tamc-order__title,
.tamc-test-card__title { font-size: 20px; line-height: 1.25; }

.tamc-tests__cat,
.tamc-test-card__desc *,
.tamc-test-card__meta *,
.tamc-order,
.tamc-order__item,
.tamc-order__subtotal,
.tamc-order__form input,
.tamc-order__form textarea {
  font-size: 16px !important;
  line-height: 1.4 !important;
}


/* ====== Loading / responsive ====== */
:is(.tamc-tests, .tamc-order, .tamc-test-card, .tamc-single) .is-loading,
.tamc-order.is-loading { opacity: .7; pointer-events: none; }

body.order-tests #wrapper {
  background: #eef2f5;
}

body.order-tests #new-services-category-wrapper {
  max-width: 1300px;
  margin: 0 auto;
}


body.order-tests #new-services-category-wrapper .services-category-content {
    margin: unset;
}

.tamc-tests__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 6px 4px 14px;
}

.tamc-tests__header-title{
  font-size: 20px;
  font-weight: 500;
  color:#1f2a37;
}

.tamc-tests__header-count{
  font-size: 14px;
  color:#6b7280;
  font-weight: 500;
}

.tamc-tests__list-inner{
  min-width: 0;
}




@media (max-width: 900px) {
  .tamc-tests { grid-template-columns: 1fr; }
  .tamc-order__form { grid-template-columns: 1fr; }
}

/* ---------------- Mobile layout ---------------- */
@media (max-width: 900px) {
  /* hide desktop blocks */
  .tamc-tests__cats--desktop,
  .tamc-tests__list--desktop {
    display: none !important;
  }

  /* show accordion */
  .tamc-acc--mobile {
    display: block !important;
    width: 100%;
  }
  .tamc-acc__count span {
    display: none;
  }
  .tamc-test-card__price * {
    font-size: 19px !important;
  }
}

/* Desktop: hide accordion */
.tamc-acc--mobile { display: none; }

/* Accordion */
.tamc-acc__title{
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  color:#1f2a37;
}

.tamc-acc__item{
  background:#fff;
  border:1px solid #e6edf5;
  border-radius: 12px;
  margin-bottom: 10px;
  overflow:hidden;
}

.tamc-acc__head{
  width:100%;
  display:flex;
  align-items:center;
  gap:10px;
  padding: 12px 14px;
  background: #fff;
  border:0;
  cursor:pointer;
  text-align:left;
}

.tamc-acc__name{
  font-size: 16px;
  font-weight: 600;
  color:#1f2a37;
  flex: 1 1 auto;
}

.tamc-acc__count{
  font-size: 13px;
  color:#6b7280;
  white-space: nowrap;
}

.tamc-acc__chev{
  width: 20px;
  height: 20px;
  display:inline-block;
  position:relative;
  color: #3580cb;
  margin-bottom: 10px;
}
.tamc-acc__chev::before{
  content:"";
  position:absolute;
  inset:0;
  margin:auto;
  width:10px;
  height:10px;
  border-right:2px solid #3580cb;
  border-bottom:2px solid #3580cb;
  transform: rotate(45deg);
  top:3px;
}
.tamc-acc__item.is-open .tamc-acc__chev::before{
  transform: rotate(-135deg);
  top:6px;
}

.tamc-acc__body{
  display:none;
  padding: 0 12px 12px;
}

@media (max-width: 900px) {
  .tamc-tests__header{
    padding: 10px 4px 10px;
  }
  .tamc-test-card{
    margin-bottom: 10px;
  }
  .tamc-tests__header {
      display: none;
  }
}

.tamc-mobile-order-btn {
    width: 100%;
    border: 0;
    border-radius: 12px;
    padding: 12px 14px;
    background: #3580cb;
    color: #fff;
    font-weight: 700;
    margin: 10px 0 0;
    max-width: 280px;
    display: flex;
    justify-content: center;
    justify-self: center;
}

.tamc-mobile-cart{
  display:none;
}

@media (max-width: 900px){
  .tamc-mobile-cart{
    display:flex;
    align-items:center;
    justify-content:center;
    position: fixed;
    right: 18px;
    bottom: 88px;
    width: 54px;
    height: 54px;
    border-radius: 999px;
    border: 0;
    background: #3580CB;
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
    z-index: 9999;

    background-image: url("../../assets/svg/medical-tests/cart.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 26px 26px;
  }

  .tamc-mobile-cart__badge{
    position:absolute;
    top:-6px;
    right:-6px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background:#fff;
    color:#3580CB;
    font-size: 12px;
    font-weight: 800;
    display:flex;
    align-items:center;
    justify-content:center;
    border: 2px solid #3580CB;
  }

  .tamc-mobile-cart:not(.has-items) .tamc-mobile-cart__badge{
    display:none;
  }
}

/* Modal */
.tamc-modal{
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
}

.tamc-modal.is-open{
  display:block;
}

.tamc-modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  pointer-events: auto;
}

.tamc-modal__panel{
  position: relative;
  inset: 0;
  z-index: 10001;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 24px 15px;
  height: 100%;
}

.tamc-modal__content{
  width: min(420px, 92vw);
  max-height: 100%;
  overflow-y: auto;
}
body.tamc-modal-open {
  overflow: hidden;
}
.tamc-modal__close{
  position:absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 0;
  background:#fff;
  font-size: 26px;
  line-height: 1;
  cursor:pointer;
  z-index: 10002;
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
}

/* Explicit dimensions and colour prevent inherited theme padding/white text. */
.tamc-modal .tamc-modal__close,
.tamc-details-modal .tamc-details-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #001b4d;
  font-size: 28px;
  line-height: 1;
}

.tamc-modal .tamc-modal__close:is(:hover, :focus-visible),
.tamc-details-modal .tamc-details-modal__close:is(:hover, :focus-visible) {
  background: #eef6ff;
  color: #3580cb;
}

:is(.tamc-modal, .tamc-details-modal) button:focus-visible {
  outline: 2px solid #3580cb;
  outline-offset: 2px;
}

body.tamc-modal-open{
  overflow:hidden;
}
@media (max-width: 900px){
  .vc_col-sm-4 .tamc-order { display:none !important; }
  .tamc-tests {
      padding: 0;
      border-radius: 0;
      background: transparent;
  }
  .tamc-acc__item {
      border-radius: 0;
  }
  .tamc-add {
      padding: 4px 10px;
  }
  .tamc-acc__item.is-open .tamc-acc__name {
      color: #3580cb;
  }
  .order-tests .new-services-category-sub-title {
      padding: 20px;
  }
  .order-tests #service-ac-get-services {
      padding: 20px;
  }
  .tamc-order {
      max-height: 80vh;
      overflow-y: auto;
    }
}
.tamc-test-card__top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.tamc-test-card__toggle{
  flex:0 0 auto;
  border:0;
  background:transparent;
  padding:0 6px;
  border-radius:8px;
  cursor:pointer;
  color: #3580cb;
}

.tamc-test-card__chev{
  display:inline-block;
  width:10px;
  height:10px;
  border-right:2px solid currentColor;
  border-bottom:2px solid currentColor;
  transform:rotate(45deg);
  transition:transform .2s ease;
  opacity:.8;
}

.tamc-test-card.is-details-open .tamc-test-card__chev{
  transform:rotate(-135deg);
}

.tamc-test-card__details{
  margin-top:10px;
}

/* loader */
.tamc-test-details__loader{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px;
  border-radius:12px;
  background:rgba(0,0,0,.03);
}
.tamc-test-details p,
.tamc-test-details span {
    font-size: 16px !important;
    line-height: 1.4 !important;
}

.tamc-spinner{
  width:16px;
  height:16px;
  border-radius:50%;
  border:2px solid rgba(0,0,0,.2);
  border-top-color: rgba(0,0,0,.6);
  animation: tamcSpin .8s linear infinite;
}

@keyframes tamcSpin{ to { transform: rotate(360deg);} }

.tamc-test-details--error{ padding:10px; }
.tamc-test-details--empty{ padding:10px; opacity:.7; }


.tamc-single { padding: 24px 0; }
.tamc-single__grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
}

.tamc-single__card {
  background: #fff;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 12px 28px rgba(0,0,0,.06);
}

.tamc-single__top {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}

.tamc-single__back {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: none;
  color: #3580cb;
}

.tamc-single__title {
  margin: 2px 0 8px;
  font-size: 22px;
  line-height: 1.2;
}

.tamc-single__short { margin: 0 0 10px; color: #5b6777; }
.tamc-single__meta { display: flex; gap: 14px; color: #6b7280; font-size: 14px; }

.tamc-single__buy {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.tamc-single__price { font-weight: 600; font-size: 18px; }

.tamc-single__content {
  margin-top: 8px;
}

@media (max-width: 980px) {
  .tamc-single__grid {
    grid-template-columns: 1fr;
  }
  .tamc-single__right {
    order: 2;
  }
}

body.single-product .page-title,
body.single-product .woocommerce-products-header__title,
body.single-product .woocommerce-breadcrumb {
  display: none !important;
}

.tamc-page-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 16px 20px;
  text-align: center;
}

.tamc-page-header__title {
  margin: 0;
  font-size: 44px;
  line-height: 1.1;
  font-weight: 700;
  color: #001b4d;
}

body.single-product #wrapper,
body.single-product .site-content {
  background: #eef2f5;
}

.tamc-single { padding: 12px 0 30px; }

.tamc-single__card {
  border: 1px solid #e6edf5;
  box-shadow: 0 12px 28px rgba(0,0,0,.06);
}

.tamc-single__back {
  position: relative;
  font-size: 0;
}

.tamc-single__title {
  font-size: 26px;
  font-weight: 700;
  color: #001b4d;
  margin: 0 0 6px;
}

.tamc-single__short * {
  font-size: 16px;
  line-height: 1.5;
  color: #6b7280;
  margin: 0 0 10px;
}

.tamc-single__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin: 0;
}
.tamc-single__meta span,
.tamc-single__meta a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #6b7280;
  font-size: 14px;
}

.tamc-single__meta span::before {
  content: "";
  width: 18px;
  height: 18px;
  display: inline-block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: .95;
}

.tamc-single__meta span:nth-child(1)::before {
  background-image: url("../../assets/svg/medical-tests/number.circle.svg");
}
.tamc-single__meta span:nth-child(2)::before {
  background-image: url("../../assets/svg/medical-tests/clock.svg");
}

.tamc-single__buy {
  align-items: flex-end;
  gap: 10px;
}

.tamc-single__price {
  font-size: 20px;
  font-weight: 600;
  color: #3580cb;
}

.tamc-single__buy .tamc-add {
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 18px !important;
}

.tamc-single__content p,
.tamc-single__content li,
.tamc-single__content span {
  font-size: 16px !important;
  line-height: 1.55 !important;
  color: #001b4d;
}

.tamc-single__content h2,
.tamc-single__content h3 {
  margin: 18px 0 10px;
  font-weight: 700;
  color: #001b4d;
}

@media (max-width: 900px) {
  .tamc-page-header__title {
    font-size: 32px;
  }
  .tamc-single__top {
    grid-template-columns: 40px 1fr;
    grid-auto-rows: auto;
  }
  .tamc-single__buy {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
  }
}

.tamc-single__back::before{
  content:"";
  width: 10px;
  height: 10px;
  display:block;
  border-left: 3px solid #3580cb;
  border-bottom: 3px solid #3580cb;
  transform: rotate(45deg);
  margin-left: 2px;
  opacity: .9;
}

html[dir="rtl"] .tamc-single__back::before,
body.rtl .tamc-single__back::before {
  transform: rotate(-135deg);
  margin-left: 0;
  margin-right: 2px;
}

.tamc-single__top{
  display: grid !important;
  grid-template-columns: 56px 1fr !important;  /* back + content */
  grid-auto-rows: auto;
  gap: 12px 16px !important;
  align-items: start;
}

.tamc-single__title{
  grid-column: 2;
  grid-row: 1;
  margin: 0 0 6px !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tamc-single__short{
  grid-column: 2;
  grid-row: 2;
  margin: 0 0 10px !important;
  color:#6b7280;
}

.tamc-single__meta{
  grid-column: 2;
  grid-row: 3;
  display:flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items:center;
  margin: 0 !important;
}

.tamc-single__buy{
    display: flex;
    align-items: center;
    gap: 14px;
    flex-direction: row;
}

.tamc-single__buy,
.tamc-single__meta{
  width: auto;
}

.tamc-single__top{
  position: relative;
}
.tamc-single__buy{
  justify-self: start;
}
.tamc-single__meta{
  justify-self: end;
}



.tamc-single__buy .tamc-add{
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 22px !important;
}

.tamc-single__meta span{
  display:inline-flex;
  align-items:center;
  gap:10px;
}
.tamc-single__meta span::before{
  content:"";
  width:18px;
  height:18px;
  display:inline-block;
  background-repeat:no-repeat;
  background-position:center;
  background-size:contain;
  opacity:.95;
}

.tamc-single__meta span:nth-child(1)::before{
  background-image: url("../../assets/svg/medical-tests/number.circle.svg");
}
.tamc-single__meta span:nth-child(2)::before{
  background-image: url("../../assets/svg/medical-tests/clock.svg");
}
.tamc-single__row1 {
    display: flex;
    align-items: center;
}
.tamc-single__row3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 980px){
  .tamc-single__top{
    grid-template-columns: 48px 1fr !important;
  }
  .tamc-single__title{
    white-space: normal;
    font-size: 30px;
  }
  .tamc-single__buy,
  .tamc-single__meta{
    grid-column: 2;
    grid-row: 3;
    justify-self: stretch;
  }
  .tamc-single__buy{
    justify-content: space-between;
    width: 100%;
  }
  .tamc-single__meta{
    justify-content: flex-start;
    margin-top: 10px !important;
    grid-row: 4; /* meta under buy on mobile */
  }
}

.single-product .blog-header {
    display: none;
}

body.tamc-details-open {
  overflow: hidden;
}

.tamc-details-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
}

.tamc-details-modal.is-open {
  display: block;
}

.tamc-details-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(2px);
}
/* Панель модалки НЕ inline */
.tamc-details-modal__panel{
  position: relative;
  display: flex;            /* ключове */
  margin: 0 auto;
  top: 50%;
  transform: translateY(-50%);
  flex-direction: column;
  width: min(1000px, calc(100vw - 30px));
  max-height: 90vh;
  overflow: hidden;         /* щоб fade не вилазив */
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,.25);
}

/* Кнопка закриття */
.tamc-details-modal__close{
  position: sticky;
  top: 0;
  align-self: flex-end;
  margin: 12px;
  margin-block-end: 0;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
}

/* ОЦЕ СКРОЛ-КОНТЕЙНЕР */
.tamc-details-modal__content{
  padding: 12px 20px 20px;
  overflow-y: scroll;       /* завжди видно скрол */
  overflow-x: hidden;
  flex: 1 1 auto;
  -webkit-overflow-scrolling: touch;
}

/* Firefox */
.tamc-details-modal__content{
  scrollbar-width: auto;
  scrollbar-color: #3580cb90 #eff7ff;
}

/* Chrome / Edge / Safari */
.tamc-details-modal__content::-webkit-scrollbar{
  width: 14px;
}

.tamc-details-modal__content::-webkit-scrollbar-track{
  background: #eff7ff;
  border-radius: 14px;
}

.tamc-details-modal__content::-webkit-scrollbar-thumb{
  background: #3580cb;
  border-radius: 14px;
  border: 4px solid #eff7ff;
}

.tamc-details-modal__content::-webkit-scrollbar-thumb:hover{
  background: #2d6fae;
}
.tamc-details-modal__content {
  clear: both;
}

.tamc-details-modal .tamc-test-details {
  margin: 0;
  padding-bottom: 50px;
}
@media (max-width: 980px){
.tamc-details-modal__panel::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 2;
}
.tamc-details-modal__panel::after{
  bottom: 0;
  height: 100px;
  background: linear-gradient(to top, #fff 25%, rgba(255,255,255,0));
}
}
/* ===== Search inside left column ===== */

.tamc-tests__search {
  margin-bottom: 16px;
}

.tamc-tests__search-field {
  position: relative;
  width: 100%;
}

.tamc-tests__search-input {
  width: 100%;
  height: 48px;
  padding: 0 44px 0 16px;
  border: 1px solid #3580CB;
  border-radius: 12px;
  outline: none;
  font-size: 16px;
  line-height: 1.2;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.tamc-tests__search-input:focus {
  border-color: #999;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.tamc-tests__search-input::placeholder {
  color: #999;
}

.tamc-tests__search-clear {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 22px;
  line-height: 24px;
  color: #777;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tamc-tests__search-clear:hover {
  color: #111;
}

/* results живуть всередині правої колонки */
.tamc-tests__list--desktop {
  min-width: 0;
}

.tamc-tests__search-results {
  width: 100%;
  display: none;
}

.tamc-tests__search-results.is-active {
  display: block;
}

.tamc-tests__search-results .tamc-tests__header {
  margin-bottom: 20px;
}

.tamc-tests__search-results .tamc-tests__list-inner {
  width: 100%;
}

.tamc-tests__search-loader,
.tamc-tests__search-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 14px;
  background: #eef6ff;
  border: 1px solid #3580CB;
  color: #001b4d;
  margin-bottom: 12px;
}

.tamc-tests__search-loader-text {
  font-size: 16px;
  line-height: 1.4;
}


@media (max-width: 900px) {
  .tamc-tests__search--mobile {
    display: block;
    margin-bottom: 12px;
  }

  .tamc-tests__cats--desktop,
  .tamc-tests__list--desktop {
    display: none !important;
  }

  .tamc-acc--mobile {
    display: block !important;
  }

  .tamc-acc__item--search {
    display: none;
  }

  .tamc-acc__item--search:not([hidden]) {
    display: block;
  }

  .tamc-acc__item--search.is-open .tamc-acc__chev::before {
    transform: rotate(-135deg);
    top: 6px;
  }

  .tamc-acc__item--search .tamc-acc__body {
    padding: 0 12px 12px;
  }

  .tamc-acc__item--search .tamc-test-card {
    margin-bottom: 10px;
  }
  .tamc-tests__search-field {
    padding: 0 10px;
  }
}
.tamc-tests__search-field {
  position: relative;
}

.tamc-tests__suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 100;
  background: #fff;
  border: 1px solid #d9e4f2;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.tamc-tests__suggestion {
  width: 100%;
  border: 0;
  background: #fff;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  text-align: start;
}

.tamc-tests__suggestion:hover {
  background: #eef6ff;
}

.tamc-tests__suggestion-title {
  font-size: 12px !important;
  line-height: 1.2 !important;
  color: #001b4d;
  font-weight: 400;
}

.tamc-tests__suggestion-code {
  display: none;
}

.tamc-cards-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 16px;
  font-size: 15px;
  color: #2d6f9f;
}

.tamc-cards-loader__spinner {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(45, 111, 159, 0.2);
  border-top-color: #2d6f9f;
  border-radius: 50%;
  animation: tamcSpin 0.8s linear infinite;
}

@keyframes tamcSpin {
  to {
    transform: rotate(360deg);
  }
}

/* Direction follows the page, including forms supplied by LTR Woo templates. */
[dir="rtl"] .tamc-acc__head,
[dir="rtl"] .tamc-tests__suggestion { text-align: right; }
[dir="rtl"] .tamc-tests__search-input { padding: 0 16px 0 44px; }
[dir="rtl"] .tamc-tests__search-clear { right: auto; left: 12px; }
[dir="rtl"] .tamc-order__form :is(input, textarea) { text-align: right; }
.tamc-order__form :is(input[type="email"], input[type="tel"]) { direction: ltr; }
@media (prefers-reduced-motion: reduce) {
  .tamc-spinner, .tamc-cards-loader__spinner { animation: none; }
  .tamc-test-card__chev, .tamc-tests__search-input { transition: none; }
}
