:root {
    --bg-color: radial-gradient(circle at 15% 20%, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0) 28%),
    radial-gradient(circle at 85% 0%, rgba(176,196,255,0.20) 0%, rgba(176,196,255,0) 24%),
    linear-gradient(180deg, #edf2f9 0%, #e7edf6 100%);

    --text-color: #202020;
    --description-color: #404040;
    --contrast-color: #888888;
    --green-color: #00a82d;
    --light-green-color: #96d446;
    --orange-color: #ee6e73;
    --blue-color: #6578fe;
    --violet-color: #d4b8f9;
    --glass: #c9ccff;
    --sp-panel-bg: #1215188c;
}
html, body {
  overflow-x: hidden;
  touch-action: pan-y;
  background: var(--bg-color);
  }
.px-1 {
    padding-right: 0.12em !important;
    padding-left: 0.12em !important;
    margin: 0 auto;
}
.error404 img {
  width: 100%; 
  height: 100%;
}
/* Контейнер выравниваем по левому краю */
.free-design-banner {
  margin-left: 15px; /* при необходимости можешь уменьшить/увеличить */
  display: inline-block;
}

/* Анимация текста градиентом */
.gradient-text {
  font-size: 15px;
  font-weight: 700;
  font-family: 'Varela Round', sans-serif;
  background: linear-gradient(90deg, var(--blue-color), var(--orange-color), var(--green-color));
  background-size: 400% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShine 5s linear infinite;
  white-space: nowrap;
  
}

/* Анимация движения градиента */
@keyframes textShine {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* === Верхняя полоса с контактами === */
.sleepprofi-topbar {
  background: var(--bg-color); /* Тёмно-бирюзовый */
  color: var(--contrast-color);              /* Белый текст */
  font-size: 15px;          /* Чуть меньше шрифт */
}
.sleepprofi-topbar a {
  font-weight: normal;
}

.sleepprofi-topbar-item a {
  color: inherit;
  text-decoration: none;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
}

.sleepprofi-topbar-item a:hover {
  color: var(--text-color);
}
.ms-2 {
    margin-left: 3px !important;
}
.sleepprofi-topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end; /* Контакты справа */
  gap: 20px;                 /* Расстояние между элементами */
  padding: 5px 20px;         /* Отступы сверху/снизу, слева/справа */
}

.sleepprofi-topbar-item {
  display: flex;
  align-items: center;
  gap: 6px; /* Расстояние между иконкой и текстом */
}

.sleepprofi-topbar-item i {
  font-size: 14px; /* Иконки чуть меньше */
  color: var(--blue-color);
}
.sleepprofi-topbar-item i:hover {
  color: var(--blue-color);
}
/* === Адаптивность для topbar === */
@media (max-width: 768px) {
  .sleepprofi-topbar-inner {
    flex-wrap: wrap; /* Перенос строк на мобильном */
    justify-content: center; /* Можно по центру */
    gap: 10px;
  }
}


/* -- Наши стили для хедера -- */
/* ============================= Header base ============================ */

.sleepprofi-header {
  background: var(--bg-color);
  border-top: 1px solid var(--text-color);
  border-bottom: 1px solid var(--text-color);
  position: relative;
  z-index: 80;
}

.sleepprofi-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 20px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}

.header-zone {
  display: flex;
  align-items: center;
  min-width: 0;
}

.header-zone-left {
  justify-content: flex-start;
}

.header-zone-center {
  justify-content: center;
}

.header-zone-right {
  justify-content: flex-end;
  gap: 16px;
}

/* ============================= Logo ============================ */

.logo-wrapper {
  display: flex;
  justify-content: center;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
}

.logo-sleep {
  font-family: 'Varela Round', sans-serif;
  font-weight: 750;
  font-size: 31px;
  line-height: 1;
  color: var(--text-color);
  letter-spacing: .2px;
}

.logo-profi {
  display: inline-flex;
  align-items: center;
  margin-left: 1px;
}

.logo-profi .tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Varela Round', sans-serif;
  font-weight: 700;
  font-size: 29px;
  line-height: 1;
  color: #1c1c1c;
  background: var(--blue-color);
  padding: 2px 2px 0;
  margin-left: 2px;
  border-radius: 5px;
}

/* ============================= Header buttons ============================ */

.catalog-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.catalog-wrapper::after {
  display: none;
}

.catalog-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 11px 18px;
  border: 1px solid rgba(255,255,255,0.46);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.28);
  color: var(--text-color);
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    0 8px 18px rgba(31, 38, 135, 0.06),
    inset 0 1px 0 rgba(255,255,255,0.60);
  transition:
    background .25s ease,
    border-color .25s ease,
    box-shadow .25s ease,
    transform .2s ease,
    color .25s ease;
}

.catalog-button:hover {
  background: rgba(255,255,255,0.38);
  border-color: rgba(255,255,255,0.62);
  color: var(--text-color);
  transform: translateY(-1px);
  box-shadow:
    0 12px 24px rgba(31, 38, 135, 0.10),
    inset 0 1px 0 rgba(255,255,255,0.72);
}

.catalog-button i {
  font-size: 16px;
}

.catalog-button-text {
  display: inline-block;
}

.search-button-text {
  display: inline-block;
}

.search-toggle {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.46);
  border-radius: 14px;
  background: rgba(255,255,255,0.28);
  color: var(--text-color);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    0 8px 18px rgba(31, 38, 135, 0.06),
    inset 0 1px 0 rgba(255,255,255,0.60);
  cursor: pointer;
  transition:
    background .25s ease,
    border-color .25s ease,
    box-shadow .25s ease,
    transform .2s ease,
    color .25s ease;
}

.search-toggle:hover {
  background: rgba(255,255,255,0.38);
  border-color: rgba(255,255,255,0.62);
  color: var(--text-color);
  transform: translateY(-1px);
  box-shadow:
    0 12px 24px rgba(31, 38, 135, 0.10),
    inset 0 1px 0 rgba(255,255,255,0.72);
}

/* ============================= Right links ============================ */

.header-extra-links {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: 4px;
}

.header-extra-item {
  display: inline-flex;
}

.header-extra-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #757575;
  transition: color .25s ease, transform .2s ease;
}

.header-extra-link:hover {
  color: var(--text-color);
  transform: translateY(-1px);
}

.header-extra-link i {
  font-size: 21px;
  margin-bottom: 2px;
  opacity: 0.9;
}

.header-extra-text {
  font-size: 13px;
  line-height: 1.1;
}

/* ============================= Overlay ============================ */

.header-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 20, 28, 0.26);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}

.header-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* ============================= Catalog drawer ============================ */

.catalog-popup.catalog-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(560px, 92vw);
  z-index: 100;
  transform: translateX(-100%);
  transition: transform .28s ease;
  background: transparent;
  opacity: 1;
  visibility: visible;
  overflow: hidden;
}

.catalog-popup.catalog-drawer.is-open {
  transform: translateX(0);
}

.catalog-popup-inner.catalog-drawer-inner {
  position: absolute;
  inset: 0;
  padding: 28px 30px 30px;
  background: var(--sp-panel-bg);
  border-right: 1px solid var(--sp-panel-border);
  border-radius: 0 18px 18px 0;
  box-shadow: var(--sp-panel-shadow);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(14px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  margin-top: 0;
}

.catalog-close {
  position: absolute;
  top: 14px;
  right: 16px;
  border: 0;
  background: transparent;
  color: var(--blue-color);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  z-index: 20;
}

.catalog-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  margin-top: 14px;
}

.catalog-section-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: .04em;
  margin-bottom: 18px;
  color: var(--glass);
  text-transform: uppercase;
}

.catalog-column ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.catalog-column li + li {
  margin-top: 6px;
}

.catalog-column a {
  display: inline-block;
  text-decoration: none;
  color: whitesmoke;
  font-size: 18px;
  line-height: 1.35;
  transition: color .3s ease, transform .3s ease;
}

.catalog-column a:hover {
  color: var(--orange-color);
  transform: translateX(1px);
}

/* ============================= Search panel ============================ */

.search-panel {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  width: min(700px, 94vw);
  z-index: 100;
  transform: translateX(100%);
  transition: transform .28s ease;
  background: transparent;
  overflow: hidden;
}

.search-panel.is-open {
  transform: translateX(0);
}

.search-panel-inner {
  position: absolute;
  inset: 0;
  padding: 28px 30px 30px;
  background: var(--sp-panel-bg);
  border-left: 1px solid var(--sp-panel-border);
  border-radius: 18px 0 0 18px;
  box-shadow: var(--sp-panel-shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  margin-top: 0;
}

.search-close {
  position: absolute;
  top: 14px;
  right: 16px;
  border: 0;
  background: transparent;
  color: var(--blue-color);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  z-index: 20;
}

/* ============================= Search form inside panel ============================ */

.search-panel-form {
  display: grid;
  grid-template-columns: 1fr 54px;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}

.search-panel .sleepprofi-search-input-container,
.search-panel-input-wrap {
  width: 100%;
  min-width: 0;
  max-width: none;
  margin: 0;
  flex: unset;
  border: 1px solid rgba(255,255,255,0.62);
  border-radius: 16px;
  background: rgba(255,255,255,0.84);
  box-shadow:
    0 10px 24px rgba(31, 38, 135, 0.06),
    inset 0 1px 0 rgba(255,255,255,0.72);
  overflow: hidden;
}

.search-panel .sleepprofi-search-input,
.search-panel-input {
  width: 100%;
  height: 56px;
  min-height: 56px;
  padding: 0 18px;
  margin: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--description-color);
  font-size: 18px;
  line-height: 56px;
  box-sizing: border-box;
}

.search-panel .sleepprofi-search-input::placeholder,
.search-panel-input::placeholder {
  color: #a1a7b3;
}

.search-panel .sleepprofi-search-btn,
.search-panel-btn {
  width: 54px;
  height: 54px;
  min-width: 54px;
  flex: unset;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--blue-color);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 10px 24px rgba(101,120,254,0.22),
    inset 0 1px 0 rgba(255,255,255,0.22);
  cursor: pointer;
}

.search-panel .sleepprofi-search-btn::after,
.search-panel-btn::after {
  display: none;
}

/* ============================= Live search ============================ */

.sleepprofi-live-search-results {
  display: none;
  margin-top: 10px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,255,255,0.65);
  box-shadow: 0 18px 34px rgba(0,0,0,0.08);
}

.sleepprofi-live-search-results.is-open {
  display: block;
}

.sleepprofi-live-search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 12px;
  text-decoration: none;
  transition: background .2s ease;
}

.sleepprofi-live-search-item:hover {
  background: rgba(101,120,254,0.08);
}

.sleepprofi-live-search-thumb {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
}

.sleepprofi-live-search-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sleepprofi-live-search-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sleepprofi-live-search-title {
  color: var(--text-color);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.sleepprofi-live-search-price {
  color: var(--blue-color);
  font-size: 14px;
  margin-top: 4px;
}

.sleepprofi-live-search-empty {
  padding: 14px 12px;
  color: var(--description-color);
  font-size: 14px;
}

/* ============================= Search tags ============================ */

.search-suggestions {
  margin-top: 22px;
}

.search-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.search-tags a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  background: rgba(255,255,255,0.74);
  color: var(--description-color);
  border: 1px solid rgba(255,255,255,0.60);
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.search-tags a:hover {
  background: rgba(255,255,255,0.96);
  color: var(--blue-color);
  transform: translateY(-1px);
}

/* ============================= Utility ============================ */

body.header-lock {
  overflow: hidden;
}

/* ============================= Autocomplete ============================ */

.ui-widget.ui-widget-content {
  border-radius: 12px;
  padding: 10px;
}

.ui-widget {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.05em;
}

.ui-menu .ui-menu-item-wrapper.ui-state-focus,
.ui-menu .ui-menu-item-wrapper.ui-state-active {
  background-color: var(--orange-color) !important;
  color: #fff !important;
  border: none;
  border-radius: 10px;
  font-size: 1em;
}

/* ============================= Products grid ============================ */

.products-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

ul.products {
  display: grid;
  grid-template-columns: repeat(4, minmax(260px, 1fr));
  gap: 24px;
  padding: 0;
}

.product-card {
  padding: 14px;
  border-radius: 16px;
  min-width: 0;
}

.product-details a {
  min-height: auto;
  font-size: 1.1rem;
}

.sp-loop-size-select {
  max-width: 100%;
  width: 100%;
}

/* ============================= Responsive ============================ */

@media (max-width: 768px) {
  :root {
    --sp-topbar-height: 48px;
    --sp-header-height: 66px;
  }

  .sleepprofi-header-inner {
    padding: 12px 14px;
    gap: 12px;
  }

  .catalog-button {
    min-height: 42px;
    width: 42px;
    height: 42px;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
  }

  .catalog-button-text,
  .search-button-text {
    display: none;
  }

  .search-toggle {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .logo-sleep,
  .logo-profi .tile {
    font-size: 22px;
  }

  .catalog-popup.catalog-drawer,
  .search-panel {
    width: 100vw;
  }

  .catalog-popup-inner.catalog-drawer-inner,
  .search-panel-inner {
    inset: 0;
    border-radius: 0;
    padding: 22px 20px 24px;
  }

  .catalog-columns {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .catalog-section-title {
    font-size: 20px;
    margin-bottom: 14px;
  }

  .catalog-column li + li {
    margin-top: 8px;
  }

  .catalog-column a {
    font-size: 16px;
    line-height: 1.3;
  }

  .search-panel-title {
    font-size: 28px;
  }

  .search-panel-form {
    grid-template-columns: 1fr 50px;
  }

  .search-panel .sleepprofi-search-input,
  .search-panel-input {
    height: 52px;
    min-height: 52px;
    font-size: 17px;
    line-height: 52px;
  }

  .search-panel .sleepprofi-search-btn,
  .search-panel-btn {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: 14px;
  }
}
/* ============================= Footer ============================ */

.footer-section-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: .04em;
  margin-bottom: 18px;
  color: var(--blue-color);
  text-transform: uppercase;
}

.footer {
  background: var(--bg-color);
  padding: 50px 0;
  color: var(--text-color);
  border-top: 1px solid var(--text-color);
  margin-top: 5em;
}

.footer h6 {
  color: var(--blue-color);
}

.footer a {
  color: var(--text-color);
  text-decoration: none;
  transition: all .3s;
}

.footer a:hover {
  background-color: #fff;
  color: var(--description-color);
  text-decoration: none;
  border-radius: 7px;
}

.footer-icons {
  list-style: none;
  display: flex;
  gap: 20px;
  padding: 0;
  font-size: 20px;
}

#upbtn {
  position: fixed;
  bottom: 100px;
  right: -10px;
  background-color: #fff;
  color: var(--description-color);
  border: 3px solid var(--description-color);
  padding: 5px 10px 5px;
  border-radius: 10px;
  cursor: pointer;
  z-index: 10000;
  font-weight: bold;
  display: none;
  transition: opacity 0.3s ease;
  transform: rotate(-90deg);
}

#upbtn:hover {
  background-color: var(--contrast-color);
}

#upbtn i {
  font-size: 16px;
}
/* ============================= Footer ============================ */

/* ============================= Каталог ============================ */
.section-title {
  font-size: 2rem;
  font-weight: 600;
  margin-top: 1em;
  margin-bottom: 0.5em;
  color: var(--blue-color);
}


ul.products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px; /* расстояние между товарами, измените по вкусу */
}

@media (max-width: 1024px) {
  ul.products {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  ul.products {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  ul.products {
    grid-template-columns: 1fr;
  }
}
.catalog-columns {
    flex-direction: column;
}

.product-image-wrapper {
    position: relative;
    overflow: hidden;
}
.product-image {
    width: 100%;
    display: block;
    transition: opacity 0.5s ease;
}
.main-image {
    opacity: 1;
    width: 100%;
    height: 100%;
    border-radius: 18px;
}

.hover-image {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}
.image-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 10;
}
.image-dots .dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin: 0 3px;
    background-color: #ccc;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.image-dots .dot.active {
    background-color: var(--blue-color);
}
ul.products {
  padding: 0 20px; /* отступы по 20px слева и справа */
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.products-wrapper {
  max-width: 1200px; /* или другая подходящая максимальная ширина */
  margin: 0 auto;    /* центрирование блока */
  padding: 0 20px;   /* отступы от краёв браузера */
}

.catalog-title {
  margin: 35px 0; /* Отступы сверху и снизу */
  color: var(--text-color);
  font-weight: 600;
  
}

.catalog-description {
    font-family: 'Varela Round', sans-serif;
    font-weight: 500;
  position: relative;
  text-align: justify;
  color: var(--description-color);
  padding-block-end: 60px;
}

/* ============================= Каталог ============================ */



/* ============================= Product catalog ============================ */
/* ============================= Product card modern ============================ */

.product-card {
  position: relative;
  overflow: visible !important;
  padding: 14px;
  margin-top: 2em;
  border-radius: 18px;
  background: rgba(255,255,255,0.38);
  border: 1px solid rgba(32,32,32,0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    0 10px 30px rgba(31, 38, 135, 0.06),
    inset 0 1px 0 rgba(255,255,255,0.55);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease;
  z-index: 1;
}

.product-card::after {
  display: none;
}

.product-card:hover,
.product-card:focus-within {
  transform: translateY(-3px);
  background: rgba(255,255,255,0.52);
  border-color: rgba(32,32,32,0.18);
  box-shadow:
    0 18px 40px rgba(31, 38, 135, 0.10),
    inset 0 1px 0 rgba(255,255,255,0.68);
  z-index: 50;
}

.product-image {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(255,255,255,0.55);
}

.product-image img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.35s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.03);
}

.product-details a {
  color: var(--text-color);
  font-size: 1.2rem;
  margin-bottom: -0.5rem;
  margin-top: 0.8em;
  font-weight: 500;
  font-family: 'Varela Round', Gadget, sans-serif;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-decoration: none;
  min-height: 60px;
  transition: color 0.2s ease;
}

.product-card:hover .product-details a {
  color: var(--blue-color);
}

.price {
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue-color);
  padding-block-start: 10px;
  margin-block-end: 0;
  display: flex;
  font-family: 'Varela Round', Gadget, sans-serif;
}

/* важно для dropdown размера */
.sp-loop-price-row {
  position: relative;
  z-index: 60;
  overflow: visible !important;
}

.sp-loop-size,
.sp-loop-size > div,
.sp-loop-size-select {
  position: relative;
  z-index: 70;
  overflow: visible !important;
}

ul.products,
.products-wrapper,
.woocommerce ul.products,
li.product {
  overflow: visible !important;
}
.product-card,
li.product,
ul.products > li,
.woocommerce ul.products li.product {
  position: relative;
  overflow: visible !important;
  z-index: 1;
}

.product-card:hover,
.product-card:focus-within,
li.product:hover,
li.product:focus-within,
.woocommerce ul.products li.product:hover,
.woocommerce ul.products li.product:focus-within {
  z-index: 80;
}

ul.products,
.products-wrapper,
.woocommerce ul.products {
  overflow: visible !important;
}

/* Когда dropdown открыт — поднимаем карточку ещё выше */
.product-card:has(.sp-dd.is-open),
li.product:has(.sp-dd.is-open),
.woocommerce ul.products li.product:has(.sp-dd.is-open) {
  z-index: 120;
}
/* ===== Поиск: сделать как обычный каталог ===== */
.search-products-wrapper,
body.search .search-products-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

body.search ul.products,
.search-products-wrapper ul.products {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;

  display: grid !important;
  grid-template-columns: repeat(4, minmax(260px, 1fr)) !important;
  gap: 24px !important;
  align-items: stretch;
}

body.search ul.products > li.product,
.search-products-wrapper ul.products > li.product {
  list-style: none !important;
  margin: 0 !important;
  width: 100% !important;
  float: none !important;
  display: block !important;
}

body.search ul.products > li.product::marker,
.search-products-wrapper ul.products > li.product::marker {
  content: "" !important;
}

body.search .product-card,
.search-products-wrapper .product-card {
  margin-top: 0 !important;
  width: 100% !important;
  height: 100%;
}

/* Заголовок поиска как в каталоге */
body.search .page-header,
.search-products-wrapper .page-header {
  margin: 0 0 28px !important;
}

body.search .page-title,
.search-products-wrapper .page-title {
  margin: 0 0 18px !important;
}

/* адаптив */
@media (max-width: 1200px) {
  body.search ul.products,
  .search-products-wrapper ul.products {
    grid-template-columns: repeat(3, minmax(240px, 1fr)) !important;
  }
}

@media (max-width: 900px) {
  body.search ul.products,
  .search-products-wrapper ul.products {
    grid-template-columns: repeat(2, minmax(220px, 1fr)) !important;
  }
}

@media (max-width: 560px) {
  body.search ul.products,
  .search-products-wrapper ul.products {
    grid-template-columns: 1fr !important;
  }

  .search-products-wrapper,
  body.search .search-products-wrapper {
    padding: 0 16px;
  }
}

/* ============================= Product catalog ============================ */
/* ============================= preloader ============================ */
#sleepprofi-preloader {
  position: fixed;
  z-index: 9999;
  background: var(--bg-color);
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center; /* Центровка текста */
}

#sleepprofi-preloader .container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

#sleepprofi-preloader .loader {
  margin-top: 2rem;
  height: 5px;
  width: 15rem;
  background-color: lightgrey;
  overflow: hidden;
  position: relative;
}

#sleepprofi-preloader .loading {
  background-color: var(--blue-color);
  width: 5rem;
  height: 5px;
  animation: sleepprofi-loading 1.8s infinite;
}

@keyframes sleepprofi-loading {
  0% {
    transform: translateX(0rem);
  }
  50% {
    transform: translateX(10rem);
  }
  100% {
    transform: translateX(0rem);
  }
}
/* ============================= preloader ============================ */
#cookie-consent {
  position: fixed;
  bottom: 0;
  z-index: 99999;
  padding: 0;
  margin: 10px;
  font-family: inherit;
}
.cookie-message {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  max-width: 500px;
  margin: 18px auto;
  background: #00000090;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
  padding: 18px 24px;
  font-size: 1rem;
  color: #fff;
  backdrop-filter: blur(2px);
}
.cookie-message a {
  text-decoration: underline !important;
  transition: color .15s;
  color: #fff;
}
.cookie-message a:hover { color: var(--blue-color); }


#cookie-accept {
  margin-left: 18px;
  padding: 8px 20px;
  background: var(--blue-color);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background .2s;
  margin-top: 1em;
}

#cookie-accept:hover { background: var(--orange-color); }

@media (max-width: 700px) {
  .cookie-message { flex-direction: column; align-items: stretch; }
  #cookie-accept { margin: 12px 0 0 0; width: 100%; }
}

.form-select {
  margin-left: 10px !important;
}
.sp-dd-open-card {
  z-index: 999 !important;
}

.sp-dd-open-card .sp-dd {
  z-index: 1000 !important;
}

.sp-dd-open-card .sp-dd__list {
  z-index: 1001 !important;
}