/* ===== MODAL FAVORITAR ===== */
.modal-favoritar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn .25s;
}
.modal-favoritar-overlay.visible { display: flex; }

.modal-favoritar {
  background: var(--surface, #151828);
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-width: 500px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  animation: slideUp .3s cubic-bezier(.4,0,.2,1);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-favoritar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border, #2B2B46);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-favoritar-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text, #F3F4F6);
}

.modal-favoritar-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--card, #1E1E32);
  border: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 20px;
  color: var(--muted, #9CA3AF);
}

.modal-favoritar-body {
  padding: 16px 20px;
  flex: 1;
  overflow-y: auto;
}

.modal-favoritar-search {
  width: 100%;
  padding: 12px 16px;
  background: var(--card, #1E1E32);
  border: 1px solid var(--border, #2B2B46);
  border-radius: 10px;
  color: var(--text, #F3F4F6);
  font-size: 15px;
  font-family: inherit;
  margin-bottom: 16px;
}
.modal-favoritar-search:focus {
  outline: none;
  border-color: var(--primary, #7C3AED);
}

.favoritar-lista-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--card, #1E1E32);
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background .2s;
  border: 1px solid transparent;
}
.favoritar-lista-item:active {
  background: var(--border, #2B2B46);
}
.favoritar-lista-item.selected {
  border-color: var(--primary, #7C3AED);
  background: rgba(124, 58, 237, 0.1);
}

.favoritar-lista-color {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
}

.favoritar-lista-info {
  flex: 1;
  min-width: 0;
}

.favoritar-lista-nome {
  font-weight: 600;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text, #F3F4F6);
}

.favoritar-lista-count {
  font-size: 13px;
  color: var(--muted, #9CA3AF);
}

.favoritar-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border, #2B2B46);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 14px;
}
.favoritar-lista-item.selected .favoritar-check {
  background: var(--primary, #7C3AED);
  border-color: var(--primary, #7C3AED);
  color: white;
}

.favoritar-nova-lista {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: transparent;
  border: 2px dashed var(--border, #2B2B46);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .2s;
  width: 100%;
  color: var(--text, #F3F4F6);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  margin-top: 8px;
}
.favoritar-nova-lista:active {
  border-color: var(--primary, #7C3AED);
}

.favoritar-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted, #9CA3AF);
}

.favoritar-loading {
  text-align: center;
  padding: 40px;
}

.favoritar-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border, #2B2B46);
  border-top-color: var(--primary, #7C3AED);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Estilo para botão favoritar nos cards */
.product-favorite.favorited {
  background: var(--primary, #7C3AED);
}
.product-favorite.favorited svg {
  fill: currentColor;
}
