/* ============================================================
   Banner + modal de cookies — Xampú Barcelona
   Estética coherente con la web (negro, blanco, acento vino #9B2335)
   AEPD-compliant: botones aceptar/rechazar mismo peso visual
   ============================================================ */

#cc-banner-wrap, #cc-modal-wrap {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===== BANNER FIJO INFERIOR ===== */
.cc-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9999;
  background: #0a0a0a;
  color: #fafafa;
  border-top: 3px solid #9B2335;
  box-shadow: 0 -8px 32px rgba(0,0,0,.4);
  animation: cc-slide-up .35s cubic-bezier(.2,.8,.2,1);
}
@keyframes cc-slide-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.cc-banner-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 32px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}
.cc-banner-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 20px;
  font-weight: 500;
  margin: 0 0 4px;
  color: #fff;
}
.cc-banner-desc {
  font-size: 13px;
  line-height: 1.55;
  color: #c8c8c8;
  margin: 0;
  max-width: 720px;
}
.cc-banner-desc a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cc-banner-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ===== BOTONES — aceptar/rechazar MISMO peso visual ===== */
.cc-btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 12px 22px;
  border: 1.5px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: all .2s ease;
  min-width: 140px;
}
.cc-btn-primary {
  background: #9B2335;
  color: #fff;
  border-color: #9B2335;
}
.cc-btn-primary:hover, .cc-btn-primary:focus-visible {
  background: #7A1A28;
  border-color: #7A1A28;
}
.cc-btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.45);
}
.cc-btn-secondary:hover, .cc-btn-secondary:focus-visible {
  background: rgba(255,255,255,.08);
  border-color: #fff;
}
.cc-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ===== MODAL DE CONFIGURACIÓN ===== */
.cc-modal {
  position: fixed; inset: 0;
  z-index: 10000;
}
.cc-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: cc-fade .25s ease;
}
@keyframes cc-fade { from { opacity:0 } to { opacity:1 } }
.cc-modal-box {
  position: relative;
  max-width: 640px;
  width: calc(100% - 32px);
  max-height: calc(100vh - 64px);
  margin: 32px auto;
  background: #fff;
  color: #0a0a0a;
  border-radius: 4px;
  padding: 40px 36px 28px;
  overflow-y: auto;
  box-shadow: 0 32px 80px rgba(0,0,0,.5);
  animation: cc-slide-up .3s cubic-bezier(.2,.8,.2,1);
}
.cc-modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 36px; height: 36px;
  background: transparent;
  border: 0;
  font-size: 28px;
  line-height: 1;
  color: #5a5a5a;
  cursor: pointer;
  border-radius: 2px;
  transition: color .2s, background .2s;
}
.cc-modal-close:hover, .cc-modal-close:focus-visible {
  color: #0a0a0a;
  background: #f2f2f2;
}
.cc-modal-box h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 28px;
  font-weight: 500;
  margin: 0 0 8px;
  color: #0a0a0a;
}
.cc-modal-intro {
  font-size: 14px;
  line-height: 1.6;
  color: #5a5a5a;
  margin: 0 0 24px;
}

/* ===== CATEGORÍAS DE COOKIES ===== */
.cc-cat {
  padding: 18px 0;
  border-top: 1px solid #e8e8e8;
}
.cc-cat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  gap: 16px;
}
.cc-cat h3 {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  color: #0a0a0a;
}
.cc-cat p {
  font-size: 13px;
  line-height: 1.55;
  color: #5a5a5a;
  margin: 4px 0 0;
}
.cc-cat p strong { color: #0a0a0a; }
.cc-toggle-on {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #9B2335;
  font-weight: 600;
}

/* ===== SWITCH TOGGLE (touch-friendly) ===== */
.cc-switch {
  position: relative;
  display: inline-block;
  width: 52px; height: 30px;
  flex-shrink: 0;
  /* zona táctil ampliada */
  padding: 8px;
  margin: -8px;
}
.cc-switch input {
  opacity: 0;
  position: absolute;
  width: 100%; height: 100%;
  margin: 0;
  cursor: pointer;
}
.cc-slider {
  position: absolute;
  top: 8px; left: 8px;
  right: 8px; bottom: 8px;
  background: #c8c8c8;
  border-radius: 16px;
  cursor: pointer;
  transition: background .2s;
}
.cc-slider::before {
  content: "";
  position: absolute;
  width: 24px; height: 24px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.cc-switch input:checked + .cc-slider {
  background: #9B2335;
}
.cc-switch input:checked + .cc-slider::before {
  transform: translateX(22px);
}
.cc-switch input:focus-visible + .cc-slider {
  outline: 2px solid #9B2335;
  outline-offset: 2px;
}

/* ===== ACCIONES MODAL ===== */
.cc-modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e8e8e8;
}
.cc-modal-actions .cc-btn { flex: 1; min-width: 140px; }
.cc-modal-actions .cc-btn-secondary {
  color: #0a0a0a;
  border-color: #c8c8c8;
}
.cc-modal-actions .cc-btn-secondary:hover {
  background: #f2f2f2;
  border-color: #0a0a0a;
}
.cc-modal-foot {
  font-size: 12px;
  color: #8a8a8a;
  margin: 20px 0 0;
  text-align: center;
}
.cc-modal-foot a { color: #0a0a0a; text-decoration: underline; }

/* ===== PLACEHOLDER MAPA BLOQUEADO ===== */
.map-blocked {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 32px;
  background: #f2f2f2;
  color: #5a5a5a;
}
.map-blocked p {
  margin: 4px 0;
  font-size: 14px;
  max-width: 360px;
}
.map-blocked p strong { color: #0a0a0a; font-size: 16px; }
.map-blocked-btn {
  margin-top: 16px;
  padding: 12px 24px;
  background: #9B2335;
  color: #fff;
  border: 0;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  cursor: pointer;
  transition: background .2s;
}
.map-blocked-btn:hover { background: #7A1A28; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .cc-banner-inner {
    grid-template-columns: 1fr;
    padding: 18px 20px;
    gap: 14px;
  }
  .cc-banner-desc { font-size: 12.5px; }
  .cc-banner-actions { justify-content: stretch; gap: 8px; }
  .cc-banner-actions .cc-btn {
    flex: 1; min-width: 0;
    padding: 14px 12px;
    min-height: 48px;
    font-size: 12px;
    letter-spacing: .02em;
  }
  .cc-modal-box {
    padding: 28px 20px 20px;
    margin: 12px auto;
    max-height: calc(100dvh - 24px);
    border-radius: 6px;
  }
  .cc-modal-close { top: 8px; right: 8px; width: 44px; height: 44px; font-size: 32px; }
  .cc-modal-box h2 { font-size: 24px; }
  .cc-modal-intro { font-size: 13px; margin-bottom: 18px; }
  .cc-cat h3 { font-size: 14px; }
  .cc-cat p { font-size: 12.5px; }
  .cc-modal-actions { flex-direction: column; gap: 8px; }
  .cc-modal-actions .cc-btn { width: 100%; min-height: 48px; }
}

@media (max-width: 400px) {
  .cc-banner-inner { padding: 14px 14px; }
  .cc-banner-title { font-size: 17px; margin-bottom: 2px; }
  .cc-banner-desc { font-size: 12px; line-height: 1.5; }
  .cc-banner-actions {
    /* stack vertical en pantallas mínimas */
    flex-direction: column;
  }
  .cc-banner-actions .cc-btn { width: 100%; padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .cc-banner, .cc-modal-box, .cc-modal-backdrop {
    animation: none;
  }
  .cc-slider, .cc-slider::before, .cc-btn { transition: none; }
}
