/* open-sans-300 - latin */
@font-face {
  font-display: swap;
  /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 300;
  src: url('../fonts/open-sans-v44-latin-300.woff2') format('woff2');
  /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* open-sans-regular - latin */
@font-face {
  font-display: swap;
  /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/open-sans-v44-latin-regular.woff2') format('woff2');
  /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* open-sans-600 - latin */
@font-face {
  font-display: swap;
  /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 600;
  src: url('../fonts/open-sans-v44-latin-600.woff2') format('woff2');
  /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* open-sans-800 - latin */
@font-face {
  font-display: swap;
  /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 800;
  src: url('../fonts/open-sans-v44-latin-800.woff2') format('woff2');
  /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

:root {
  /* --- Шрифты (без изменений: имена не менял) --- */
  --main-font: 'Open Sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --fw-light: 300;
  --fw-regular: 400;
  --fw-semibold: 600;
  --fw-bold: 800;

  /* --- Размеры (скорректированы под макет) --- */
  --fs-h1: 42px;
  --fs-h2: 28px;
  --fs-h3: 22px;
  --fs-body: 16px;
  --fs-nav: 1rem;
  --20px-rem: 1.25rem;
  --18px-rem: 1.125rem;

  /* --- Цвета Бренда (корректировки для контраста) --- */
  --brand-red: #e23636;
  --brand-red-hover: #c02e2e;
  --brand-star: #ffb300;
  --brand-success: rgb(40, 89, 67);    /* основной зелёный */
  --brand-success-dark: #286b3a; /* тёмный при наведении */
  --brand-danger: #d32f2f;

  /* --- Семантика --- */
  --bg-body: #f6f7f5;          /* очень светлый, близкий к скриншоту */
  --bg-surface: #ffffff;
  --bg-surface-secondary: #f1f3f2;
  --bg-navbar: #2f8a45;        /* зелёный хедера */
  --bg-footer: rgb(40, 89, 67);

  --text-primary: #21312a;     /* тёмно-зелёно-коричневый для текста */
  --text-on-dark: #ffffff;
  --text-muted: #6c757d;
  --text-price: var(--brand-red);

  --border-color: #e9ecef;
  --border-form: rgba(0, 0, 0, 0.06);
  --shadow-card: rgba(27, 48, 34, 0.08);
  --shadow-popover: rgba(0, 0, 0, 0.12);
}



/* --- DARK MODE (не менял имен переменных, оставил возможность) --- */
[data-theme="dark"] {
  --bg-body: #121412;
  --bg-surface: #1b1e1b;
  --bg-surface-secondary: #252925;
  --bg-navbar: #0d110e;
  --bg-footer: #0d110e;

  --text-primary: #e9ecef;
  --text-on-dark: #f8f9fa;
  --text-muted: #adb5bd;
  --text-price: #ff5252;

  --border-color: #2c302c;
  --border-form: rgba(255, 255, 255, 0.05);
  --shadow-card: rgba(0, 0, 0, 0.4);
  --shadow-popover: rgba(0, 0, 0, 0.5);
}

/* --- Базовые стили --- */
* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  font-family: var(--main-font);
  font-size: var(--fs-body);
  line-height: 1.35;
  color: var(--text-primary);
  background-color: var(--bg-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  margin: 0;
}

/* Links */
a { color: inherit; text-decoration: none; transition: color .18s ease, opacity .18s; }
a:hover { text-decoration: none; opacity: 0.85; }

/* Headings */
h1 { font-size: var(--fs-h1); font-weight: var(--fw-bold); margin: 0 0 .6rem 0; color: var(--text-primary); z-index: 999;}
h2 { font-size: var(--fs-h2); font-weight: var(--fw-semibold); margin: 0 0 .5rem 0; color: var(--text-primary); }
h3 { font-size: var(--fs-h3); font-weight: var(--fw-semibold); margin: 0 0 .4rem 0; color: var(--text-primary); }

.index h1 {
  color: #fff;
} 

/* --- Navbar (перекрываем bootstrap bg-dark) --- */
.navbar {
  background-color: rgba(0, 0, 0, 0);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.hero-card p {
  color: #fff;
}

.section-title a {
  color: var(--bg-navbar)
}

/* Общий контейнер для шапки и первого блока */
.top-wrapper {
  min-height: 12vh; 
  position: relative;

} 

.test {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.index .top-wrapper {
  min-height: 70vh; 
} 

.index .test {
  object-position: bottom;
}

/* Делаем навар прозрачным, чтобы видеть фон под ним */
.navbar-mod {
  border: none;
}

/* Настройка высоты герой-карточки, если нужно больше места */
.hero-card {
  position: relative;
  z-index: 34;
  padding-top: 50px;
  padding-bottom: 80px;
  background: transparent; 
} 

.navbar .container { display: flex; align-items: center; gap: 1rem; }

.navbar-brand {
  font-weight: var(--fw-bold);
  font-size: 1.45rem;
  color: var(--text-on-dark) !important;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.bg-logo {
  background-color: rgba(23, 64, 39, 1);
}

.logo-name {
  width: 120px; 
  height: 120px; 
  text-decoration: none; 
  padding: 10px;
}

.logo-img {
  width: 40px; 
  height: auto;
}

/* make telephone & cart text white and vertically centered */
.navbar .nav-link, .navbar .navbar-nav .nav-link { color: var(--text-on-dark) !important; font-weight: 600; padding: .45rem .6rem; font-size: 1rem; }
.navbar .nav-link:hover { opacity: 0.92; }

/* mobile toggler */
.navbar-toggler { border-color: rgba(255,255,255,0.12); }

/* Dropdown menu */
.dropdown-menu { border-radius: 8px; border: none; box-shadow: 0 6px 20px rgba(0,0,0,0.12); }

/* --- Hero (если добавишь геро-блок в шаблон, стиль готов) --- */
.hero {
  background-color: transparent;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 28px;
  margin-bottom: 40px;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: 30px;
  align-items: center;
}

/* контейнер внутри героя (например: слева картинка-ряды, справа текст) */
.hero .hero-image {
  background-position: left center;
  background-size: cover;
  background-repeat: no-repeat;
  min-height: 300px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(27,48,34,0.08);
}

.hero .hero-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,255,255,0.98));
  padding: 36px;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(27,48,34,0.06);
}

/* CTA button in hero */
.btn-hero {
  display: inline-block;
  background-color: var(--brand-success);
  color: var(--text-on-dark);
  padding: 12px 28px;
  font-weight: var(--fw-bold);
  border-radius: 8px;
  border: none;
  text-transform: none;
}
.btn-hero:hover { background-color: var(--brand-success-dark); }

/* --- Cards (товар) --- */
.card {
  border: 1px solid transparent;
  border-radius: 12px;
  background-color: var(--bg-surface);
  transition: transform .28s cubic-bezier(.22,.9,.35,1), box-shadow .28s;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* height: 100%; */
}

/* subtle border & shadow */
.card {
  border: 1px solid var(--border-color);
  box-shadow: 0 6px 18px var(--shadow-card);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 36px rgba(27,48,34,0.12);
}

/* image */
.card-img-top {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--border-color);
  background: #f4f5f3;
}

/* body of card flexible */
.card-body {
  padding: 18px;
  flex: 1 1 auto;
}

/* title + clamp */
.card-title {
  font-size: 1.03rem;
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: .55rem;
  min-height: 2.6rem;
}

/* price */
.card-price, .product-price {
  font-size: 1.25rem;
  font-weight: var(--fw-bold);
  color: var(--text-price);
  margin-bottom: .35rem;
}

/* category small text */
.card-body small.text-muted { color: var(--text-muted); }

/* footer for button */
.card-footer {
  background: transparent;
  border-top: 1px solid transparent;
  padding: 14px 18px 18px;
}

/* Buy button: в шаблоне используется btn btn-danger, поэтому переназначим btn-danger */
.btn-danger {
  background-color: var(--brand-success);
  border: none;
  border-radius: 8px;
  font-weight: var(--fw-semibold);
  color: var(--text-on-dark);
  padding: .6rem .9rem;
  transition: background-color .16s ease, transform .16s;
  box-shadow: 0 6px 18px rgba(31,88,45,0.12);
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-danger:hover {
  background-color: var(--brand-success-dark);
  transform: translateY(-1px);
}

.btn-red {
  background-color: red;
}

/* special larger hero button modifier (если нужен) */
.btn-danger-mod {
  padding: 14px 36px;
  font-weight: var(--fw-bold);
  font-size: 1.12rem;
  border-radius: 10px;
}

/* Badge (В наличии / Под заказ) — bootstrap дает bg-success/bg-secondary, но переопределим цвета) */
.badge.bg-success {
  background-color: var(--brand-success) !important;
  color: var(--text-on-dark);
  font-weight: 600;
  border-radius: 12px;
  padding: .35rem .6rem;
  box-shadow: 0 6px 14px rgba(31,88,45,0.08);
}
.badge.bg-secondary {
  background-color: #98a79a !important;
  color: var(--text-on-dark);
  font-weight: 600;
  border-radius: 12px;
  padding: .35rem .6rem;
}

/* small badge position helper (шаблон уже использует position-absolute top-0 end-0 m-2) */
.position-absolute .badge { font-size: .85rem; }

/* --- Cards grid tweaks to visually match макета --- */
.row.row-cols-1.row-cols-md-2.row-cols-lg-4.g-4 {
  gap: 1.35rem;
}



/* cart name links */
.cart-name { color: var(--text-primary); font-weight: 600; }
.cart-name:hover { color: var(--brand-red); }

/* Popover корзины */
.product-popover {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border-radius: 13px;
  padding: 26px 22px;
  box-shadow: 0 11px 55px 0 var(--shadow-popover);
  position: absolute;
  z-index: 150;
  opacity: 0;
  transition: opacity 0.35s, transform 0.35s;
  transform-origin: top right;
}
.product-popover--open { opacity: 1; transform: translateY(0); }

/* titles inside popover */
.product-popover__title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

/* close button style */
.product-popover__close {
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  background: transparent;
}

/* availability pseudo (если используются псевдоэлементы) */
.product__availability:after { background: var(--brand-success); }
.product__absent:after { background: var(--brand-danger); }

/* Stars */
.fa-star { color: var(--brand-star); }

/* --- Footer --- */
.footer {
  background-color: var(--bg-footer);
  color: var(--text-on-dark);
  padding: 2.25rem 0;
  font-size: .95rem;
}
.footer a { color: rgba(255,255,255,0.95); text-decoration: none; }
.footer a:hover { text-decoration: underline; opacity: .95; }

/* Footer small text / copyright */
.footer hr { border-top: 1px solid rgba(255,255,255,0.08); margin: 1rem 0; }
.footer .btn { padding: .25rem .5rem; border-radius: 6px; }

/* --- Utilities from макета --- */
.container.mt-5 { margin-top: 2.5rem; }
.mb-5 { margin-bottom: 3rem !important; }

/* small product label in card */
.card small { display: block; margin-top: 6px; color: var(--text-muted); }

/* product price variant for hero or product page */
.product-price {
  font-size: 28px;
  font-weight: var(--fw-bold);
  color: var(--text-primary);
}

/* Подписи наличия в карточке (если ты используешь специальные классы) */
.product__availability-text { color: var(--brand-success); font-weight: 600; }

/* --- Адаптив --- */
@media (max-width: 1199.98px) {
  .hero { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .hero .hero-image { min-height: 260px; }
  .card-img-top { height: 200px; }
}

@media (max-width: 991.98px) {
  .navbar .container { padding: 0; }
  .card-img-top { height: 200px; }
  .card-body { padding: 14px; }
  .card-footer { padding: 12px 14px 14px; }
}

@media (max-width: 767.98px) {
  body { font-size: 1rem; }
  h1 { font-size: 1.3rem; }
  h2 { font-size: 1.2rem; }
  h3 { font-size: 1.1rem; }
  h4 { font-size: 1rem; }
  .h5 {font-size: 1rem;}
  .card-img-top { height: 160px; }
  .product-popover { left: 50%; transform: translateX(-50%); width: calc(100% - 30px); margin-left: 0; }
  .badge { font-size: .75rem; padding: .28rem .45rem; }
  .navbar .nav-link { font-size: .95rem; padding: .35rem .5rem; }
}

/* Small visual polish */
a.btn:active, button:active { transform: translateY(0); transition: none; }

/* Если используешь shadows у изображений (карточки со снимками товаров) */
.card .card-img-top { transition: transform .28s ease; }
.card:hover .card-img-top { transform: scale(1.02); }

/* Ensure bootstrap form controls fit the theme */
.form-control {
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.06);
  padding: .6rem .75rem;
  box-shadow: none;
}

/* Final touch: small elements spacing as in макете */
.mb-2 { margin-bottom: .5rem !important; }
.mt-4 { margin-top: 1.25rem !important; }


/* ===== SECTION STYLES ===== */

.section-block {
  padding: 60px 0;
}

.section-light {
  background-color: #ffffff;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.section-header h2 {
  margin: 0;
}

.empty-block {
  background: #fff;
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.05);
}

/* ===== ADVANTAGES ===== */

.advantages {
  padding: 15px 0;
  background: #f6f7f5;
}

.adv-card {
  background: #fff;
  padding: 30px 20px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  transition: 0.3s;
}

.adv-card:hover {
  transform: translateY(-5px);
}

.adv-card i {
  color: var(--brand-success);
}

/* ===== REVIEWS ===== */

.reviews {
  padding: 70px 0;
}

.review-card {
  display: flex;
  align-items: flex-start;
  gap: 25px;
  background: #fff;
  padding: 30px;
  border-radius: 14px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.06);
  max-width: 750px;
}

.review-avatar img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

.review-stars i {
  color: var(--brand-star);
}

@media (max-width: 768px) {
  .review-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}


/* ===== Product page additions (match screenshot) ===== */

/* Layout helpers */
.product-page { margin-bottom: 60px; }

/* Gallery */
.product-gallery .product-main-image {
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,255,255,0.98));
  box-shadow: 0 14px 36px var(--shadow-card);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}
.product-main-img { max-height: 420px; width: auto; display:block; margin: 0 auto; object-fit: contain; }

/* Thumbs */
.gallery-thumbs { gap: .6rem; }
.gallery-thumbs .thumb {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 6px;
  border-radius: 8px;
  width: 72px;
  height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.gallery-thumbs .thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.gallery-thumbs .thumb.active {
  box-shadow: 0 8px 20px rgba(31,88,45,0.10);
  transform: translateY(-4px);
  border: 1px solid rgba(31,88,45,0.12);
}

/* Variant list */
.variant-form .variant-option {
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: var(--bg-surface-secondary);
  transition: box-shadow .18s ease, transform .12s ease;
}
.variant-form .variant-option:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(27,48,34,0.06);
}
.variant-option input.form-check-input { width: 20px; height: 20px; }

/* Price block */
.product-purchase-section .product-price {
  font-size: 28px; /* reuse variable earlier - kept explicit */
  font-weight: var(--fw-bold);
  color: var(--text-primary);
}

/* Green add-to-cart button already styled as btn-danger override.
   We add a little more styling for prominence. */
.add-to-cart-btn {
  background: linear-gradient(180deg, var(--brand-success), var(--brand-success-dark));
  border: none;
  color: var(--text-on-dark);
  padding: 12px 18px;
  border-radius: 10px;
  box-shadow: 0 10px 26px rgba(31,88,45,0.12);
  font-weight: var(--fw-semibold);
}
.add-to-cart-btn:hover { background: linear-gradient(180deg, var(--brand-success-dark), var(--brand-success)); transform: translateY(-2px); }

/* Sticky consultation aside */
.sticky-consultation {
  position: sticky;
  top: 110px;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(27,48,34,0.06);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
}

/* Cards in recommendations (slight polish) */
.product-reco { border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; box-shadow: 0 8px 24px var(--shadow-card); }
.product-reco .card-img-top { height: 250px; object-fit: cover; }

/* Tabs & description */
.tab-content.bg-white { border-radius: 10px; box-shadow: 0 10px 30px rgba(27,48,34,0.04); }

/* Responsive tweaks */
@media (max-width: 991.98px) {
  .product-main-img { max-height: 360px; }
  .gallery-thumbs .thumb { width: 64px; height: 64px; }
  .sticky-consultation { position: static; top: auto; }
}

@media (max-width: 767.98px) {
  .product-main-img { max-height: 260px; }
  .gallery-thumbs { overflow-x: auto; }
  .gallery-thumbs .thumb { flex: 0 0 auto; }
  .variant-option { padding: 12px; }
}



/* контейнер, дающий горизонтальный скролл */
.table-responsive.table-scroll {
  width: 100%;
  overflow-x: auto; /* горизонтальный скролл */
  -webkit-overflow-scrolling: touch; /* плавный скролл на iOS */
}

/* Гарантируем, что таблица не сжимается слишком сильно */
.table-responsive.table-scroll table {
  min-width: 900px; /* подберите под вашу таблицу — можно уменьшить/увеличить */
  white-space: nowrap; /* предотвращает перенос ячеек на новые строки */
}

/* Адаптив: для очень маленьких экранов можно уменьшать min-width */
@media (max-width: 575.98px) {
  .table-responsive.table-scroll table {
    min-width: 700px;
  }
}


/* Контейнер пагинации */
/* Контейнер пагинации */
.pagination {
    gap: 10px;
}

/* Общий стиль */
.pagination__item .page-link {
    width: 45px;
    height: 45px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--border-color);
    border-radius: 6px;

    background-color: var(--bg-surface-secondary);
    color: var(--text-primary);

    font-weight: var(--fw-semibold);
    text-decoration: none;

    transition: all 0.25s ease;
    cursor: pointer;
}

/* Hover */
.pagination__item .page-link:hover {
    background-color: var(--brand-success);
    color: var(--text-on-dark);
    border-color: var(--brand-success);
}

/* Активная */
.pagination__item.active .page-link {
    background-color: var(--brand-success);
    color: var(--text-on-dark);
    border-color: var(--brand-success);
    cursor: default;
}

/* Многоточие */
.pagination__item--dots .page-link {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: default;
    pointer-events: none;
}

/* Убираем bootstrap focus */
.page-link:focus {
    box-shadow: none !important;
    outline: none;
}

.pagination__item .page-link:hover {
    transform: translateY(-2px);
}

.filter-scroll {
    max-height: 220px;
    overflow-y: auto;
}

.filter-scroll::-webkit-scrollbar {
    width: 6px;
}

.filter-scroll::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 4px;
}

.form-check-input:checked {
  background-color: var(--brand-red);
  border-color: var(--brand-red-hover);
}

/* Поиск */
.form-control-sm {
  border-radius: 4px !important;
  /* Заменил --sx-cyan на основной зеленый бренда */
  border: 1px solid var(--brand-success) !important; 
  font-size: 0.85rem;
  max-width: 330px;
  max-height: 30px;
  /* Используем поверхность из вашего root */
  background-color: var(--bg-surface) !important;
  color: var(--text-primary);
  width: 100%;
  transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.form-control-sm::placeholder {
  /* Заменил #ccc на ваш приглушенный текст */
  color: var(--text-muted);
}


.form-control-sm:focus {
  /* При фокусе делаем границу чуть темнее */
  border-color: var(--brand-success-dark) !important;
  background-color: var(--bg-surface);
  color: var(--text-primary);
  outline: 0;
  /* Добавил легкое свечение в тон бренда для мягкости */
  box-shadow: 0 0 0 0.2rem rgba(47, 138, 69, 0.15);
}

/* Переопределяем стили для поля поиска, чтобы они соответствовали скриншоту */
.form-control-sm {
    /* Удаляем границу, как на скриншоте */
    border: none !important;
    font-size: 0.85rem;
    max-width: 330px;
    max-height: 30px;
    background-color: var(--bg-surface) !important; /* #ffffff - белый */
    color: var(--text-primary); /* #21312a */
    width: 100%;
}

/* Устанавливаем закругления только для внешних углов input-group */
.input-group .form-control-sm {
    border-radius: 4px 0 0 4px !important;
}

.input-group .btn-search-custom {
    border-radius: 0 4px 4px 0 !important;
}

/* Стили для кнопки, чтобы она была заметной на фоне навбара */
.btn-search-custom {
    /* Используем более темный зеленый для фона кнопки, чтобы она не сливалась */
    /* background-color: var(--brand-success-dark) !important; 
    border-color: var(--brand-success-dark) !important; */
    background-color: #25653e !important;
    border-color: #25653e !important;
    color: var(--text-on-dark) !important; /* #ffffff - белый */
    font-size: 0.85rem;
    padding: 0 15px;
    height: 30px;
    display: flex;
    align-items: center;
    transition: background-color 0.2s ease-in-out;
    /* Убираем границу между инпутом и кнопкой */
    border-left: none !important;
}

.btn-search-custom:hover {
    /* Наведение делает кнопку еще темнее */
    background-color: #1f502d !important;
    border-color: #1f502d !important;
}

.form-control-sm::placeholder {
    color: var(--text-muted); /* #6c757d */
}

.form-control-sm:focus {
    background-color: var(--bg-surface);
    color: var(--text-primary);
    outline: 0;
    /* Не добавляем тень к инпуту, так как это input-group */
    box-shadow: none !important;
}

/* При фокусе на инпуте, подсвечиваем всю группу */
.input-group:focus-within {
    border-radius: 4px;
    box-shadow: 0 0 0 0.2rem rgba(40, 107, 58, 0.25);
}

@media (max-width: 991.98px) {
    #search-form {
        margin-top: 15px;
        max-width: 100%; /* На мобилках пусть будет на всю ширину */
    }
}



/* Делаем пункты меню крупнее и в одну строку */
.navbar-nav .nav-link {
    font-size: 1.3rem !important; /* Увеличиваем размер (было 1rem) */
    font-weight: var(--fw-semibold) !important; /* Делаем жирнее (600) */
    white-space: nowrap; /* ЗАПРЕТ переноса на вторую строку */
    padding-left: 15px !important;
    padding-right: 15px !important;
}

/* Убираем лишние отступы у контейнера навигации, чтобы влезло больше элементов */
.navbar-spacing {
    gap: 10px; 
}

/* Если на стандартных ноутбуках всё еще тесно, можно чуть уменьшить логотип */
.navbar-brand.logo {
    font-size: 1.5rem;
    font-weight: var(--fw-bold);
    margin-right: 2rem;
}


.product-description-container {
    /* Основное: разрешает перенос слишком длинных слов (названия препаратов и т.д.) */
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    
    /* Дополнительно: скрывает всё, что всё же умудрилось вылезти */
    overflow: hidden;
    
    /* Гарантирует, что блок не будет растягиваться шире родителя */
    max-width: 100%;
}

/* Если внутри описания есть картинки, они тоже не должны ломать верстку */
.product-description-container img {
    max-width: 100%;
    height: auto;
}


.list-group-item.active {
    z-index: 2;
    background-color: var(--brand-success);
    border-color: var(--brand-success);
}


/* Чтобы navbar корректно переносился */
.navbar-mod .container {
    display: flex;
    align-items: center;
}

/* Правый блок */
.header-actions {
    margin-left: auto;
    flex-shrink: 1;
    min-width: 0;
}


/* Поиск */
.header-search {
    width: 100%;
    max-width: 330px;
    min-width: 220px;
}


/* Правый блок */
.header-actions {
    margin-left: auto;
    flex-shrink: 1;
    min-width: 0;
}


/* Поиск */
.header-search {
    width: 100%;
    max-width: 330px;
    min-width: 220px;
}

/* Строка под поиском: текст + кнопки */
.header-social-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    width: 100%;
    margin-top: 10px;
    flex-wrap: wrap;
}

/* Текст "Наши чаты..." */
.header-social-title {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

/* Кнопки соцсетей */
.social-link {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
    flex-shrink: 0;
}

.social-link:hover {
    transform: translateY(-2px);
    opacity: 0.92;
}

/* Цвета кнопок */
.whatsapp-link {
    /* background: #25D366; */
}

.max-link {
    /* background: #3b82f6; поменяй если нужен фирменный цвет MAX */
}

/* SVG внутри кнопок */
.social-icon-img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    display: block;
}




/* Правый блок */
.header-actions {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    min-width: 0;
}

/* Верхняя строка: 2 телефона + корзина */
.header-top-line {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    flex-wrap: nowrap; /* ключевое: не переносить */
    white-space: nowrap;
}

/* Ссылки верхней строки */
.header-top-link {
    color: #fff;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.header-top-link:hover {
    color: #f3f3f3;
}

/* Корзина */
.header-cart-link {
    padding-left: 6px;
}

/* Поиск */
.header-search {
    width: 100%;
    max-width: 360px;
    min-width: 260px;
}

.navbar-toggler:focus {
  box-shadow: none !important;
}

/* ----------------------------- */
/* АДАПТАЦИЯ ДЛЯ 991px–1268px */
/* ----------------------------- */
@media (max-width: 1403px) and (min-width: 992px) {
    /* collapse-блок растягиваем на всю строку и разрешаем перенос */
    .navbar-spacing {
        display: flex !important;
        flex-wrap: wrap;
        align-items: flex-start;
        width: 100%;
    }

    .navbar-mod .container {
    flex-wrap: wrap;
    }

    /* ПРАВЫЙ БЛОК: телефон + корзина + поиск */
    .header-actions {
        order: 1;
        width: auto;                 /* не 100% */
        margin-left: auto;           /* прижать вправо */
        align-self: flex-start;      /* прижать к верхнему краю */
        align-items: flex-end !important;
        margin-top: 0 !important;
        margin-bottom: 4px !important;
    }



    /* Поиск */
    .header-search {
        width: 280px;
        max-width: 280px;
        min-width: 220px;
        margin-left: auto;
    }

    /* МЕНЮ НИЖЕ */
    .navbar-spacing .navbar-nav.me-auto {
        order: 2;
        width: 100%;
        flex-wrap: wrap;
        margin-top: 0;
        margin-bottom: 0;
    }


    /* Компактнее меню */
    .navbar-spacing .navbar-nav.me-auto .nav-link {
        font-size: 14px;
        padding-left: 0.45rem;
        padding-right: 0.45rem;
    }

        .header-actions {
        position: relative;
        top: -114px !important;
    }

        .header-top-line {
        gap: 12px;
        flex-wrap: nowrap;
    }

    .header-top-link {
        font-size: 1rem;
    }

    .header-search {
        width: 320px;
        max-width: 320px;
        min-width: 240px;
    }

        .navbar-spacing .navbar-nav.me-auto {
        order: 1;
        width: 100%;
        margin-top: 0 !important;      /* убираем отступ сверху */
        margin-bottom: 0 !important;   /* убираем bootstrap mb-2 */
        padding-top: 0 !important;
        align-items: center;
    }

 
}




.navbar-toggler {
  background-color: #fff;
}




@media (max-width: 991.98px) {
    /* Весь правый блок */
    .header-actions {
        width: 100%;
        align-items: stretch !important;
        gap: 8px;
    }

    /* Верхняя строка: 2 телефона + корзина */
    .header-top-line {
        display: flex;
        flex-wrap: wrap;           /* КЛЮЧЕВОЕ: разрешаем перенос */
        align-items: center;
        justify-content: flex-start;
        gap: 8px 12px;             /* вертикальный / горизонтальный gap */
        white-space: normal;       /* КЛЮЧЕВОЕ: разрешаем перенос */
    }

    /* Ссылки внутри верхней строки */
    .header-top-link {
        line-height: 1.2;
        white-space: nowrap;       /* сам текст не ломаем внутри ссылки */
    }

    /* Корзина может перейти на новую строку */
    .header-cart-link {
        flex-shrink: 0;
    }

    /* Поиск */
    .header-search {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    /* Соцсети */
    .header-social-row {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 8px;
    }

    .header-social-title {
        white-space: nowrap;
    }

    /* Кнопки чуть компактнее */
    .social-link {
        width: 30px;
        height: 30px;
        border-radius: 8px;
    }

    .index .top-wrapper {
      min-height: 55vh;
    }

}

/* 
.header__nav-link.is-open:before, .header__nav-link:hover:before, .header__nav-link.z-link.is-open:before, .header__nav-link.z-link:hover:before {
    width: 100%;
    background: #33be60;
}


.header__nav-link:before, .header__nav-link.z-link:before {
    content: "";
    position: absolute;
    left: 0;
    bottom: 2px;
    width: 0;
    height: 8px;
    background: #33be60;
    border-radius: 0 4px 0 0;
    transition: width .4s 
ease-in-out;
}

.header__nav-link:not(.active):not(.current):hover {
      color: inherit;
    opacity: .8;
} */



.favorite-btn.is-favorite {
    background: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

.favorite-btn.is-favorite i {
    color: #fff;
}

main {
  min-height: 70vh;
}