/* =========================================================
   COOKIES Y ELEMENTOS LEGALES — estilo piedra, vela y oro
   ========================================================= */

/* ── Botones del sistema de consentimiento ── */
.ck-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--font-inscription, Georgia, serif);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
  transition: transform 0.35s var(--ease, ease), background 0.35s, border-color 0.35s, color 0.3s, box-shadow 0.35s;
}
.ck-btn:focus-visible { outline: 2px solid var(--candle, #f3b65b); outline-offset: 3px; }
.ck-btn:active { transform: scale(0.98); }

/* Aceptar y Rechazar comparten estilo: misma visibilidad (AEPD) */
.ck-btn-choice {
  color: var(--gold-light, #e8d5a3);
  background: rgba(201, 168, 76, 0.12);
  border-color: rgba(201, 168, 76, 0.6);
}
.ck-btn-choice:hover {
  color: #1b1408;
  background: var(--gold, #c9a84c);
  border-color: var(--gold, #c9a84c);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -12px rgba(243, 182, 91, 0.7);
}
.ck-btn-gold {
  color: #1b1408;
  background: linear-gradient(135deg, #e6c983 0%, #c9a84c 45%, #9a782b 100%);
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.5), 0 12px 30px -14px rgba(201, 168, 76, 0.7);
}
.ck-btn-gold:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.6), 0 18px 36px -14px rgba(243, 182, 91, 0.85); }
.ck-btn-link {
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  color: var(--text-2, #bcb097);
  background: none;
  border: none;
  letter-spacing: 0.16em;
  text-decoration: underline;
  text-decoration-color: rgba(201, 168, 76, 0.45);
  text-underline-offset: 5px;
}
.ck-btn-link:hover { color: var(--gold-light, #e8d5a3); text-decoration-color: currentColor; }

/* ── Primera capa: aviso ── */
.ck-banner {
  position: fixed;
  z-index: 1100;
  left: 50%;
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  width: min(1040px, calc(100vw - 2rem));
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem 1.75rem;
  border-radius: 24px;
  color: var(--text-2, #bcb097);
  background:
    radial-gradient(ellipse 45% 140% at 0% 50%, rgba(243, 182, 91, 0.13), transparent 60%),
    linear-gradient(180deg, rgba(33, 28, 23, 0.97), rgba(15, 12, 10, 0.98));
  border: 1px solid rgba(201, 168, 76, 0.35);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.95), 0 0 70px -30px rgba(243, 182, 91, 0.4);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  transform: translate(-50%, 28px);
  transition: opacity 0.55s var(--ease, ease), transform 0.65s var(--ease, ease);
}
.ck-banner::before {
  content: '';
  position: absolute;
  left: 12%; right: 12%; top: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--candle, #f3b65b), transparent);
}
.ck-banner.is-visible { opacity: 1; transform: translate(-50%, 0); }

.ck-seal {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #f6d9b0;
  background: radial-gradient(circle at 35% 30%, #b8502e, #6e2412 70%);
  box-shadow:
    inset 0 -3px 6px rgba(0, 0, 0, 0.4),
    inset 0 2px 3px rgba(255, 200, 160, 0.3),
    0 0 34px -6px rgba(243, 182, 91, 0.45);
  animation: ckSeal 4.5s ease-in-out infinite;
}
@keyframes ckSeal { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }

.ck-title {
  margin: 0 0 0.3rem;
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--bone, #efe6d2);
}
.ck-desc { margin: 0; font-size: 1rem; line-height: 1.6; }
.ck-desc a, .ck-panel-intro a {
  color: var(--gold-light, #e8d5a3);
  text-decoration: underline;
  text-decoration-color: rgba(201, 168, 76, 0.5);
  text-underline-offset: 3px;
}
.ck-desc a:hover, .ck-panel-intro a:hover { text-decoration-color: currentColor; }

.ck-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  min-width: 320px;
}
.ck-actions .ck-btn-link { grid-column: 1 / -1; justify-self: center; }

/* ── Segunda capa: panel ── */
.ck-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.ck-modal[hidden] { display: none; }
.ck-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 5, 4, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.4s var(--ease, ease);
}
.ck-panel {
  position: relative;
  width: min(700px, 100%);
  max-height: min(88vh, 880px);
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  color: var(--text-2, #bcb097);
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(243, 182, 91, 0.1), transparent 70%),
    linear-gradient(180deg, #211c17, #13100d);
  border: 1px solid rgba(201, 168, 76, 0.35);
  box-shadow: 0 50px 120px -30px rgba(0, 0, 0, 0.95), 0 0 80px -30px rgba(243, 182, 91, 0.35);
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  transition: opacity 0.45s var(--ease, ease), transform 0.55s var(--ease, ease);
  outline: none;
}
.ck-modal.is-open .ck-backdrop { opacity: 1; }
.ck-modal.is-open .ck-panel { opacity: 1; transform: none; }

.ck-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.75rem 1.75rem 1.25rem;
  border-bottom: 1px solid rgba(201, 168, 76, 0.15);
}
.ck-kicker {
  margin: 0 0 0.4rem;
  font-family: var(--font-inscription, Georgia, serif);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold, #c9a84c);
}
.ck-panel-title {
  font-family: var(--font-display, Georgia, serif);
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  font-weight: 500;
  line-height: 1.1;
  color: var(--bone, #efe6d2);
}
.ck-close {
  flex-shrink: 0;
  width: 48px; height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--gold-light, #e8d5a3);
  background: rgba(12, 10, 8, 0.5);
  border: 1px solid rgba(201, 168, 76, 0.35);
  transition: background 0.3s, color 0.3s, transform 0.4s var(--ease, ease);
}
.ck-close:hover { background: var(--gold, #c9a84c); color: #1b1408; transform: rotate(90deg); }
.ck-close:focus-visible { outline: 2px solid var(--candle, #f3b65b); outline-offset: 3px; }

.ck-panel-body {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.35rem 1.75rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.ck-panel-intro { margin: 0 0 0.25rem; font-size: 1rem; line-height: 1.65; }

.ck-cat {
  padding: 1.15rem 1.3rem;
  border-radius: 16px;
  background: rgba(255, 240, 200, 0.03);
  border: 1px solid rgba(201, 168, 76, 0.15);
  transition: border-color 0.4s, background 0.4s;
}
.ck-cat:has(.ck-switch:checked) { border-color: rgba(201, 168, 76, 0.45); background: rgba(201, 168, 76, 0.05); }
.ck-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.ck-cat-title {
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--bone, #efe6d2);
  cursor: pointer;
}
span.ck-cat-title { cursor: default; }
.ck-cat-desc { margin: 0.45rem 0 0; font-size: 0.97rem; line-height: 1.6; }

.ck-always {
  flex-shrink: 0;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-family: var(--font-inscription, Georgia, serif);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.ck-switch {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  flex-shrink: 0;
  width: 54px; height: 30px;
  margin: 0;
  border-radius: 999px;
  cursor: pointer;
  background: #3d342a;
  border: 1px solid rgba(201, 168, 76, 0.35);
  transition: background 0.35s, border-color 0.35s, box-shadow 0.35s;
}
.ck-switch::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #bcb097;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  transition: transform 0.4s var(--ease, ease), background 0.3s;
}
.ck-switch:hover { border-color: rgba(201, 168, 76, 0.7); }
.ck-switch:checked {
  background: linear-gradient(135deg, #e6c983, #c9a84c);
  border-color: #c9a84c;
  box-shadow: 0 0 18px -4px rgba(243, 182, 91, 0.6);
}
.ck-switch:checked::after { transform: translateX(24px); background: #1b1408; }
.ck-switch:focus-visible { outline: 2px solid var(--candle, #f3b65b); outline-offset: 3px; }

.ck-cat-details { margin-top: 0.65rem; }
.ck-cat-details summary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 32px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-inscription, Georgia, serif);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold, #c9a84c);
}
.ck-cat-details summary::-webkit-details-marker { display: none; }
.ck-cat-details summary::before {
  content: '';
  width: 6px; height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.3s;
}
.ck-cat-details[open] summary::before { transform: rotate(45deg); }
.ck-cat-details summary:hover { color: var(--gold-light, #e8d5a3); }
.ck-cat-details summary:focus-visible { outline: 2px solid var(--candle, #f3b65b); outline-offset: 3px; border-radius: 4px; }
.ck-cat-details ul { list-style: none; margin: 0.6rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.ck-cat-details li {
  display: flex;
  flex-direction: column;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  font-size: 0.88rem;
  background: rgba(12, 10, 8, 0.5);
  border: 1px solid rgba(201, 168, 76, 0.1);
}
.ck-cat-details li strong { color: var(--bone, #efe6d2); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85rem; font-weight: 500; }

.ck-panel-foot {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  padding: 1.25rem 1.75rem 1.5rem;
  border-top: 1px solid rgba(201, 168, 76, 0.15);
}

/* ── Contenido externo bloqueado ── */
.ck-embed-host { position: relative; }
.ck-embed {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 3rem 1.5rem 1.5rem;
  text-align: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(243, 182, 91, 0.16), transparent 60%),
    linear-gradient(180deg, #211c17, #13100d);
}
.ck-embed-inner { max-width: 380px; }
.ck-embed-icon {
  width: 52px; height: 52px;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--gold, #c9a84c);
  border: 1px solid rgba(201, 168, 76, 0.4);
  background: radial-gradient(circle at 50% 35%, rgba(243, 182, 91, 0.2), transparent);
}
.ck-embed-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--bone, #efe6d2);
}
.ck-embed p:not(.ck-embed-title) { margin: 0; font-size: 0.95rem; line-height: 1.6; color: var(--text-2, #bcb097); }
.ck-embed-actions { display: flex; flex-wrap: wrap; gap: 0.6rem 1.1rem; align-items: center; justify-content: center; margin-top: 1.1rem; }
.ck-embed-link {
  font-size: 0.92rem;
  color: var(--gold-light, #e8d5a3);
  text-decoration: underline;
  text-decoration-color: rgba(201, 168, 76, 0.5);
  text-underline-offset: 4px;
}
.ck-embed-link:hover { text-decoration-color: currentColor; }

/* ── Estado del consentimiento (Política de cookies) ── */
.ck-status-list { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-direction: column; }
.ck-status-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  color: var(--bone, #efe6d2);
  border-bottom: 1px dashed rgba(201, 168, 76, 0.16);
}
.ck-status-list li::before { display: none !important; }
.ck-chip {
  flex-shrink: 0;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-family: var(--font-inscription, Georgia, serif);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.ck-chip.is-on { color: #6ee7b7; background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.45); }
.ck-chip.is-off { color: #fca5a5; background: rgba(239, 68, 68, 0.08); border: 1px solid rgba(239, 68, 68, 0.4); }
.ck-status-meta, .ck-status-empty { font-size: 0.9rem; color: var(--text-2, #bcb097); }
.ck-status-meta code { font-size: 0.85rem; color: var(--gold-light, #e8d5a3); }

/* ── Enlaces legales del pie ── */
.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.25rem 1.5rem;
  margin: 0 0 0.9rem;
}
.legal-links a,
.legal-links button {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0;
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--text-2, #bcb097);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.3s;
}
.legal-links a::after,
.legal-links button::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 8px;
  height: 1px;
  background: var(--gold, #c9a84c);
  transform: scaleX(0);
  transition: transform 0.4s var(--ease, ease);
}
.legal-links a:hover, .legal-links button:hover, .legal-links a[aria-current] { color: var(--gold-light, #e8d5a3); }
.legal-links a:hover::after, .legal-links button:hover::after, .legal-links a[aria-current]::after { transform: scaleX(1); }
.legal-links button { color: var(--gold, #c9a84c); }
.legal-links :focus-visible { outline: 2px solid var(--candle, #f3b65b); outline-offset: 3px; border-radius: 4px; }

/* ── Casilla de privacidad en formularios ── */
.form-legal { display: flex; flex-direction: column; gap: 0.85rem; }
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.97rem;
  line-height: 1.55;
  color: var(--text-2, #bcb097);
}
.form-check input {
  -webkit-appearance: none;
  appearance: none;
  flex-shrink: 0;
  width: 24px; height: 24px;
  margin: 1px 0 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  border-radius: 7px;
  border: 1px solid var(--stone-600, #3d342a);
  background: rgba(12, 10, 8, 0.65);
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.form-check input::after {
  content: '';
  width: 11px; height: 6px;
  margin-top: -3px;
  border-left: 2px solid #1b1408;
  border-bottom: 2px solid #1b1408;
  transform: rotate(-45deg) scale(0);
  transition: transform 0.3s var(--ease, ease);
}
.form-check input:hover { border-color: rgba(201, 168, 76, 0.5); }
.form-check input:checked {
  background: linear-gradient(135deg, #e6c983, #c9a84c);
  border-color: var(--gold, #c9a84c);
  box-shadow: 0 0 16px -4px rgba(243, 182, 91, 0.6);
}
.form-check input:checked::after { transform: rotate(-45deg) scale(1); }
.form-check input:focus-visible { outline: 2px solid var(--candle, #f3b65b); outline-offset: 3px; }
.form-check a, .form-legal-info a {
  color: var(--gold-light, #e8d5a3);
  text-decoration: underline;
  text-decoration-color: rgba(201, 168, 76, 0.5);
  text-underline-offset: 3px;
}
.form-legal-info {
  margin: 0;
  padding: 0.85rem 1rem;
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--text-2, #bcb097);
  background: rgba(255, 240, 200, 0.025);
  border-left: 2px solid rgba(201, 168, 76, 0.4);
  border-radius: 0 10px 10px 0;
}
.form-legal-info strong { color: var(--bone, #efe6d2); font-weight: 600; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .ck-banner {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.35rem 1.25rem 1.1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
  }
  .ck-seal { width: 48px; height: 48px; position: absolute; top: 1.1rem; right: 1.1rem; }
  .ck-seal svg { width: 22px; height: 22px; }
  .ck-title { padding-right: 3.5rem; font-size: 1.35rem; }
  .ck-actions { min-width: 0; }
}
@media (max-width: 720px) {
  html.ck-banner-open .wa-widget { opacity: 0; visibility: hidden; pointer-events: none; }
}
@media (max-width: 560px) {
  .ck-banner { bottom: max(0.75rem, env(safe-area-inset-bottom)); width: calc(100vw - 1.5rem); }
  .ck-desc { font-size: 0.95rem; }
  .ck-panel { max-height: 92vh; }
  .ck-panel-head, .ck-panel-body, .ck-panel-foot { padding-left: 1.2rem; padding-right: 1.2rem; }
  .ck-panel-foot { grid-template-columns: 1fr 1fr; }
  .ck-panel-foot .ck-btn-gold { grid-column: 1 / -1; order: -1; }
}

@media (prefers-reduced-motion: reduce) {
  .ck-banner, .ck-panel, .ck-backdrop, .ck-switch::after, .ck-btn { transition: none; }
  .ck-seal { animation: none; }
}
