/* ==========================================================================
   MARCO PERIMETRAL GLOBAL (ESQUINAS PERMANENTES DE ALTA GAMA)
   ========================================================================== */

/* ==========================================================================
   ESQUINA SUPERIOR IZQUIERDA: EMBLEMA CLONADO EXACTO DE LA HOME (el-maestro-boticario.html)
   ========================================================================== */
.global-logo-left,
.brand-emblem-left {
    position: absolute !important;
    top: 25px !important;
    left: 3.5% !important;
    right: auto !important;
    bottom: auto !important;
    z-index: 75 !important;
    display: inline-block !important;
    text-decoration: none !important;
}

.global-logo-left img,
.brand-emblem-left img,
.global-logo-left .brand-logo,
.brand-emblem-left .brand-logo,
.global-logo-left #brand-logo,
.brand-emblem-left #brand-logo {
    max-width: 130px !important;
    width: 130px !important;
    height: auto !important;
    display: block !important;
    transform: scale(1) !important;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6)) !important;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

@media (hover: hover) and (pointer: fine) {
    .global-logo-left:hover img,
    .brand-emblem-left:hover img,
    .global-logo-left:hover .brand-logo,
    .brand-emblem-left:hover .brand-logo,
    .global-logo-left:hover #brand-logo,
    .brand-emblem-left:hover #brand-logo,
    .global-logo-left img:hover,
    .brand-emblem-left img:hover {
        transform: scale(1.08) !important;
        filter: drop-shadow(0 0 16px rgba(212, 175, 55, 0.75)) brightness(1.2) !important;
        opacity: 1 !important;
    }
}

/* ESQUINA SUPERIOR DERECHA: IDIOMAS Y CONTACTO */
.global-header-right {
    position: absolute !important;
    top: 30px !important;
    right: 3.5% !important;
    z-index: 70 !important;
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    font-family: 'Cinzel', serif !important;
    font-size: 11px !important;
    letter-spacing: 2px !important;
    color: rgba(244, 240, 236, 0.75) !important;
}

.global-header-right a {
    color: inherit !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
}

.global-header-right a:hover {
    color: #E5C483 !important;
}

.global-header-right .cart-icon {
    display: inline-flex !important;
    align-items: center !important;
    text-decoration: none !important;
}

.global-header-right .cart-icon svg {
    width: 16px !important;
    height: 16px !important;
    stroke: #C5A059 !important;
    fill: none !important;
    transition: stroke 0.3s ease, transform 0.2s ease !important;
}

.global-header-right .cart-icon:hover svg {
    stroke: #E5C483 !important;
    transform: scale(1.1) !important;
}

/* ESQUINA SUPERIOR DERECHA: BOTÓN CONSULTAR AL BOTICARIO */
.btn-boticario, #btn-consultar-boticario, .global-btn-consultar, .btn-consultar-boticario {
    position: absolute !important;
    top: 82px !important;
    right: 3.5% !important;
    z-index: 70 !important;
    background: rgba(12, 11, 14, 0.92) !important;
    border: 1px solid rgba(197, 160, 89, 0.60) !important;
    color: #E5C483 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 42px !important;
    padding: 0 20px !important;
    line-height: 1 !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
    font-family: 'Cinzel', serif !important;
    font-size: 10.5px !important;
    font-weight: 600 !important;
    letter-spacing: 1.8px !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    border-radius: 2px !important;
    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
    animation: glowBoticarioSuperior 3.5s ease-in-out infinite !important;
    transition: transform 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease !important;
    text-decoration: none !important;
}

.btn-boticario svg, .btn-boticario i, .btn-boticario .icon-lupa,
#btn-consultar-boticario svg, #btn-consultar-boticario i,
.global-btn-consultar svg, .global-btn-consultar i,
.btn-consultar-boticario svg, .btn-consultar-boticario i {
    position: static !important;
    transform: none !important;
    left: auto !important;
    top: auto !important;
    display: inline-block !important;
    vertical-align: middle !important;
    margin-right: 8px !important;
    line-height: 1 !important;
    width: 14px !important;
    height: 14px !important;
    stroke: #E5C483 !important;
    flex-shrink: 0 !important;
}

.btn-boticario span, #btn-consultar-boticario span,
.global-btn-consultar span, .btn-consultar-boticario span {
    display: inline-block !important;
    vertical-align: middle !important;
    line-height: 1 !important;
}

.btn-boticario:hover, #btn-consultar-boticario:hover,
.global-btn-consultar:hover, .btn-consultar-boticario:hover {
    transform: translateY(-1px) !important;
    border-color: #E5C483 !important;
    color: #FFFFFF !important;
    box-shadow: 0 0 22px 4px rgba(229, 196, 131, 0.45), 0 4px 15px rgba(0, 0, 0, 0.8) !important;
}

.btn-boticario:hover svg, #btn-consultar-boticario:hover svg,
.global-btn-consultar:hover svg, .btn-consultar-boticario:hover svg {
    stroke: #FFFFFF !important;
    color: #FFFFFF !important;
}

/* ESQUINA INFERIOR IZQUIERDA: LEMA EDITORIAL DE MARCA */
.footer-brand-signature {
    position: absolute !important;
    bottom: 28px !important;
    left: 36px !important;
    text-align: left !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
    z-index: 20 !important;
}

/* Las tres líneas comparten exactamente la misma configuración que la primera */
.footer-brand-signature p,
.footer-title,
.footer-subtitle,
.footer-tagline {
    font-family: 'Cinzel', serif !important;
    font-size: 11px !important;
    letter-spacing: 2.5px !important;
    color: #C5A059 !important;
    opacity: 1 !important;
    text-transform: uppercase !important;
    font-weight: 400 !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    text-shadow: none !important;
}

/* ESQUINA INFERIOR DERECHA: PRIVACIDAD Y COOKIES */
.global-footer-legal {
    position: absolute !important;
    bottom: 24px !important;
    right: 3.5% !important;
    z-index: 70 !important;
    font-family: 'Cinzel', serif !important;
    font-size: 9.5px !important;
    letter-spacing: 2px !important;
    color: rgba(244, 240, 236, 0.45) !important;
    text-transform: uppercase !important;
}

.global-footer-legal a {
    color: inherit !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
}

.global-footer-legal a:hover {
    color: #E5C483 !important;
}

@keyframes glowBoticarioSuperior {
    0%, 100% {
        box-shadow: 0 0 12px 2px rgba(197, 160, 89, 0.22), 0 3px 10px rgba(0, 0, 0, 0.75);
        border-color: rgba(197, 160, 89, 0.45);
    }
    50% {
        box-shadow: 0 0 22px 5px rgba(229, 196, 131, 0.48), 0 4px 15px rgba(0, 0, 0, 0.85);
        border-color: rgba(229, 196, 131, 0.85);
    }
}

/* ==========================================================================
   VARIANTE LUMINOSA / THEME-LIGHT (PURA ELEGANCIA - CONTRASTE BRONCE GRABADO)
   ========================================================================== */

/* Header Superior Derecho (ES | EN | CONTACTO + Cesta) */
body.theme-light .global-header-right {
    color: #2A2218 !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.9) !important;
}

body.theme-light .global-header-right span {
    color: #2A2218 !important;
    font-weight: 700 !important;
}

body.theme-light .global-header-right a {
    color: #2A2218 !important;
    font-weight: 700 !important;
}

body.theme-light .global-header-right a:hover {
    color: #8C6621 !important;
}

body.theme-light .global-header-right .cart-icon svg {
    stroke: #2A2218 !important;
    stroke-width: 2px !important;
}

body.theme-light .global-header-right .cart-icon:hover svg {
    stroke: #8C6621 !important;
}

/* ==========================================================================
   HOMOLOGACIÓN TOTAL DE FOOTERS CON EL ESTILO DE «CONTACTO» (PURA ELEGANCIA)
   ========================================================================== */

/* 1. Footer Izquierdo (Firma Institucional) y Footer Derecho (Privacidad • Cookies) */
body.pura-elegancia .footer-brand-signature p,
body.theme-light .footer-brand-signature p,
.pura-elegancia-page .footer-brand-signature p,
body[data-room="pura-elegancia"] .footer-brand-signature p,
body.theme-light .footer-title,
body.theme-light .footer-subtitle,
body.theme-light .footer-tagline,
body.pura-elegancia .global-footer-legal,
body.pura-elegancia .global-footer-legal a,
body.pura-elegancia .footer-legal,
body.pura-elegancia .footer-legal a,
body.theme-light .global-footer-legal,
body.theme-light .global-footer-legal a,
body.theme-light .footer-legal,
body.theme-light .footer-legal a,
.pura-elegancia-page .global-footer-legal,
.pura-elegancia-page .global-footer-legal a,
.pura-elegancia-page .footer-legal,
.pura-elegancia-page .footer-legal a,
body[data-room="pura-elegancia"] .global-footer-legal,
body[data-room="pura-elegancia"] .global-footer-legal a,
body[data-room="pura-elegancia"] .footer-legal,
body[data-room="pura-elegancia"] .footer-legal a {
    color: #2A2218 !important; /* Mismo color exacto que CONTACTO */
    opacity: 1 !important; /* Misma opacidad de CONTACTO */
    font-weight: 700 !important; /* Mismo peso tipográfico de CONTACTO */
    font-family: 'Cinzel', serif !important;
    letter-spacing: 2px !important; /* Mismo espaciado que CONTACTO */
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.9) !important; /* Mismo relieve que CONTACTO */
    transition: all 0.3s ease !important;
}

/* 2. Efecto Hover idéntico en los enlaces interactivos */
body.pura-elegancia .global-footer-legal a:hover,
body.pura-elegancia .footer-legal a:hover,
body.theme-light .global-footer-legal a:hover,
body.theme-light .footer-legal a:hover,
.pura-elegancia-page .global-footer-legal a:hover,
.pura-elegancia-page .footer-legal a:hover,
body[data-room="pura-elegancia"] .global-footer-legal a:hover,
body[data-room="pura-elegancia"] .footer-legal a:hover {
    color: #8C6621 !important; /* Mismo color hover de CONTACTO */
    opacity: 1 !important;
}

/* ==========================================================================
   TRANSICIÓN CINEMÁTICA GLOBAL (OVERLAY PERMANENTE INFALIBLE)
   Tiempos canónicos: Entrada a negro <= 250ms | Levantamiento <= 350ms
   ========================================================================== */
html, body {
    background-color: #060504 !important;
}

/* Erradicación absoluta de overlays legacy o duplicados */
#cinematic-curtain,
#cinematic-overlay,
.cinematic-overlay,
.transition-curtain {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

/* ==========================================================================
   MARQUESINAS CENTRALES SUPERIORES DE SALA (TITULACIÓN WOW)
   ========================================================================== */
.room-hero-title {
  position: absolute;
  top: 28px;
  left: 50%;
  transform: translate(-50%, 8px);
  text-align: center;
  z-index: 50;
  pointer-events: none;
  opacity: 0;
  animation: luxuryTitleReveal 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Revelado cinemático idéntico para La Reserva Privada */
body[data-room="la-reserva-privada"] #spot-logo {
  opacity: 0;
  transform: translate(-50%, 8px);
  animation: luxuryTitleReveal 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 1. Supresión total del filtro / veladura superior sobre los avatares */
.room-hero-title::before,
.room-grimorio-secreto .room-hero-title::before,
.room-trastienda .room-hero-title::before,
.room-la-trastienda .room-hero-title::before,
body[data-room="la-trastienda"] .room-hero-title::before,
body[data-room="el-grimorio-secreto"] .room-hero-title::before {
  display: none !important;
}

/* Título central de sala con oro corporativo #D4AF37 */
.room-hero-title:not(.light-room) .room-name {
  color: #D4AF37 !important;
  font-family: 'Cinzel', serif !important;
  font-size: 1.35rem !important;
  letter-spacing: 0.38em !important;
  font-weight: 500 !important;
  margin: 0;
  text-transform: uppercase;
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.5), 0 2px 8px rgba(0, 0, 0, 0.95) !important;
}

/* Subtítulo visible y bien definido */
.room-hero-title:not(.light-room) .room-subtitle {
  display: block;
  color: rgba(212, 175, 55, 0.85) !important;
  font-family: 'Montserrat', sans-serif !important;
  font-size: 0.65rem !important;
  letter-spacing: 0.32em !important;
  font-weight: 500;
  margin-top: 5px;
  text-transform: uppercase;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9) !important;
}

/* Contraste específico intacto para Pura Elegancia (fondo mármol claro) */
.room-hero-title.light-room::before {
  display: none !important;
}

/* Título de sala clara: contraste sobre mármol */
.room-hero-title.light-room .room-name,
body[data-room="pura-elegancia"] .room-hero-title .room-name,
.theme-light .room-hero-title .room-name {
  color: #6b552d !important;
  font-family: 'Cinzel', serif !important;
  font-weight: 600 !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8), 0 0 12px rgba(212, 175, 55, 0.25) !important;
}

.room-hero-title.light-room .room-subtitle,
body[data-room="pura-elegancia"] .room-hero-title .room-subtitle,
.theme-light .room-hero-title .room-subtitle {
  color: #5a4926 !important;
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 500 !important;
  text-shadow: none !important;
}

/* ==========================================================================
   3. BOTÓN CINCELADO EN EL MOSTRADOR (RÉPLICA 1:1 EL SANTUARIO)
   ========================================================================== */
/* ÚNICAMENTE para La Trastienda y El Grimorio Secreto */
body[data-room="la-trastienda"] #spot-nav[id],
body[data-room="el-grimorio-secreto"] #spot-nav[id] {
  position: absolute !important;
  bottom: 70px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 45;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@keyframes luxuryAuraPulseDark {
  0%, 100% {
    color: #F4F0EC;
    text-shadow: 
      0 0 8px rgba(212, 175, 55, 0.6),
      0 0 16px rgba(212, 175, 55, 0.35),
      0 2px 4px rgba(0, 0, 0, 0.85);
  }
  50% {
    color: #D4AF37;
    text-shadow: 
      0 0 14px rgba(212, 175, 55, 1),
      0 0 28px rgba(255, 215, 0, 0.75),
      0 2px 6px rgba(0, 0, 0, 0.95);
  }
}

@keyframes lineAuraPulse {
  0%, 100% {
    width: 55%;
    box-shadow: 0 0 6px rgba(212, 175, 55, 0.4);
  }
  50% {
    width: 85%;
    box-shadow: 0 0 14px rgba(212, 175, 55, 1);
  }
}

body:not(.theme-light):not([data-room="pura-elegancia"]) .btn-cincelado {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  padding: 4px 8px !important;
  cursor: pointer !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  position: relative !important;
  box-shadow: none !important;
}

body:not(.theme-light):not([data-room="pura-elegancia"]) .btn-cincelado-text {
  font-family: 'Cinzel', serif !important;
  font-size: 0.74rem !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  letter-spacing: 3.5px !important;
  text-align: center !important;
  animation: luxuryAuraPulseDark 3s ease-in-out infinite !important;
  transition: all 0.35s ease !important;
}

body:not(.theme-light):not([data-room="pura-elegancia"]) .btn-cincelado-line {
  height: 1.5px !important;
  background: linear-gradient(90deg, transparent 0%, #D4AF37 50%, transparent 100%) !important;
  margin-top: 4px !important;
  animation: lineAuraPulse 3s ease-in-out infinite !important;
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

body:not(.theme-light):not([data-room="pura-elegancia"]) .btn-cincelado:hover .btn-cincelado-text,
body:not(.theme-light):not([data-room="pura-elegancia"]) .btn-cincelado:focus-visible .btn-cincelado-text {
  animation: none !important;
  color: #D4AF37 !important;
  letter-spacing: 4px !important;
  text-shadow: 0 0 16px rgba(212, 175, 55, 1) !important;
}

body:not(.theme-light):not([data-room="pura-elegancia"]) .btn-cincelado:hover .btn-cincelado-line,
body:not(.theme-light):not([data-room="pura-elegancia"]) .btn-cincelado:focus-visible .btn-cincelado-line {
  animation: none !important;
  width: 100% !important;
  box-shadow: 0 0 14px rgba(212, 175, 55, 1) !important;
}

@keyframes luxuryTitleReveal {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes heroTitleReveal {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@media (max-width: 768px) {
  /* Escala de logo perimetral adaptada a móvil */
  .global-logo-left,
  .brand-emblem-left {
    top: 14px !important;
    left: 16px !important;
  }
  .global-logo-left img,
  .brand-emblem-left img,
  .global-logo-left .brand-logo,
  .brand-emblem-left .brand-logo,
  .global-logo-left #brand-logo,
  .brand-emblem-left #brand-logo,
  .trastienda-logo {
    width: 58px !important;
    max-width: 58px !important;
  }

  /* Utilidades compactas en móvil */
  .global-header-right {
    top: 20px !important;
    right: 16px !important;
    font-size: 9.5px !important;
    gap: 10px !important;
  }

  /* Marquesina superior con espacio axial respirable */
  .room-hero-title {
    top: 76px;
    width: 90%;
  }
  .room-hero-title .room-name {
    font-size: 0.95rem;
    letter-spacing: 0.20em;
  }
  .room-hero-title .room-subtitle {
    font-size: 0.52rem;
    letter-spacing: 0.16em;
    margin-top: 3px;
  }

  /* Pie perimetral compacto en móvil */
  .footer-brand-signature {
    bottom: 16px !important;
    left: 16px !important;
  }
  .footer-brand-signature p,
  .footer-title,
  .footer-subtitle,
  .footer-tagline {
    font-size: 8.5px !important;
    letter-spacing: 1.5px !important;
  }
  .global-footer-legal {
    bottom: 16px !important;
    right: 16px !important;
    font-size: 8px !important;
  }
}

/* ==========================================================================
   SALA CANÓNICA: EL GRIMORIO SECRETO (DESKTOP & MOBILE)
   ========================================================================== */
.room-grimorio-secreto,
body.room-grimorio-secreto {
  background-image: url('../assets/backgrounds/el-grimorio-secreto-bg.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

@media (max-width: 768px) {
  .room-grimorio-secreto,
  body.room-grimorio-secreto {
    background-image: url('../assets/backgrounds/el-grimorio-secreto-bg-mobile.jpg');
    background-position: center top;
  }
}

/* ==========================================================================
   NEUTRALIZACIÓN DE OVERLAYS LEGACY OBSOLETOS
   ========================================================================== */
.page-fade-overlay,
.cinematic-overlay-backdrop {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  z-index: -9999 !important;
}

/* ==========================================================================
   ACTIVACIÓN INSTANTÁNEA AL RETORNAR DESDE PDP (CERO PARPADEO DE SALA)
   ========================================================================== */
html.catalog-instant-open body {
  overflow: hidden !important;
}
html.catalog-instant-open #pedestal-collections-modal,
html.catalog-instant-open .pedestal-collections-modal,
html.catalog-instant-open #collections-modal,
html.catalog-instant-open .collections-modal-overlay,
body.catalog-instant-open #collections-modal,
body.catalog-instant-open .collections-modal-overlay,
body.catalog-instant-open #pedestal-collections-modal,
body.catalog-instant-open .pedestal-collections-modal {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  transition: none !important;
  animation: none !important;
  pointer-events: auto !important;
  z-index: 99999 !important;
  background: rgba(10, 10, 10, 0.96) !important;
}

body.catalog-instant-open .collections-dialog,
html.catalog-instant-open .collections-dialog {
  transform: translateY(0) scale(1) !important;
  transition: none !important;
  animation: none !important;
}

/* BLINDAJE DE SALAS SECRETAS (CRIPTA Y TRASTIENDA): SUPRESIÓN DEL BOTÓN DE CONSULTA GENERAL */
body[data-room="el-grimorio-secreto"] #btn-consultar-boticario,
body[data-room="el-grimorio-secreto"] .btn-consultar-boticario,
body[data-room="el-grimorio-secreto"] .global-btn-consultar,
body[data-room="la-trastienda"] #btn-consultar-boticario,
body[data-room="la-trastienda"] .btn-consultar-boticario,
body[data-room="la-trastienda"] .global-btn-consultar {
  display: none !important;
}


