/* Popup My Way — modal + banner inferior */
.fand-myway {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease, padding 0.35s ease, align-items 0.35s ease;
  cursor: none;
}

/* El cursor custom siempre por encima del popup My Way */
body.fand-ui.has-custom-cursor .fand-cursor {
  z-index: 2147483000 !important;
}

.fand-myway a,
.fand-myway button {
  cursor: none;
}

.fand-myway.is-open,
.fand-myway.is-docked {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.fand-myway__shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(80, 10, 30, 0.35), transparent 55%),
    rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.fand-myway.is-open .fand-myway__shade {
  opacity: 1;
  pointer-events: auto;
}

.fand-myway__dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  width: min(820px, 100%);
  border-radius: 1.1rem;
  overflow: hidden;
  background: #0d0b0c;
  color: #f5f0e8;
  box-shadow:
    0 0 0 1px rgba(212, 175, 106, 0.28),
    0 28px 80px rgba(0, 0, 0, 0.55);
  transform: translateY(18px) scale(0.96);
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.4s ease,
    border-radius 0.35s ease,
    box-shadow 0.35s ease;
}

.fand-myway.is-open .fand-myway__dialog {
  transform: none;
}

.fand-myway__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 3;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.fand-myway__expand {
  display: none;
}

.fand-myway__stage {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  background: #120e10;
  transition: min-height 0.35s ease;
}

.fand-myway__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.fand-myway__spot {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 55%, rgba(13, 11, 12, 0.35) 100%);
  pointer-events: none;
  z-index: 1;
}

.fand-myway__body {
  padding: clamp(1.25rem, 3vw, 1.85rem);
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: padding 0.35s ease;
}

.fand-myway__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(212, 175, 106, 0.9);
}

.fand-myway__title {
  margin: 0 0 0.45rem;
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.fand-myway__meta {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
  color: rgba(245, 240, 232, 0.72);
  line-height: 1.45;
}

.fand-myway__copy {
  margin: 0 0 1.1rem;
  font-size: 0.84rem;
  line-height: 1.5;
  color: rgba(245, 240, 232, 0.78);
}

.fand-myway__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: fit-content;
  max-width: 100%;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #d4af6a, #b8893d);
  color: #1a1208;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(212, 175, 106, 0.28);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  flex-shrink: 0;
}

.fand-myway__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(212, 175, 106, 0.38);
  color: #1a1208;
}

/* Estado docked: barra inferior */
.fand-myway.is-docked {
  inset: auto 0 0 0;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0.85rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
  z-index: 950;
  background: transparent;
}

.fand-myway.is-docked .fand-myway__shade {
  display: none;
}

.fand-myway.is-docked .fand-myway__dialog {
  width: min(960px, 100%);
  grid-template-columns: 110px minmax(0, 1fr);
  border-radius: 1rem;
  transform: none;
  box-shadow:
    0 0 0 1px rgba(212, 175, 106, 0.35),
    0 16px 40px rgba(0, 0, 0, 0.35);
}

.fand-myway.is-docked .fand-myway__stage {
  min-height: 88px;
}

.fand-myway.is-docked .fand-myway__body {
  padding: 0.75rem 3.25rem 0.75rem 1rem;
  gap: 0.75rem;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.fand-myway.is-docked .fand-myway__body-text {
  min-width: 0;
  flex: 1;
}

.fand-myway.is-docked .fand-myway__title {
  font-size: 1.1rem;
  margin-bottom: 0.15rem;
}

.fand-myway.is-docked .fand-myway__meta {
  margin: 0;
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fand-myway.is-docked .fand-myway__copy {
  display: none;
}

.fand-myway.is-docked .fand-myway__close {
  display: none;
}

.fand-myway.is-docked .fand-myway__expand {
  display: inline-flex;
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 3;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
}

.fand-myway.is-docked .fand-myway__actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.35rem;
  flex-wrap: wrap;
}

.fand-myway.is-docked .fand-myway__cta {
  padding: 0.55rem 0.95rem;
  font-size: 0.7rem;
}

.fand-myway__actions {
  display: block;
}

.fand-myway.is-open .fand-myway__body {
  gap: 0;
}

.fand-myway.is-open .fand-myway__actions {
  margin-top: 0.15rem;
}

@media (max-width: 720px) {
  .fand-myway.is-open .fand-myway__dialog {
    grid-template-columns: 1fr;
    width: min(420px, 100%);
  }

  .fand-myway.is-open .fand-myway__stage {
    min-height: 200px;
    aspect-ratio: 16 / 10;
  }

  .fand-myway.is-open .fand-myway__body {
    text-align: center;
  }

  .fand-myway.is-open .fand-myway__cta {
    width: 100%;
  }

  .fand-myway.is-docked {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
    padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
  }

  .fand-myway.is-docked .fand-myway__dialog {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .fand-myway.is-docked .fand-myway__stage {
    min-height: 76px;
  }

  .fand-myway.is-docked .fand-myway__body {
    padding: 0.55rem 2.5rem 0.55rem 0.7rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .fand-myway.is-docked .fand-myway__eyebrow {
    display: none;
  }

  .fand-myway.is-docked .fand-myway__meta {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fand-myway,
  .fand-myway__dialog,
  .fand-myway__shade {
    transition: none;
  }
}
