/* ========= Catalog page ========= */
.catalog-page {
  padding-top: 10px;
  padding-bottom: 40px;
}

.catalog-top {
  padding-top: 10px;
  padding-bottom: 6px;
}

.catalog-top__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.catalog-title {
  margin: 0;
  font-size: 18px;
  letter-spacing: .10em;
  text-transform: uppercase;
}

.tabs {
  display: flex;
  gap: 10px;
  overflow: auto;
  padding: 14px 2px 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  border: 1px solid rgba(0, 0, 0, .18);
  background: transparent;
  color: var(--ink);
  padding: 9px 10px;
  border-radius: 0;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
}

.tab.is-active {
  border-color: rgba(0, 0, 0, .45);
}

.catalog-search {
  margin: 8px 0 18px;
}

.catalog-search__input {
  width: 100%;
  border: 1px solid rgba(0, 0, 0, .18);
  border-radius: 0;
  padding: 12px;
  font-size: 14px;
  outline: none;
}

/* grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 18px;
}

@media (max-width:360px) {
  .product-grid {
    gap: 18px 14px;
  }

  .product-card__name {
    font-size: 12px;
  }
}

/* card reset */
.product-card,
.catalog-card {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Убираем подчеркивания в карточке (часто из-за <a>) */
.product-card a,
.catalog-card a {
  text-decoration: none !important;
  color: inherit;
}

.product-card__kicker,
.product-card__name,
.product-card__size,
.product-card__price {
  text-decoration: none !important;
}

/* IMAGE: парящая карточка, без рамки/паддинга */
.product-card__img {
  width: 100%;
  aspect-ratio: 3/4;
  background: #fff;
  padding: 0;
  overflow: hidden;

  border-radius: 18px;
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.08),
    0 2px 10px rgba(0, 0, 0, 0.04);
  transform: translateZ(0);
}

.product-card__img img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;        /* чтобы выглядело богаче, без “пустых” полей */
  object-position: center;
  background: transparent;
}

/* TEXT BLOCK: компактнее, логичнее, цена ближе */
.product-card__meta {
  padding: 10px 2px 0;
  display: flex;
  flex-direction: column;
  gap: 2px; /* минимальный отступ между материалом и типом */
  min-width: 0;
}

.product-card__kicker {
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  opacity: .55;
  margin: 0;
  line-height: 1.25;
}

.product-card__kicker--sub {
  margin: 0;
  opacity: .45;
  line-height: 1.25;
}

.product-card__name {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.18;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .9;
}

.product-card__size {
  margin: 6px 0 0;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .55;
}

.product-card__price {
  margin-top: 6px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.price--old {
  font-size: 12px;
  opacity: .45;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(0,0,0,.35);
}

.price--promo {
  font-size: 13px;
  letter-spacing: .06em;
  color: #b00020; /* спокойный красный */
  font-weight: 600;
}

/* empty / filter / footer */
.catalog-empty {
  margin-top: 18px;
  opacity: .7;
  font-size: 14px;
}

.filter-btn {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 10px 0;
  cursor: pointer;
  opacity: .75;
}

.filter-btn:active {
  opacity: 1;
}

.filter-btn__plus {
  margin-left: 6px;
}

.footer {
  padding: 26px 0;
  opacity: .7;
  font-size: 14px;
}

/* Убрать подчёркивание у ссылок в карточках каталога */
.product-card,
.product-card:visited,
.product-card:hover,
.product-card:active {
  text-decoration: none;
  color: inherit;
}

/* На случай если внутри карточки есть вложенные <a> */
.product-card a,
.product-card a:visited,
.product-card a:hover,
.product-card a:active {
  text-decoration: none;
  color: inherit;
}

/* =========================
   Sort dropdown (Filter)
   ========================= */

.sort-dd {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* панель */
.sort-dd__panel{
  position: absolute;
  top: calc(100% + 10px);
  right: 0;                 /* прижать к правому краю кнопки */
  left: auto;

  width: min(320px, calc(100vw - 28px)); /* не шире экрана */
  max-width: calc(100vw - 28px);
  box-sizing: border-box;

  background: #fff;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(0,0,0,.10);

  padding: 10px;
  z-index: 50;

  display: none;
}

.sort-dd.is-open .sort-dd__panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* пункты */
.sort-dd__item {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 12px 12px;
  border-radius: 12px;
  font-size: 13px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.78);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}

.sort-dd.is-open .sort-dd__panel{
  display: block;
}
.sort-dd__item + .sort-dd__item{
  margin-top: 6px;
  border-top: 1px solid rgba(0,0,0,.06);
  padding-top: 16px;
}
.sort-dd__item:hover {
  background: rgba(0,0,0,0.04);
  color: rgba(0,0,0,0.92);
}

.sort-dd__item:active {
  transform: translateY(1px);
}

/* на мобилке панель по ширине */
@media (max-width: 520px){
  .sort-dd__panel{
    right: 0;
    left: auto;
  }
}


.sort-dd__item.is-reset{
  margin-top: 6px;
  border-top: 1px solid rgba(0,0,0,0.08);
  padding-top: 14px;
  color: rgba(0,0,0,0.52);
  letter-spacing: 0.16em;
}

.sort-dd__item.is-reset:hover{
  background: rgba(0,0,0,0.03);
  color: rgba(0,0,0,0.78);
}

.product-card__note{
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #b00020; /* спокойный красный */
  line-height: 1.35;
}

