/* ===================================================================
   COOKIE CONSENT — Fossil Natura · Consent Mode v2
   =================================================================== */

/* ── Banner (primera capa) ──────────────────────────────────────── */
#fn-cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9900;
  background: #0c0c0c;
  color: #fff;
  padding: 18px 0;
  transform: translateY(100%);
  transition: transform .4s cubic-bezier(.22,1,.36,1);
  border-top: 1px solid #2a2a2a;
}
#fn-cookie-banner.fn-visible {
  transform: translateY(0);
}
.fn-cb-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 48px;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.fn-cb-text {
  flex: 1;
  min-width: 220px;
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(255,255,255,.65);
}
.fn-cb-text strong { color: #fff; font-weight: 500; }
.fn-cb-text a {
  color: rgba(255,255,255,.55);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .15s;
}
.fn-cb-text a:hover { color: #fff; }
.fn-cb-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  flex-shrink: 0;
}
.fn-cb-btn {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 10px 18px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .2s;
  white-space: nowrap;
  line-height: 1;
}
.fn-cb-btn--accept {
  background: #fff;
  color: #0c0c0c;
}
.fn-cb-btn--accept:hover { background: #e8e8e8; }
.fn-cb-btn--reject {
  background: transparent;
  color: rgba(255,255,255,.7);
  border-color: rgba(255,255,255,.2);
}
.fn-cb-btn--reject:hover {
  border-color: rgba(255,255,255,.5);
  color: #fff;
}
.fn-cb-btn--settings {
  background: transparent;
  color: rgba(255,255,255,.45);
  border-color: transparent;
  padding-left: 4px;
  padding-right: 4px;
}
.fn-cb-btn--settings:hover { color: rgba(255,255,255,.8); }

/* ── Panel de preferencias (segunda capa) ───────────────────────── */
#fn-cookie-panel {
  position: fixed;
  inset: 0;
  z-index: 9950;
  display: none;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .3s;
}
#fn-cookie-panel.fn-visible {
  opacity: 1;
}
.fn-panel-box {
  background: #fff;
  width: 100%;
  max-width: 580px;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 14px 14px 0 0;
  padding: 36px 36px 28px;
  transform: translateY(32px);
  transition: transform .35s cubic-bezier(.22,1,.36,1);
}
#fn-cookie-panel.fn-visible .fn-panel-box {
  transform: translateY(0);
}
.fn-panel-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 28px;
  font-weight: 400;
  color: #111;
  margin-bottom: 10px;
}
.fn-panel-intro {
  font-size: 13px;
  line-height: 1.65;
  color: #555;
  margin-bottom: 20px;
}
.fn-panel-intro a { color: #111; text-decoration: underline; text-underline-offset: 3px; }

/* ── Categoría ── */
.fn-cat {
  border-top: 1px solid #e4e4e0;
  padding: 15px 0;
}
.fn-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 5px;
}
.fn-cat-name {
  font-size: 13.5px;
  font-weight: 500;
  color: #111;
}
.fn-cat-desc {
  font-size: 12px;
  line-height: 1.6;
  color: #666;
  max-width: 440px;
}
.fn-always-on {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #888;
  flex-shrink: 0;
}

/* ── Toggle switch ── */
.fn-toggle {
  position: relative;
  flex-shrink: 0;
  width: 46px;
  height: 26px;
  display: inline-block;
}
.fn-toggle input {
  opacity: 0; width: 0; height: 0;
  position: absolute;
}
.fn-toggle-track {
  position: absolute;
  inset: 0;
  background: #ddd;
  border-radius: 26px;
  cursor: pointer;
  transition: background .2s;
}
.fn-toggle input:checked ~ .fn-toggle-track { background: #111; }
.fn-toggle input:disabled ~ .fn-toggle-track { background: #111; cursor: default; opacity: .45; }
.fn-toggle-track::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.fn-toggle input:checked ~ .fn-toggle-track::after { transform: translateX(20px); }

/* ── Botones del panel ── */
.fn-panel-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e4e4e0;
  flex-wrap: wrap;
}
.fn-panel-btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 12px 22px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .2s;
  line-height: 1;
}
.fn-panel-btn--save {
  background: #111;
  color: #fff;
  flex: 1;
  text-align: center;
}
.fn-panel-btn--save:hover { opacity: .82; }
.fn-panel-btn--all {
  background: transparent;
  color: #111;
  border-color: #e4e4e0;
}
.fn-panel-btn--all:hover { border-color: #111; }

/* ── Botón flotante "Gestionar cookies" ── */
#fn-cookie-manage {
  display: none; /* se activa con JS cuando hay consentimiento guardado */
}

/* ── Responsive ── */
@media (max-width: 680px) {
  .fn-cb-inner { padding: 0 20px; gap: 14px; }
  .fn-cb-actions { width: 100%; justify-content: stretch; }
  .fn-cb-btn { flex: 1; text-align: center; font-size: 10px; padding: 10px 10px; }
  .fn-cb-btn--settings { flex: none; width: 100%; padding: 6px; color: rgba(255,255,255,.4); }
  .fn-panel-box { padding: 24px 20px 20px; border-radius: 16px 16px 0 0; }
  .fn-panel-title { font-size: 24px; }
}
