/* ══════════════════════════════════════════════════════════════════════════
   AlvoraCrafts — styles for the pieces added on top of the design system.
   The design-system tokens live in _ds/.../styles.css (don't edit that one).
   ══════════════════════════════════════════════════════════════════════ */

/* ── Accessibility: skip straight to the content ─────────────────────────
   Invisible until a keyboard user presses Tab, then it slides into view. */
.skip-link {
  position: absolute;
  left: 50%;
  top: -60px;
  transform: translateX(-50%);
  z-index: 999;
  background: var(--color-accent);
  color: #fff5ea;
  padding: 10px 22px;
  border-radius: 0 0 12px 12px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.18s ease;
}
.skip-link:focus {
  top: 0;
  color: #fff5ea;
}

/* ── Visible keyboard focus everywhere ───────────────────────────────────
   Mouse users never see this; keyboard users always can. */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Wishlist heart ──────────────────────────────────────────────────── */
.wish-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-content: center;
  background: color-mix(in srgb, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
  transition: transform 0.18s ease, background 0.18s ease;
}
.wish-btn svg {
  fill: none;
  stroke: var(--color-text);
  stroke-width: 1.8;
  transition: fill 0.18s ease, stroke 0.18s ease, transform 0.18s ease;
}
.wish-btn:hover {
  transform: scale(1.1);
  background: var(--color-bg);
}
.wish-btn.is-saved svg {
  fill: #d14343;
  stroke: #d14343;
}
.wish-btn.is-saved {
  background: var(--color-bg);
}

/* A gentle pulse the moment something is saved. */
@keyframes wishPop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.32); }
  100% { transform: scale(1); }
}
.wish-btn.is-saved svg { animation: wishPop 0.32s ease; }

/* ── "Saved" counter in the navigation ───────────────────────────────── */
.nav-wish {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: var(--color-text);
  text-decoration: none;
  transition: background 0.18s ease;
}
.nav-wish:hover { background: var(--color-neutral-200); }
.nav-wish [data-wish-count] {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--color-accent);
  color: #fff5ea;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-sizing: border-box;
}

/* ── Social icons in the footer ──────────────────────────────────────── */
[data-social-links] {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
[data-social-links] a:hover {
  background: var(--color-accent) !important;
  color: #fff5ea !important;
  transform: translateY(-2px);
}

/* ── Share row on the product page ───────────────────────────────────── */
.share-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: var(--space-4);
  font-size: 13px;
  color: color-mix(in srgb, var(--color-text) 65%, transparent);
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border: 1px solid var(--color-neutral-300);
  border-radius: 999px;
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s ease;
}
.share-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent-800);
}

/* ── Respect "reduce motion" ─────────────────────────────────────────────
   Visitors who ask their device to limit animation get a still page. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Print: drop the furniture, keep the information ─────────────────── */
@media print {
  .nav, footer, .wish-btn, .share-row,
  #wa-float-btn, [data-float-cta], #alvora-toast, .skip-link {
    display: none !important;
  }
  body { background: #fff; color: #000; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 11px; }
}
