/* =============================================================
   TELMIN & ENEIDA PRIVATE COLLECTION
   styles_index.css — Componentes do index (base, sem breakpoints)
   Breakpoints em: styles_desktop.css / styles_tablet.css / styles_mobile.css
   ============================================================= */

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  background: var(--bg-hero);
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--gold-primary);
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  max-width: 900px;
  padding: 0 20px;
}

.hero-content a {
  display: inline-flex;
  border-radius: 9999px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.hero-content a:hover {
  transform: scale(1.04);
  box-shadow: 0 0 12px 3px rgba(197, 151, 95, 0.55);
}

.logo-te { width: 110px; height: 110px; display: block; }

.hero h1 {
  font-family: 'Cinzel', serif;
  font-size: clamp(1em, 2.5vw, 1.8em);
  font-weight: 600;
  letter-spacing: clamp(2px, 0.35em, 8px);
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--gold-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: uppercase;
  line-height: 1.4;
  margin: 0;
}

.hero h1 .subtitle-line {
  display: block;
  font-size: 0.55em;
  letter-spacing: clamp(3px, 0.8vw, 8px);
  margin-top: 4px;
  font-weight: 400;
}

.hero-subtitle {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(1.2em, 2.8vw, 1.8em);
  color: var(--text-secondary);
  font-weight: 500;
  margin: 0;
}

/* ── Seção de controles ───────────────────────────────────── */
.controls { background: var(--bg-primary); }

.controls-container {
  max-width: var(--max-width-content);
  margin: 0 auto;
  padding: 6px 20px;
}

.stats-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2px 0;
  gap: 4px;
}

.stats-count {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px;
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: 0.93em;
  letter-spacing: 0.012em;
  color: var(--text-muted);
}

.stats-count strong { color: var(--gold-primary); font-weight: 500; }

/* ── Barra de chips de filtros ativos ────────────────────── */
.active-filters-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  padding: 2px 0 1px;
  min-height: 1.6em;
}

.active-filters-bar:not(.has-filters) { visibility: hidden; }

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-primary);
  background: var(--bg-secondary);
  font-size: 0.72rem;
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  cursor: default;
  transition: border-color 0.15s, background 0.15s;
  white-space: nowrap;
}

.filter-chip:hover { border-color: var(--gold-primary); background: var(--gold-soft); }

.filter-chip-label { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }

.filter-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--border-soft);
  color: var(--text-muted);
  font-size: 0.65rem;
  line-height: 1;
  cursor: pointer;
  border: none;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.filter-chip-remove:hover { background: var(--danger); color: #fff; }

.controls-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }

.search-box { flex: 1; }

.search-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  transition: all 0.2s ease;
}

.search-wrapper:focus-within { border-color: var(--gold-primary); background: var(--bg-tertiary); }

.search-icon { font-size: 0.9em; opacity: 0.8; flex-shrink: 0; }

.search-input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: 0.9em;
  color: var(--text-primary);
  outline: none;
}

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

/* Botão X para limpar o campo de busca */
.search-clear {
  background: none;
  border: none;
  padding: 0 2px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.1em;
  line-height: 1;
  display: none;           /* oculto por padrão; JS mostra quando há texto */
  flex-shrink: 0;
  outline: none;
  transition: color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.search-clear:hover { color: var(--gold-primary); }

/* Visível quando o input tem conteúdo */
.search-clear.visible { display: block; }

/* ── Menu combinado ───────────────────────────────────────── */
.combined-menu { display: flex; align-items: center; gap: 0; position: relative; }

.menu-item {
  position: relative;
  padding: 4px 10px 14px 10px;
  background: transparent;
  border: none;
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: 0.93em;
  letter-spacing: 0.012em;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  outline: none;
  text-decoration: none;
  border-bottom: none;
  box-shadow: none;
}

.menu-item:hover,
.menu-item:focus,
.menu-item.active,
.menu-item.open { border-bottom: none; text-decoration: none; outline: none; box-shadow: none; }

.clear-filters-mobile { color: var(--gold-primary); }

.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: auto;
  margin-top: 0;
  padding: 6px 0;
  min-width: unset;
  width: max-content;
  max-width: 90vw;
  z-index: 999;
  border-radius: 6px;
  overflow: hidden;
  box-sizing: border-box;
  background: var(--submenu-bg);
  border: 1px solid var(--submenu-border);
  backdrop-filter: blur(6px);
}


.menu-item.open .submenu { display: block; }

/* ── Submenu de anos: TODOS ocupa todas as colunas (column-span:all) ── */

/* Mobile: 2 colunas */
#submenu-anos {
  columns: 2;
  column-gap: 0;
  width: 140px;
}

/* TODOS ocupa todas as colunas — sem separador, mesma aparência dos outros menus */
#submenu-anos > div:first-child { column-span: all; }

#submenu-anos > div { break-inside: avoid; }

.submenu > div,
.submenu > div > div {
  padding: 7px 14px;
  font-weight: 300;
  font-size: 0.93em;
  letter-spacing: 0.012em;
  white-space: nowrap;
  cursor: pointer;
  color: var(--text-primary);
}

.submenu > div:hover,
.submenu > div > div:hover { background: var(--submenu-hover); }

.submenu div[data-filter="clear-all"] { color: var(--gold-primary); }

[data-theme="light"] .submenu > div:hover,
[data-theme="light"] .submenu > div > div:hover { background: #ffffff; color: #000000; border-left: 2px solid #000000; }

[data-theme="light"] .submenu div[data-filter="clear-all"] { color: var(--gold-primary); }

/* ── Filtros E / T ────────────────────────────────────────── */
.quick-box-filters { display: flex; gap: 6px; align-items: center; padding-top: 4px; padding-bottom: 4px; align-self: center; }

.qb-btn {
  font-family: inherit;
  background: transparent;
  border: 0.6px solid rgba(201, 169, 86, 0.65);
  color: var(--text-primary);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: none;
}

.qb-btn:hover { transform: translateY(-1px); border-color: rgba(201, 169, 86, 0.95); }
.qb-btn:focus, .qb-btn:focus-visible, .qb-btn:active { outline: none; box-shadow: none; }
.qb-btn.active { background: rgba(201, 169, 86, 0.16); border-color: rgba(201, 169, 86, 1); }
[data-theme="light"] .qb-btn { color: var(--text-primary); }
[data-theme="light"] .qb-btn.active { color: var(--gold-primary); }

.view-mode { display: flex; gap: 8px; align-items: center; padding-bottom: 6px; }

/* Separador vertical entre grade/lista e shuffle */
.vm-sep {
  color: var(--border-primary);
  font-size: 0.85em;
  user-select: none;
  padding: 0 2px;
}

.vm-btn {
  background: transparent; border: none; cursor: pointer;
  font-size: 0.9em; color: var(--text-muted); padding: 4px; outline: none;
  transition: color 0.2s ease;
}
.vm-btn:hover, .vm-btn.active { color: var(--text-primary); }

/* Botão shuffle: leve animação ao pressionar */
.shuffle-btn:active { transform: rotate(30deg) scale(0.9); transition: transform 0.15s ease; }

/* Popover de escolha do proprietário */
.shuffle-popover {
  position: fixed;
  z-index: calc(var(--z-modal) + 1);
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.45);
  display: none;
  flex-direction: column;
  min-width: 90px;
  overflow: hidden;
}
.shuffle-popover.open { display: flex; }

.shp-opt {
  background: none;
  border: none;
  padding: 7px 14px;
  text-align: left;
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  transition: background 0.15s;
  white-space: nowrap;
}
.shp-opt:hover { background: var(--gold-soft); color: var(--gold-primary); }
.shp-opt + .shp-opt { border-top: 1px solid var(--border-soft); }

/* Abas do histórico */
.shp-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
}
.shp-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 8px 4px;
  font-size: 0.78rem;
  cursor: pointer;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.shp-tab:hover { color: var(--text-primary); }
.shp-tab.active {
  color: var(--gold-primary);
  border-bottom-color: var(--gold-primary);
}

/* Painel de histórico de sorteios */
.shuffle-history-panel {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: var(--z-modal);
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-modal);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  width: min(480px, 92vw);
  max-height: 70vh;
  overflow: hidden;
  flex-direction: column;
}
.shuffle-history-panel.open { display: flex; }

.shp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border-primary);
  flex-shrink: 0;
}
.shp-title {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.shp-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 1.1rem; padding: 0 4px;
  transition: color 0.2s;
}
.shp-close:hover { color: var(--text-primary); }
.shp-body {
  overflow-y: auto;
  padding: 8px 0;
  flex: 1;
}
.shp-empty {
  padding: 24px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}
.shp-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  transition: background 0.15s;
}
.shp-item:last-child { border-bottom: none; }
.shp-item:hover { background: var(--gold-soft); }
.shp-item-num {
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 24px;
  flex-shrink: 0;
  text-align: right;
}
.shp-item-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 80px;
  flex-shrink: 0;
}
.shp-item-name {
  font-size: 0.9rem;
  color: var(--text-primary);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shp-item-col {
  font-size: 0.75rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}
/* Botão de exclusão individual — aparece ao passar o mouse (desktop)
   e fica sempre visível no mobile/tablet (touch) */
.shp-item-delete {
  background: none;
  border: none;
  cursor: pointer;
  color: transparent;          /* oculto por padrão no desktop */
  font-size: 0.78rem;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
  margin-left: auto;           /* empurra para a direita do flex */
}
.shp-item:hover .shp-item-delete {
  color: var(--text-muted);
}
.shp-item-delete:hover {
  color: var(--danger) !important;
  background: rgba(220, 53, 69, 0.10);
}
/* Touch: botão sempre visível, área de toque confortável */
@media (hover: none), (max-width: 1024px) {
  .shp-item-delete {
    color: var(--text-muted);
    padding: 4px 8px;
  }
}
.shp-footer {
  padding: 10px 20px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
}
.shp-clear {
  background: none; border: 1px solid var(--border-primary); border-radius: 999px;
  padding: 4px 12px; font-size: 0.72rem; cursor: pointer;
  color: var(--text-muted); letter-spacing: 0.06em; text-transform: uppercase;
  transition: all 0.2s;
}
.shp-clear:hover { border-color: var(--danger); color: var(--danger); }

/* Overlay de fundo para o painel */
.shuffle-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: calc(var(--z-modal) - 1);
}
.shuffle-overlay.open { display: block; }

.controls-filters { display: none; }

/* ── Galeria ─────────────────────────────────────────────── */
.gallery-section {
  max-width: var(--max-width-content);
  margin: 0 auto;
  padding: 20px;
  position: relative;
}

.gallery-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 1px;
  background: var(--gold-primary);
  pointer-events: none;
}

.gallery-grid { display: grid; gap: 18px; align-items: stretch; }

/* Card */
.pen-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--border-primary);
  box-shadow: 0 4px 14px var(--shadow-color);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.pen-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 26px rgba(197, 151, 95, 0.22);
  border-color: var(--gold-primary);
}

.pen-image {
  position: relative;
  width: 100%;
  background: var(--bg-image);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.pen-image img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-base); }
.pen-card:hover .pen-image img { transform: scale(1.05); }
.pen-icon { font-size: 4em; opacity: 0.3; }

.pen-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--gold-primary);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75em;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.pen-content {
  padding: 12px 16px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.pen-title {
  font-size: 1.12em;
  font-weight: 600;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin-bottom: 10px;
}

.pen-collection {
  color: var(--text-secondary);
  font-size: 0.88em;
  font-weight: 500;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pen-year {
  color: var(--gold-light);
  font-size: 0.81em;
  font-weight: 500;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
  opacity: 0.85;
}

.pen-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-primary);
  margin-bottom: 8px;
  font-size: 0.86rem;
  line-height: 1.35;
  min-height: 100px;
  height: auto;
  overflow: visible;
}

.pen-detail-label {
  font-size: 0.75em;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
  font-weight: 300;
}

.pen-detail-value {
  font-size: 0.95em;
  color: var(--text-primary);
  font-weight: 600;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Edição com múltiplos valores: um por linha com marcador */
.pen-detail-value.edicao-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.edicao-line {
  display: block;
  font-size: inherit;
  color: var(--text-primary);
  font-weight: 600;
}

.pen-description {
  font-size: 0.85em;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 8px;
  text-align: justify;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}

.pen-location-value .loc-top,
.pen-location-value .loc-bottom { display: block; line-height: 1.15; }
.pen-location-value .loc-bottom { margin-top: 2px; }

.gallery-list .pen-card { flex-direction: row; }
.gallery-list .pen-image { width: 200px; min-height: 200px; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); grid-column: 1 / -1; }
.empty-state h2 { font-size: 1.5em; margin-bottom: 10px; }

/* ── Skeleton loader ─────────────────────────────────────── */
/*
  Aparece apenas na primeira visita (sem cache).
  Estrutura espelha o pen-card: bloco de imagem + linhas de conteúdo.
  A animação shimmer usa um gradiente em movimento para simular
  o carregamento progressivo — padrão adotado por Pinterest, YouTube etc.
*/
@keyframes skeletonShimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}

.skeleton-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-primary);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  opacity: 0.7;
}

.sk-pulse {
  background: linear-gradient(
    90deg,
    var(--bg-tertiary, #1e1e2e) 25%,
    rgba(255,255,255,0.06) 50%,
    var(--bg-tertiary, #1e1e2e) 75%
  );
  background-size: 600px 100%;
  animation: skeletonShimmer 1.4s infinite linear;
}

[data-theme="light"] .sk-pulse {
  background: linear-gradient(
    90deg,
    #e8e8e8 25%,
    #f4f4f4 50%,
    #e8e8e8 75%
  );
  background-size: 600px 100%;
  animation: skeletonShimmer 1.4s infinite linear;
}

.sk-image {
  width: 100%;
  height: 250px;
  flex-shrink: 0;
}

.sk-content {
  padding: 12px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sk-line {
  height: 12px;
  border-radius: 6px;
}

.sk-title   { width: 75%; height: 16px; }
.sk-sub     { width: 45%; height: 11px; margin-bottom: 4px; }
.sk-detail  { width: 90%; }
.sk-detail2 { width: 60%; }
.sk-desc    { width: 100%; margin-top: 8px; }
.sk-desc2   { width: 80%; }

/* ── Modal ────────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: var(--z-modal);
  backdrop-filter: blur(5px);
  overflow-y: auto;
  display: flex;          /* sempre flex — visibilidade controlada por opacity */
  align-items: center;
  justify-content: center;
  padding: 20px;

  /* Estado inicial: invisível e não interativo */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.modal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-secondary);
  border-radius: var(--radius-modal);
  max-width: 900px;
  width: 100%;
  border: 1px solid var(--border-primary);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.50);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;

  /* Leve scale para dar profundidade à abertura */
  transform: scale(0.97);
  transition: transform 180ms ease;
}

.modal.active .modal-content {
  transform: scale(1);
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gold-primary);
  position: sticky;
  top: 0;
  background: var(--bg-secondary);
  z-index: 10;
}

/* Grupo de ações: QR + × — alinhados via flex, sem position:absolute */
.modal-header-actions {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 4px;
  padding-right: 16px;
}

.modal-close {
  font-size: 1.6em;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition-base);
  line-height: 1;
  padding: 4px 6px;
  flex-shrink: 0;
}

.modal-close:hover { color: var(--gold-primary); }

.modal-title { font-size: 1.8em; color: var(--text-primary); margin-bottom: 6px; padding-right: 80px; }
.modal-collection { color: var(--text-secondary); font-size: 1.1em; font-weight: 500; }
.modal-body { padding: 24px; }

/* Área de imagem: fundo transparente — foto flutua sobre o fundo do modal */
.modal-image {
  width: 100%;
  background: transparent;
  border-radius: 0;
  overflow: hidden;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  max-height: 60vh;
}

.modal-image > img {
  max-width: 100%; max-height: 100%;
  object-fit: contain; width: auto; height: auto; display: block;
}

/* ── Carrossel do modal ───────────────────────────────────── */
.modal-carousel {
  width: 100%;
  display: block;
}

.mc-frame {
  width: 100%;
  display: block;
}

.mc-img { width: 100%; height: auto; display: block; }

.mc-counter {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.78em;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 3px 12px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  pointer-events: none;
  white-space: nowrap;
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
}

/*
  Setas: apenas o símbolo, sem caixa, sem borda, sem fundo.
  Brancas, semitransparentes em repouso, douradas no hover.
  Posicionadas dentro do .modal-image (position: relative),
  alinhadas verticalmente ao centro visível da foto.
*/
.mc-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: none;
  border: none;
  padding: 0;
  color: rgba(255, 255, 255, 0.70);
  font-size: 2.8em;
  line-height: 1;
  cursor: pointer;
  transition: color var(--transition-base), opacity var(--transition-base);
  user-select: none;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.80;
}

.mc-nav:hover {
  color: var(--gold-primary);
  opacity: 1;
}

/* Distância das setas às bordas do container (não à foto, que é menor) */
.mc-prev { left: 12px; }
.mc-next { right: 12px; }

/* ── Barra de ampliar: abaixo da imagem ──────────────────── */
/* ── Botão expandir: overlay absoluto no canto inferior direito da foto ── */
.mc-expand {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 11;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.78);
  padding: 3px 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease, color 0.18s ease;
  pointer-events: auto;
}

.mc-expand:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.modal-carousel.mc-mobile { display: block; }
.modal-carousel.mc-mobile .mc-frame { width: 100%; }

.modal-details { margin-bottom: 18px; }

.modal-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "ano        tipo"
    "edicao     tiragem"
    "localizacao manutencao";
  gap: 12px 24px;
  padding: 16px 18px;
  background: var(--bg-tertiary);
  border-radius: 10px;
  max-width: 500px;
  margin: 0 auto;
}

.md-item { display: flex; flex-direction: column; gap: 3px; }

.md-item[data-field="ano"]         { grid-area: ano; }
.md-item[data-field="tipo"]        { grid-area: tipo; }
.md-item[data-field="tiragem"]     { grid-area: tiragem; }
.md-item[data-field="edicao"]      { grid-area: edicao; }
.md-item[data-field="localizacao"] { grid-area: localizacao; }
.md-item[data-field="manutencao"]  { grid-area: manutencao; }

.md-item[data-field="ano"],
.md-item[data-field="edicao"],
.md-item[data-field="localizacao"] { justify-self: start; text-align: left; }

.md-item[data-field="ano"] .pen-detail-label,
.md-item[data-field="ano"] .pen-detail-value,
.md-item[data-field="edicao"] .pen-detail-label,
.md-item[data-field="edicao"] .pen-detail-value,
.md-item[data-field="localizacao"] .pen-detail-label,
.md-item[data-field="localizacao"] .pen-detail-value { text-align: left; }

.md-item[data-field="tipo"],
.md-item[data-field="tiragem"],
.md-item[data-field="manutencao"] { justify-self: end; text-align: right; }

.md-item[data-field="tipo"] .pen-detail-label,
.md-item[data-field="tipo"] .pen-detail-value,
.md-item[data-field="tiragem"] .pen-detail-label,
.md-item[data-field="tiragem"] .pen-detail-value,
.md-item[data-field="manutencao"] .pen-detail-label,
.md-item[data-field="manutencao"] .pen-detail-value { text-align: right; }

.modal-description {
  font-size: 0.97em;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 20px;
  text-align: justify;
  min-height: 5em; /* reserva espaço antes do texto carregar — evita layout shift */
  opacity: 0;
  transition: opacity 0.5s ease 0.2s;
}

/* Fade-in da descrição após o modal abrir */
.modal.active .modal-description { opacity: 1; }

.modal-gallery { margin-top: 20px; display: none; }

.modal-gallery h3 {
  font-size: 1.3em; color: var(--text-primary);
  margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 1px solid var(--gold-primary);
}

.modal-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 15px; }

/* ── Lightbox ─────────────────────────────────────────────── */
.lightbox {
  display: none; position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.98);
  z-index: var(--z-lightbox);
  align-items: center; justify-content: center;
  overscroll-behavior: none;
}

.lightbox.active { display: flex; }

.lightbox-content {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  position: relative; max-width: 90%; max-height: 90%;
  background: transparent;
}

.lightbox-image { max-width: 100%; max-height: 75vh; object-fit: contain; margin-bottom: 12px; display: block; transition: opacity 0.3s ease; }
.lightbox-image.fade { opacity: 0; }

.lightbox-close { position: absolute; top: -36px; right: 0; font-size: 2.5em; color: white; cursor: pointer; transition: color var(--transition-base); line-height: 1; }
.lightbox-close:hover { color: var(--gold-primary); }

.lightbox-controls { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 14px; }

.lightbox-nav { color: white; cursor: pointer; user-select: none; transition: color var(--transition-base); font-size: 2.4em; line-height: 1; padding: 0 10px; display: flex; align-items: center; }
.lightbox-nav:hover { color: var(--gold-primary); }

.lightbox-counter { font-size: 0.85em; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.9; color: rgba(255, 255, 255, 0.75); line-height: 1; }

body.lightbox-open { overflow: hidden; }
.lightbox, .lightbox * { touch-action: none; }

@supports (-webkit-touch-callout: none) {
  .lightbox, .lightbox * { -webkit-overflow-scrolling: auto; }
}

.controls.sticky-landscape {
  position: fixed; top: var(--header-height); left: 0; right: 0;
  z-index: var(--z-controls); background: var(--bg-primary);
  border-bottom: 1px solid var(--gold-primary);
}

body.has-sticky-ui-landscape .gallery-section { padding-top: 120px; }

/* =============================================================
   LISTA DE DESEJOS
   ============================================================= */

/* ── Botão no menu de controles ──────────────────────────── */
.wishlist-btn { position: relative; }

.wishlist-icon {
  color: var(--gold-primary);
  font-size: 1em; line-height: 1;
  pointer-events: none; user-select: none;
}

.wishlist-badge {
  position: absolute; top: -5px; right: -6px;
  min-width: 15px; height: 15px; border-radius: 8px;
  background: var(--gold-primary); color: var(--bg-primary);
  font-size: 0.6rem; font-weight: 700;
  display: none; align-items: center; justify-content: center;
  padding: 0 3px; line-height: 1;
  font-family: 'Montserrat', sans-serif; pointer-events: none;
}
.wishlist-badge.visible { display: flex; }

/* ── Overlay de fundo ────────────────────────────────────── */
.wishlist-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.48);
  z-index: calc(var(--z-modal) - 1);
  backdrop-filter: blur(2px);
}
.wishlist-overlay.open { display: block; }

/* ── Painel principal ────────────────────────────────────── */
.wishlist-panel {
  display: none; position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.97);
  z-index: var(--z-modal);
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-modal);
  box-shadow: 0 24px 64px rgba(0,0,0,0.55);
  width: min(560px, 94vw);
  max-height: 82vh;
  overflow: hidden;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.wishlist-panel.open {
  display: flex; opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ── Cabeçalho ───────────────────────────────────────────── */
.wishlist-panel-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border-primary);
  flex-shrink: 0;
}
.wishlist-panel-title {
  font-size: 0.9rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-secondary);
}

/* ── Formulário (visível apenas autenticado) ─────────────── */
.wishlist-form {
  display: flex; flex-direction: column; gap: 6px;
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
  background: var(--bg-tertiary, var(--bg-primary));
}
.wishlist-input {
  width: 100%; padding: 7px 12px;
  border-radius: 8px; border: 1px solid var(--border-soft);
  background: var(--bg-secondary); color: var(--text-primary);
  font-family: 'Montserrat', sans-serif; font-size: 0.83rem;
  outline: none; transition: border-color 0.15s ease; resize: none;
  box-sizing: border-box;
}
.wishlist-input:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 2px var(--gold-soft);
}
.wishlist-input::placeholder { color: var(--text-muted); opacity: 0.7; }
.wishlist-select { appearance: none; cursor: pointer; }
.wishlist-textarea { min-height: 34px; line-height: 1.5; }
.wishlist-input-row { display: flex; gap: 6px; align-items: center; }

/* ── Fotos no formulário ─────────────────────────────────── */
.wishlist-photos-form {
  display: flex; flex-direction: column; gap: 6px; padding: 8px 0 2px;
}
.wishlist-photos-label {
  font-size: 0.74rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.wishlist-photos-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.wl-photo-thumb {
  position: relative; width: 56px; height: 56px;
  border-radius: 6px; overflow: hidden;
  border: 1px solid var(--border-soft); flex-shrink: 0;
}
.wl-photo-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  cursor: pointer; transition: opacity 0.15s;
}
.wl-photo-thumb img:hover { opacity: 0.8; }
.wl-photo-del {
  position: absolute; top: 2px; right: 2px;
  background: rgba(0,0,0,0.65); color: #fff;
  border: none; border-radius: 50%;
  width: 16px; height: 16px; font-size: 0.6rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  line-height: 1; padding: 0;
}
.wishlist-photo-add-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 5px 12px; border-radius: 8px;
  border: 1px dashed var(--border-primary);
  font-size: 0.75rem; font-family: 'Montserrat', sans-serif;
  color: var(--text-muted); cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  height: 56px; min-width: 56px;
}
.wishlist-photo-add-btn:hover { border-color: var(--gold-primary); color: var(--gold-primary); }

/* ── Ações do formulário ─────────────────────────────────── */
.wishlist-form-actions {
  display: flex; justify-content: center; align-items: center;
  gap: 8px; margin-top: 2px;
}
.wishlist-btn-add {
  background: linear-gradient(135deg, var(--gold-soft), transparent);
  border: 1px solid var(--border-primary); border-radius: 999px;
  padding: 5px 16px; font-size: 0.75rem;
  font-family: 'Montserrat', sans-serif; letter-spacing: 0.06em;
  text-transform: uppercase; cursor: pointer; color: var(--text-primary);
  transition: border-color 0.18s ease, background 0.18s ease;
}
.wishlist-btn-add:hover { border-color: var(--gold-primary); background: var(--gold-soft); }
.wishlist-btn-cancel {
  background: none; border: 1px solid var(--border-soft); border-radius: 999px;
  padding: 5px 14px; font-size: 0.75rem;
  font-family: 'Montserrat', sans-serif; letter-spacing: 0.06em;
  text-transform: uppercase; cursor: pointer; color: var(--text-muted);
  transition: border-color 0.18s ease, color 0.18s ease;
}
.wishlist-btn-cancel:hover { border-color: var(--danger); color: var(--danger); }

/* ── Lista de itens ──────────────────────────────────────── */
.wishlist-body { overflow-y: auto; padding: 6px 0; flex: 1; }

/* ── Estado vazio ────────────────────────────────────────── */
.wl-empty {
  padding: 24px 16px; text-align: center;
  font-size: 0.82rem; color: var(--text-muted); font-style: italic;
}

/* ── Item individual ─────────────────────────────────────── */
.wl-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-soft);
  transition: background 0.15s ease;
}
.wl-item:last-child { border-bottom: none; }
.wl-item:hover { background: var(--gold-soft); }
.wl-item.wl-dragging { opacity: 0.4; background: var(--gold-soft); }
.wl-item.wl-drag-over { border-top: 2px solid var(--gold-primary); margin-top: -2px; }

/* ── Handle de arrastar ──────────────────────────────────── */
.wl-drag-handle {
  flex-shrink: 0; cursor: grab; color: transparent;
  font-size: 0.9rem; line-height: 1; padding: 2px;
  align-self: center; transition: color 0.15s;
  user-select: none; touch-action: none;
}
.wl-item:hover .wl-drag-handle { color: var(--text-muted); }
.wl-drag-handle:active { cursor: grabbing; }
@media (hover: none), (max-width: 1024px) {
  .wl-drag-handle { color: var(--text-muted); }
}

/* ── Numeração ───────────────────────────────────────────── */
.wl-item-num {
  font-size: 0.72rem; color: var(--text-muted);
  min-width: 18px; flex-shrink: 0;
  text-align: right; padding-top: 3px;
}

/* ── Info do item ────────────────────────────────────────── */
.wl-item-info {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px;
}
.wl-item-nome {
  font-size: 0.88rem; color: var(--text-primary); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wl-item-meta {
  font-size: 0.74rem; color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wl-item-disp {
  font-size: 0.74rem; color: var(--text-muted); font-style: italic;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wl-item-preco {
  font-size: 0.74rem; color: var(--gold-primary); font-weight: 500;
}

/* ── Fotos em miniatura na listagem ──────────────────────── */
.wl-item-photos { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.wl-item-photo {
  width: 44px; height: 44px; border-radius: 5px;
  object-fit: cover; cursor: pointer;
  border: 1px solid var(--border-soft);
  transition: opacity 0.15s, transform 0.15s;
}
.wl-item-photo:hover { opacity: 0.85; transform: scale(1.05); }

/* ── Coluna direita: datas + ações ───────────────────────── */
.wl-right {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 6px; flex-shrink: 0; align-self: flex-start; padding-top: 2px;
}

/* ── Datas do item ───────────────────────────────────────── */
.wl-dates {
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
}
.wl-date {
  font-size: 0.65rem; color: var(--text-muted);
  white-space: nowrap; text-align: right;
}
.wl-date-lbl { font-weight: 500; margin-right: 2px; }

/* ── Botões de ação por item ─────────────────────────────── */
.wl-item-actions {
  display: flex; gap: 4px; justify-content: flex-end;
}
.wl-btn-edit, .wl-btn-del {
  background: none; border: none; cursor: pointer; color: transparent;
  font-size: 0.9rem; line-height: 1; padding: 4px 7px;
  border-radius: 4px; flex-shrink: 0; transition: color 0.15s, background 0.15s;
}
.wl-item:hover .wl-btn-edit,
.wl-item:hover .wl-btn-del { color: var(--text-muted); }
.wl-btn-edit:hover { color: var(--gold-primary) !important; background: var(--gold-soft); }
.wl-btn-del:hover  { color: var(--danger) !important; background: rgba(220,53,69,0.10); }
@media (hover: none), (max-width: 1024px) {
  .wl-btn-edit, .wl-btn-del { color: var(--text-muted); padding: 5px 8px; }
}

/* ── Rodapé (sempre visível) ─────────────────────────────── */
.wishlist-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border-soft);
  display: flex; justify-content: space-between; align-items: center;
  flex-shrink: 0; gap: 8px;
}
.wl-export-icon { display: none; }

.wishlist-btn-export {
  background: none; border: 1px solid var(--border-soft); border-radius: 999px;
  padding: 5px 14px; font-size: 0.74rem;
  font-family: 'Montserrat', sans-serif; letter-spacing: 0.05em;
  text-transform: uppercase; cursor: pointer; color: var(--text-muted);
  transition: border-color 0.18s, color 0.18s;
}
.wishlist-btn-export:hover { border-color: var(--gold-primary); color: var(--gold-primary); }
.wishlist-btn-access {
  background: none; border: 1px solid var(--border-soft); border-radius: 999px;
  padding: 5px 16px; font-size: 0.74rem;
  font-family: 'Montserrat', sans-serif; letter-spacing: 0.06em;
  text-transform: uppercase; cursor: pointer; color: var(--text-muted);
  transition: border-color 0.18s, color 0.18s;
}
.wishlist-btn-access:hover { border-color: var(--gold-primary); color: var(--gold-primary); }

/* ── Modal de PIN ────────────────────────────────────────── */
.wl-pin-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  z-index: calc(var(--z-modal) + 10);
  align-items: center; justify-content: center;
}
.wl-pin-overlay.open { display: flex; }
.wl-pin-modal {
  background: var(--bg-secondary); border: 1px solid var(--border-primary);
  border-radius: var(--radius-modal); padding: 28px 28px 22px;
  width: min(340px, 90vw); display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);
}
.wl-pin-title {
  font-size: 0.9rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-secondary);
}
.wl-pin-desc { font-size: 0.8rem; color: var(--text-muted); margin: 0; }
.wl-pin-input { letter-spacing: 0.15em; font-size: 1rem !important; }
.wl-pin-error { font-size: 0.75rem; color: var(--danger); min-height: 16px; }
.wl-pin-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

/* ── Lightbox da wishlist ────────────────────────────────── */
.wl-lightbox {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.92); z-index: calc(var(--z-modal) + 20);
  align-items: center; justify-content: center;
}
.wl-lightbox.open { display: flex; }
.wl-lightbox-img {
  max-width: 90vw; max-height: 88vh;
  object-fit: contain; border-radius: 6px;
}
.wl-lightbox-close {
  position: absolute; top: 16px; right: 20px;
  color: #fff; font-size: 2rem; cursor: pointer;
  line-height: 1; opacity: 0.8; transition: opacity 0.15s;
}
.wl-lightbox-close:hover { opacity: 1; }
.wl-lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  color: #fff; font-size: 2.5rem; cursor: pointer;
  opacity: 0.7; transition: opacity 0.15s; user-select: none; padding: 0 16px;
}
.wl-lightbox-nav:hover { opacity: 1; }
.wl-lightbox-prev { left: 8px; }
.wl-lightbox-next { right: 8px; }


/* =============================================================
   NOVAS FUNCIONALIDADES — v10
   ============================================================= */

/* ── 4. Highlight de busca ───────────────────────────────── */
.search-hl {
  background: rgba(197, 151, 95, 0.22);
  color: var(--gold-primary);
  border-radius: 2px;
  padding: 0 2px;
  font-style: normal;
}

/* ── 8. Badge de raridade nos cards ─────────────────────── */
.rarity-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.60);
  border: 1px solid var(--gold-primary);
  color: var(--gold-primary);
  font-size: 0.60em;
  padding: 3px 8px;
  border-radius: 20px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  pointer-events: none;
  line-height: 1;
}

.rarity-badge.ultra-rara {
  background: rgba(197, 151, 95, 0.82);
  border-color: transparent;
  color: #000;
}

.rarity-badge.muito-rara {
  background: rgba(197, 151, 95, 0.45);
  border-color: var(--gold-primary);
  color: var(--text-primary);
}

/* Raridade inline no modal */
.modal-rarity {
  font-size: 0.72em;
  font-weight: 600;
  color: var(--gold-primary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  opacity: 0.85;
}

.modal-rarity.ultra-rara { color: var(--text-secondary); }
.modal-rarity.muito-rara { color: var(--gold-light); }

/* ── 7. Toggle de comparação nos cards ───────────────────── */
.compare-toggle {
  position: absolute;
  bottom: 8px;
  left: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border-primary);
  background: var(--bg-secondary);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.18s, background 0.18s, color 0.18s, border-color 0.18s;
  z-index: 5;
  padding: 0;
}

.pen-card:hover .compare-toggle { opacity: 1; }
.pen-card.compare-selected .compare-toggle,
.compare-toggle.active {
  opacity: 1;
  background: var(--gold-primary);
  color: #000;
  border-color: var(--gold-primary);
}

.pen-card.compare-selected { border-color: var(--gold-primary); }

@media (hover: none) { .compare-toggle { opacity: 0.65; } }

/* ── 7. Barra flutuante de comparação ────────────────────── */
.compare-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  z-index: calc(var(--z-modal) - 1);
  background: var(--bg-secondary);
  border: 1px solid var(--gold-primary);
  border-radius: var(--radius-pill);
  padding: 8px 8px 8px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.50);
  transition: transform 0.28s ease, opacity 0.28s ease;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}

.compare-bar.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.compare-bar-count {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.compare-bar-btn {
  background: var(--gold-primary);
  color: #000;
  border: none;
  border-radius: var(--radius-pill);
  padding: 5px 16px;
  font-size: 0.74rem;
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  font-weight: 600;
  transition: opacity 0.18s;
}

.compare-bar-btn:hover { opacity: 0.85; }

.compare-bar-clear {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 4px 8px;
  border-radius: 50%;
  transition: color 0.18s, background 0.18s;
}

.compare-bar-clear:hover { color: var(--text-primary); background: var(--gold-soft); }

/* ── 7. Modal de comparação ──────────────────────────────── */
.compare-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--overlay);
  backdrop-filter: blur(4px);
  z-index: var(--z-modal);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.compare-overlay.active { display: flex; }

.compare-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-modal);
  max-width: 860px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.compare-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gold-primary);
  flex-shrink: 0;
}

.compare-title {
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.compare-body {
  overflow: auto;
  flex: 1;
  padding: 0;
}

/* Grid de comparação */
.cmp-grid {
  display: table;
  width: 100%;
  border-collapse: collapse;
}

.cmp-header-row,
.cmp-row {
  display: flex;
  align-items: stretch;
}

.cmp-row {
  border-top: 1px solid var(--border-soft);
  transition: background 0.15s;
}

.cmp-row:hover { background: rgba(197,151,95,0.04); }

.cmp-row-diff {
  background: rgba(197,151,95,0.06);
}
.cmp-row-diff:hover { background: rgba(197,151,95,0.11); }

/* Coluna do label */
.cmp-label-col {
  flex: 0 0 110px;
  min-width: 90px;
  padding: 10px 14px;
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  border-right: 1px solid var(--border-soft);
  flex-shrink: 0;
}

/* Ponto dourado em campos diferentes */
.cmp-diff-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-primary);
  flex-shrink: 0;
}

/* Coluna de cada caneta */
.cmp-pen-col {
  flex: 1;
  padding: 10px 14px;
  border-right: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
}

.cmp-pen-col:last-child { border-right: none; }

.cmp-header-row .cmp-pen-col {
  flex-direction: column;
  align-items: center;
  padding: 20px 14px 14px;
  border-bottom: 1px solid var(--gold-primary);
}

/* Foto no cabeçalho */
.cmp-photo {
  width: 100%;
  max-width: 140px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
  background: var(--bg-image);
  display: block;
}

.cmp-no-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2em;
  opacity: 0.25;
}

.cmp-pen-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.3;
  margin-bottom: 3px;
}

.cmp-pen-col-label {
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-align: center;
}

/* Valor */
.cmp-value {
  font-size: 0.84rem;
  color: var(--text-primary);
}

.cmp-value-diff {
  color: var(--gold-primary);
  font-weight: 600;
}

/* ── 6. Painel de histórico ──────────────────────────────── */
.view-hist-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: calc(var(--z-modal) - 1);
}

.view-hist-overlay.open { display: block; }

.view-hist-panel {
  position: fixed;
  top: var(--header-height);
  right: 0;
  width: min(320px, 88vw);
  max-height: calc(100vh - var(--header-height));
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-primary);
  border-bottom: 1px solid var(--border-primary);
  z-index: var(--z-modal);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.26s ease;
  overflow: hidden;
}

.view-hist-panel.open { transform: translateX(0); }

.view-hist-body { overflow-y: auto; flex: 1; padding: 4px 0; }

/* ── 10. QR Code ─────────────────────────────────────────── */
.qr-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: var(--z-lightbox);
  align-items: center;
  justify-content: center;
}

.qr-overlay.active { display: flex; }

.qr-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-modal);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 230px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.qr-title {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.qr-img {
  width: 180px;
  height: 180px;
  border-radius: 6px;
  background: var(--bg-tertiary);
}

.qr-url {
  font-size: 0.68rem;
  color: var(--text-muted);
  word-break: break-all;
  text-align: center;
  max-width: 200px;
  line-height: 1.5;
}

.qr-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.qr-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #25d366;
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 6px 18px;
  font-size: 0.74rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: opacity 0.18s;
  white-space: nowrap;
}

.qr-whatsapp:hover { opacity: 0.88; }

.qr-close {
  background: none;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  padding: 5px 18px;
  font-size: 0.74rem;
  font-family: 'Montserrat', sans-serif;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.qr-close:hover { border-color: var(--gold-primary); color: var(--gold-primary); }

/* ── Botão QR no modal ───────────────────────────────────── */
.modal-qr-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
  transition: color 0.18s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-qr-btn:hover { color: var(--gold-primary); }


/* ── Caneta do Dia ───────────────────────────────────────── */
.pod-banner {
  margin: 16px 20px 0;
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--border-primary);
  background: var(--bg-card);
  cursor: pointer;
  transition: border-color 0.2s;
}

.pod-banner:hover { border-color: var(--gold-primary); }

.pod-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
}

.pod-img {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-image);
}

.pod-no-img {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6em;
  opacity: 0.4;
}

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

.pod-label {
  font-size: 0.62em;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-primary);
  font-weight: 600;
}

.pod-name {
  font-size: 0.92em;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pod-meta {
  font-size: 0.74em;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pod-rarity {
  font-size: 0.64em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--gold-primary);
}

.pod-rarity.ultra-rara { color: var(--text-secondary); }

.pod-arrow {
  color: var(--text-muted);
  font-size: 1.4em;
  flex-shrink: 0;
  transition: color 0.18s;
}

.pod-banner:hover .pod-arrow { color: var(--gold-primary); }

/* ── Histórico: linha com data ───────────────────────────── */
.shp-item-main {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.shp-item-date {
  font-size: 0.68em;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── @media print — Exportar PDF ────────────────────────── */
@media print {
  /* Oculta tudo exceto a galeria */
  .site-header,
  .hero,
  .controls,
  .pod-banner,
  .modal,
  .lightbox,
  .shuffle-overlay, .shuffle-popover, .shuffle-history-panel,
  .wishlist-overlay, .wishlist-panel,
  .wl-pin-overlay, .wl-lightbox,
  .view-hist-overlay, .view-hist-panel,
  .compare-bar, .compare-overlay,
  .qr-overlay,
  .compare-toggle { display: none !important; }

  body {
    background: #fff !important;
    color: #000 !important;
  }

  .gallery-section { padding: 0 !important; }

  .gallery-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px !important;
    padding: 12px !important;
  }

  .pen-card {
    border: 1px solid #ccc !important;
    border-radius: 6px !important;
    break-inside: avoid;
    page-break-inside: avoid;
    background: #fff !important;
    box-shadow: none !important;
  }

  .pen-image img { width: 100% !important; height: 160px !important; object-fit: cover !important; }
  .pen-content { padding: 8px !important; }
  .pen-title { font-size: 0.80em !important; color: #000 !important; }
  .pen-collection { font-size: 0.68em !important; color: #555 !important; }
  .pen-year { font-size: 0.68em !important; color: #777 !important; }
  .pen-badge { font-size: 0.58em !important; }
  .rarity-badge { background: #eee !important; border: 1px solid #aaa !important; color: #333 !important; }
  .pen-details, .pen-description { display: none !important; }
}


/* ── 28. Animação de entrada dos cards ───────────────────── */
@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pen-card.card-animated {
  animation: cardFadeIn 0.32s ease both;
}

/* ── 26. Tela cheia ──────────────────────────────────────── */
body.fullscreen-gallery .site-header,
body.fullscreen-gallery .controls {
  display: none !important;
}

body.fullscreen-gallery .gallery-section {
  padding-top: 8px !important;
}

/* ── 24. Notas pessoais ──────────────────────────────────── */
.notes-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: var(--z-modal);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.notes-overlay.active { display: flex; }

.notes-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-modal);
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.notes-loading {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.notes-pin-section {
  padding: 16px 20px 8px;
  border-bottom: 1px solid var(--border-soft);
}

.notes-pin-label {
  font-size: 0.80rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.notes-pin-row {
  display: flex;
  gap: 8px;
}

.notes-input {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 8px 12px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.87rem;
  width: 100%;
}

.notes-input:focus { outline: none; border-color: var(--gold-primary); }

.notes-confirm-btn {
  background: var(--gold-primary);
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.80rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.notes-pin-error { font-size: 0.75rem; color: var(--danger); margin-top: 6px; }

.notes-fields {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notes-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.notes-textarea { resize: vertical; min-height: 64px; }

.notes-footer {
  padding: 12px 20px 16px;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--border-soft);
}

.notes-save-btn {
  background: var(--gold-primary);
  color: #000;
  border: none;
  border-radius: var(--radius-pill);
  padding: 7px 24px;
  font-size: 0.80rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.18s;
  font-family: 'Montserrat', sans-serif;
}

.notes-save-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.notes-save-btn:not(:disabled):hover { opacity: 0.85; }

/* ── 25. Estatísticas ────────────────────────────────────── */
.stats-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: var(--z-modal);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.stats-overlay.active { display: flex; }

.stats-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-modal);
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.stats-body {
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.stat-block { display: flex; flex-direction: column; gap: 8px; }

.stat-summary {
  font-size: 1.0rem;
  font-weight: 600;
  color: var(--text-primary);
  padding: 4px 0;
}

.stat-sep { color: var(--gold-primary); margin: 0 6px; }

.stat-title {
  font-size: 0.70rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  font-weight: 500;
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 4px;
}

.stat-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-primary);
  min-width: 130px;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-bar-wrap {
  flex: 1;
  height: 6px;
  background: var(--border-soft);
  border-radius: 3px;
  overflow: hidden;
}

.stat-bar {
  height: 100%;
  background: var(--gold-primary);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.stat-val {
  font-size: 0.80rem;
  color: var(--text-muted);
  min-width: 24px;
  text-align: right;
  flex-shrink: 0;
}


/* ── Mapa visual de localizações ─────────────────────────── */
.loc-map-toggle-row {
  padding: 6px 10px 2px;
  border-bottom: 1px solid var(--border-soft);
}

.loc-map-toggle-btn {
  background: none;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  padding: 4px 12px;
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s;
  white-space: nowrap;
}

.loc-map-toggle-btn:hover {
  border-color: var(--gold-primary);
  color: var(--gold-primary);
}

.loc-map-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: calc(var(--z-modal) - 1);
}

.loc-map-overlay.open { display: block; }

.loc-map-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 55vh;
  background: var(--bg-secondary);
  border-top: 1px solid var(--gold-primary);
  border-radius: 16px 16px 0 0;
  z-index: var(--z-modal);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.28s ease;
  overflow: hidden;
  pointer-events: none;
}

.loc-map-panel.open { transform: translateY(0); pointer-events: auto; }

.loc-map-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
}

.loc-map-title {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.loc-map-body {
  overflow-y: auto;
  flex: 1;
  padding: 16px;
}

.loc-map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
}

.loc-map-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 6px;
  border: 1px solid var(--border-primary);
  border-radius: 10px;
  cursor: pointer;
  background: var(--bg-card);
  transition: border-color 0.18s, background 0.18s;
  min-height: 60px;
}

.loc-map-cell:hover {
  border-color: var(--gold-primary);
  background: var(--gold-soft);
}

.loc-map-active {
  border-color: var(--gold-primary);
  background: rgba(197,151,95,0.12);
}

.loc-map-code {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  word-break: break-all;
  letter-spacing: 0.02em;
}

.loc-map-count {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.loc-map-all .loc-map-code { color: var(--gold-primary); }

/* Desktop: painel lateral em vez de bottom sheet */
@media (min-width: 769px) {
  .loc-map-panel {
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translate(-50%, -40%) scale(0.96);
    opacity: 0;
    max-height: 70vh;
    width: 420px;
    border-radius: var(--radius-modal);
    border-top: 1px solid var(--border-primary);
    transition: transform 0.22s ease, opacity 0.2s ease;
  }

  .loc-map-panel.open {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}
