/**
 * Стили публичной части Laravel (не из сборки marm-textiles / main.min.css).
 * После обновления main.min.css из Gulp правки добавляйте сюда.
 */

/* Шапка и панели каталога выше карточек (у слайдера z-index: 10) */
.header {
  z-index: 20;
  isolation: isolate;
}

.sorted {
  z-index: 6;
}

.filter {
  z-index: 4;
}

/* Закрытые модалки не должны перехватывать клики */
.modal-overlay:not(.open) {
  pointer-events: none;
}

/* Невидимые зоны слайдера не перехватывают клики по шапке при скролле */
.goods-card-image-slider-hover,
.goods-card-image-slider-hover-zone {
  pointer-events: none;
}

/* Карточка каталога: слайды галереи до наведения (без серого «битого» img) */
.goods-card-image-slider-item img.goods-card-image-defer {
  object-fit: cover;
  background-color: #f3f3f3;
}

/* --- Аватар в ЛК и в меню пользователя --- */
.shop-avatar-picker {
  position: relative;
  display: block;
  width: 100%;
  box-sizing: border-box;
}

.shop-avatar-picker__hit {
  position: relative;
  display: block;
  margin: 0 auto;
  cursor: pointer;
  border-radius: 50%;
  overflow: hidden;
  line-height: 0;
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  box-sizing: border-box;
}

.shop-avatar-picker__hit picture,
.shop-avatar-picker__hit img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-avatar-picker__plus {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  color: #b4b0b0;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.04);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.shop-avatar-picker__hit:hover .shop-avatar-picker__plus,
.shop-avatar-picker__hit:focus-within .shop-avatar-picker__plus {
  opacity: 1;
  visibility: visible;
  background: rgba(0, 0, 0, 0.48);
  transform: scale(1);
}

@media (hover: none),
(pointer: coarse) {
  .shop-avatar-picker__plus {
    opacity: 0;
    visibility: hidden;
    transform: scale(1.04);
  }
}

.shop-avatar-picker__plus svg {
  display: none;
}

.shop-avatar-picker__plus::before {
  content: "+";
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.9rem;
  height: 2.9rem;
  font-size: 2rem;
  font-weight: 500;
  line-height: 1;
}

.shop-avatar-picker.is-busy {
  opacity: 0.65;
  pointer-events: none;
}

.shop-avatar-picker__err {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: calc(100% + 0.35rem);
  width: min(18rem, 92vw);
  margin-top: 0;
  font-size: max(0.8rem, 13px);
  color: #c00;
  text-align: center;
  line-height: 1.25;
  pointer-events: none;
}

.shop-avatar-picker__err:empty {
  display: none;
}

.modal-user-image {
  overflow: hidden;
  flex-shrink: 0;
  box-sizing: border-box;
}

.modal-user-image .shop-avatar-picker {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.modal-user-image .shop-avatar-picker__hit {
  width: 100%;
  height: 100%;
  aspect-ratio: unset;
}

.modal-user-image .shop-avatar-picker__hit img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header-widget._user {
  overflow: hidden;
}

.header-widget._user img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Профиль: аватар поверх карточки (базовые .profile — в main.min из profile.scss) */
.profile-image {
  overflow: visible;
  box-sizing: border-box;
}

.profile-image .shop-avatar-picker {
  width: 100%;
  height: 100%;
}

.profile-image .shop-avatar-picker__hit {
  width: 100%;
  height: 100%;
  aspect-ratio: unset;
}

.profile-image .shop-avatar-picker__hit img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/*
 * Модалка «Выход»: одна форма на футер, иначе вложенный <form display:inline>
 * не участвует в flex как «половина» ряда и кнопка «Выйти» с width:50% схлопывается.
 */
.modal-footer-logout-form {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  align-items: stretch;
  width: 100%;
  margin: 0;
  gap: max(0.8rem, 16px);
  box-sizing: border-box;
}

/* Одна кнопка в футере (успех заказа и т.п.): не 50% ширины слева */
.modal-footer--center {
  justify-content: center;
}

.modal-footer--center .modal-footer-btn {
  width: auto;
  min-width: min(12rem, 100%);
}

.modal-footer-logout-form__meta {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  pointer-events: none;
}

/* --- Уведомление после отправки отзыва --- */
.site-toast {
  position: fixed;
  z-index: 9999;
  right: max(1rem, 16px);
  bottom: max(1rem, 16px);
  max-width: min(22rem, calc(100vw - 2rem));
  padding: 1rem 2.75rem 1rem 1.1rem;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
  background: #1a1a1a;
  color: #fff;
  font-size: max(0.9rem, 15px);
  line-height: 1.45;
  animation: site-toast-in 0.35s ease-out;
}

.site-toast-text {
  margin: 0;
}

.site-toast-close {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  width: 2rem;
  height: 2rem;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
}

.site-toast-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* --- Регистрация: подтверждение телефона --- */
.form-timer-wrap {
  position: relative;
  display: block;
}

.form-timer-wrap .form-input {
  padding-right: 4.5rem;
}

.form-timer {
  position: absolute;
  top: 50%;
  right: 1.1rem;
  transform: translateY(-50%);
  display: none;
  color: rgba(34, 34, 34, 0.55);
  font-size: 0.85rem;
  line-height: 1;
  pointer-events: none;
}

.form-timer.show {
  display: inline-flex;
}

.form-timer-btn {
  display: none;
  border: 0;
  background: transparent;
  color: rgba(34, 34, 34, 0.74);
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.form-timer-btn.show {
  display: inline-flex;
  justify-content: center;
}

.map--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 24rem;
  background: #f1f1f1;
  color: rgba(34, 34, 34, 0.62);
  font-weight: 500;
  text-align: center;
}
