/* .showmore глобально — вариант A (тихий) + шеврон вниз
   Язык catalog-link / feedback: мягкий персиковый градиент, тонкая рамка
   rgba(140,0,20,.38), радиус 3px (как .catalog-list .item), объём; hover = бордо + translateY(-1px)
   + статичная тень. Без толстого outline, без pill, без блика/glow.
   PHP-шаблоны не трогаем. Late в header.php (после style.css / home-mobile.css).
   Ширины/паддинги из style.css и компактные оверрайды home-mobile сохраняются. */

a.showmore,
.showmore {
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  text-decoration: none;
  color: var(--color-black, #423b38);
  border-radius: 3px;
  border: 1.5px solid rgba(140, 0, 20, 0.38);
  background: linear-gradient(
    165deg,
    #ffe9da 0%,
    var(--color-orange, #fcd9c2) 42%,
    #f3c4a0 100%
  );
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.65) inset,
    0 4px 14px rgba(66, 59, 56, 0.14),
    0 1px 2px rgba(66, 59, 56, 0.08);
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transform: translateZ(0);
  transition:
    transform 0.2s ease,
    box-shadow 0.26s ease,
    background 0.28s ease,
    border-color 0.28s ease,
    color 0.2s ease,
    opacity 0.2s ease;
}

/* Шеврон вниз вместо сетки showmore.svg.
   mask + currentColor — цвет иконки следует за текстом (в т.ч. белый на hover). */
a.showmore::before,
.showmore::before {
  content: '';
  display: inline-block;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-right: 10px;
  background-color: currentColor;
  background-image: none;
  background-size: auto;
  background-repeat: no-repeat;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%23000' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%23000' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

@media (max-width: 991px) {
  a.showmore::before,
  .showmore::before {
    width: 16px;
    height: 16px;
    margin-right: 8px;
  }
}

/* Активный hover только на устройствах с настоящим hover —
   тач (iPad и т.п.) не «залипает» в бордо после тапа. */
@media (hover: hover) {
  a.showmore:hover,
  .showmore:hover {
    color: #fff;
    text-decoration: none;
    border-color: var(--color-red, #8c0014);
    background: linear-gradient(
      165deg,
      #a31024 0%,
      var(--color-red, #8c0014) 48%,
      #6a0010 100%
    );
    transform: translateY(-1px);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.14) inset,
      0 0 0 1px rgba(140, 0, 20, 0.1),
      0 8px 20px rgba(140, 0, 20, 0.28),
      0 2px 6px rgba(66, 59, 56, 0.12);
  }

  /* home-mobile.css: .pop-brands-section .showmore.wide:hover специфичнее —
     выравниваем к тому же тихому A-языку. */
  .pop-brands-section a.showmore.wide:hover,
  .pop-brands-section .showmore.wide:hover {
    color: #fff;
    text-decoration: none;
    border-color: var(--color-red, #8c0014);
    background: linear-gradient(
      165deg,
      #a31024 0%,
      var(--color-red, #8c0014) 48%,
      #6a0010 100%
    );
    transform: translateY(-1px);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.14) inset,
      0 0 0 1px rgba(140, 0, 20, 0.1),
      0 8px 20px rgba(140, 0, 20, 0.28),
      0 2px 6px rgba(66, 59, 56, 0.12);
  }
}

/* Клавиатура: бордовый вид + ореол фокуса. Обычный :focus не красим. */
a.showmore:focus-visible,
.showmore:focus-visible,
.pop-brands-section a.showmore.wide:focus-visible,
.pop-brands-section .showmore.wide:focus-visible {
  color: #fff;
  text-decoration: none;
  border-color: var(--color-red, #8c0014);
  background: linear-gradient(
    165deg,
    #a31024 0%,
    var(--color-red, #8c0014) 48%,
    #6a0010 100%
  );
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.14) inset,
    0 0 0 3px rgba(140, 0, 20, 0.28),
    0 8px 18px rgba(140, 0, 20, 0.26);
}

/* style.css даёт :hover → плоский --color-red. На таче гасим прыжок. */
@media not all and (hover: hover) {
  a.showmore:hover,
  .showmore:hover,
  .pop-brands-section a.showmore.wide:hover,
  .pop-brands-section .showmore.wide:hover {
    color: var(--color-black, #423b38);
    border-color: rgba(140, 0, 20, 0.38);
    background: linear-gradient(
      165deg,
      #ffe9da 0%,
      var(--color-orange, #fcd9c2) 42%,
      #f3c4a0 100%
    );
    transform: translateZ(0);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.65) inset,
      0 4px 14px rgba(66, 59, 56, 0.14),
      0 1px 2px rgba(66, 59, 56, 0.08);
  }
}

a.showmore:active,
.showmore:active {
  transform: translateY(0);
  box-shadow:
    0 2px 5px rgba(66, 59, 56, 0.2) inset,
    0 0 0 1px rgba(140, 0, 20, 0.12),
    0 2px 6px rgba(140, 0, 20, 0.18);
}

/* .is-loading (каталог / поиск / бренд) — opacity + pointer-events из style.css;
   не перебиваем. transition opacity выше уже есть. */

@media (prefers-reduced-motion: reduce) {
  a.showmore,
  .showmore {
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  }
  a.showmore:hover,
  .showmore:hover,
  a.showmore:focus-visible,
  .showmore:focus-visible,
  a.showmore:active,
  .showmore:active,
  .pop-brands-section a.showmore.wide:hover,
  .pop-brands-section .showmore.wide:hover {
    transform: translateZ(0);
  }
}

/* Windows High Contrast / forced-colors */
@media (forced-colors: active) {
  a.showmore,
  .showmore {
    border-color: ButtonText;
    forced-color-adjust: none;
  }
  a.showmore::before,
  .showmore::before {
    background-color: ButtonText;
  }
}

/* home-mobile: компактный «Все бренды» — оставляем их padding/font, радиус A */
@media (max-width: 768px) {
  .pop-brands-section a.showmore.wide,
  .pop-brands-section .showmore.wide {
    border-radius: 3px;
  }
}
