/* ==========================================================================
   LEGACY — стили для старых шаблонов (постепенно вычищается по мере
   реализации новых template-parts). НЕ ДОБАВЛЯТЬ сюда новые правила.
   ========================================================================== */

/* Старые секции / banner */
.section-banner img {
  max-height: 800px;
  object-fit: cover;
}

/* Старая навигация в шапке */
.nav-link {
  color: black;
  font-size: 16px;
  text-transform: uppercase;
}
.nav-link.active {
  color: #F6623E;
}

/* === Старая карточка товара (products-mini-card.php) ================== */
.card-product {
  width: 100%;
  height: 100%;
}
.card-product-name {
  font-weight: 500;
  text-align: center;
  line-height: 20px;
}
.card-product-img {
  position: relative;
}
.card-product-img img {
  cursor: pointer;
  max-height: 300px;
  object-fit: cover;
}
.card-product-footer .price {
  color: #F6623E;
  font-size: 16px;
}
.card-product-footer .price-sale {
  color: #828181;
  font-size: 16px;
  text-decoration: line-through;
}
.section-product-prices .price {
  color: #F6623E;
  font-size: 30px;
}
.section-product-prices .price-sale {
  color: #828181;
  font-size: 25px;
  text-decoration: line-through;
}
.card-product-action-button {
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  background: #669f73;
  width: 100%;
  color: white !important;
  display: block;
  font-weight: 600;
  cursor: pointer;
  border: 0;
}
.card-product .product-favorite-toggle {
  right: 8px;
  color: black;
  cursor: pointer;
}
.card-product-action-button:hover {
  background: #529e63;
}
.card-product-action-next {
  cursor: pointer;
  font-size: 30px;
  height: 100%;
  background: #f9d9cc;
  text-transform: uppercase;
  font-weight: 500;
  width: 100%;
}
.card-product-action-next a {
  height: 100%;
  width: 100%;
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
}
.card-product-action-next:hover {
  background: #fdcebb;
}

/* === Swiper baseline (текущие шаблоны полагаются на это) ============== */
.swiper {
  width: 100%;
  height: 100%;
}
.swiper-slide {
  font-size: 18px;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
}
.swiper-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
}

/* === Старые заголовки секций ========================================= */
.title {
  text-transform: uppercase;
  font-size: 36px;
  font-weight: 500;
}
.title-down {
  width: 127px;
  border: 2px solid #ab4459;
}
.text-right {
  text-align: right !important;
}

/* === Fancybox base override ========================================== */
.fancybox__content {
  padding: 0;
  max-width: 460px;
  border-radius: var(--radius-lg, 16px) !important;
  background: var(--color-bg, #fff);
}

/* ============================================================
   Modal — «Купить в 1 клик» (mcakes redesign)
   ============================================================ */
.mc-one-click {
  display: flex;
  flex-direction: column;
}

.mc-one-click__head {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-4) var(--space-5) var(--space-3);
  border-block-end: 1px solid var(--color-border);
}

.mc-one-click__thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-bg-light);
}

.mc-one-click__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mc-one-click__head-text {
  flex: 1;
  min-width: 0;
}

.mc-one-click__title {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-md);
  line-height: var(--lh-snug);
  color: var(--color-text);
  margin: 0 0 var(--space-1);
}

.mc-one-click__price-line {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.mc-one-click__price {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: var(--fs-xl);
  color: var(--color-text);
  line-height: 1;
}

.mc-one-click__bonus {
  font-size: var(--fs-xs);
  color: var(--color-warn, #C97A0E);
  font-weight: var(--fw-medium);
}

/* Form */
.mc-one-click__form {
  padding: var(--space-4) var(--space-5) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.mc-one-click__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mc-one-click__label {
  font-size: var(--fs-xs);
  color: var(--color-text-soft);
  font-weight: var(--fw-medium);
}

.mc-one-click__input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  color: var(--color-text);
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}

.mc-one-click__input::placeholder { color: var(--color-text-muted); }

.mc-one-click__input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-focus-ring, 0 0 0 3px rgba(246, 98, 62, .15));
}

.mc-one-click__input:invalid:not(:placeholder-shown) {
  border-color: var(--color-danger, #DC3545);
}

.mc-one-click__submit {
  margin-block-start: var(--space-2);
  width: 100%;
  justify-content: center;
}

/* Trust list */
.mc-one-click__trust {
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: var(--space-3) 0 0;
  border-block-start: 1px dashed var(--color-border);
  display: grid;
  gap: var(--space-2);
  font-size: var(--fs-xs);
  color: var(--color-text-soft);
}

.mc-one-click__trust li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mc-one-click__trust .mc-icon {
  color: var(--color-primary);
  flex-shrink: 0;
}

.mc-one-click__privacy {
  font-size: 11px;
  color: var(--color-text-muted);
  margin: var(--space-2) 0 0;
  line-height: 1.4;
  text-align: center;
}

.mc-one-click__privacy a {
  color: var(--color-text-soft);
  text-decoration: underline;
}

.mc-one-click__privacy a:hover {
  color: var(--color-primary);
}

/* Скрываем «iti»-флаг (intl-tel-input) если плагин его подкидывает */
.mc-one-click .iti__flag-container,
.mc-one-click .iti__country-container {
  display: none !important;
}

/* === Спасибо за заказ ================================================ */
.thanks-for-order h1 {
  font-size: 3em;
  margin-bottom: 10px;
}
.thanks-for-order-desc {
  font-size: 24px;
}

/* === Старая шапка / соцсети =========================================== */
.section-header-social-item i {
  font-size: 25px;
}
.section-header-burger {
  font-size: 22px;
}

/* === Vertical gallery slider (страница товара) ======================== */
.vertical-imgs-slider .swiper-container {
  overflow: hidden;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}
.vertical-imgs-slider .swiper-container-wrapper {
  display: flex;
  flex-flow: column nowrap;
  width: 100%;
  max-height: 350px;
}
.vertical-imgs-slider .swiper-button-next,
.vertical-imgs-slider .swiper-button-prev {
  color: #000;
}
.vertical-imgs-slider .swiper-slide {
  text-align: center;
  background-size: cover;
  background-position: center;
  background-color: #fff;
  display: flex;
  flex-flow: column nowrap;
  justify-content: center;
  align-items: center;
}
.vertical-imgs-slider .gallery-top {
  position: relative;
  width: 100%;
}
.vertical-imgs-slider .gallery-thumbs {
  width: 100%;
  padding-top: 10px;
}
.vertical-imgs-slider .gallery-thumbs .swiper-wrapper {
  flex-direction: row;
}
.vertical-imgs-slider .gallery-thumbs .swiper-slide {
  width: 25%;
  flex-flow: row nowrap;
  height: 100%;
  opacity: 0.75;
  cursor: pointer;
}
.vertical-imgs-slider .gallery-thumbs .swiper-slide-thumb-active {
  opacity: 1;
}

/* === Карточка событий (by-event) ===================================== */
.card-by-event p {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
}

#breadcrumbs a {
  text-decoration: none;
}

.nav .badge {
  top: 0;
  right: -20px;
}

/* === Legacy media queries ============================================ */
@media (max-width: 991px) {
  .section-header-social-item i { font-size: 22px; }
  .section-header-menu-item a { font-size: 14px; }
  .card-product-action-button { font-size: 14px; }
  .title { font-size: 26px; }
}

@media (max-width: 767px) {
  .section-header-menu-item a { font-size: 25px; }
  .section-header-social-item i { font-size: 30px; }
  .vertical-imgs-slider .swiper-container-wrapper { max-height: 320px; }
}

@media (max-width: 575px) {
  .section-banner img {
    object-fit: unset;
    max-height: unset;
  }
  .nav .badge {
    font-size: 10px;
    top: 8px;
    right: 6px;
  }
}

@media (min-width: 320px) {
  .vertical-imgs-slider .swiper-container { min-height: 320px; }
  .vertical-imgs-slider .swiper-container-wrapper { flex-flow: row nowrap; }
  .vertical-imgs-slider .gallery-top { width: 80%; margin-right: 10px; }
  .vertical-imgs-slider .gallery-thumbs { width: 20%; padding: 0; }
  .vertical-imgs-slider .gallery-thumbs .swiper-wrapper { flex-direction: column; }
  .vertical-imgs-slider .gallery-thumbs .swiper-slide {
    flex-flow: column nowrap;
    width: 100%;
  }
}
