.wc-cpf {
  --wc-cpf-border: #d9d9d9;
  --wc-cpf-text: #051626;
  --wc-cpf-muted: #666666;
  --wc-cpf-accent: #177EC0;
  --wc-cpf-bg: #ffffff;
  margin: 2.5rem 0;
  color: var(--wc-cpf-text);
}

.wc-cpf__toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: clamp(1rem, 2.5vw, 2.75rem);
  align-items: center;
  padding: 1.2rem 0 1rem;
  border-top: 1px solid var(--wc-cpf-border);
}

.wc-cpf__field {
  position: relative;
  display: block;
}

.wc-cpf__select {
  width: 100%;
  min-height: 2.2rem;
  padding: 0 2rem 0 0;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  box-shadow: none;
  color: var(--wc-cpf-text);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-transform: uppercase;
  text-overflow: ellipsis;
  appearance: none;
}

.wc-cpf__field::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0.2rem;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-60%) rotate(45deg);
  pointer-events: none;
}

.wc-cpf__select:focus {
  outline: none;
  color: var(--wc-cpf-accent);
}

.wc-cpf__select:disabled {
  opacity: 1;
  color: var(--wc-cpf-text);
  cursor: default;
  -webkit-text-fill-color: currentColor;
}

.wc-cpf__field.is-locked::after {
  opacity: 0.45;
}

.wc-cpf__actions {
  display: flex;
  justify-content: flex-end;
}

.wc-cpf__reset {
  min-height: 2.2rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--wc-cpf-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s ease;
}

.wc-cpf__reset:hover,
.wc-cpf__reset:focus {
  color: var(--wc-cpf-accent);
}

.wc-cpf__status {
  margin: 0.85rem 0 0;
  color: var(--wc-cpf-muted);
  font-size: 0.85rem;
}

.wc-cpf__message {
  margin: 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--wc-cpf-border);
  color: var(--wc-cpf-muted);
}

.elementor-loop-container.elementor-grid.wc-cpf-managed > .products,
.elementor-loop-container.elementor-grid.wc-cpf-managed > .wc-cpf__message {
  grid-column: 1 / -1;
  width: 100%;
}

.elementor-loop-container.elementor-grid.wc-cpf-managed > .products {
  margin: 0;
}

.elementor-loop-container.elementor-grid.wc-cpf-loading {
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

@media (max-width: 980px) {
  .wc-cpf__toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wc-cpf__actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .wc-cpf__toolbar {
    grid-template-columns: 1fr;
    gap: 0.85rem;
    padding-top: 1rem;
  }

  .wc-cpf__actions {
    justify-content: flex-start;
  }
}
