/* ValeAinda Experiência - Camada visual complementar ao Astra
   Regras estritamente escopadas com namespace .valeinda-exp
   Não sobrescreve estilos globais do Astra/Astra Child */

.valeinda-exp {
  --va-exp-primary: #1f6feb;
  --va-exp-text: #1f2937;
  --va-exp-text-muted: #4b5563;
  --va-exp-bg: #ffffff;
  --va-exp-surface: #f8fafc;
  --va-exp-border: #e5e7eb;
  --va-exp-radius: 8px;
  --va-exp-sm: 0.5rem;
  --va-exp-md: 1rem;
  --va-exp-lg: 1.25rem;
  color: var(--va-exp-text);
  line-height: 1.6;
}

.valeinda-exp-card {
  background: var(--va-exp-bg);
  border: 1px solid var(--va-exp-border);
  border-radius: var(--va-exp-radius);
  padding: var(--va-exp-md);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  margin-bottom: var(--va-exp-md);
}

.valeinda-exp-card--unstyled {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.valeinda-exp-title {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 var(--va-exp-md);
  color: var(--va-exp-text);
}

.valeinda-exp-meta {
  color: var(--va-exp-text-muted);
  font-size: 0.95rem;
}

.valeinda-exp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  border-radius: var(--va-exp-radius);
  border: 1px solid transparent;
  background: var(--va-exp-primary);
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  line-height: 1.2;
  transition: filter 0.15s ease, transform 0.05s ease;
  white-space: nowrap;
}

.valeinda-exp-btn:hover,
.valeinda-exp-btn:focus {
  filter: brightness(0.95);
  outline: 2px solid rgba(31, 111, 235, 0.35);
  outline-offset: 2px;
  text-decoration: none;
}

.valeinda-exp-btn:active {
  transform: translateY(1px);
}

.valeinda-exp-btn.is-secondary {
  background: #ffffff;
  color: var(--va-exp-text);
  border-color: var(--va-exp-border);
}

.valeinda-exp-btn.is-ghost {
  background: transparent;
  color: var(--va-exp-text-muted);
  border-color: transparent;
}

.valeinda-exp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--va-exp-sm);
  align-items: center;
}

.valeinda-exp-stack {
  display: flex;
  flex-direction: column;
  gap: var(--va-exp-md);
}

.valeinda-exp-grid {
  display: grid;
  gap: var(--va-exp-md);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

@media (max-width: 768px) {
  .valeinda-exp-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .valeinda-exp-btn {
    width: 100%;
  }
}

/* Promoções e Destaques */
.valeinda-exp-campaign {
  margin: var(--va-exp-lg) 0;
}

.valeinda-exp-campaign__inner {
  display: flex;
  flex-direction: column;
  gap: var(--va-exp-md);
  background: var(--va-exp-bg);
  border: 1px solid var(--va-exp-border);
  border-radius: var(--va-exp-radius);
  padding: var(--va-exp-md);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.valeinda-exp-campaign__media {
  width: 100%;
  border-radius: calc(var(--va-exp-radius) - 2px);
  overflow: hidden;
}

.valeinda-exp-campaign__image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
}

.valeinda-exp-campaign__content {
  display: flex;
  flex-direction: column;
  gap: var(--va-exp-sm);
}

.valeinda-exp-campaign__title {
  margin: 0;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  line-height: 1.25;
  color: var(--va-exp-text);
}

.valeinda-exp-campaign__text {
  margin: 0;
  color: var(--va-exp-text-muted);
  font-size: clamp(0.95rem, 1.2vw, 1rem);
}

.valeinda-exp-campaign__actions {
  margin-top: var(--va-exp-sm);
}

@media (min-width: 992px) {
  .valeinda-exp-campaign__inner {
    flex-direction: row;
    align-items: center;
  }
  .valeinda-exp-campaign__media {
    flex: 0 0 50%;
  }
  .valeinda-exp-campaign__content {
    flex: 1 1 50%;
    padding-left: var(--va-exp-md);
  }
}

@media (max-width: 768px) {
  .valeinda-exp-campaign__image {
    max-height: 320px;
  }
}


/* Mídia multimída — imagem, GIF, MP4/WebM, YouTube/Vimeo (click-to-load) */
.valeinda-exp-media-video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  max-height: 420px;
  object-fit: cover;
  background: #000;
  border: 0;
}

.valeinda-exp-video-external {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: #000;
  border-radius: 4px;
}

.valeinda-exp-campaign__media .valeinda-exp-video-external {
  aspect-ratio: 16 / 9;
  max-height: 420px;
}

.valeinda-exp-video-external--placeholder {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

.valeinda-exp-video-external__poster {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}

.valeinda-exp-video-external__play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.valeinda-exp-video-external__play:hover {
  background: rgba(0, 0, 0, 0.85);
}

.valeinda-exp-video-external__play:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.valeinda-exp-video-external iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}


/* Floating banner */
.valeinda-exp-floating {
  position: fixed;
  bottom: clamp(1rem, 2vw, 1.25rem);
  right: clamp(1rem, 2vw, 1.25rem);
  z-index: 1000;
  max-width: min(90vw, 420px);
  width: calc(100vw - 2rem);
  box-sizing: border-box;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 8px;
  box-shadow: 0 10px 40px -20px rgba(0,0,0,0.5);
  padding: clamp(0.75rem, 2vw, 1rem);
  display: none;
  align-items: flex-start;
  gap: clamp(0.5rem, 2vw, 0.75rem);
  overflow: hidden;
}

.valeinda-exp-floating.is-visible {
  display: flex;
  flex-direction: column;
}

.valeinda-exp-floating__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: #fff;
  color: #111;
  font-size: 1.375rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  z-index: 2;
}

.valeinda-exp-floating__close:hover {
  background: #f1f1f1;
}

.valeinda-exp-floating__close:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.valeinda-exp-floating__inner {
  display: flex;
  flex-direction: column;
  gap: clamp(0.75rem, 2vw, 1rem);
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
}

.valeinda-exp-floating__media {
  flex: 0 0 auto;
  width: 100%;
  height: clamp(160px, 30vw, 220px);
}

.valeinda-exp-floating__image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.valeinda-exp-floating__media .valeinda-exp-media-video {
  height: 100%;
  aspect-ratio: auto;
  border-radius: 4px;
}

.valeinda-exp-floating__media .valeinda-exp-video-external {
  height: 100%;
}

.valeinda-exp-floating__content {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}

.valeinda-exp-floating__title {
  margin: 0 0 0.25rem 0;
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  line-height: 1.25;
}

.valeinda-exp-floating__text {
  margin: 0 0 0.5rem 0;
  font-size: clamp(0.875rem, 2vw, 0.95rem);
  line-height: 1.4;
}

.valeinda-exp-floating__actions {
  display: flex;
}

@media (max-width: 480px) {
  .valeinda-exp-floating {
    right: 0.5rem;
    left: 0.5rem;
    bottom: 0.5rem;
    width: auto;
    max-width: none;
  }

  .valeinda-exp-floating__media {
    height: clamp(120px, 30vw, 160px);
  }
}
