/* ==========================================================================
   Mercado Primavera — página de demonstração da Vitrine Digital
   Identidade própria e fictícia (não reutiliza as variáveis da Idea Criativo,
   propositalmente: esta página representa o site de OUTRA empresa).
   ========================================================================== */

:root {
  --v-green: #2f6f4e;
  --v-green-dark: #1f4d36;
  --v-orange: #e8873b;
  --v-cream: #fbf6ee;
  --v-ink: #232b21;
  --v-muted: #e4e0d3;
  --v-line: rgba(35, 43, 33, 0.14);

  --v-font-display: "Fraunces", Georgia, serif;
  --v-font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --v-maxw: 1180px;
  --v-gutter: clamp(1.25rem, 4vw, 3rem);
  --v-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--v-font-body);
  background: var(--v-cream);
  color: var(--v-ink);
  line-height: 1.55;
  overflow-x: hidden;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 0;
  background: none;
}
input {
  font: inherit;
  color: inherit;
}
ul {
  list-style: none;
  padding: 0;
}

:focus-visible {
  outline: 2px solid var(--v-green);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: 0.5rem;
  transform: translate(-50%, -150%);
  background: var(--v-ink);
  color: #fff;
  padding: 0.6rem 1.1rem;
  border-radius: 6px;
  z-index: 50;
  transition: transform 0.2s var(--v-ease);
}
.skip-link:focus {
  transform: translate(-50%, 0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------- Faixa de demonstração */
.demo-strip {
  background: var(--v-ink);
  color: #fff;
  text-align: center;
  padding: 0.6rem var(--v-gutter);
  font-size: 0.82rem;
}
.demo-strip strong {
  color: var(--v-orange);
}
.demo-strip a {
  text-decoration: underline;
  text-underline-offset: 2px;
  margin-left: 0.4rem;
}

/* ------------------------------------------------------- Cabeçalho */
.vitrine-header {
  background: #fff;
  border-bottom: 1px solid var(--v-line);
}
.vitrine-header__top {
  border-bottom: 1px solid var(--v-line);
  padding: 0.45rem var(--v-gutter);
}
.vitrine-url {
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--v-green-dark);
  max-width: 100%;
  overflow-wrap: break-word;
}
.vitrine-url__cursor {
  display: inline-block;
  width: 7px;
  height: 1em;
  background: var(--v-green);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: vitrine-blink 1s step-end infinite;
}
@keyframes vitrine-blink {
  50% {
    opacity: 0;
  }
}

.vitrine-header__main {
  max-width: var(--v-maxw);
  margin: 0 auto;
  padding: 1.1rem var(--v-gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}
.vitrine-logo {
  font-family: var(--v-font-display);
  font-weight: 500;
  font-size: clamp(1.35rem, 4vw, 1.7rem);
  color: var(--v-green-dark);
}
.vitrine-logo span {
  color: var(--v-orange);
  font-style: italic;
}
.vitrine-search {
  flex: 1 1 240px;
  max-width: 360px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--v-cream);
  border: 1px solid var(--v-line);
  border-radius: 999px;
  padding: 0.6rem 1rem;
  color: var(--v-green-dark);
}
.vitrine-search input {
  flex: 1;
  background: none;
  border: 0;
  min-width: 0;
  font-size: 0.95rem;
}
.vitrine-search input:focus {
  outline: none;
}
.vitrine-search input::placeholder {
  color: rgba(35, 43, 33, 0.45);
}

.vitrine-categories {
  max-width: var(--v-maxw);
  margin: 0 auto;
  padding: 0 var(--v-gutter) 1rem;
}
.vitrine-categories__track {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.vitrine-cat {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--v-line);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--v-green-dark);
  min-height: 40px;
  transition: background 0.2s var(--v-ease), color 0.2s var(--v-ease),
    border-color 0.2s var(--v-ease);
}
.vitrine-cat:hover,
.vitrine-cat.is-active {
  background: var(--v-green);
  border-color: var(--v-green);
  color: #fff;
}

/* ------------------------------------------------------- Botões */
.vitrine-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 46px;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  background: var(--v-green);
  color: #fff;
  border: 1.5px solid var(--v-green);
  transition: transform 0.2s var(--v-ease), background 0.2s var(--v-ease);
}
.vitrine-btn:hover {
  transform: translateY(-2px);
  background: var(--v-green-dark);
  border-color: var(--v-green-dark);
}
.vitrine-btn--primary {
  background: var(--v-orange);
  border-color: var(--v-orange);
}
.vitrine-btn--primary:hover {
  background: #cf7530;
  border-color: #cf7530;
}
.vitrine-btn--ghost {
  background: transparent;
  color: var(--v-green-dark);
  border-color: var(--v-line);
}
.vitrine-btn--ghost:hover {
  background: transparent;
  border-color: var(--v-green);
}
.vitrine-btn--outline {
  background: transparent;
  color: var(--v-green-dark);
  border-color: var(--v-green);
}
.vitrine-btn--outline:hover {
  background: var(--v-green);
  color: #fff;
}
.vitrine-btn--sm {
  min-height: 40px;
  padding: 0.6rem 1rem;
  font-size: 0.82rem;
}

/* ------------------------------------------------------- Produtos */
#produtos {
  max-width: var(--v-maxw);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3rem) var(--v-gutter) clamp(3rem, 6vw, 4.5rem);
}
.vitrine-category {
  scroll-margin-top: 1.5rem;
}
.vitrine-category + .vitrine-category {
  margin-top: clamp(2rem, 5vw, 3rem);
}
.vitrine-category[hidden] {
  display: none;
}
.vitrine-section-title {
  font-family: var(--v-font-display);
  font-weight: 500;
  font-size: clamp(1.3rem, 3.2vw, 1.7rem);
  margin-bottom: 1.4rem;
}
.vitrine-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.vitrine-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--v-line);
  border-radius: 12px;
  overflow: hidden;
  opacity: 1;
  transform: none;
  transition: opacity 0.35s var(--v-ease), transform 0.35s var(--v-ease);
}
.vitrine-card[hidden] {
  display: none;
}
.vitrine-card__media {
  width: 100%;
  aspect-ratio: 1;
  background: var(--v-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--v-green-dark);
  overflow: hidden;
}
.vitrine-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.vitrine-card__media svg {
  width: 35%;
  height: 35%;
}
.vitrine-card__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  padding: 0.9rem 1rem 1rem;
}
.vitrine-card__price {
  order: 1;
  font-family: var(--v-font-display);
  color: var(--v-green-dark);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.vitrine-card__price-old {
  font-family: var(--v-font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(35, 43, 33, 0.4);
}
.vitrine-card__name {
  order: 2;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--v-ink);
}
.vitrine-card__desc {
  order: 3;
  font-size: 0.82rem;
  color: rgba(35, 43, 33, 0.65);
}
.vitrine-card__cat {
  order: 4;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(35, 43, 33, 0.45);
  font-weight: 700;
}
.vitrine-card__body a.vitrine-btn {
  order: 5;
  margin-top: 0.5rem;
}
.vitrine-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: rgba(35, 43, 33, 0.6);
}

/* ------------------------------------------------------- Rodapé */
.vitrine-footer {
  background: var(--v-ink);
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  padding: clamp(2rem, 5vw, 3rem) var(--v-gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.vitrine-footer__disclaimer {
  max-width: 56ch;
  font-size: 0.85rem;
}
.vitrine-footer__disclaimer strong {
  color: var(--v-orange);
}
.vitrine-footer__back {
  font-size: 0.85rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: rgba(255, 255, 255, 0.75);
}
.vitrine-footer__back:hover {
  color: #fff;
}

/* ------------------------------------------------------- Breakpoints */
@media (min-width: 640px) {
  .vitrine-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .vitrine-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ------------------------------------------------------- Motion reduzido */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
