/* per-favorites-common.css — common layout styles for per favorites page */

.per-favorites-main {
  flex: 1;
  min-width: 0;
  padding: 24px;
}

.per-favorites-header {
  margin-bottom: 20px;
}

.per-favorites-title {
  font-size: 28px;
  line-height: 42px;
  color: #1a1a1a;
  font-weight: 700;
}

.per-favorites-subtitle {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.5;
  color: #666;
}

.per-favorites-toolbar {
  background: #fff;
  min-height: 53px;
  border-radius: 16px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.per-favorites-select-all {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #666;
  font-weight: 600;
  cursor: pointer;
}

.per-favorites-select-all input {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 1px solid #d6d6d6;
  border-radius: 4px;
  background: #fff;
  position: relative;
  cursor: pointer;
}

.per-favorites-select-all input:checked {
  background: #e31e24;
  border-color: #e31e24;
}

.per-favorites-select-all input:checked::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.per-favorites-delete {
  height: 32px;
  min-width: 86px;
  border: 1px solid #e31e24;
  border-radius: 8px;
  padding: 0 14px;
  background: #fff;
  color: #e31e24;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.per-favorites-delete.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.per-favorites-delete:hover {
  background: #fff3f3;
}

.per-favorites-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(230px, 253px));
  gap: 24px;
  justify-content: space-between;
}

.per-favorites-card {
  border: 1.4px solid #ddd;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 537px;
}

.per-favorites-card__media {
  position: relative;
  height: 250px;
  background: #f5f5f5;
}

.per-favorites-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.per-favorites-card__check {
  position: absolute;
  left: 12px;
  top: 12px;
  cursor: pointer;
}

.per-favorites-card__check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.per-favorites-card__check span {
  width: 24px;
  height: 24px;
  border: 1px solid #d6d6d6;
  background: #fff;
  border-radius: 4px;
  display: block;
  position: relative;
}

.per-favorites-card__check input:checked + span {
  background: #e31e24;
  border-color: #e31e24;
}

.per-favorites-card__check input:checked + span::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 4px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.per-favorites-card__like {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 32px;
  height: 32px;
  border: 1px solid #ddd;
  border-radius: 999px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.per-favorites-card__like img {
  width: 16px;
  height: 16px;
}

.per-favorites-card__body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.per-favorites-card__category {
  font-size: 11px;
  line-height: 1.45;
  color: #999;
}

.per-favorites-card__name {
  margin-top: 4px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: #1a1a1a;
  min-height: 40px;
}

.per-favorites-card__sku {
  margin-top: 6px;
  font-size: 11px;
  color: #999;
}

.per-favorites-card__price-row {
  margin-top: 11px;
  min-height: 30px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.per-favorites-card__price-row strong {
  font-size: 20px;
  line-height: 30px;
  font-weight: 700;
}

.per-favorites-card__price-row span {
  font-size: 13px;
  color: #999;
  text-decoration: line-through;
}

.per-favorites-card__stock {
  margin-top: 12px;
  min-height: 25px;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  line-height: 16px;
  font-weight: 600;
}

.per-favorites-card__added {
  margin-top: 10px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  line-height: 1.45;
  color: #999;
}

.per-favorites-card__added img {
  width: 12px;
  height: 12px;
}

.per-favorites-card__action {
  margin-top: 10px;
  min-height: 40px;
  width: 100%;
  border-radius: 8px;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.per-favorites-card__action img {
  width: 14px;
  height: 14px;
}

@media (max-width: 1500px) {
  .per-favorites-grid {
    grid-template-columns: repeat(3, minmax(230px, 1fr));
  }
}

@media (max-width: 1100px) {
  .per-favorites-title {
    font-size: 26px;
    line-height: 1.25;
  }

  .per-favorites-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 768px) {
  .per-favorites-main {
    width: 100%;
    padding: 0;
  }

  .per-favorites-title {
    font-size: 24px;
    line-height: 1.25;
  }

  .per-favorites-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .per-favorites-card {
    min-height: 0;
  }
}
