/* Favoritos / acesso rápido — faixa no topo da home + estrela nos cards.
   Usa os tokens de reset.css (paleta da marca, Montserrat). */

.quick-access {
  margin: 0 0 26px;
  animation: qa-enter 0.4s ease both;
}

@keyframes qa-enter {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.quick-access-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
}

.quick-access-eyebrow {
  color: var(--green-700);
  font-size: 20px;
  transform: translateY(3px);
}

.quick-access-head h2 {
  margin: 0;
  color: var(--green-900);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.quick-access-hint {
  display: none;
}

.quick-access-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

.qa-item {
  position: relative;
  min-width: 0;
  animation: qa-pop 0.28s ease both;
}

@keyframes qa-pop {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}

.qa-open {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 13px 40px 13px 13px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(10, 10, 10, 0.06);
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.qa-open:hover,
.qa-open:focus-visible {
  transform: translateY(-2px);
  border-color: var(--green-600);
  box-shadow: 0 16px 34px rgba(10, 10, 10, 0.14);
  outline: none;
}

.qa-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--green-900);
  background: var(--green-100);
  border-radius: 12px;
}

.qa-icon .material-symbols-rounded { font-size: 22px; }
.qa-icon img { width: 22px; height: 22px; object-fit: contain; }

.qa-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.qa-text strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.qa-text small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.qa-go {
  position: absolute;
  right: 12px;
  bottom: 11px;
  color: var(--green-600);
  font-size: 18px;
  opacity: 0;
  transition: opacity 0.16s ease;
  pointer-events: none;
}

.qa-open:hover .qa-go,
.qa-open:focus-visible .qa-go { opacity: 1; }

.qa-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.qa-remove .material-symbols-rounded { font-size: 15px; }

.qa-item:hover .qa-remove,
.qa-remove:focus-visible { opacity: 1; }

.qa-remove:hover {
  color: #a3352b;
  background: #f2d9d6;
}

/* Sem hover (touch): controles sempre visíveis */
@media (hover: none) {
  .qa-go { opacity: 1; }
  .qa-remove { opacity: 0.65; }
}

/* Mobile: vira um trilho horizontal com snap */
@media (max-width: 700px) {
  .quick-access { margin-bottom: 18px; }

  /* o 1º card começa alinhado com os demais blocos (14px) e ainda pode rolar até a borda da tela */
  .quick-access-head { padding-inline: 14px; }

  .quick-access-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-inline: 14px;
    scroll-padding-inline: 14px;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .quick-access-row::-webkit-scrollbar { display: none; }

  .qa-item {
    flex: 0 0 72%;
    max-width: 250px;
    scroll-snap-align: start;
  }
}

/* --- estrela nos cards de subcategoria --- */

.subcat-cell {
  position: relative;
  display: flex;
  min-width: 0;
}

.subcat-cell > .subcategory-card {
  flex: 1 1 auto;
  width: 100%;
}

.card-fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 34px;
  height: 34px;
  color: var(--green-700);
  background: var(--green-050);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.14s ease, color 0.14s ease;
}

.card-fav-btn .material-symbols-rounded { display: block; flex: none; width: 20px; height: 20px; font-size: 20px; line-height: 20px; text-align: center; overflow: hidden; }
.card-fav-btn:hover { background: var(--green-100); }
.card-fav-btn:active { transform: scale(0.88); }
.card-fav-btn:focus-visible {
  outline: 2px solid var(--green-600);
  outline-offset: 2px;
}

.card-fav-btn.is-on {
  color: #e8a13c;
  border-color: #f0d3a2;
  background: #fff6e8;
}

.card-fav-btn.is-on .material-symbols-rounded {
  font-variation-settings: "FILL" 1;
}

/* --- avisinho (toast) de erro ao salvar favorito --- */

.fav-aviso {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 1200;
  max-width: min(90vw, 360px);
  padding: 12px 18px;
  color: #fff;
  background: var(--green-900);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(10, 10, 10, 0.28);
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.fav-aviso.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* aviso de "tem versão nova" — clicável (recarrega) */
.versao-aviso {
  border: 0;
  font: inherit;
  cursor: pointer;
  pointer-events: auto;
}

.versao-aviso.is-visible { pointer-events: auto; }

/* Aviso quando o admin "abre na tela" da pessoa */
.tela-toast {
  position: fixed;
  left: 50%;
  top: calc(var(--topbar-height, 76px) + 12px);
  z-index: 1300;
  max-width: min(92vw, 420px);
  padding: 13px 20px;
  color: #fff;
  background: var(--green-800);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(10, 10, 10, 0.34);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, -10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.tela-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* "clique fantasma" quando o admin te leva até uma categoria */
@keyframes tela-clique-kf {
  0% { transform: scale(1); }
  45% { transform: scale(0.965); }
  100% { transform: scale(1); }
}

.tela-clique { animation: tela-clique-kf 0.42s ease; }

/* item pisca pra pessoa clicar */
@keyframes tela-piscar-kf {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 161, 60, 0); }
  50% { box-shadow: 0 0 0 5px rgba(232, 161, 60, 0.62), 0 0 22px 7px rgba(232, 161, 60, 0.42); }
}

.tela-piscar {
  position: relative;
  z-index: 3;
  border-radius: 20px;
  animation: tela-piscar-kf 0.7s ease-in-out 3;
}

@media (prefers-reduced-motion: reduce) {
  .tela-clique { animation: none; }
  .tela-piscar { animation: none; outline: 3px solid #e8a13c; outline-offset: 2px; }
}
