/*
 * Dulce Lujuria - Módulo de Cabecera y Navegación
 * Header fijo, anuncio, bolsa y panel móvil accesible
 */

/* Barra Superior de Anuncios */
.dl-announcement-bar {
  background-color: #0c090c;
  border-bottom: 1px solid var(--dl-border-subtle);
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  color: var(--dl-text-muted);
}
.dl-announcement-bar span {
  color: var(--dl-primary);
  margin-right: 0.4rem;
}

/* Header Fijo con Backdrop Blur */
.dl-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(20, 15, 19, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--dl-border-subtle);
  transition: all 0.3s ease;
}

.dl-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.dl-logo {
  font-family: var(--dl-font-display);
  font-size: 1.6rem;
  letter-spacing: 0.05em;
  color: #ffffff;
}

.dl-brand-lujuria {
  color: #ffffff !important;
  font-style: italic;
  -webkit-text-fill-color: #ffffff !important;
}

.dl-logo-img img,
.dl-logo-svg {
  max-height: 54px;
  width: auto;
  object-fit: contain;
  display: block;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.dl-brand-anchor {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--dl-text);
  text-decoration: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.dl-brand-anchor:hover {
  opacity: 0.94;
  transform: translateY(-1px);
}

.dl-brand-emblem {
  width: 54px;
  height: 54px;
  max-height: 54px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 50%;
  flex-shrink: 0;
  display: block;
  border: 1px solid rgba(225, 29, 116, 0.35);
  box-shadow: 0 0 20px rgba(225, 29, 116, 0.35);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.dl-brand-anchor:hover .dl-brand-emblem {
  transform: scale(1.06);
  border-color: rgba(225, 29, 116, 0.7);
  box-shadow: 0 0 28px rgba(225, 29, 116, 0.6);
}

.dl-brand-name {
  font-family: var(--dl-font-display);
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  color: var(--dl-text);
  line-height: 1;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .dl-header-inner {
    height: 68px;
  }
  .dl-brand-anchor {
    gap: 0.65rem;
  }
  .dl-brand-emblem {
    width: 44px;
    height: 44px;
    max-height: 44px;
  }
  .dl-brand-name {
    font-size: 1.35rem;
  }
}

.dl-nav {
  display: none;
  align-items: center;
  gap: 2rem;
  font-size: 0.82rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dl-text-muted);
}

@media (min-width: 900px) {
  .dl-nav { display: flex; }
}

.dl-nav a:hover {
  color: var(--dl-primary);
}

.dl-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dl-header-social-link {
  color: var(--dl-text-muted);
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}
.dl-header-social-link:hover {
  color: var(--dl-primary);
}

/* Botón de Favoritos en Header */
.dl-header-wishlist-link {
  position: relative;
  color: var(--dl-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  transition: all 0.25s ease;
  text-decoration: none;
}
.dl-header-wishlist-link:hover {
  color: var(--dl-primary);
  background: rgba(225, 29, 116, 0.1);
  transform: scale(1.08);
}
.dl-wishlist-badge {
  position: absolute;
  top: -2px;
  right: -3px;
  background-color: var(--dl-primary);
  color: #fff;
  border-radius: 9999px;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  box-shadow: 0 0 10px var(--dl-primary-glow);
}

/* Botón de la Bolsa en Header */
.dl-cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.1rem;
  border-radius: 9999px;
  background: transparent;
  border: 1px solid var(--dl-border);
  color: var(--dl-text);
  font-size: 0.85rem;
  font-family: var(--dl-font-body);
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.25s ease;
}

.dl-cart-btn:hover {
  background-color: var(--dl-primary);
  border-color: var(--dl-primary);
  color: #fff;
  box-shadow: 0 0 20px var(--dl-primary-glow);
}

.dl-cart-badge {
  background-color: var(--dl-primary);
  color: #fff;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  line-height: 1;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px var(--dl-primary-glow);
}

.dl-cart-btn:hover .dl-cart-badge {
  background-color: #fff;
  color: var(--dl-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Botón Hamburguesa Móvil */
.dl-menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--dl-border-subtle);
  border-radius: 0.5rem;
  cursor: pointer;
  padding: 0;
  z-index: 60;
  flex-shrink: 0;
  transition: border-color 0.25s ease;
}

.dl-menu-toggle:hover,
.dl-menu-toggle:focus-visible {
  border-color: var(--dl-primary);
}
.dl-menu-toggle:focus-visible {
  outline: 2px solid var(--dl-primary);
  outline-offset: 2px;
}

@media (min-width: 900px) {
  .dl-menu-toggle { display: none; }
}

.dl-hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--dl-text);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center;
}

.dl-menu-toggle[aria-expanded="true"] .dl-hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.dl-menu-toggle[aria-expanded="true"] .dl-hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.dl-menu-toggle[aria-expanded="true"] .dl-hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Panel Menú Móvil Full-Screen */
.dl-mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0.35s ease;
}
.dl-mobile-menu.active {
  visibility: visible;
  pointer-events: auto;
}

.dl-mobile-menu-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.dl-mobile-menu.active .dl-mobile-menu-overlay {
  opacity: 1;
}

.dl-mobile-menu-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 380px;
  background: linear-gradient(180deg, #171016 0%, #140f13 100%);
  border-left: 1px solid var(--dl-border);
  box-shadow: -15px 0 40px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.dl-mobile-menu.active .dl-mobile-menu-panel {
  transform: translateX(0);
}

.dl-mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--dl-border-subtle);
  margin-bottom: 1.5rem;
}

.dl-mobile-close {
  background: transparent;
  border: 1px solid var(--dl-border-subtle);
  border-radius: 0.5rem;
  color: var(--dl-text-muted);
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}
.dl-mobile-close:hover {
  color: var(--dl-primary);
  border-color: var(--dl-primary);
}

.dl-mobile-nav {
  flex-grow: 1;
  overflow-y: auto;
}
.dl-mobile-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.dl-mobile-nav ul li a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 0.75rem;
  font-size: 1.05rem;
  font-family: var(--dl-font-display);
  color: var(--dl-text);
  border-radius: 0.75rem;
  transition: all 0.2s ease;
  text-decoration: none;
}
.dl-mobile-nav ul li a:hover,
.dl-mobile-nav ul li a:focus {
  color: var(--dl-primary);
  background-color: rgba(225, 29, 116, 0.06);
}
.dl-mobile-nav ul li a svg {
  color: var(--dl-primary);
  flex-shrink: 0;
}

.dl-mobile-menu-footer {
  border-top: 1px solid var(--dl-border-subtle);
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.dl-mobile-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--dl-text-muted);
  transition: color 0.2s ease;
}
.dl-mobile-social-link:hover {
  color: var(--dl-primary);
}

@media (min-width: 900px) {
  .dl-mobile-menu { display: none !important; }
}

@media (max-width: 768px) {
  .dl-header-social-link { display: none; }
  .dl-header-actions { gap: 0.6rem; }
  .dl-cart-btn { padding: 0.45rem 0.8rem; font-size: 0.82rem; }
  .dl-logo { font-size: 1.4rem; }
}

@media (max-width: 480px) {
  .dl-logo { font-size: 1.25rem; }
  .dl-cart-btn .dl-cart-text { display: none; }
  .dl-cart-btn {
    position: relative;
    padding: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    justify-content: center;
    flex-shrink: 0;
  }
  .dl-cart-btn .dl-cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    font-size: 0.65rem;
    padding: 0 4px;
    border: 2px solid #181216;
  }
  .dl-menu-toggle { width: 38px; height: 38px; }
}
