:root {
  color-scheme: light;
  --bg: rgb(248, 246, 247);
  --bg-gradient: linear-gradient(180deg, rgb(248, 246, 247) 0%, rgb(248, 246, 247) 100%);
  --surface: #ffffff;
  --surface-alt: #fff5f3;
  --border: #f0c7c7;
  --border-strong: #e4a6a6;
  --text: #2d0f2f;
  --muted: #7a5975;
  --accent: #b42826;
  --accent-strong: #b42826;
  --accent-soft: rgba(180, 40, 38, 0.12);
  --shadow: 0 25px 60px rgba(180, 40, 38, 0.18);
  font-family: 'Poppins', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

@font-face {
  font-family: 'Scholar Serif';
  src: url('../fonts/ScholarSerif/Scholar-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Scholar Serif';
  src: url('../fonts/ScholarSerif/Scholar-Italic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-gradient);
  color: var(--text);
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

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

a {
  color: inherit;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.83rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid var(--border-strong);
  color: var(--accent-strong);
  background: var(--surface);
  font-family: 'IBM Plex Mono', monospace;
}

.pill--accent {
  background: var(--accent-soft);
}

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 999px;
  padding: 0.2rem 0.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  text-transform: capitalize;
  color: var(--muted);
}

.site-header {
  padding: 5rem 1.5rem 4rem;
}

.editorial-hero {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
  font-family: 'Georgia', 'Times New Roman', serif;
  color: #120f0d;
  padding: 0 1rem;
}

.editorial-hero__title {
  margin: 0;
  font-size: min(6.2rem, 12vw);
  letter-spacing: 0.08em;
  font-weight: 600;
  color: #11100f;
  font-family: 'Scholar Serif', 'Georgia', 'Times New Roman', serif;
  line-height: 0.95;
}

.editorial-hero__subtitle {
  margin: -2.4rem 0 0;
  font-size: min(5.4rem, 10vw);
  color: #b42826;
  font-style: italic;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-family: 'Scholar Serif', 'Georgia', 'Times New Roman', serif;
  line-height: 0.95;
}

@media (max-width: 640px) {
  .editorial-hero {
    max-width: 100%;
    gap: 0.4rem;
  }

  .editorial-hero__title {
    font-size: clamp(3rem, 11vw, 4.5rem);
    letter-spacing: 0.05em;
  }

  .editorial-hero__subtitle {
    margin-top: -1.2rem;
    font-size: clamp(2.4rem, 8vw, 3.6rem);
    letter-spacing: 0.015em;
  }
}

.site-header__lead {
  margin: 0;
  color: var(--muted);
}

.site-header__actions {
  display: none;
}

.catalog {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.catalog__header {
  margin-bottom: 1.5rem;
  text-align: center;
}

.catalog__header h2 {
  margin: 0;
  font-size: 2.1rem;
}

.catalog__header p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.catalog__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  justify-content: center;
}

.filter-chip {
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 0.45rem 1.1rem;
  background: var(--surface);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.filter-chip.is-active {
  border-color: var(--accent-strong);
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.catalog__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.7rem;
  max-width: 1100px;
  margin: 0 auto;
}

@media (max-width: 1024px) {
  .catalog__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .catalog__grid {
    grid-template-columns: 1fr;
  }
}

.catalog-card {
  background: var(--surface);
  border-radius: 1.2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.catalog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 80px rgba(180, 40, 38, 0.22);
}

.catalog-card__media {
  aspect-ratio: 1 / 1;
  background: var(--surface-alt);
  overflow: hidden;
}

.catalog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.catalog-card__body {
  padding: 0.9rem 1.1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}

.catalog-card__price {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent-strong);
}

.catalog-card__title {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 3.08em; /* 2 linhas * 1.4 line-height * 1.1rem font-size */
}

.catalog-card__actions {
  margin-top: auto;
  display: flex;
  justify-content: center;
}

.button {
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.7rem 1.6rem;
  font-weight: 600;
  font-size: 0.96rem;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease,
    color 150ms ease;
}

.button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.button--xs {
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
}

.button--primary {
  background: linear-gradient(120deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff;
  box-shadow: 0 10px 30px rgba(180, 40, 38, 0.35);
}

.button--primary:hover {
  transform: translateY(-2px);
}

.button--ghost {
  border-color: var(--border-strong);
  color: var(--accent-strong);
  background: transparent;
}

.button--ghost:hover {
  background: var(--accent-soft);
}

.button--secondary {
  background: var(--surface-alt);
  border-color: transparent;
  color: var(--accent-strong);
}

.button--link {
  background: rgba(180, 40, 38, 0.12);
  color: var(--accent-strong);
  border: none;
  width: 100%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  white-space: nowrap;
  gap: 0.35rem;
  font-size: 0.85rem;
}

.catalog__empty {
  border: 1px dashed var(--border-strong);
  background: var(--surface);
  border-radius: 1.2rem;
  padding: 2rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.catalog__empty p {
  color: var(--muted);
}

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

.site-footer {
  margin-top: auto;
  padding: 2.5rem 1.5rem 3rem;
  text-align: center;
  color: var(--muted);
}

/* Admin */
.admin-shell {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4rem;
}

.admin-shell h1 {
  margin: 2rem 0 0.25rem;
  font-family: 'Libre Baskerville', serif;
}

.admin-shell > p {
  margin: 0 0 2rem;
  color: var(--muted);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.panel {
  background: var(--surface);
  border-radius: 1.5rem;
  border: 1px solid var(--border);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.panel h2 {
  margin: 0;
}

.status-pill {
  background: var(--surface-alt);
  border: 1px solid var(--border-strong);
  color: var(--accent-strong);
  font-weight: 600;
}

.form-control {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-control label {
  font-size: 0.88rem;
  color: var(--muted);
}

.form-control input,
.form-control textarea,
.form-control select {
  border-radius: 0.9rem;
  border: 1px solid var(--border);
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  background: var(--surface-alt);
  color: var(--text);
  font-family: inherit;
}

.form-control input:focus,
.form-control textarea:focus,
.form-control select:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.product-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 520px;
  overflow: auto;
  padding-right: 0.5rem;
}

.product-card {
  border-radius: 1.1rem;
  border: 1px solid var(--border);
  padding: 1rem;
  display: flex;
  gap: 1rem;
  background: var(--surface-alt);
}

.product-card__photo {
  flex: 0 0 72px;
  height: 72px;
  border-radius: 0.85rem;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
}

.product-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.product-card__title {
  margin: 0;
  font-weight: 600;
}

.product-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.product-card__price {
  font-weight: 600;
  color: var(--accent-strong);
}

.product-card__url {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  word-break: break-all;
}

.product-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.danger {
  color: #dc2626;
}

.helper-text {
  font-size: 0.88rem;
  color: var(--muted);
}

@media (max-width: 700px) {
  .catalog__grid {
    grid-template-columns: 1fr;
  }

  .site-header__meta {
    padding: 1.5rem;
  }

  .product-card {
    flex-direction: column;
  }
}

