/* Estilos personalizados que complementan Tailwind. */

html {
  scroll-behavior: smooth;
}

body {
  background-image:
    radial-gradient(circle at 20% -10%, rgba(126, 92, 255, 0.10), transparent 50%),
    radial-gradient(circle at 80% 110%, rgba(52, 211, 153, 0.06), transparent 55%);
  background-attachment: fixed;
}

/* Scrollbar moderna */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: #0b0f1a; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #4a25e0, #7e5cff);
  border-radius: 999px;
  border: 3px solid #0b0f1a;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #5e36ff, #a48cff); }

/* Pequeño fade-in en carga */
@keyframes amg-fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
main > section { animation: amg-fade-up .55s ease-out both; }
main > section:nth-child(2) { animation-delay: .05s; }
main > section:nth-child(3) { animation-delay: .10s; }
main > section:nth-child(4) { animation-delay: .15s; }

/* Inputs autofill oscuros */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #0b0f1a inset !important;
  -webkit-text-fill-color: #fff !important;
  caret-color: #fff;
  transition: background-color 9999s ease-out;
}

/* Foco accesible */
:focus-visible {
  outline: 2px solid #a48cff;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Fotografías de producto */
.amg-shot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.amg-shot-frame {
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #111727;
}
.amg-shot-frame img {
  transition: transform 0.6s ease;
}
.amg-shot-frame:hover img {
  transform: scale(1.04);
}

.amg-dropzone {
  position: relative;
  min-height: 160px;
  padding: 1rem;
  border: 2px dashed rgba(164, 140, 255, 0.35);
  border-radius: 1rem;
  background: rgba(11, 15, 26, 0.55);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.amg-dropzone:hover,
.amg-dropzone.is-dragover {
  border-color: #7e5cff;
  background: rgba(17, 23, 39, 0.9);
}
.amg-dropzone-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 128px;
  color: #cbd5e1;
  font-size: 0.9rem;
  text-align: center;
  line-height: 1.45;
  pointer-events: none;
}
.amg-dropzone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 0.65rem;
}
.amg-dropzone-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 0.7rem;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
}
.amg-dropzone-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.amg-dropzone-file {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0.5rem;
  background: rgba(255,255,255,0.04);
  text-align: center;
}
.amg-dropzone-file strong {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a48cff;
}
.amg-dropzone-file span {
  margin-top: 0.35rem;
  font-size: 0.65rem;
  color: #94a3b8;
  word-break: break-all;
  line-height: 1.25;
}
.amg-dropzone-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(7, 9, 18, 0.85);
  color: #fecaca;
  line-height: 1;
  font-size: 1rem;
}

.amg-faq {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.amg-faq-item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}
.amg-faq-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.25rem;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: #fff;
}
.amg-faq-summary::-webkit-details-marker { display: none; }
.amg-faq-icon {
  flex-shrink: 0;
  color: #a48cff;
  transition: transform 0.2s ease;
}
.amg-faq-item[open] .amg-faq-icon {
  transform: rotate(180deg);
}
.amg-faq-body {
  padding: 0 1.25rem 1.2rem;
  color: #cbd5e1;
  font-size: 0.9rem;
  line-height: 1.65;
}
.amg-faq-body p { margin: 0; }

.amg-prose p { margin: 0 0 1rem; }
.amg-prose h1, .amg-prose h2, .amg-prose h3, .amg-prose h4 {
  color: #fff;
  font-weight: 600;
  margin: 1.4rem 0 0.6rem;
}
.amg-prose h1 { font-size: 1.75rem; }
.amg-prose h2 { font-size: 1.4rem; }
.amg-prose h3 { font-size: 1.2rem; }
.amg-prose ul, .amg-prose ol { margin: 0 0 1rem 1.2rem; }
.amg-prose a { color: #a48cff; }
.amg-prose img { max-width: 100%; border-radius: 0.75rem; margin: 1rem 0; }
.amg-prose figure {
  margin: 1.5rem 0;
  break-inside: avoid;
}
.amg-prose figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #94a3b8;
  text-align: center;
  line-height: 1.4;
}
.amg-prose table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.9rem; }
.amg-prose td, .amg-prose th { border: 1px solid rgba(255,255,255,0.1); padding: 0.4rem 0.6rem; }

@media (min-width: 768px) {
  .amg-prose-cols {
    column-count: 2;
    column-gap: 2.75rem;
    column-rule: 1px solid rgba(255, 255, 255, 0.08);
  }
  .amg-prose-cols h1,
  .amg-prose-cols h2,
  .amg-prose-cols h3,
  .amg-prose-cols h4,
  .amg-prose-cols img,
  .amg-prose-cols figure,
  .amg-prose-cols table,
  .amg-prose-cols ul,
  .amg-prose-cols ol,
  .amg-prose-cols blockquote {
    break-inside: avoid;
  }
}

.amg-tts {
  overflow: visible;
}
.amg-tts-ring {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  border: 2px dashed #34d399;
  pointer-events: none;
  opacity: 1;
  animation: amg-tts-spin 12s linear infinite;
}
.amg-tts.is-playing .amg-tts-ring {
  animation: amg-tts-fade 2s ease forwards;
}
@keyframes amg-tts-spin {
  to { transform: rotate(360deg); }
}
@keyframes amg-tts-fade {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* Banner de consentimiento (cookies y políticas) */
.policy-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  padding: 0.75rem;
  pointer-events: none;
}
.policy-consent[hidden] {
  display: none !important;
}
.policy-consent-panel {
  pointer-events: auto;
  max-width: 52rem;
  margin: 0 auto;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(11, 15, 26, 0.97);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.65);
}
.policy-consent-inner {
  padding: 1rem 1.15rem 1.1rem;
}
.policy-consent-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}
.policy-consent-text {
  margin-top: 0.45rem;
  font-size: 0.78rem;
  line-height: 1.55;
  color: #94a3b8;
}
.policy-consent-text a {
  color: #a48cff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.policy-consent-text a:hover {
  color: #c9bbff;
}
.policy-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}
.policy-consent-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  font-size: 0.75rem;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.policy-consent-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}
.policy-consent-btn-primary {
  border-color: rgba(164, 140, 255, 0.45);
  background: #5e36ff;
  color: #fff;
}
.policy-consent-btn-primary:hover {
  background: #7e5cff;
}
.policy-consent-btn-ghost {
  background: transparent;
}
.policy-consent-options {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.75rem;
}
.policy-consent-option {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.78rem;
  color: #cbd5e1;
  cursor: pointer;
}
.policy-consent-option strong {
  display: block;
  color: #fff;
  font-size: 0.8rem;
}
.policy-consent-option small {
  display: block;
  margin-top: 0.15rem;
  color: #94a3b8;
  line-height: 1.45;
}
.policy-consent-option input {
  margin-top: 0.15rem;
  accent-color: #5e36ff;
}
.policy-consent-option input:disabled {
  opacity: 0.7;
}

.policy-check {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #94a3b8;
}
.policy-check input {
  margin-top: 0.2rem;
  accent-color: #5e36ff;
  flex-shrink: 0;
}
.policy-check a {
  color: #a48cff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.policy-check a:hover {
  color: #c9bbff;
}

@media (max-width: 640px) {
  .policy-consent {
    padding: 0.5rem;
  }
  .policy-consent-actions {
    flex-direction: column;
  }
  .policy-consent-btn {
    width: 100%;
  }
}
