/* ============================================================
   Каталог анализов /analyzes/ для bhclinik.ru
   Палитра: акцент #dedd21, оливковый #6a7e44, тёмный текст #1a1f1c
   ============================================================ */

:root {
  --bh-accent:    #dedd21;
  --bh-olive:     #6a7e44;
  --bh-dark:      #1a1f1c;
  --bh-muted:     #6b7065;
  --bh-line:      #e2e7df;
  --bh-bg-soft:   #f6f7f3;
  --bh-row-hover: #fafbf5;
  --bh-add:       #bcbe01;
  --bh-add-hover: #a3a601;
}

/* ----------- INDEX: 13 категорий ----------- */
.analyzes-index {
  margin: 2rem 0 3rem;
}
.analyzes-index__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.analyzes-index__card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.5rem 1.25rem;
  background: #fff;
  border: 1px solid var(--bh-line);
  border-radius: 14px;
  text-decoration: none;
  color: var(--bh-dark);
  position: relative;
  overflow: hidden;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.analyzes-index__card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, #dedd21, #bcbe01);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .25s;
}
.analyzes-index__card:hover {
  border-color: var(--bh-accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(37, 47, 40, 0.08);
}
.analyzes-index__card:hover::before {
  transform: scaleY(1);
}
.analyzes-index__title {
  font-family: "Roboto Condensed", "Inter", system-ui, sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--bh-dark);
  line-height: 1.25;
}
.analyzes-index__count {
  font-size: 0.85rem;
  color: var(--bh-muted);
  margin-bottom: 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.analyzes-index__count::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--bh-add);
}
.analyzes-index__price {
  font-family: "Roboto Condensed", "Inter", system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--bh-olive);
  margin-bottom: 0.85rem;
}
.analyzes-index__desc {
  font-size: 0.85rem;
  color: var(--bh-muted);
  line-height: 1.45;
  flex-grow: 1;
  margin-bottom: 0.85rem;
}
.analyzes-index__card::after {
  content: '→';
  position: absolute;
  right: 1.25rem; bottom: 1rem;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bh-bg-soft);
  color: var(--bh-olive);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: background .2s, color .2s, transform .2s;
}
.analyzes-index__card:hover::after {
  background: var(--bh-accent);
  color: var(--bh-dark);
  transform: translateX(3px);
}

/* ----------- CATEGORY: страница категории ----------- */
.analyzes-cat {
  margin: 1.5rem 0 2.5rem;
}

/* Hero-блок: лид + 3 статы в виде карточек */
.analyzes-cat__intro {
  background: linear-gradient(135deg, #fbfcf7 0%, #f0f3e8 100%);
  border: 1px solid #e6ebd9;
  border-radius: 16px;
  padding: 1.85rem 2rem;
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
}
.analyzes-cat__intro::after {
  content: '';
  position: absolute;
  right: -60px; top: -60px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(222,221,33,0.20) 0%, transparent 70%);
  pointer-events: none;
}
.analyzes-cat__lead {
  font-size: 1.05rem;
  color: #1f2922;
  margin: 0 0 1.25rem;
  line-height: 1.55;
  position: relative;
  max-width: 65ch;
}
.analyzes-cat__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.85rem;
  position: relative;
}
.analyzes-cat__stat {
  background: #fff;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  color: var(--bh-muted);
  border-left: 3px solid var(--bh-accent);
  box-shadow: 0 2px 8px rgba(37, 47, 40, 0.04);
}
.analyzes-cat__stat b {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--bh-dark);
  margin-bottom: 0.1rem;
  font-family: "Roboto Condensed", "Inter", system-ui, sans-serif;
}

/* Подкатегория: каждая в своей карточке */
.analyzes-sub {
  margin-bottom: 1.5rem;
  background: #fff;
  border: 1px solid var(--bh-line);
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow .2s;
}
.analyzes-sub:hover {
  box-shadow: 0 4px 18px rgba(37, 47, 40, 0.05);
}
.analyzes-sub__title {
  font-family: "Roboto Condensed", "Inter", system-ui, sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
  padding: 1rem 1.5rem;
  background: #f0f3e8;
  color: var(--bh-dark);
  position: relative;
  padding-left: 2rem;
  border-bottom: 2px solid var(--bh-accent);
}
.analyzes-sub__title::before {
  content: '';
  position: absolute;
  left: 1rem; top: 50%;
  transform: translateY(-50%);
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #bcbe01;
  box-shadow: 0 0 0 4px rgba(188, 190, 1, 0.22);
}
.analyzes-sub__items {
  display: flex;
  flex-direction: column;
  padding: 0 1.5rem;
}

.analyzes-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 90px 110px 40px;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 0.5rem;
  margin: 0 -0.5rem;
  border-radius: 8px;
  border-bottom: 1px solid var(--bh-line);
  transition: background .15s, transform .15s;
}
.analyzes-row:last-child {
  border-bottom: none;
}
.analyzes-row:hover {
  background: var(--bh-row-hover);
  transform: translateX(2px);
}
.analyzes-row__name {
  font-size: 0.95rem;
  color: var(--bh-dark);
  line-height: 1.4;
  font-weight: 500;
}
.analyzes-row__bio {
  font-size: 0.78rem;
  color: var(--bh-muted);
  line-height: 1.3;
}
.analyzes-row__days {
  font-size: 0.85rem;
  color: var(--bh-olive);
  text-align: center;
  font-weight: 500;
  background: #f0f3e8;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
}
.analyzes-row__price {
  font-family: "Roboto Condensed", "Inter", system-ui, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--bh-dark);
  text-align: right;
  white-space: nowrap;
}
.analyzes-row__add {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bh-add);
  color: #fff;
  border: none;
  cursor: pointer;
  line-height: 1;
  font-weight: 400;
  font-size: 0;
  position: relative;
  box-shadow: 0 2px 8px rgba(188, 190, 1, 0.35);
  transition: background .15s, transform .15s, box-shadow .15s;
}
.analyzes-row__add::before {
  content: '+';
  font-size: 1.4rem;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.analyzes-row__add:hover {
  background: var(--bh-add-hover);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(188, 190, 1, 0.5);
}
.analyzes-row__add.is-added {
  background: var(--bh-olive);
}
.analyzes-row__add.is-added::before {
  content: '✓';
  font-size: 1.05rem;
  font-weight: 700;
}

/* Collection-секция: забор биоматериала */
.analyzes-collection {
  margin-top: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #fffce4 0%, #f6f7f3 100%);
  border: 1px solid #e6ebd9;
  border-radius: 14px;
}
.analyzes-collection__title {
  font-family: "Roboto Condensed", "Inter", system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
  color: var(--bh-dark);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.analyzes-collection__title::before {
  content: '💉';
  font-size: 1.2rem;
}
.analyzes-collection__note {
  font-size: 0.9rem;
  color: var(--bh-muted);
  margin: 0 0 1rem;
}
.analyzes-row--collection {
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--bh-line);
  margin-bottom: 0.5rem;
  padding: 0.85rem 1rem !important;
}
.analyzes-row--collection .analyzes-row__name {
  font-weight: 600;
  color: var(--bh-dark);
}

/* ----------- SEARCH ----------- */
.analyzes-search {
  position: relative;
  margin-bottom: 2rem;
}
.analyzes-search__input {
  width: 100%;
  padding: .85rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--bh-line);
  border-radius: 10px;
  background: #fff;
  color: var(--bh-dark);
  outline: none;
  transition: border-color .15s;
}
.analyzes-search__input:focus {
  border-color: var(--bh-accent);
}
.analyzes-search__results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 480px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--bh-line);
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  z-index: 10;
  display: none;
}
.analyzes-search__results.is-open {
  display: block;
}
.analyzes-search__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 40px;
  gap: .75rem;
  align-items: center;
  padding: .65rem 1rem;
  border-bottom: 1px solid var(--bh-line);
  font-size: .9rem;
}
.analyzes-search__item:last-child {
  border-bottom: none;
}
.analyzes-search__item-name {
  color: var(--bh-dark);
}
.analyzes-search__item-cat {
  font-size: .75rem;
  color: var(--bh-olive);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-top: .15rem;
}
.analyzes-search__item-price {
  font-weight: 600;
  text-align: right;
  color: var(--bh-dark);
}
.analyzes-search__item-add {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bh-add);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}
.analyzes-search__empty {
  padding: 1rem;
  text-align: center;
  color: var(--bh-muted);
  font-size: .9rem;
}

/* ----------- CART (мини-бар + модалка) ----------- */
.analyzes-cart-bar {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%) translateY(150%);
  background: var(--bh-dark);
  color: #fff;
  padding: 1rem 1.5rem;
  border-radius: 14px;
  box-shadow: 0 6px 24px rgba(0,0,0,.2);
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 100;
  transition: transform .25s ease;
  font-size: .95rem;
  max-width: calc(100vw - 2rem);
}
.analyzes-cart-bar.is-open {
  transform: translateX(-50%) translateY(0);
}
.analyzes-cart-bar__count {
  font-weight: 600;
}
.analyzes-cart-bar__sum {
  color: var(--bh-accent);
  font-weight: 700;
  white-space: nowrap;
}
.analyzes-cart-bar__btn {
  padding: .55rem 1rem;
  background: var(--bh-accent);
  color: var(--bh-dark);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: .9rem;
  transition: background .15s;
}
.analyzes-cart-bar__btn:hover {
  background: #c9c810;
}

/* Модалка */
.analyzes-cart-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}
.analyzes-cart-modal.is-open {
  display: flex;
}
.analyzes-cart-modal__inner {
  background: #fff;
  border-radius: 14px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
  position: relative;
}
.analyzes-cart-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 1.6rem;
  color: var(--bh-muted);
  cursor: pointer;
  line-height: 1;
}
.analyzes-cart-modal__title {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--bh-dark);
}
.analyzes-cart-list {
  margin-bottom: 1rem;
  border-top: 1px solid var(--bh-line);
}
.analyzes-cart-list__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 28px;
  gap: .75rem;
  align-items: center;
  padding: .65rem 0;
  border-bottom: 1px solid var(--bh-line);
  font-size: .9rem;
}
.analyzes-cart-list__price {
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}
.analyzes-cart-list__remove {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: var(--bh-muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}
.analyzes-cart-list__remove:hover {
  color: #d33;
}
.analyzes-cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--bh-dark);
}
.analyzes-cart-form label {
  display: block;
  font-size: .85rem;
  color: var(--bh-muted);
  margin: .65rem 0 .25rem;
}
.analyzes-cart-form input,
.analyzes-cart-form textarea {
  width: 100%;
  padding: .65rem .85rem;
  border: 1px solid var(--bh-line);
  border-radius: 8px;
  font-size: .95rem;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
}
.analyzes-cart-form input:focus,
.analyzes-cart-form textarea:focus {
  border-color: var(--bh-accent);
}
.analyzes-cart-form__submit {
  width: 100%;
  padding: .85rem 1rem;
  margin-top: 1rem;
  background: var(--bh-accent);
  color: var(--bh-dark);
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.analyzes-cart-form__submit:hover {
  background: #c9c810;
}
.analyzes-cart-form__hint {
  font-size: .8rem;
  color: var(--bh-muted);
  margin-top: .5rem;
  line-height: 1.4;
}
.analyzes-cart-form__success {
  text-align: center;
  padding: 2rem 0;
  color: var(--bh-olive);
}
.analyzes-cart-form__success h3 {
  font-size: 1.3rem;
  margin: 0 0 .5rem;
  color: var(--bh-dark);
}

/* ----------- Mobile ----------- */
@media (max-width: 720px) {
  .analyzes-row {
    grid-template-columns: minmax(0, 1fr) 90px 40px;
    grid-template-areas:
      "name name add"
      "bio  price add";
    gap: .35rem .75rem;
  }
  .analyzes-row__name { grid-area: name; }
  .analyzes-row__bio  { grid-area: bio; font-size: .75rem; }
  .analyzes-row__days { display: none; }
  .analyzes-row__price { grid-area: price; }
  .analyzes-row__add  { grid-area: add; align-self: center; }

  .analyzes-cat__stats {
    flex-direction: column;
    gap: .65rem;
  }
}
