/* Botões */
.wl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  line-height: 1;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.wl-btn:hover {
  transform: translateY(-1px);
}

.wl-btn--promo {
  background: var(--grad-promo-dream);
  color: var(--wl-white);
  box-shadow: var(--shadow-soft);
}

.wl-btn--promo:hover {
  color: var(--wl-white);
  animation: wl-pulse-soft 1.4s ease infinite;
}

.wl-btn--ghost {
  background: transparent;
  border-color: var(--color-border);
  color: var(--wl-cherry);
}

.wl-btn--outline {
  background: var(--wl-white);
  border-color: var(--wl-pink);
  color: var(--wl-promo);
}

.wl-btn--lg {
  padding: 1rem 1.6rem;
  font-size: var(--text-base);
}

/* Inputs */
.wl-input,
.wl-login input[type="text"],
.wl-login input[type="password"],
.wl-login input[type="email"] {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--wl-cherry);
  background: var(--wl-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.75rem;
  width: 100%;
}

.wl-input--qty {
  width: 4.5rem;
}

.wl-textarea {
  resize: vertical;
  min-height: 5rem;
}

.wl-label {
  display: block;
  font-weight: 600;
  font-size: var(--text-sm);
  margin-bottom: var(--space-2);
}

/* Chips / filters */
.wl-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.wl-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: var(--wl-white);
  border: 1px solid var(--color-border);
  color: var(--wl-cherry);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
}

.wl-chip:hover,
.wl-chip.is-active {
  background: var(--wl-blush);
  border-color: var(--wl-candy);
  color: var(--wl-cherry);
}

/* Product grid — interaction cards (allowed) */
.wl-catalog-search {
  margin: 0 0 var(--space-4);
}

.wl-catalog-search__input {
  width: 100%;
  max-width: 28rem;
  min-height: 2.75rem;
  padding-left: 1rem;
  background: var(--wl-white);
}

.wl-product-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

@media (min-width: 640px) {
  .wl-product-grid {
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: var(--space-5);
  }
}

@media (max-width: 639px) {
  .wl-product-card__body {
    padding: var(--space-3);
  }

  .wl-product-card__title {
    font-size: 1.05rem;
    min-height: 2.2em;
  }

  .wl-product-card__excerpt {
    font-size: 0.75rem;
    min-height: 0;
    -webkit-line-clamp: 2;
  }

  .wl-product-card__meta {
    font-size: 0.7rem;
  }

  .wl-add-form {
    flex-wrap: wrap;
  }

  .wl-add-form .wl-input {
    flex: 1 1 100%;
    min-width: 0;
  }

  .wl-add-form .wl-btn {
    width: 100%;
  }
}

.wl-product-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.wl-product-card > article {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.wl-product-card:hover {
  transform: translateY(-3px);
}

.wl-product-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--grad-cloud-candy);
  display: grid;
  place-items: center;
  overflow: hidden;
}

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

.wl-product-card__placeholder {
  color: var(--wl-pink);
  opacity: 0.85;
  display: grid;
  place-items: center;
  gap: 0.35rem;
  text-align: center;
  font-size: var(--text-xs);
  font-weight: 600;
}

.wl-product-card__add-photo {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--wl-promo);
  padding: 0;
}

.wl-product-card__add-photo:hover,
.wl-product-card__add-photo:focus-visible {
  background: rgba(255, 246, 250, 0.35);
  outline: none;
}

.wl-product-card__add-photo.has-photo {
  place-items: end;
  justify-items: end;
  padding: 0.55rem;
  background: transparent;
}

.wl-product-card__add-photo.has-photo:hover {
  background: linear-gradient(to top, rgba(42, 11, 29, 0.2), transparent 55%);
}

.wl-product-card__add-photo .wl-plus {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  background: #fff;
  border: 1px dashed var(--wl-pink);
  color: var(--wl-promo);
  box-shadow: 0 6px 18px rgba(42, 11, 29, 0.08);
}

.wl-product-card__add-photo.has-photo .wl-plus {
  width: 2.1rem;
  height: 2.1rem;
  border-style: solid;
  opacity: 0.95;
}

.wl-product-card__add-photo .wl-plus-label {
  margin-top: 0.35rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--wl-cherry);
}

.wl-product-card__add-photo.has-photo .wl-plus-label {
  display: none;
}

.wl-product-card__body {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0;
}

.wl-product-card__cat {
  margin: 0 0 var(--space-1);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wl-promo);
}

.wl-product-card__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  letter-spacing: 0.03em;
  margin: 0 0 var(--space-2);
  line-height: 1.05;
  min-height: 2.1em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wl-product-card__meta {
  margin: 0 0 var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-muted);
}

.wl-product-card__excerpt {
  margin: 0 0 var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-muted);
  line-height: 1.4;
  min-height: 2.8em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wl-add-form {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  margin-top: auto;
  padding-top: var(--space-2);
}

.wl-product-card__body > .wl-btn {
  margin-top: auto;
  width: 100%;
}

/* Tables */
.wl-cart-table-wrap,
.wl-finance-card {
  overflow-x: auto;
}

.wl-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--wl-white);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.wl-table th,
.wl-table td {
  text-align: left;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-sm);
  vertical-align: middle;
}

.wl-table th {
  background: var(--wl-blush-soft);
  font-weight: 600;
}

.wl-table--compact th,
.wl-table--compact td {
  padding: 0.55rem 0.75rem;
}

.wl-product-card__media--pick {
  display: grid;
  place-items: center;
  width: 100%;
  border: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  padding: 0;
}

.wl-product-card__media--pick:hover {
  filter: brightness(0.98);
}

.wl-pick-label {
  display: block;
  margin-top: 0.4rem;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wl-promo);
}

.wl-image-pick {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px dashed var(--wl-candy);
  border-radius: var(--radius-md);
  background: var(--wl-blush-soft);
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  font: inherit;
  color: var(--wl-cherry);
}

.wl-image-pick img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wl-image-pick__placeholder {
  display: grid;
  place-items: center;
  gap: 0.35rem;
  color: var(--wl-promo);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--space-3);
  text-align: center;
}

.wl-product-card--custom {
  border-style: dashed;
  border-color: var(--wl-candy);
  background: linear-gradient(180deg, var(--wl-blush-soft), var(--wl-white));
}

.wl-product-card__media--dash {
  background: repeating-linear-gradient(
    -45deg,
    var(--wl-blush-soft),
    var(--wl-blush-soft) 8px,
    var(--wl-white) 8px,
    var(--wl-white) 16px
  );
}

.wl-dialog {
  border: 0;
  padding: 0;
  border-radius: var(--radius-lg);
  max-width: min(92vw, 28rem);
  width: 100%;
  background: transparent;
}

.wl-dialog::backdrop {
  background: rgba(42, 11, 29, 0.45);
}

.wl-dialog__panel {
  margin: 0;
  padding: var(--space-5);
  background: var(--wl-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: var(--space-3);
}

.wl-dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.wl-dialog__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  letter-spacing: 0.04em;
  margin: 0;
}

.wl-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.wl-people {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.wl-chip--person {
  cursor: pointer;
  font: inherit;
}

.wl-chip--person.is-active {
  background: var(--grad-promo-dream);
  border-color: transparent;
  color: var(--wl-white);
}

.wl-cart-submit {
  margin-top: var(--space-5);
  max-width: 36rem;
  display: grid;
  gap: var(--space-3);
}

.wl-meta-box {
  margin: 0;
  padding: var(--space-4);
  border: 1px solid var(--wl-candy);
  border-radius: var(--radius-md);
  background: var(--wl-blush-soft);
}

.wl-meta-box legend {
  padding: 0 var(--space-2);
}

.wl-meta-grid {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-3);
}

@media (min-width: 640px) {
  .wl-meta-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.wl-field.is-invalid .wl-input {
  border-color: var(--wl-promo);
  box-shadow: 0 0 0 3px rgba(216, 36, 133, 0.18);
}

.wl-required {
  color: var(--wl-promo);
  font-weight: 700;
}

.wl-hint {
  margin: 0.15rem 0 0;
  font-size: var(--text-sm);
  color: var(--color-muted);
}

.wl-field-error {
  margin: 0.35rem 0 0;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--wl-promo);
}

.wl-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  animation: none;
}

/* Orders / finance */
.wl-order-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-4);
}

.wl-order-card,
.wl-finance-card,
.wl-login__box {
  background: var(--wl-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-soft);
}

.wl-order-card__head,
.wl-finance-card__head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  align-items: flex-start;
  margin-bottom: var(--space-3);
}

.wl-order-card__title,
.wl-finance-card__title,
.wl-sector-block__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  letter-spacing: 0.04em;
  margin: 0;
}

.wl-order-card__meta,
.wl-finance-card__meta {
  margin: 0.25rem 0 0;
  color: var(--color-muted);
  font-size: var(--text-sm);
}

.wl-order-card__items {
  margin: var(--space-3) 0 0;
  padding-left: 1.1rem;
  color: var(--color-muted);
  font-size: var(--text-sm);
}

.wl-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--wl-blush);
  color: var(--wl-cherry);
}

.wl-badge--enviado { background: #D4E8FF; color: #163a66; }
.wl-badge--pendente { background: #FFE8A3; }
.wl-badge--em_compra { background: var(--wl-candy); color: var(--wl-cherry); }
.wl-badge--entregue { background: #C8F0D8; }
.wl-badge--cancelado { background: #F0D0D8; }

.wl-sector-block {
  margin-top: var(--space-6);
}

.wl-sector-block__title {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--wl-candy);
}

.wl-sector-block__count {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-muted);
  letter-spacing: 0;
  text-transform: none;
}

.wl-finance-card {
  margin-bottom: var(--space-4);
}

.wl-finance-card__actions {
  min-width: 10rem;
}

.wl-finance-card__nota {
  font-size: var(--text-sm);
  color: var(--color-muted);
  margin: 0 0 var(--space-3);
}

.wl-notice {
  padding: var(--space-4);
  background: var(--wl-blush-soft);
  border-radius: var(--radius-md);
  border: 1px solid var(--wl-blush);
}

.wl-notice--error {
  background: #FFF0F3;
  border-color: #F0B0C0;
}

.wl-login__box {
  max-width: 24rem;
}

.wl-login .login-username,
.wl-login .login-password,
.wl-login .login-remember,
.wl-login .login-submit {
  margin-bottom: var(--space-3);
}

.wl-login label {
  display: block;
  font-weight: 600;
  font-size: var(--text-sm);
  margin-bottom: var(--space-1);
}

.wl-login .button {
  background: var(--grad-promo-dream);
  border: 0;
  color: #fff;
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}

.wl-toast {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 100;
  background: var(--wl-cherry);
  color: var(--wl-cloud);
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-glow);
  font-size: var(--text-sm);
  font-weight: 500;
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.wl-toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 700px) {
  .wl-table thead {
    display: none;
  }
  .wl-table tr {
    display: block;
    padding: var(--space-3);
    border-bottom: 1px solid var(--color-border);
  }
  .wl-table td {
    display: flex;
    justify-content: space-between;
    gap: var(--space-3);
    border: 0;
    padding: 0.35rem 0;
  }
  .wl-table td::before {
    content: attr(data-label);
    font-weight: 600;
  }
}
