@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --primary-color: #d596df;
  --primary-hover: #947a98;
  --secondary-color: #64748b;
  --bg-color: #f6f7fb;
  --bg-light: #f8fafc;
  --card-bg: rgba(255, 255, 255, 0.84);
  --card-bg-solid: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --success: #16a34a;
  --danger: #dc2626;
  --border-color: rgba(148, 163, 184, 0.32);
  --radius: 8px; /* Ajustado de 14px para 8px */
  --radius-sm: 6px; /* Ajustado de 10px para 6px */
  --radius-lg: 20px;
  --transition: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-sm: 0 1px 2px rgba(2, 6, 23, 0.06);
  --shadow-md: 0 12px 30px rgba(2, 6, 23, 0.1);
  --shadow-lg: 0 28px 60px rgba(2, 6, 23, 0.18);
  --shadow-btn: 0 12px 24px rgba(119, 53, 91, 0.22);
  --focus-ring: 0 0 0 4px rgba(235, 37, 235, 0.16);
  --header-height: 78px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text-main);
  line-height: 1.5;
  background:
    radial-gradient(
      1200px 700px at 20% 10%,
      rgba(128, 36, 92, 0.1),
      transparent 55%
    ),
    radial-gradient(
      900px 500px at 90% 0%,
      rgba(236, 72, 153, 0.08),
      transparent 55%
    ),
    var(--bg-color);
  -webkit-font-smoothing: antialiased;
}

body.menu-open,
body.sidebar-open {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

h1,
h2,
h3 {
  margin-bottom: 1rem;
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 800;
}

p {
  overflow-wrap: break-word;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

a:hover {
  color: var(--primary-hover);
}

button {
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    background-color var(--transition),
    color var(--transition),
    filter var(--transition);
}

button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  outline: none;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.88);
  transition: border-color var(--transition), box-shadow var(--transition);
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary-color);
  box-shadow: var(--focus-ring);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

public-header,
public-footer,
dashboard-sidebar,
category-card,
lead-form,
produto-form,
brand-logo {
  display: block;
}

.container {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.logo-text {
  color: var(--text-main);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  max-width: 100%;
  padding: 0.9rem 1.35rem;
  background: var(--primary-color);
  color: #ffffff;
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  max-width: 100%;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm); 
  background: var(--shadow-btn);
  color: var(--primary-color);
  font-weight: 700;
}

.btn-action:hover {
  background: var(--shadow-btn);
}

.main-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.header-container {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-width: 0;
}

.header-brand-link {
  display: inline-flex;
  align-items: center;
  color: inherit;
  flex-shrink: 0;
}

.main-header .header-menu-toggle,
.main-header .header-nav-close {
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: var(--radius); 
  background: rgba(37, 99, 235, 0.08);
  color: var(--text-main);
}

.header-menu-toggle {
  flex-direction: column;
}

.header-menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 2px 0;
  border-radius: 999px;
  background: currentColor;
}

.header-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}

.header-nav-top {
  display: none;
}

.header-nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.25rem;
  flex-wrap: wrap;
  min-width: 0;
}

.header-nav-link {
  color: var(--text-muted);
  font-weight: 700;
}

.header-nav-link:hover {
  color: var(--primary-color);
}

.header-auth-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.8rem 1.1rem;
  border-radius: var(--radius); 
  font-weight: 700;
}


.header-auth-link--solid {
  background: var(--primary-color);
  color: #ffffff;
}

.header-auth-link--solid:hover {
  color: #ffffff;
  background: var(--primary-hover);
}

.header-auth-link--ghost {
  color: var(--text-main);
  background: transparent;
}

.header-overlay {
  padding: 0;
  border-radius: 0;
}

.header-overlay[hidden] {
  display: none !important;
}

.modal {
  width: min(720px, calc(100% - 1rem));
  max-width: calc(100% - 1rem);
  max-height: calc(100dvh - 1rem);
  margin: auto;
  border: none;
  border-radius: var(--radius-lg);
  padding: 0;
  background: var(--card-bg-solid);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  scrollbar-gutter: stable both-edges;
}

.modal::backdrop {
  background: var(--overlay-color-strong);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-content {
  padding: clamp(1rem, 2vw, 2rem);
  max-height: calc(100dvh - 1rem);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
}

.btn-close {
  padding: 0.4rem;
  line-height: 1;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.75rem;
}

.btn-close:hover {
  color: var(--danger);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 1rem;
}

.form-group {
  min-width: 0;
}

.form-group label {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.form-group-full {
  grid-column: 1 / -1;
}

.form-helper {
  margin-top: 0.45rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 1rem;
  font-size: 0.95rem;
}

.form-checkbox input {
  width: auto;
  flex: 0 0 auto;
  margin: 0.25rem 0 0;
  inline-size: 1rem;
  block-size: 1rem;
  accent-color: var(--primary-color);
}

.form-checkbox span {
  flex: 1;
  min-width: 0;
}

.form-feedback {
  display: none;
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  font-weight: 700;
  text-align: center;
}

.form-feedback.is-visible {
  display: block;
}

.form-feedback.is-success {
  color: #166534;
  background: #dcfce7;
}

.form-feedback.is-error {
  color: #991b1b;
  background: #fee2e2;
}

.form-submit {
  width: 100%;
  margin-top: 1.25rem;
}

.form-footer {
  margin-top: 1.5rem;
}

.lead-form-submit.is-hidden {
  display: none;
}

.lead-modal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.75rem;
  margin-top: 1.25rem;
  min-width: 0;
}

.lead-modal-actions > button {
  flex: 1 1 220px;
}

.cropper-modal-content {
  width: min(760px, calc(100vw - 1.25rem));
}

.cropper-layout {
  display: grid;
  gap: 1rem;
}

.cropper-preview {
  max-height: 420px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.04);
}

.cropper-image {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
}

.cropper-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.cropper-zoom {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.cropper-zoom input {
  width: 220px;
}

.cropper-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.public-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 3.5rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr));
  gap: 1.75rem;
  min-width: 0;
}

.footer-column {
  min-width: 0;
}

.footer-copy {
  margin-top: 0.9rem;
  max-width: 360px;
  line-height: 1.7;
}

.footer-title {
  margin-bottom: 0.85rem;
  font-size: 1.05rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  color: var(--text-muted);
}

.footer-links a {
  color: inherit;
}

.footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.footer-actions .btn-action {
  color: var(--primary-color);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
}

.footer-meta {
  font-size: 0.875rem;
}

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--text-muted);
}

.text-sm {
  font-size: 0.875rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.w-full {
  width: 100%;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1024px) {
  .container {
    width: min(1200px, calc(100% - 1.5rem));
  }
}

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

@media (max-width: 820px) {
  .main-header .header-menu-toggle,
  .main-header .header-nav-close {
    display: inline-flex;
  }

  .header-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-header-overlay);
    border-radius: 0;
    background: var(--overlay-color);
  }

  .header-overlay:not([hidden]) {
    display: block;
  }

  .header-nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: var(--z-header-drawer);
    width: var(--drawer-width);
    max-width: 100%;
    height: 100dvh;
    padding: 1.25rem;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 1.25rem;
    background: rgba(255, 255, 255, 0.98);
    border-left: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: transform var(--transition);
  }

  .header-nav[data-open="true"] {
    transform: translateX(0);
  }

  .header-nav-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.25rem;
  }

  .header-nav-title {
    font-size: 1.05rem;
    font-weight: 800;
  }

  .header-nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .header-nav-link,
  .header-auth-link {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 12px;
  }

  .header-auth-link--ghost {
    background: rgba(37, 99, 235, 0.08);
  }
}

@media (max-width: 720px) {
  .modal {
    width: min(720px, calc(100% - 0.75rem));
    max-width: calc(100% - 0.75rem);
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-group-full {
    grid-column: auto;
  }

  .lead-modal-actions > button {
    flex-basis: 100%;
  }

  .cropper-controls {
    align-items: stretch;
  }

  .cropper-zoom {
    flex-direction: column;
    align-items: stretch;
  }

  .cropper-zoom input {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(1200px, calc(100% - 1rem));
  }

  .card {
    padding: 1.15rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}