/* =========================================================================
   ABADAL — CMP a medida · estilos (paleta de marca, sin librerías)
   Usa las variables de shared.css: --ink --ink-2 --ivory --ash --burgundy
   --gold --glass-b --sans. Con fallback por si carga aislado.
   ========================================================================= */
#abadal-cc {
  --cc-ink: var(--ink, #121212);
  --cc-ink2: var(--ink-2, #1E1E1E);
  --cc-ivory: var(--ivory, #F4F1EC);
  --cc-ash: var(--ash, #9a9a96);
  --cc-burgundy: var(--burgundy, #8C1D18);
  --cc-line: var(--glass-b, rgba(244, 241, 236, .14));
  font-family: var(--sans, 'Manrope', system-ui, sans-serif);
}
#abadal-cc[aria-hidden="true"] { display: none; }

/* ---------------- Banner ---------------- */
.cc-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 9000;
  background: var(--cc-ink2);
  border-top: 1px solid var(--cc-line);
  box-shadow: 0 -18px 50px rgba(0, 0, 0, .45);
  animation: cc-up .4s cubic-bezier(.22, .61, .36, 1) both;
}
@keyframes cc-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .cc-banner { animation: none; } }

.cc-banner__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px clamp(20px, 5vw, 48px);
  display: flex;
  gap: 28px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.cc-banner__text { flex: 1 1 420px; min-width: 280px; }
.cc-banner__actions {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  flex: 0 0 auto;
}

.cc-title {
  font-family: var(--sans, 'Manrope', sans-serif);
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--cc-ivory); margin: 0 0 8px;
}
.cc-body {
  font-size: 13.5px; line-height: 1.65; color: var(--cc-ash); margin: 0;
}
.cc-body a { color: var(--cc-ivory); text-decoration: underline; text-underline-offset: 2px; }

/* ---------------- Botones ---------------- */
.cc-btn {
  font-family: var(--sans, 'Manrope', sans-serif);
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  padding: 13px 22px; min-height: 44px; cursor: pointer;
  border: 1px solid transparent; background: transparent;
  transition: background .25s, color .25s, border-color .25s;
}
.cc-btn--solid { background: var(--cc-ivory); color: var(--cc-ink); border-color: var(--cc-ivory); }
.cc-btn--solid:hover { background: #fff; }
.cc-btn--ghost { color: var(--cc-ivory); border-color: var(--cc-line); }
.cc-btn--ghost:hover { border-color: var(--cc-ivory); }
.cc-btn:focus-visible { outline: 2px solid var(--cc-gold, #EAC113); outline-offset: 2px; }

/* ---------------- Modal de preferencias ---------------- */
.cc-overlay {
  position: fixed; inset: 0; z-index: 9001;
  background: rgba(10, 10, 10, .72); backdrop-filter: blur(2px);
  animation: cc-fade .3s both;
}
@keyframes cc-fade { from { opacity: 0; } to { opacity: 1; } }
.cc-modal {
  position: fixed; z-index: 9002;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 48px); overflow: auto;
  background: var(--cc-ink2); border: 1px solid var(--cc-line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  animation: cc-pop .32s cubic-bezier(.22, .61, .36, 1) both;
}
@keyframes cc-pop { from { opacity: 0; transform: translate(-50%, -46%); } to { opacity: 1; transform: translate(-50%, -50%); } }
@media (prefers-reduced-motion: reduce) { .cc-overlay, .cc-modal { animation: none; } }
.cc-modal__inner { padding: clamp(24px, 4vw, 40px); }
.cc-modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.cc-x {
  background: none; border: 0; color: var(--cc-ash); font-size: 28px; line-height: 1;
  cursor: pointer; padding: 4px 8px; min-height: 44px; min-width: 44px;
}
.cc-x:hover { color: var(--cc-ivory); }
.cc-x:focus-visible { outline: 2px solid var(--cc-gold, #EAC113); outline-offset: 2px; }

.cc-cats { margin: 22px 0 26px; border-top: 1px solid var(--cc-line); }
.cc-cat { padding: 18px 0; border-bottom: 1px solid var(--cc-line); }
.cc-cat__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cc-cat__title { font-size: 13px; letter-spacing: .04em; color: var(--cc-ivory); font-weight: 600; }
.cc-cat__always { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--cc-ash); }
.cc-cat__desc { font-size: 12.5px; line-height: 1.6; color: var(--cc-ash); margin: 8px 0 0; }
.cc-modal__actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------------- Switch accesible ---------------- */
.cc-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: 0 0 auto; cursor: pointer; }
.cc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.cc-switch__ui {
  position: absolute; inset: 0; background: #3a3a3a; border: 1px solid var(--cc-line);
  transition: background .25s;
}
.cc-switch__ui::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  background: var(--cc-ivory); transition: transform .25s;
}
.cc-switch input:checked + .cc-switch__ui { background: var(--cc-burgundy); border-color: var(--cc-burgundy); }
.cc-switch input:checked + .cc-switch__ui::after { transform: translateX(20px); }
.cc-switch input:focus-visible + .cc-switch__ui { outline: 2px solid var(--cc-gold, #EAC113); outline-offset: 2px; }

@media (max-width: 640px) {
  .cc-banner__actions { width: 100%; }
  .cc-banner__actions .cc-btn { flex: 1 1 auto; text-align: center; }
}

/* ---------------- Botón flotante permanente de cookies (RGPD: acceso continuo) ---------------- */
#cc-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 8500;
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(26, 26, 26, .78); color: var(--ivory, #F4F1EC);
  border: 1px solid var(--glass-b, rgba(244, 241, 236, .2)); cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4); backdrop-filter: blur(6px);
  transition: transform .25s, background .25s, border-color .25s;
}
#cc-fab[hidden] { display: none; }
#cc-fab svg { opacity: .8; }
#cc-fab:hover { transform: translateY(-2px); background: rgba(40, 40, 40, .95); border-color: var(--ivory, #F4F1EC); }
#cc-fab:hover svg { opacity: 1; }
@media (max-width: 640px) { #cc-fab { width: 48px; height: 48px; right: 16px; bottom: 16px; } }

/* ---------------- Enlace "Preferencias de cookies" en el footer ---------------- */
.footer__legal-links button[data-cc-open] {
  font-family: var(--sans, 'Manrope', sans-serif);
  font-size: 9px; color: var(--ivory-d, #ddd); letter-spacing: .28em;
  text-transform: uppercase; opacity: .7; cursor: pointer;
  background: none; border: 0; padding: 0; line-height: inherit;
  border-bottom: 1px solid transparent; transition: opacity .3s, border-color .3s;
}
.footer__legal-links button[data-cc-open]:hover { opacity: 1; border-bottom-color: var(--burgundy, #8C1D18); }
.footer__legal-links button[data-cc-open]:focus-visible { outline: 2px solid var(--gold, #EAC113); outline-offset: 2px; }
