@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Jost:wght@300;400;500&display=swap');

/* ── Variables ─────────────────────────────────────────── */
:root {
  --bg:           #0c0b09;
  --surface:      #111009;
  --card:         #191610;
  --card-hover:   #1f1b13;
  --border:       rgba(185, 150, 60, 0.13);
  --border-hover: rgba(185, 150, 60, 0.38);
  --gold:         #c8a84b;
  --gold-light:   #dfc46a;
  --gold-glow:    rgba(200, 168, 75, 0.14);
  --cream:        #ede4cc;
  --text:         #c8bc9e;
  --muted:        #6b604a;
  --dim:          #35301f;
  --green:        #5ab876;
  --amber:        #d4854a;
  --blue:         #7a8fa6;
  --radius:       13px;
  --radius-sm:    8px;
  --transition:   0.22s ease;
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Jost', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}
img    { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
a      { text-decoration: none; }

/* ── Header ────────────────────────────────────────────── */
header {
  text-align: center;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.header-content {
  position: relative;
  z-index: 1;
  padding: 46px 24px 28px;
}

.detail-header .header-content {
  padding: 20px 24px;
}

/* ── Header coin background ────────────────────────────── */
/*
  Coins are vivid at the edges (no text there).
  The mask-image gradient fades them out toward the center
  where the brand text lives, keeping full readability.
  mask: transparent = coin hidden, black = coin visible.
*/
.header-coins {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: radial-gradient(
    ellipse 100% 100% at 50% 50%,
    transparent 28%,
    rgba(0,0,0,0.55) 50%,
    black 68%
  );
  mask-image: radial-gradient(
    ellipse 100% 100% at 50% 50%,
    transparent 28%,
    rgba(0,0,0,0.55) 50%,
    black 68%
  );
}

/* Detail header: horizontal mask — coins only peek in from L/R corners */
.header-coins-sm {
  -webkit-mask-image: linear-gradient(
    to right,
    black 0%, rgba(0,0,0,0.6) 14%,
    transparent 28%, transparent 72%,
    rgba(0,0,0,0.6) 86%, black 100%
  );
  mask-image: linear-gradient(
    to right,
    black 0%, rgba(0,0,0,0.6) 14%,
    transparent 28%, transparent 72%,
    rgba(0,0,0,0.6) 86%, black 100%
  );
}

.hc { position: absolute; }

/*
  Two overlapping clusters, one on each side.
  High opacity — the mask above handles text-safe zones.
  Left:  hc-1 (back-corner), hc-3 (lower-mid), hc-5 (inner)
  Right: hc-2 (back-corner), hc-4 (lower-mid), hc-6 (inner)
*/
.hc-1 { width: 310px; top:    -70px; left:  -30px; opacity: 0.26; transform: rotate(-8deg); }
.hc-3 { width: 270px; bottom: -60px; left:   4%;   opacity: 0.24; transform: rotate(16deg); }
.hc-5 { width: 210px; top:     20px; left:  20%;   opacity: 0.22; transform: rotate(4deg); }

.hc-2 { width: 300px; top:    -60px; right: -25px; opacity: 0.25; transform: rotate(10deg); }
.hc-4 { width: 260px; bottom: -55px; right:  6%;   opacity: 0.24; transform: rotate(-18deg); }
.hc-6 { width: 195px; top:     25px; right: 21%;   opacity: 0.22; transform: rotate(-7deg); }

/* Detail header — compact, coins peek in from corners */
.hc-sm-1 { width: 140px; top: -35px; left:  -8px;  opacity: 0.22; transform: rotate(-10deg); }
.hc-sm-2 { width: 130px; top: -28px; right: -5px;  opacity: 0.20; transform: rotate(8deg); }

.brand-link { display: inline-block; }
.brand-link:hover .brand { opacity: 0.82; }

/* ── Brand wrapper + Fedix logo ────────────────────────── */
.brand-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* Inline layout used in the compact detail header */
.brand-wrapper-inline {
  flex-direction: row;
  align-items: center;
  gap: 14px;
}

.fedix-logo {
  height: 160px;
  width: auto;
  filter:
    drop-shadow(0 0 32px rgba(200, 168, 75, 0.28))
    drop-shadow(0 8px 28px rgba(200, 168, 75, 0.32));
  transition: filter 0.35s ease, transform 0.35s ease;
}

.brand-link:hover .fedix-logo {
  filter:
    drop-shadow(0 0 48px rgba(200, 168, 75, 0.46))
    drop-shadow(0 10px 36px rgba(200, 168, 75, 0.50));
  transform: scale(1.04);
}

.detail-header .fedix-logo {
  height: 42px;
  filter: drop-shadow(0 2px 10px rgba(200, 168, 75, 0.35));
}

.brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 300;
  letter-spacing: 0.2em;
  color: var(--cream);
  text-transform: uppercase;
  transition: opacity var(--transition);
}

.detail-header .brand {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
}

.tagline {
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 300;
  margin-top: 8px;
}

.header-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 20px;
}

.header-rule::before,
.header-rule::after {
  content: '';
  height: 1px;
  width: 72px;
  background: var(--border);
}

.header-rule span {
  color: var(--gold);
  font-size: 0.52rem;
  opacity: 0.65;
}

/* ── Header toggles (language + currency) ──────────────── */
/* Shared absolutely-positioned row that spans the header width */
.header-toggles {
  position: absolute;
  top: 18px;
  left: 24px;
  right: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1;
}

.lang-toggle,
.currency-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
}

.lang-btn,
.currency-btn {
  font-family: 'Jost', sans-serif;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding: 4px 3px;
  transition: color var(--transition);
}

.lang-btn:hover,
.currency-btn:hover  { color: var(--text); }

.lang-btn.active,
.currency-btn.active { color: var(--gold); font-weight: 500; }

.lang-sep,
.currency-sep {
  color: var(--dim);
  font-size: 0.68rem;
  user-select: none;
}

/* ── Main nav ──────────────────────────────────────────── */
.main-nav {
  display: flex;
  justify-content: center;
  border-bottom: 1px solid var(--border);
}

.nav-tab {
  font-family: 'Jost', sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 15px 28px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--transition), border-color var(--transition);
}

.nav-tab:hover { color: var(--text); }
.nav-tab.active {
  color: var(--cream);
  border-bottom-color: var(--gold);
}

/* ── Controls ──────────────────────────────────────────── */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 20px 24px 16px;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--cream);
  font-family: 'Jost', sans-serif;
  font-size: 0.9rem;
  font-weight: 300;
  padding: 10px 14px 10px 38px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-input::placeholder { color: var(--muted); }
.search-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.ctrl-select {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'Jost', sans-serif;
  font-size: 0.88rem;
  font-weight: 300;
  padding: 10px 34px 10px 13px;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b604a' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  transition: border-color var(--transition);
}

.ctrl-select:focus { border-color: var(--gold); }
.ctrl-select option { background: #1a1710; color: var(--text); }

.result-count {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 300;
  letter-spacing: 0.06em;
  white-space: nowrap;
  margin-left: auto;
}

/* ── Grid ──────────────────────────────────────────────── */
#grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 24px;
  padding: 8px 24px 52px;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

/* ── Card ──────────────────────────────────────────────── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  animation: fadeUp 0.45s ease both;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--border-hover);
  box-shadow: 0 20px 50px rgba(0,0,0,0.55), 0 0 0 1px rgba(185,150,60,0.1);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Carousel ──────────────────────────────────────────── */
.carousel {
  position: relative;
  overflow: hidden;
  background: #090805;
  aspect-ratio: 4/3;
}

.carousel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes imgOut {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(1.04); }
}

@keyframes imgIn {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

.carousel-img.out { animation: imgOut 0.18s ease forwards; }
.carousel-img.in  { animation: imgIn  0.32s ease both; }

.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(10, 9, 6, 0.72);
  border: 1px solid rgba(185, 150, 60, 0.2);
  color: var(--gold-light);
  width: 33px;
  height: 33px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  opacity: 0;
  transition: opacity var(--transition), background var(--transition);
  z-index: 2;
}

.carousel:hover .nav { opacity: 1; }
.nav:hover { background: rgba(185, 150, 60, 0.18); }
.nav.left  { left: 9px; }
.nav.right { right: 9px; }

.dots {
  position: absolute;
  bottom: 9px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  z-index: 2;
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transition: background var(--transition), transform var(--transition);
}

.dot.active {
  background: var(--gold);
  transform: scale(1.4);
}

/* ── Quantity badge (carousel overlay) ─────────────────── */
.qty-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(10, 9, 6, 0.78);
  border: 1px solid rgba(185, 150, 60, 0.3);
  color: var(--gold-light);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 5px;
  z-index: 2;
}

/* ── Card body ─────────────────────────────────────────── */
.card-body { padding: 15px 17px 17px; }

.card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--cream);
  letter-spacing: 0.02em;
  line-height: 1.28;
  margin-bottom: 5px;
}

.card-meta {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 300;
  margin-bottom: 14px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* ── Badges ────────────────────────────────────────────── */
.badge {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-unc   { background: rgba(90,184,118,0.1);  color: var(--green); border: 1px solid rgba(90,184,118,0.22); }
.badge-vf    { background: rgba(200,168,75,0.1);  color: var(--gold-light); border: 1px solid rgba(200,168,75,0.22); }
.badge-f     { background: rgba(212,133,74,0.1);  color: var(--amber); border: 1px solid rgba(212,133,74,0.22); }
.badge-other { background: rgba(122,143,166,0.1); color: var(--blue);  border: 1px solid rgba(122,143,166,0.22); }

/* ── Price ─────────────────────────────────────────────── */
.price {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.32rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.02em;
}

/* ── Empty state ───────────────────────────────────────── */
.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 90px 20px;
  color: var(--muted);
}

.empty-icon { font-size: 2.2rem; margin-bottom: 18px; opacity: 0.3; }

.empty h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.55rem;
  font-weight: 300;
  color: var(--text);
  margin-bottom: 8px;
}

.empty p { font-size: 0.85rem; font-weight: 300; }

/* ── About section ─────────────────────────────────────── */
.about-section {
  flex: 1;
  padding: 64px 24px 80px;
}

.about-inner {
  max-width: 820px;
  margin: 0 auto;
}

.about-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 300;
  font-style: italic;
  color: var(--cream);
  letter-spacing: 0.03em;
  text-align: center;
}

.about-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 18px auto 28px;
}

.about-rule::before,
.about-rule::after {
  content: '';
  height: 1px;
  width: 52px;
  background: var(--border);
}

.about-rule span {
  color: var(--gold);
  font-size: 0.52rem;
  opacity: 0.75;
}

.about-body {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--text);
  line-height: 1.95;
  margin-bottom: 44px;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(172px, 1fr));
  gap: 14px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 18px;
  text-align: center;
  transition: border-color var(--transition), transform var(--transition);
}

.stat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
}

.stat-icon {
  display: block;
  color: var(--gold);
  font-size: 1.2rem;
  margin-bottom: 10px;
  opacity: 0.8;
}

.stat-text {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.04em;
  line-height: 1.4;
}

/* ── Footer ────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 30px 24px 28px;
  margin-top: auto;
  position: relative;
  overflow: hidden;
}

/* ── Footer coin background ────────────────────────────── */
.footer-coins {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: radial-gradient(
    ellipse 100% 100% at 50% 50%,
    transparent 22%,
    rgba(0,0,0,0.5) 44%,
    black 62%
  );
  mask-image: radial-gradient(
    ellipse 100% 100% at 50% 50%,
    transparent 22%,
    rgba(0,0,0,0.5) 44%,
    black 62%
  );
}

.fc { position: absolute; }
/* Left cluster */
.fc-1 { width: 185px; bottom: -60px; left:  -18px; opacity: 0.22; transform: rotate(18deg); }
.fc-3 { width: 150px; top:   -40px;  left:   6%;   opacity: 0.20; transform: rotate(-8deg); }
/* Right cluster */
.fc-2 { width: 175px; top:   -55px;  right: -12px; opacity: 0.22; transform: rotate(-12deg); }
.fc-4 { width: 145px; bottom: -50px; right:  5%;   opacity: 0.20; transform: rotate(10deg); }

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-link {
  font-family: 'Jost', sans-serif;
  font-size: 0.74rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color var(--transition);
  padding: 2px 0;
}

button.footer-link { background: none; border: none; cursor: pointer; }
.footer-link:hover  { color: var(--gold); }
.footer-link.active { color: var(--text); }

.footer-sep { color: var(--dim); font-size: 0.7rem; user-select: none; }

.footer-contact {
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--muted);
}

.footer-wa {
  color: var(--text);
  transition: color var(--transition);
}

.footer-wa:hover { color: var(--gold); }

.footer-rights {
  font-size: 0.7rem;
  font-weight: 300;
  color: var(--dim);
  letter-spacing: 0.07em;
}

/* ── Back button ───────────────────────────────────────── */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.73rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 400;
  padding: 14px 24px;
  transition: color var(--transition);
}

.back-btn:hover { color: var(--gold); }
.back-btn svg   { transition: transform var(--transition); }
.back-btn:hover svg { transform: translateX(-3px); }

/* ── Detail page ───────────────────────────────────────── */
.detail-page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 52px;
  width: 100%;
  flex: 1;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  align-items: start;
}

/* ── Gallery ───────────────────────────────────────────── */
.gallery-main {
  aspect-ratio: 1;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: zoom-in;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 20px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.gallery-main:hover img { transform: scale(1.025); }

.gallery-thumbs {
  display: flex;
  gap: 9px;
  margin-top: 11px;
  flex-wrap: wrap;
}

.thumb {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color var(--transition);
  flex-shrink: 0;
}

.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.active { border-color: var(--gold); }
.thumb:hover:not(.active) { border-color: var(--border-hover); }

/* ── Item info ─────────────────────────────────────────── */
.item-info { padding-top: 4px; }

.item-eyebrow {
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 400;
  margin-bottom: 10px;
}

.item-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.9rem, 2.8vw, 2.8rem);
  font-weight: 300;
  color: var(--cream);
  line-height: 1.18;
  letter-spacing: 0.02em;
  margin-bottom: 22px;
}

.item-divider {
  height: 1px;
  background: var(--border);
  margin: 18px 0;
  position: relative;
}

.item-divider::after {
  content: '◆';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-size: 0.5rem;
  background: var(--bg);
  padding-right: 10px;
  opacity: 0.65;
}

.item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.item-label {
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 300;
}

.item-value {
  font-size: 0.92rem;
  color: var(--text);
}

.item-price {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.02em;
  margin: 4px 0 2px;
  line-height: 1.2;
}

.item-description {
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--text);
  line-height: 1.85;
  margin: 18px 0 0;
}

/* ── WhatsApp button ───────────────────────────────────── */
.btn-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 22px;
  margin-top: 18px;
  background: #25D366;
  border-radius: 10px;
  color: #fff;
  font-family: 'Jost', sans-serif;
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn-whatsapp:hover {
  background: #1fbd5a;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.28);
}

.btn-whatsapp:active { transform: translateY(0); }

/* ── Lightbox ──────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(6, 5, 4, 0.94);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
  cursor: zoom-out;
}

.lightbox.open { opacity: 1; pointer-events: all; }

.lightbox img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  transform: scale(0.94);
  transition: transform 0.28s ease;
}

.lightbox.open img { transform: scale(1); }

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  color: var(--muted);
  font-size: 1.3rem;
  line-height: 1;
  padding: 6px;
  transition: color var(--transition);
}

.lightbox-close:hover { color: var(--cream); }

/* ── Animation stagger ─────────────────────────────────── */
.card:nth-child(2)  { animation-delay: 0.05s; }
.card:nth-child(3)  { animation-delay: 0.10s; }
.card:nth-child(4)  { animation-delay: 0.15s; }
.card:nth-child(5)  { animation-delay: 0.20s; }
.card:nth-child(6)  { animation-delay: 0.25s; }
.card:nth-child(7)  { animation-delay: 0.30s; }
.card:nth-child(8)  { animation-delay: 0.35s; }
.card:nth-child(9)  { animation-delay: 0.40s; }
.card:nth-child(10) { animation-delay: 0.45s; }
.card:nth-child(11) { animation-delay: 0.50s; }
.card:nth-child(12) { animation-delay: 0.55s; }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 800px) {
  .detail-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .header-content { padding: 34px 16px 22px; }

  #grid {
    padding: 6px 16px 40px;
    gap: 14px;
  }

  .controls { padding: 14px 16px 10px; }
  .about-section { padding: 44px 16px 60px; }

  /* Scale down on tablet */
  .hc-1 { width: 210px; }
  .hc-2 { width: 200px; }
  .hc-3 { width: 180px; }
  .hc-4 { width: 172px; }
  .hc-5, .hc-6 { display: none; }
  .fedix-logo   { height: 120px; }

  /* Widen the mask's opaque zone on narrower screens so edge coins stay visible */
  .header-coins {
    -webkit-mask-image: radial-gradient(ellipse 100% 100% at 50% 50%, transparent 20%, rgba(0,0,0,0.55) 42%, black 60%);
    mask-image:         radial-gradient(ellipse 100% 100% at 50% 50%, transparent 20%, rgba(0,0,0,0.55) 42%, black 60%);
  }
  .footer-coins {
    -webkit-mask-image: radial-gradient(ellipse 100% 100% at 50% 50%, transparent 15%, rgba(0,0,0,0.5) 38%, black 55%);
    mask-image:         radial-gradient(ellipse 100% 100% at 50% 50%, transparent 15%, rgba(0,0,0,0.5) 38%, black 55%);
  }
}

@media (max-width: 480px) {
  #grid {
    grid-template-columns: 1fr 1fr;
    gap: 11px;
  }

  .card-body   { padding: 10px 12px 13px; }
  .card-title  { font-size: 1.05rem; }
  .card-meta   { font-size: 0.7rem; margin-bottom: 10px; }
  .price       { font-size: 1.1rem; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .fedix-logo  { height: 88px; }

  /* Prevent toggles from overlapping the brand title on the detail page */
  .detail-header .header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 16px 14px;
  }
  .detail-header .header-toggles {
    position: static;
    width: 100%;
    margin-bottom: 6px;
  }

  /* On small phones the transparent zone only needs to protect a narrow text block */
  .header-coins {
    -webkit-mask-image: radial-gradient(ellipse 100% 100% at 50% 50%, transparent 14%, rgba(0,0,0,0.5) 34%, black 52%);
    mask-image:         radial-gradient(ellipse 100% 100% at 50% 50%, transparent 14%, rgba(0,0,0,0.5) 34%, black 52%);
  }
}

/* Touch: always show carousel nav arrows */
@media (hover: none) {
  .nav { opacity: 0.65; }
}
