/* =====================================================
   ILZE Baltic — ilze-wishlist-page.css
   Страница вишлиста: layout, grid, header, empty state
   ===================================================== */

/* ══════════════════════════════════════════════════════
   1. ШАПКА СТРАНИЦЫ
   ══════════════════════════════════════════════════════ */

/* Убираем CAPS из h1 если тема выдаёт его с text-transform */
#main .page-header h1 {
  text-transform: none !important;
}

/* Строка с заголовком и счётчиком */
.wishlist-page-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

/* Бейдж с количеством товаров */
.wishlist-products-counter,
.wishlist-count-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #f26f21 !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  border-radius: 999px !important;
  padding: 2px 9px !important;
  line-height: 1.4 !important;
  vertical-align: middle !important;
  margin-left: 6px !important;
}

/* ══════════════════════════════════════════════════════
   2. КОНВЕРТИРУЕМ КАРУСЕЛЬ В GRID
   ══════════════════════════════════════════════════════ */

/* Скрываем стрелки навигации слайдера */
.ilze-slider-prev,
.ilze-slider-next,
.js-slider-prev,
.js-slider-next,
.slider-arrow,
.ilze-products-slider-prev,
.ilze-products-slider-next,
.wishlist-products .slick-prev,
.wishlist-products .slick-next,
#wishlist-products-list ~ .slider-nav,
.wishlist-slider-controls,
[class*="wishlist"] [class*="prev"],
[class*="wishlist"] [class*="next"] {
  display: none !important;
}

/* Контейнер слайдера → убираем overflow и transform */
.ilze-slider-wrapper,
.ilze-slider-track,
.wishlist-slider,
[id*="wishlist"] .ilze-slider,
.wishlist-products-list {
  overflow: visible !important;
  transform: none !important;
  transition: none !important;
  width: 100% !important;
}

/* Сам список карточек → grid */
.wishlist-products .products,
.wishlist-products ul,
.wishlist-products-list .products,
#wishlist-products-list,
.js-wishlist-products {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 12px !important;
  /* Сброс слайдерной геометрии */
  transform: none !important;
  width: 100% !important;
  flex-wrap: wrap !important;
}

/* Ячейки карточек */
.wishlist-products .products > *,
.wishlist-products ul > li,
.wishlist-products-list .js-product,
#wishlist-products-list > * {
  width: 100% !important;
  max-width: 100% !important;
  flex: 0 0 auto !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Desktop: 4 колонки */
@media (min-width: 768px) {
  .wishlist-products .products,
  .wishlist-products ul,
  .wishlist-products-list .products,
  #wishlist-products-list,
  .js-wishlist-products {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 16px !important;
  }
}

/* Планшет: 3 колонки */
@media (min-width: 480px) and (max-width: 767px) {
  .wishlist-products .products,
  .wishlist-products ul,
  #wishlist-products-list {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px !important;
  }
}

/* ══════════════════════════════════════════════════════
   3. ПАНЕЛЬ ДЕЙСТВИЙ (поделиться / очистить)
   ══════════════════════════════════════════════════════ */

.wishlist-share,
.wishlist-actions-bar {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  margin-bottom: 20px !important;
  padding-bottom: 16px !important;
  border-bottom: 1px solid #e5e5e5 !important;
}

/* Кнопки в панели — pill-стиль как в page-footer */
.wishlist-share a,
.wishlist-share button,
.wishlist-actions-bar a,
.wishlist-actions-bar button {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 7px 16px !important;
  border-radius: 999px !important;
  border: 1px solid #dce5ee !important;
  background: #f6f8fb !important;
  color: #4a6070 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: color .18s, border-color .18s, background .18s !important;
  white-space: nowrap !important;
}

.wishlist-share a:hover,
.wishlist-share button:hover,
.wishlist-actions-bar a:hover,
.wishlist-actions-bar button:hover {
  color: #f26f21 !important;
  border-color: #f26f21 !important;
  background: #fff8f3 !important;
}

/* ══════════════════════════════════════════════════════
   4. ПУСТОЕ СОСТОЯНИЕ
   ══════════════════════════════════════════════════════ */

.wishlist-empty,
.wishlist-empty-state,
[class*="wishlist"][class*="empty"] {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 48px 24px !important;
  text-align: center !important;
}

/* Иконка сердечка */
.wishlist-empty::before,
.wishlist-empty-state::before {
  content: '\2665' !important;
  font-size: 48px !important;
  color: #f0d5c5 !important;
  display: block !important;
  margin-bottom: 16px !important;
  line-height: 1 !important;
}

.wishlist-empty p,
.wishlist-empty-state p,
.wishlist-empty span {
  font-size: 15px !important;
  color: #6b7c8d !important;
  margin: 0 0 20px !important;
  max-width: 280px !important;
  line-height: 1.5 !important;
}

/* Кнопка "в каталог" */
.wishlist-empty a,
.wishlist-empty-state a {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 10px 22px !important;
  border-radius: 999px !important;
  background: #f26f21 !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  transition: background .18s !important;
}

.wishlist-empty a:hover,
.wishlist-empty-state a:hover {
  background: #d95e10 !important;
  color: #fff !important;
}

/* ══════════════════════════════════════════════════════
   5. ПАГИНАЦИЯ
   ══════════════════════════════════════════════════════ */

.wishlist-pagination,
#wishlist-products-list ~ nav {
  display: flex !important;
  justify-content: center !important;
  margin-top: 24px !important;
}

.wishlist-pagination .page-list,
.wishlist-pagination ul {
  display: flex !important;
  gap: 6px !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.wishlist-pagination li a,
.wishlist-pagination li span {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  border: 1px solid #dce5ee !important;
  background: #f6f8fb !important;
  color: #4a6070 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  transition: all .15s !important;
}

.wishlist-pagination li.active a,
.wishlist-pagination li a:hover {
  background: #f26f21 !important;
  border-color: #f26f21 !important;
  color: #fff !important;
}

/* ══════════════════════════════════════════════════════
   6. MOBILE TWEAKS
   ══════════════════════════════════════════════════════ */

@media (max-width: 480px) {
  .wishlist-share,
  .wishlist-actions-bar {
    gap: 8px !important;
  }
  .wishlist-empty {
    padding: 32px 16px !important;
  }
}

/* ══════════════════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════════════════ */

.wl-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 24px 40px;
}

/* Сердечко SVG */
.wl-empty-icon {
  width: 64px;
  height: 64px;
  fill: none;
  stroke: #f0c8b0;
  stroke-width: 1.2;
  margin-bottom: 20px;
  animation: wl-pulse 2.4s ease-in-out infinite;
}

@keyframes wl-pulse {
  0%, 100% { transform: scale(1);   stroke: #f0c8b0; }
  50%       { transform: scale(1.08); stroke: #f26f21; }
}

.wl-empty-title {
  font-size: 17px;
  font-weight: 700;
  color: #1a2530;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.wl-empty-sub {
  font-size: 13px;
  color: #6b7c8d;
  margin: 0 0 24px;
  max-width: 260px;
  line-height: 1.5;
}

/* Кнопка — оранжевый pill */
.wl-empty-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 10px 24px !important;
  border-radius: 999px !important;
  background: #f26f21 !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  transition: background .18s, transform .18s !important;
}

.wl-empty-btn:hover {
  background: #d95e10 !important;
  color: #fff !important;
  transform: translateY(-1px) !important;
  text-decoration: none !important;
}

/* ══════════════════════════════════════════════════════
   ADD MORE CARD (карточка-заглушка в слайдере)
   ══════════════════════════════════════════════════════ */

.wl-add-more-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  height: 100% !important;
  min-height: 180px !important;
  border: 2px dashed #e0e8f0 !important;
  border-radius: 6px !important;
  background: #fafbfc !important;
  text-decoration: none !important;
  gap: 10px !important;
  padding: 16px !important;
  transition: border-color .2s, background .2s !important;
  box-sizing: border-box !important;
}

.wl-add-more-card:hover {
  border-color: #f26f21 !important;
  background: #fff8f3 !important;
  text-decoration: none !important;
}

.wl-add-more-icon svg {
  stroke: #c8d4de;
  transition: stroke .2s;
}

.wl-add-more-card:hover .wl-add-more-icon svg {
  stroke: #f26f21;
}

.wl-add-more-label {
  font-size: 12px !important;
  font-weight: 500 !important;
  color: #9aaab8 !important;
  text-align: center !important;
  line-height: 1.3 !important;
  transition: color .2s !important;
}

.wl-add-more-card:hover .wl-add-more-label {
  color: #f26f21 !important;
}

/* Карточка-заглушка занимает ту же ширину что и обычная */
.wl-add-more-slide {
  display: flex !important;
  flex-direction: column !important;
}

/* ══════════════════════════════════════════════════════
   SORT ROW
   ══════════════════════════════════════════════════════ */

.wl-sort-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 0 2px;
}

.wl-sort-label {
  font-size: 12px;
  color: #9aaab8;
  font-weight: 500;
  white-space: nowrap;
}

.wl-sort-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.wl-sort-btn {
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid #dce5ee;
  background: #f6f8fb;
  color: #4a6070;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
  white-space: nowrap;
  line-height: 1.4;
}

.wl-sort-btn:hover {
  color: #f26f21;
  border-color: #f26f21;
  background: #fff8f3;
}

.wl-sort-btn.active {
  background: #f26f21;
  border-color: #f26f21;
  color: #fff;
}

/* ══════════════════════════════════════════════════════
   STAT BAR (счётчик + кнопка поделиться)
   ══════════════════════════════════════════════════════ */

.wl-stat-bar {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 9px 14px;
  margin-bottom: 16px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  max-width: 100%;
}

/* Десктоп — во всю ширину контента, крупнее, с тенью */
@media (min-width: 768px) {
  .wl-stat-bar {
    display: flex;
    width: calc(100% - 32px);
    margin-left: 16px;
    margin-right: 16px;
    padding: 14px 22px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    margin-bottom: 22px;
    box-sizing: border-box;
  }

  .wl-stat-heart {
    width: 24px !important;
    height: 24px !important;
  }

  .wl-stat-count {
    font-size: 14px;
  }

  .wl-share-btn {
    padding: 10px 22px;
    font-size: 14px;
    gap: 7px;
  }

  .wl-share-btn svg {
    width: 16px !important;
    height: 16px !important;
  }
}

/* Мобиль — во всю ширину с отступами от краёв */
@media (max-width: 767px) {
  .wl-stat-bar {
    display: flex !important;
    width: calc(100% - 28px) !important;
    margin-left: 14px !important;
    margin-right: 14px !important;
    box-sizing: border-box !important;
  }
}

.wl-stat-left {
  display: flex;
  align-items: center;
  gap: 9px;
}

.wl-stat-heart path {
  stroke: #f26f21;
}

.wl-stat-count {
  font-size: 13px;
  font-weight: 600;
  color: #1a2530;
}

/* Кнопка "Поделиться" */
.wl-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid #dce5ee;
  background: #f6f8fb;
  color: #4a6070;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: color .18s, border-color .18s, background .18s;
  white-space: nowrap;
}

.wl-share-btn:hover {
  color: #f26f21;
  border-color: #f26f21;
  background: #fff8f3;
}

.wl-share-btn.copied {
  color: #2d8644;
  border-color: #2d8644;
  background: rgba(52,168,83,0.06);
}