/* Selected Products Block Styles */

:root {
  --baudep-accent: #f257b6;
  --baudep-text-main: #2f2f2f;
  --baudep-text-muted: #787878;
  --baudep-card-gap: 22px;
}

.baudep-selected-products-block {
  margin: 48px 0 60px;
}

.baudep-selected-products-block__header {
  margin-bottom: 34px;
  text-align: center;
  position: relative;
  padding-top: 12px;
}

@import url("./block-section-header.css");

.baudep-selected-products-block__wrapper {
  position: relative;
}

.baudep-selected-products-block__viewport {
  overflow: hidden;
}

.baudep-selected-products-block__content {
  display: grid;
  gap: var(--baudep-card-gap);
  margin-top: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.baudep-selected-products-block__content.is-slider {
  display: flex;
  gap: 0;
  transition: transform 0.35s ease;
  will-change: transform;
}

.baudep-product-item {
  background: #fff;
  border-radius: 2px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.baudep-selected-products-block__content.is-slider .baudep-product-item {
  flex: 0 0 25%;
  max-width: 25%;
  padding-right: var(--baudep-card-gap);
}

.baudep-product-item__link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.baudep-product-item:hover .baudep-product-item__image img {
  transform: scale(1.03);
}

.baudep-product-item__image {
  width: 100%;
  aspect-ratio: 2 / 3;
  background: #f2f2f2;
  overflow: hidden;
  position: relative;
}

.baudep-product-item__image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    transform 0.35s ease,
    opacity 0.28s ease;
}

.baudep-product-item__image-main {
  opacity: 1;
}

.baudep-product-item__image-hover {
  opacity: 0;
}

.baudep-product-item:hover .baudep-product-item__image-main {
  opacity: 0;
}

.baudep-product-item:hover .baudep-product-item__image-hover {
  opacity: 1;
}

.baudep-product-item__info {
  padding: 12px 2px 0;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.baudep-product-item__name {
  font-size: 16px;
  font-weight: 400;
  color: #404040;
  margin-bottom: 5px;
  line-height: 1.5;
  line-clamp: 2;
  min-height: 44px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.baudep-product-item__price {
  margin: 0;
  color: var(--baudep-accent);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
}

.baudep-product-item__empty {
  text-align: center;
  padding: 40px 20px;
  color: #999;
}

.baudep-selected-products-block__nav {
  position: absolute;
  top: calc(50% - 50px);
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  color: #9b9b9b;
  box-shadow: 0 3px 16px rgba(0, 0, 0, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
}

.baudep-selected-products-block__nav:hover {
  transform: translateY(-50%) scale(1.04);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.11);
}

.baudep-selected-products-block__nav[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.baudep-selected-products-block__nav span {
  font-size: 42px;
  line-height: 1;
  margin-top: -5px;
}

.baudep-selected-products-block__nav--prev {
  left: 26px;
}

.baudep-selected-products-block__nav--next {
  right: 26px;
}

.baudep-product-archive {
  padding: 40px 0 72px;
}

.baudep-product-archive__section {
  margin: 0;
}

.baudep-product-archive__header {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.baudep-product-archive__description {
  margin-top: 12px;
}

.baudep-product-archive__description p:last-child {
  margin-bottom: 0;
}

.baudep-product-archive__count {
  margin: 16px 0 0;
  color: var(--baudep-text-muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.baudep-product-archive__pagination {
  margin-top: 44px;
}

.baudep-product-archive__pagination .page-numbers {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 0;
  margin: 0;
}

.baudep-product-archive__pagination .page-numbers li {
  margin: 0;
}

.baudep-product-archive__pagination .page-numbers a,
.baudep-product-archive__pagination .page-numbers span {
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #e8dbe5;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #3f3f3f;
  background: #fff;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.baudep-product-archive__pagination .page-numbers a:hover,
.baudep-product-archive__pagination .page-numbers .current {
  background: var(--baudep-accent);
  border-color: var(--baudep-accent);
  color: #fff;
}

@media (max-width: 1200px) {
  .baudep-product-item__name {
    font-size: 16px;
  }

  .baudep-product-item__price {
    font-size: 26px;
  }
}

@media (max-width: 991px) {
  .baudep-selected-products-block__content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .baudep-selected-products-block__content.is-slider .baudep-product-item {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .baudep-selected-products-block__nav--prev {
    left: 14px;
  }

  .baudep-selected-products-block__nav--next {
    right: 14px;
  }
}

@media (max-width: 600px) {
  .baudep-selected-products-block {
    margin: 34px 0;
  }

  .baudep-product-archive {
    padding: 24px 0 52px;
  }

  .baudep-selected-products-block__content {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .baudep-selected-products-block__content.is-slider .baudep-product-item {
    flex: 0 0 100%;
    max-width: 100%;
    padding-right: 0;
  }

  .baudep-product-item__name {
    font-size: 16px;
    min-height: 32px;
  }

  .baudep-product-item__price {
    font-size: 26px;
  }

  .baudep-selected-products-block__nav {
    width: 42px;
    height: 42px;
    top: 46%;
  }

  .baudep-selected-products-block__nav span {
    font-size: 32px;
    margin-top: -4px;
  }

  .baudep-product-archive__pagination {
    margin-top: 30px;
  }

  .baudep-product-archive__pagination .page-numbers {
    gap: 8px;
  }

  .baudep-product-archive__pagination .page-numbers a,
  .baudep-product-archive__pagination .page-numbers span {
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    font-size: 14px;
  }
}

/* Admin Styles */
.baudep-selected-products-admin {
  padding: 16px;
  background: #fff;
}

.baudep-selected-products-admin__form-group {
  margin-bottom: 16px;
}

.baudep-selected-products-admin__label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #1a1a1a;
}

.baudep-selected-products-admin__input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.baudep-selected-products-admin__textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  min-height: 80px;
  font-family: inherit;
  resize: vertical;
}

.baudep-selected-products-admin__search {
  width: 100%;
  max-width: 400px;
}

.baudep-selected-products-admin__results {
  margin-top: 12px;
  padding: 12px;
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 4px;
  max-height: 300px;
  overflow-y: auto;
}

.baudep-selected-products-admin__result-item {
  padding: 8px;
  background: #fff;
  margin-bottom: 8px;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}

.baudep-selected-products-admin__result-item:hover {
  background: #f0f0f0;
}

.baudep-selected-products-admin__selected-list {
  margin-top: 16px;
  padding: 12px;
  background: #f0f7ff;
  border: 1px solid #b8d4e8;
  border-radius: 4px;
}

.baudep-selected-products-admin__selected-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  background: #fff;
  margin-bottom: 8px;
  border-radius: 3px;
  border: 1px solid #e0e0e0;
}

.baudep-selected-products-admin__remove-btn {
  padding: 4px 8px;
  background: #dc3545;
  color: #fff;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
  transition: background 0.2s;
}

.baudep-selected-products-admin__remove-btn:hover {
  background: #c82333;
}
