/* Category / products listing — fixes .selected & .readmore overflow */

.productCategory .category-page__title {
  margin: 0 0 28px;
  text-align: right;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: clamp(1.25rem, 2.5vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--dark-main, #191e3b);
}

.productCategory #products-wrap {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.productCategory #products-wrap .products {
  width: 100%;
  min-width: 0;
}

/* Intro bar + sort dropdown */
.productCategory #products-wrap .intro-panel {
  gap: 20px;
  flex-wrap: wrap;
}

.productCategory #products-wrap .intro-panel .intro-text {
  flex: 1 1 240px;
  min-width: 0;
}

.productCategory #products-wrap .intro-panel .intro-text .results {
  font-weight: 700;
  color: var(--blue-main, #1668e3);
}

.productCategory #products-wrap .intro-panel .select-wrap {
  position: relative;
  flex: 0 1 280px;
  min-width: 200px;
  max-width: 100%;
}

.productCategory #products-wrap .intro-panel .select-wrap .selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 12px 16px;
  border: 1px solid #818494;
  border-radius: 8px;
  background: #fff;
  color: var(--dark-main, #191e3b);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.25;
  text-align: right;
  cursor: pointer;
  box-sizing: border-box;
  overflow: visible;
  user-select: none;
  appearance: none;
  -webkit-appearance: none;
}

/* Отключаем сломанный ::before из middle.css (битый PNG + absolute) */
.productCategory #products-wrap .intro-panel .select-wrap .selected::before {
  display: none !important;
  content: none !important;
}

.productCategory #products-wrap .intro-panel .select-wrap .selected__label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.productCategory #products-wrap .intro-panel .select-wrap .selected__icon {
  flex: 0 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #525975;
  transition: transform 0.2s ease;
}

.productCategory #products-wrap .intro-panel .select-wrap .selected.active .selected__icon {
  transform: rotate(180deg);
}

.productCategory #products-wrap .intro-panel .select-wrap .selected:hover {
  border-color: var(--blue-main, #1668e3);
}

.productCategory #products-wrap .intro-panel .select-wrap .selected.active {
  border-color: var(--blue-main, #1668e3);
  box-shadow: 0 0 0 3px rgba(22, 104, 227, 0.12);
}

.productCategory #products-wrap .intro-panel .select-wrap .dropdown {
  right: 0;
  left: auto;
  min-width: 100%;
  max-width: 310px;
}

.productCategory #products-wrap .intro-panel .select-wrap .dropdown.active {
  max-height: 200px;
  opacity: 1;
}

.productCategory #products-wrap .intro-panel .select-wrap .dropdown .dropdown-item {
  margin: 0;
  padding: 12px 16px;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.productCategory #products-wrap .intro-panel .select-wrap .dropdown .dropdown-item:hover {
  background: var(--blue-secondary, #eef4fa);
  color: var(--blue-main, #1668e3);
}

/* Product cards */
.productCategory #products-wrap .product-card {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border-gray, #dfe0e4);
  box-shadow: 0 2px 12px rgba(25, 30, 59, 0.06);
  transition: box-shadow 0.2s ease;
}

.productCategory #products-wrap .product-card:hover {
  box-shadow: 0 6px 20px rgba(25, 30, 59, 0.1);
}

.productCategory #products-wrap .product-card .img-wrap {
  flex: 0 0 280px;
  max-width: 280px;
  min-height: 220px;
}

.productCategory #products-wrap .product-card .product-content {
  max-height: none;
  min-width: 0;
  flex: 1;
  align-items: stretch;
  gap: 20px;
  padding: 24px;
  box-sizing: border-box;
}

.productCategory #products-wrap .product-card .product-content .info {
  flex: 1 1 auto;
  min-width: 0;
  margin-left: 0;
  overflow: hidden;
}

.productCategory #products-wrap .product-card .product-content .info h4 a {
  color: var(--dark-main, #191e3b);
  text-decoration: none;
}

.productCategory #products-wrap .product-card .product-content .info h4 a:hover {
  color: var(--blue-main, #1668e3);
}

.productCategory #products-wrap .product-card .product-content .info .services {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  clear: both;
}

.productCategory #products-wrap .product-card .product-content .info .services .attrib {
  float: none;
  width: auto;
  margin: 0;
}

/* Price column + CTA */
.productCategory #products-wrap .product-card .product-content .price-wrap {
  flex: 0 0 168px;
  max-width: 168px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  border-inline-end: 1px solid var(--border-gray, #dfe0e4);
  padding-inline-end: 20px;
  margin-inline-end: 4px;
  box-sizing: border-box;
}

.productCategory #products-wrap .product-card .product-content .price-wrap .price-text {
  margin-bottom: 12px;
}

.productCategory #products-wrap .product-card .product-content .price-wrap .readmore {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  margin-top: auto;
  padding: 12px 14px;
  box-sizing: border-box;
  border-radius: 10px;
  background: var(--blue-main, #1668e3);
  color: #fff !important;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  text-decoration: none;
  position: relative;
  transition: background 0.2s ease, transform 0.15s ease;
}

.productCategory #products-wrap .product-card .product-content .price-wrap .readmore:hover {
  opacity: 1;
  background: #1256c4;
  transform: translateY(-1px);
}

.productCategory #products-wrap .product-card .product-content .price-wrap .readmore::before {
  content: "";
  position: static;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  background: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M15 18l-6-6 6-6'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

@media screen and (max-width: 1120px) {
  .productCategory #products-wrap .product-card .img-wrap {
    flex: 0 0 auto;
    max-width: 100%;
    width: 100%;
    min-height: 200px;
    max-height: 240px;
  }
}

@media screen and (max-width: 768px) {
  .productCategory #products-wrap .intro-panel .select-wrap {
    flex: 1 1 100%;
    width: 100%;
  }

  .productCategory #products-wrap .intro-panel .select-wrap .selected {
    width: 100%;
    max-width: 100%;
  }

  .productCategory #products-wrap .product-card .product-content .price-wrap {
    flex: 1 1 auto;
    max-width: 100%;
    border-inline-end: none;
    border-block-start: 1px solid var(--border-gray, #dfe0e4);
    padding-inline-end: 0;
    padding-block-start: 20px;
    margin-inline-end: 0;
  }

  .productCategory #products-wrap .product-card .product-content .price-wrap .readmore {
    max-width: 280px;
    align-self: flex-end;
  }
}
