/* ══════════════════════════════════════
   ARARA — cabideiro virtual (home)
   Peças de perfil na barra; hover vira de frente; clique abre o destaque.
   Cada peça recebe --ar (largura/altura do recorte) e a altura vem do tipo.
══════════════════════════════════════ */
.arara-section {
  position: relative;
  padding: var(--section-py) 0 calc(var(--section-py) * 0.8);
  background:
    radial-gradient(ellipse 60% 55% at 50% 30%, rgba(200,168,75,0.07), transparent 70%),
    linear-gradient(to bottom, var(--bg), var(--bg-subtle) 60%, var(--bg));
  overflow: hidden;
}
.arara-section::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-border), transparent);
}

.arara {
  --slot: 54px;
  --hook: 26px;
  --h-kimono: 360px;
  --h-rash: 228px;
  --h-tee: 214px;
  --side: 76deg;
  position: relative;
  margin: 56px auto 0;
  max-width: 1040px;
}

/* Barra + suportes de parede */
.arara-barra {
  position: relative;
  height: 10px;
  margin: 0 4%;
  border-radius: 6px;
  background: linear-gradient(to bottom, #f3dc8f 0%, var(--gold) 35%, var(--gold-dark) 80%, #4d3a0b 100%);
  box-shadow: 0 6px 18px rgba(0,0,0,0.6), 0 0 24px rgba(200,168,75,0.15);
  z-index: 3;
}
.arara-barra::before,
.arara-barra::after {
  content: '';
  position: absolute; top: -28px;
  width: 6px; height: 34px;
  background: linear-gradient(to right, #2a2a2a, #4a4a4a, #222);
  border-radius: 2px;
}
.arara-barra::before { left: 10px; }
.arara-barra::after  { right: 10px; }

.arara-trilho {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  list-style: none;
  margin: -4px 0 0;          /* ganchos encostam na barra */
  min-height: calc(var(--h-kimono) + var(--hook) + 20px);
}

.arara-item {
  --h: var(--h-rash);
  --w: calc(var(--h) * var(--ar));
  position: relative;
  flex: 0 0 var(--slot);
  min-width: 0;            /* senão o item estica até a largura da foto */
  display: flex;
  justify-content: center;
  transition: flex-basis 0.55s cubic-bezier(.2,.8,.2,1);
}
.arara-item[data-tipo="kimono"] { --h: var(--h-kimono); }
.arara-item[data-tipo="tee"]    { --h: var(--h-tee); }

.arara-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: var(--w);
  flex: 0 0 auto;
  perspective: 1100px;
  outline: none;
  cursor: pointer;
  transform-origin: 50% 0;
}

/* A foto é mais larga que o espaço na barra: a área de clique/hover
   é só a faixa do espaço (e cresce quando a peça abre), senão uma peça
   rouba o mouse da vizinha. */
.arara-link { pointer-events: none; }
.arara-link::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  height: calc(var(--hook) + var(--h));
  width: var(--slot);
  transform: translateX(-50%);
  pointer-events: auto;
}
.arara-item.ativa .arara-link::before { width: calc(var(--w) + 18px); }

/* Gancho: fica fixo, não gira com a peça */
.arara-gancho {
  width: 16px; height: var(--hook);
  flex: 0 0 auto;
  background: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 26'%3E%3Cpath d='M8 26V13c0-3 5-3 5-7.5S10.5 1 8 1 3 2.5 3 5' fill='none' stroke='%23b59a52' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  position: relative; z-index: 2;
}

.arara-peca {
  position: relative;
  display: block;
  width: var(--w);
  height: var(--h);
  transform: rotateY(var(--side));
  transform-origin: 50% 0;
  transition: transform 0.6s cubic-bezier(.2,.8,.2,1), filter 0.6s var(--ease);
  filter: brightness(0.62) saturate(0.9);
  will-change: transform;
}
/* Ombreira do cabide */
.arara-peca::before {
  content: '';
  position: absolute;
  top: -3px; left: 50%;
  width: 64%; height: 9px;
  transform: translateX(-50%);
  border-radius: 50% 50% 3px 3px / 90% 90% 3px 3px;
  background: linear-gradient(to bottom, #3b2a17, #1b130b);
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
  z-index: 2;
}
.arara-peca img {
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: top center;
  filter: drop-shadow(0 18px 22px rgba(0,0,0,0.55));
  user-select: none; -webkit-user-drag: none;
  pointer-events: none;
}

/* Hover / foco: abre espaço e vira de frente */
@media (hover: hover) {
  .arara-item.ativa { flex-basis: calc(var(--w) + 18px); z-index: 5; }
  .arara-item.ativa .arara-peca { transform: rotateY(0deg); filter: none; }
}
.arara-link:focus-visible .arara-peca { transform: rotateY(0deg); filter: none; }
.arara-item:has(.arara-link:focus-visible) { flex-basis: calc(var(--w) + 18px); z-index: 5; }
.arara-link:focus-visible::after {
  content: ''; position: absolute; inset: var(--hook) -6px -6px;
  border: 1px solid var(--gold-border-h); border-radius: 8px;
}

/* Vizinhas balançam quando a peça do lado abre */
.arara-item.balanca .arara-link { animation: arara-balanco 0.9s cubic-bezier(.3,.6,.3,1); }
@keyframes arara-balanco {
  0% { transform: rotate(0); } 25% { transform: rotate(var(--bal, 2.4deg)); }
  55% { transform: rotate(calc(var(--bal, 2.4deg) * -0.5)); } 100% { transform: rotate(0); }
}

.arara-legenda {
  margin-top: 26px;
  min-height: 48px;
  text-align: center;
}
.arara-legenda-nome {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 19px;
  color: var(--text);
  transition: opacity 0.25s;
}
.arara-legenda-preco {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--gold);
}
.arara-dica {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.arara-dica--toque { display: none; }

/* ══ Destaque (overlay) ══ */
.arara-foco {
  position: fixed; inset: 0;
  z-index: calc(var(--z-nav) + 10);
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: rgba(8,8,8,0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.arara-foco[hidden] { display: none; }
.arara-foco.aberto { opacity: 1; }

.arara-foco-topo {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px var(--container-px);
}
.arara-foco-contador {
  font-family: var(--font-accent);
  font-size: 18px; letter-spacing: 0.15em; color: var(--text-muted);
}
.arara-fechar {
  font-size: 12px; font-weight: 600; letter-spacing: 0.22em;
  color: var(--text); padding: 10px 4px;
}
.arara-fechar:hover { color: var(--gold); }

.arara-palco {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  gap: clamp(16px, 6vw, 90px);
  min-height: 0;
  touch-action: pan-y;
}
.arara-palco-barra {
  position: absolute; top: 6%; left: 8%; right: 8%;
  height: 6px; border-radius: 4px;
  background: linear-gradient(to bottom, #f3dc8f, var(--gold) 40%, var(--gold-dark));
  opacity: 0.35;
}
.arara-fantasma {
  height: 46%;
  opacity: 0.13;
  filter: grayscale(0.4) blur(1px);
  transition: opacity 0.3s;
  object-fit: contain;
  align-self: flex-start;
  margin-top: calc(6% + 18px);
  max-width: 18vw;
}
.arara-atual-wrap {
  position: relative;
  height: 100%;
  display: flex; flex-direction: column; align-items: center;
  padding-top: 6%;
  perspective: 1400px;
}
.arara-cabide {
  width: clamp(120px, 14vw, 190px); height: 52px;
  margin: -34px 0 -18px;
  position: relative; z-index: 2;
  background: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 52'%3E%3Cpath d='M100 24V16c0-4 7-4 7-9.5S103.5 1 100 1s-6 2-6 5' fill='none' stroke='%23c8a84b' stroke-width='2.2' stroke-linecap='round'/%3E%3Cpath d='M100 24L8 46q-6 3 0 4h184q6-1 0-4z' fill='none' stroke='%23c8a84b' stroke-width='2.6' stroke-linejoin='round'/%3E%3C/svg%3E");
  filter: drop-shadow(0 3px 4px rgba(0,0,0,0.6));
}
.arara-atual {
  height: min(50vh, 500px);
  max-width: 46vw;
  object-fit: contain;
  object-position: top center;
  filter: drop-shadow(0 30px 40px rgba(0,0,0,0.7));
  transform-origin: 50% 0;
}

.arara-seta {
  position: absolute; top: 45%;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--gold-border);
  color: var(--gold); font-size: 22px; line-height: 1;
  display: grid; place-items: center;
  background: rgba(10,10,10,0.6);
  transition: border-color var(--t), background var(--t);
  z-index: 2;
}
.arara-seta:hover { border-color: var(--gold-border-h); background: var(--gold-glow-sm); }
.arara-seta--ant { left: clamp(12px, 4vw, 60px); }
.arara-seta--prox { right: clamp(12px, 4vw, 60px); }

.arara-foco-info {
  position: relative; z-index: 1;
  text-align: center;
  padding: 8px var(--container-px) 28px;
  max-width: 620px; margin: 0 auto;
}
.arara-foco-cat {
  font-size: 11px; font-weight: 600; letter-spacing: 0.25em; color: var(--gold);
}
.arara-foco-nome {
  font-family: var(--font-display); font-style: italic; font-weight: 600;
  font-size: clamp(20px, 2.4vw, 26px); line-height: 1.25; margin-top: 6px; color: var(--text);
}
.arara-foco-preco {
  margin-top: 6px; font-size: 15px; letter-spacing: 0.08em; color: var(--gold-light);
}
.arara-foco-desc {
  margin-top: 10px; font-size: 14px; color: var(--text-muted); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.arara-foco-cta { margin-top: 18px; display: inline-flex; }

/* Troca de peça: gira no cabide */
.arara-atual.sai-esq  { animation: arara-sai 0.28s ease-in forwards; --dir: -1; }
.arara-atual.sai-dir  { animation: arara-sai 0.28s ease-in forwards; --dir: 1; }
.arara-atual.entra    { animation: arara-entra 0.5s cubic-bezier(.2,.8,.2,1); }
@keyframes arara-sai   { to { transform: rotateY(calc(var(--dir) * 80deg)); opacity: 0; } }
@keyframes arara-entra { from { transform: rotateY(calc(var(--dir, 1) * -80deg)); opacity: 0; } to { transform: none; opacity: 1; } }

/* ══ Mobile ══ */
@media (max-width: 720px) {
  .arara {
    --slot: 22px;
    --hook: 20px;
    --h-kimono: 230px;
    --h-rash: 150px;
    --h-tee: 140px;
    margin-top: 40px;
  }
  .arara-barra { margin: 0 2%; height: 8px; }
  .arara-dica--mouse { display: none; }
  .arara-dica--toque { display: inline; }
  .arara-fantasma { display: none; }
  .arara-atual { height: min(48vh, 420px); max-width: 78vw; }
  .arara-seta { top: auto; bottom: 8px; width: 42px; height: 42px; }
  .arara-palco { padding-bottom: 56px; }
}
@media (hover: none) {
  .arara-dica--mouse { display: none; }
  .arara-dica--toque { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
  .arara-item, .arara-peca, .arara-foco { transition: none; }
  .arara-item.balanca .arara-link,
  .arara-atual.sai-esq, .arara-atual.sai-dir, .arara-atual.entra { animation: none; }
}
