/* ============================================================
   LAPEN Córdoba · Diseño Profesional Minimalista Moderno
   Paleta de marca refinada con mejor contraste y profundidad
   ============================================================ */
:root {
  /* Colores de Marca */
  --brand: #9d1b1f;          /* rojo LAPEN CÓRDOBA refinado */
  --brand-600: #800000;
  --brand-700: #6b0000;
  --brand-800: #570000;
  --brand-soft: #fef5f5;
  --brand-tint: #fbe8e8;
  --brand-light: #fff5f5;
  --gold: #d4a574;            /* acento cálido dorado */
  --gold-dark: #b98a2e;
  
  /* Neutrales refinados */
  --ink: #1a1a1a;
  --ink-2: #525252;
  --ink-3: #737373;
  --ink-light: #a3a3a3;
  --line: #e5e5e5;
  --line-dark: #d4d4d4;
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --bg-warm: #fef9f3;
  --bg-grey: #f5f5f5;
  
  /* Bordes y sombras mejoradas */
  --radius: 16px;
  --radius-sm: 8px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-1: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-2: 0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-3: 0 12px 32px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.06);
  --shadow-4: 0 20px 48px rgba(0,0,0,.16), 0 8px 16px rgba(0,0,0,.08);
  
  /* Animaciones */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ============================================================
   BASE STYLES
   ============================================================ */
* { 
  margin: 0; 
  padding: 0; 
  box-sizing: border-box; 
}

html { 
  scroll-behavior: smooth; 
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, 'Helvetica Neue', Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'kern' 1, 'liga' 1;
  overflow-x: hidden;
}

a { 
  color: var(--brand); 
  text-decoration: none; 
  transition: color var(--transition-fast);
}

a:hover { 
  color: var(--brand-600); 
}

img { 
  max-width: 100%; 
  display: block; 
  height: auto;
}

.container { 
  max-width: 1200px; 
  margin: 0 auto; 
  padding: 0 32px; 
}

.muted { 
  color: var(--ink-2); 
}

/* Animaciones de entrada */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.animate-in {
  animation: fadeIn 0.6s var(--transition-base) backwards;
}

.animate-scale {
  animation: fadeInScale 0.5s var(--transition-base) backwards;
}

/* ============================================================
   HEADER - Diseño flotante minimalista
   ============================================================ */
.site-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  position: sticky; 
  top: 0; 
  z-index: 100;
  transition: all var(--transition-base);
}

.site-header:hover {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-1);
}

.nav {
  display: flex; 
  align-items: center; 
  gap: 24px;
  max-width: 1200px; 
  margin: 0 auto; 
  padding: 12px 32px;
  flex-wrap: wrap;
}

.brand { 
  display: flex; 
  align-items: center; 
  gap: 12px; 
  margin-right: auto;
  transition: transform var(--transition-fast);
}

.brand:hover {
  transform: translateY(-1px);
}

.brand img { 
  height: 48px; 
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.08));
  transition: filter var(--transition-fast);
}

.brand:hover img {
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.12));
}

.brand .brand-name { 
  font-weight: 700; 
  font-size: 1.1rem; 
  letter-spacing: -0.02em; 
  color: var(--ink); 
  line-height: 1.2; 
}

.brand .brand-name small { 
  display: block; 
  font-weight: 500; 
  font-size: 0.7rem; 
  color: var(--ink-3);
  letter-spacing: 0.02em; 
  text-transform: uppercase;
}

.nav-links { 
  display: flex; 
  align-items: center; 
  gap: 6px; 
}

.nav-links > a {
  color: var(--ink-2); 
  font-weight: 600; 
  font-size: 0.92rem;
  padding: 10px 16px; 
  border-radius: 10px; 
  transition: all var(--transition-fast);
  position: relative;
}

.nav-links > a::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transition: transform var(--transition-fast);
}

.nav-links > a:hover {
  background: var(--brand-light);
  color: var(--brand);
}

.nav-links > a:hover::after {
  transform: scaleX(1);
}

.nav-links > a.nav-active,
.nav-links > .dropdown.nav-active > .drop-btn {
  color: var(--brand);
  background: var(--brand-light);
}
.nav-links > a.nav-active::after,
.nav-links > .dropdown.nav-active > .drop-btn::after {
  transform: scaleX(1);
}

.nav-links a.btn-admin {
  background: linear-gradient(135deg, var(--brand), var(--brand-600));
  color: #fff; 
  border-radius: 12px;
  padding: 10px 20px; 
  font-weight: 700;
  box-shadow: var(--shadow-1);
  border: none;
}

/* Hamburger icon */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger-line {
  display: block;
  width: 100%;
  height: 2.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: all 0.3s;
}

/* Separator and login in nav */
.nav-separator {
  width: 1px;
  height: 24px;
  background: var(--line-dark);
  margin: 0 4px;
}
.nav-login-link {
  color: var(--ink-2) !important;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 10px 16px;
  border-radius: 10px;
  transition: all var(--transition-fast);
  position: relative;
}
.nav-login-link:hover {
  background: var(--brand-light);
  color: var(--brand) !important;
}

/* ============================================================
   USER MENU (hamburger dropdown)
   ============================================================ */
.user-menu {
  position: relative;
}
.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 2px solid var(--line);
  border-radius: 24px;
  padding: 6px 12px 6px 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.user-menu-btn:hover {
  border-color: var(--brand);
  background: var(--brand-light);
}
.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: .8rem;
  font-weight: 700;
  flex-shrink: 0;
}
.user-name-desktop {
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.user-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 280px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
  border: 1px solid var(--line);
  padding: 8px 0;
  z-index: 1000;
  animation: fadeIn .2s var(--transition-base);
}
.user-menu.open .user-dropdown {
  display: block;
}
.user-dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}
.user-avatar-lg {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
}
.user-dropdown-name {
  font-weight: 700;
  font-size: .95rem;
  color: var(--ink);
}
.user-dropdown-email {
  font-size: .8rem;
  color: var(--ink-3);
}
.user-dropdown-divider {
  height: 1px;
  background: var(--line);
  margin: 4px 0;
}
.user-dropdown-section-title {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-light);
  padding: 8px 16px 4px;
}
.user-dropdown-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: .9rem;
  color: var(--ink) !important;
  text-decoration: none !important;
  transition: all var(--transition-fast);
}
.user-dropdown-link:hover {
  background: var(--brand-light);
  color: var(--brand) !important;
}
.user-dropdown-logout {
  color: var(--danger) !important;
}
.user-dropdown-logout:hover {
  background: #fef2f2 !important;
  color: #dc2626 !important;
}
.user-role-badge {
  display: inline-block;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--brand-light);
  color: var(--brand);
  margin-top: 2px;
}
.user-login-form {
  padding: 0 16px;
}
.user-login-form input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: .88rem;
  background: var(--bg);
  margin-bottom: 8px;
  outline: none;
  transition: border-color var(--transition-fast);
}
.user-login-form input:focus {
  border-color: var(--brand);
}
.user-login-form .btn {
  padding: 10px 16px;
  font-size: .88rem;
}

.nav-links a.btn-admin:hover {
  background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
  transform: translateY(-1px);
  box-shadow: var(--shadow-2);
}

.nav-links a.btn-admin::after {
  display: none;
}

.cart-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px; 
  background: linear-gradient(135deg, var(--brand), var(--brand-600));
  color: #fff;
  border-radius: 999px; 
  font-size: 0.7rem; 
  padding: 2px 7px;
  min-width: 20px;
  height: 20px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(157, 27, 31, 0.3);
  animation: fadeInScale 0.3s var(--transition-base);
}

/* ============================================================
   DROPDOWN - Mejorado con animaciones
   ============================================================ */
.dropdown { 
  position: relative; 
}

.dropdown .drop-btn { 
  cursor: pointer;
  position: relative;
}

.dropdown .drop-btn::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transition: transform var(--transition-fast);
}

.dropdown-menu {
  display: none; 
  position: absolute; 
  top: calc(100% + 4px);
  left: 0; 
  min-width: 220px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-3);
  padding: 8px; 
  z-index: 200;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity var(--transition-base), transform var(--transition-base);
}

/* pseudo-elemento puente: evita que el mouse pierda hover al cruzar la gap */
.dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 12px;
  background: transparent;
}

.dropdown:hover .dropdown-menu, 
.dropdown.is-open .dropdown-menu { 
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.dropdown-menu a { 
  display: block; 
  color: var(--ink-2) !important; 
  padding: 10px 14px; 
  border-radius: 10px; 
  font-weight: 600; 
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.dropdown-menu a:hover { 
  background: var(--brand-light);
  color: var(--brand) !important;
  transform: translateX(4px);
}

/* ============================================================
   HERO - Banner principal con slideshow de fondo
   ============================================================ */
.hero {
  position: relative;
  color: #fff;
  overflow: hidden;
  padding: 140px 32px 160px;
  text-align: center;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Slideshow de fondo --- */
.hero-slideshow {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  transform: scale(1.04);
  transition: opacity 1.2s ease-in-out, transform 8s ease-out;
  will-change: opacity, transform;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

/* Fallback gradient si no hay imágenes */
.hero-slideshow:empty {
  background: linear-gradient(135deg, #1a0404 0%, var(--brand-800) 30%, var(--brand) 70%, var(--brand-600) 100%);
}

/* --- Overlay oscuro sobre las fotos --- */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to bottom, rgba(10, 0, 0, 0.55) 0%, rgba(100, 0, 0, 0.45) 50%, rgba(10, 0, 0, 0.65) 100%);
}

/* Sin imágenes: overlay con gradiente sólido de marca */
.hero-slideshow:not(:has(.hero-slide[style*="url"])) ~ .hero-overlay {
  background: linear-gradient(135deg, #1a0404 0%, var(--brand-800) 30%, var(--brand) 70%, var(--brand-600) 100%);
  opacity: 1;
}

/* --- Contenido sobre el overlay --- */
.hero .container {
  position: relative;
  z-index: 2;
  max-width: 900px;
  width: 100%;
}

/* --- Badge sobre el título --- */
.hero-badges {
  margin-bottom: 18px;
  animation: fadeIn 0.6s ease 0.1s backwards;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 999px;
}

/* --- Título --- */
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  line-height: 1.1;
  animation: fadeIn 0.8s ease 0.25s backwards;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

/* --- Párrafo --- */
.hero p {
  font-size: 1.15rem;
  max-width: 680px;
  margin: 0 auto 40px;
  opacity: 0.9;
  line-height: 1.75;
  animation: fadeIn 0.8s ease 0.4s backwards;
  font-weight: 400;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

/* --- Botones CTA --- */
.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeIn 0.8s ease 0.55s backwards;
}

.hero-cta .btn {
  min-width: 180px;
  padding: 15px 32px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero-cta .btn-light {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.hero-cta .btn-light:hover {
  background: #f5f5f5;
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
}

.hero-cta .btn-outline-light {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px);
}

.hero-cta .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #fff;
  transform: translateY(-3px);
}

/* --- Indicadores (dots) --- */
.hero-dots {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s ease;
}

.hero-dot.active {
  background: #fff;
  width: 24px;
}

/* --- Responsive --- */
@media (max-width: 640px) {
  .hero {
    padding: 100px 20px 120px;
    min-height: 480px;
  }

  .hero h1 {
    font-size: clamp(1.8rem, 8vw, 2.6rem);
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .hero-cta .btn {
    width: 100%;
    max-width: 320px;
  }
}

/* ============================================================
   BOTONES - Sistema de botones mejorado
   ============================================================ */
.btn {
  display: inline-flex; 
  align-items: center; 
  justify-content: center; 
  gap: 8px;
  padding: 13px 28px; 
  border-radius: 12px; 
  font-weight: 700; 
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer; 
  transition: all var(--transition-fast);
  text-align: center;
  position: relative;
  overflow: hidden;
  letter-spacing: -0.01em;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:active::before {
  width: 300px;
  height: 300px;
}

.btn-light { 
  background: #fff; 
  color: var(--brand);
  box-shadow: var(--shadow-2);
}

.btn-light:hover { 
  background: var(--bg-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow-3);
}

.btn-outline-light { 
  background: transparent; 
  color: #fff; 
  border-color: rgba(255,255,255,0.4);
  backdrop-filter: blur(8px);
}

.btn-outline-light:hover { 
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.6);
  transform: translateY(-2px);
}

.btn-primary { 
  background: linear-gradient(135deg, var(--brand), var(--brand-600));
  color: #fff;
  box-shadow: 0 4px 12px rgba(157, 27, 31, 0.3);
}

.btn-primary:hover { 
  background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(157, 27, 31, 0.4);
}

.btn-green { 
  background: linear-gradient(135deg, var(--brand), var(--brand-600));
  color: #fff;
  box-shadow: 0 4px 12px rgba(157, 27, 31, 0.3);
}

.btn-green:hover { 
  background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(157, 27, 31, 0.4);
}

.btn-outline { 
  background: #fff; 
  border-color: var(--line-dark);
  color: var(--ink);
}

.btn-outline:hover { 
  background: var(--bg-soft);
  border-color: var(--brand);
  color: var(--brand);
  transform: translateY(-1px);
}

.btn-danger { 
  background: var(--brand-soft); 
  color: var(--brand-700);
  border-color: var(--brand-tint);
}

.btn-danger:hover { 
  background: var(--brand-tint);
  transform: translateY(-1px);
}

.btn-sm { 
  padding: 9px 18px; 
  font-size: 0.85rem; 
}
.btn-red {
  background: #dc2626;
  color: #fff;
}
.btn-red:hover {
  background: #b91c1c;
  color: #fff;
}

.btn-block { 
  width: 100%; 
}

/* ============================================================
   SECCIONES - Layout mejorado
   ============================================================ */
.section { 
  padding: 100px 32px;
  position: relative;
}

.section-alt { 
  background: linear-gradient(to bottom, var(--bg-soft), var(--bg));
  position: relative;
}

.section-alt::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--line), transparent);
}

.section-warm { 
  background: linear-gradient(135deg, var(--bg-warm) 0%, rgba(254, 249, 243, 0.4) 100%);
}

.section-title { 
  font-size: clamp(1.8rem, 4vw, 2.5rem); 
  font-weight: 800; 
  letter-spacing: -0.03em;
  text-align: center; 
  color: var(--ink); 
  margin-bottom: 14px;
  line-height: 1.2;
}

.section-sub { 
  text-align: center; 
  color: var(--ink-2); 
  max-width: 680px; 
  margin: 0 auto 48px;
  font-size: 1.08rem;
  line-height: 1.65;
  font-weight: 400;
}

/* ============================================================
   CARDS - Sistema de tarjetas mejorado con profundidad
   ============================================================ */
.grid { 
  display: grid; 
  gap: 28px; 
}

.grid-3 { 
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); 
}

.grid-4 { 
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); 
}

.card {
  background: #fff; 
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: flex; 
  flex-direction: column; 
  overflow: hidden;
  transition: all var(--transition-base);
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 2px;
  background: linear-gradient(135deg, transparent, rgba(157, 27, 31, 0.1));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-3);
  transform: translateY(-6px);
  border-color: var(--brand-tint);
}

.card:hover::before {
  opacity: 1;
}

.card-img { 
  height: 230px; 
  object-fit: cover; 
  width: 100%; 
  background: linear-gradient(135deg, var(--bg-grey), var(--bg-soft));
  transition: transform var(--transition-slow);
}

.card:hover .card-img {
  transform: scale(1.05);
}

.card-body { 
  padding: 24px 26px 26px;
  flex: 1; 
  display: flex; 
  flex-direction: column; 
}

.card-cat {
  align-self: flex-start; 
  background: linear-gradient(135deg, var(--brand-tint), var(--brand-soft));
  color: var(--brand-700);
  font-size: 0.72rem; 
  font-weight: 800; 
  padding: 5px 12px;
  border-radius: 8px;
  text-transform: uppercase; 
  letter-spacing: 0.06em;
  margin-bottom: 12px;
  border: 1px solid var(--brand-tint);
}

.card h3 { 
  font-size: 1.15rem; 
  font-weight: 700; 
  margin-bottom: 10px;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.card h3 a { 
  color: var(--ink);
  transition: color var(--transition-fast);
}

.card h3 a:hover { 
  color: var(--brand); 
}

.card .excerpt { 
  color: var(--ink-2); 
  font-size: 0.92rem; 
  flex: 1;
  line-height: 1.6;
}

.card .meta { 
  color: var(--ink-3); 
  font-size: 0.82rem; 
  margin-top: 16px;
  display: flex; 
  gap: 14px; 
  flex-wrap: wrap;
  font-weight: 500;
}

/* ============================================================
   GALERÍA - Grid mejorado con overlays
   ============================================================ */
.gallery-item { 
  border-radius: var(--radius); 
  overflow: hidden; 
  border: 1px solid var(--line);
  position: relative;
  aspect-ratio: 4/3;
  background: var(--bg-grey);
  transition: all var(--transition-base);
}

.gallery-item::after {
  content: '🔍';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 2rem;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.gallery-item:hover::after {
  opacity: 1;
}

.gallery-item img { 
  height: 100%;
  width: 100%; 
  object-fit: cover; 
  transition: transform var(--transition-slow);
}

.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-3);
  z-index: 1;
}

.gallery-item:hover img { 
  transform: scale(1.1);
}

/* ============================================================
   PROSE - Contenido de texto enriquecido
   ============================================================ */
.prose { 
  max-width: 760px; 
  margin: 0 auto; 
  color: var(--ink-2);
  font-size: 1.05rem;
  line-height: 1.75;
}

.prose h2 { 
  color: var(--ink); 
  margin: 32px 0 16px;
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}

.prose h3 {
  color: var(--ink);
  margin: 24px 0 12px;
  font-weight: 700;
  font-size: 1.3rem;
}

.prose p { 
  margin-bottom: 18px; 
}

.prose img { 
  border-radius: var(--radius);
  margin: 24px 0;
  box-shadow: var(--shadow-2);
}

.prose ul, .prose ol { 
  padding-left: 28px; 
  margin-bottom: 18px; 
}

.prose li { 
  margin-bottom: 8px; 
}

.prose a {
  color: var(--brand);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
  transition: all var(--transition-fast);
}

.prose a:hover {
  color: var(--brand-600);
  text-decoration-thickness: 3px;
}

/* ============================================================
   FORMULARIOS - Diseño moderno con mejor UX
   ============================================================ */
.form-card { 
  max-width: 680px; 
  margin: 0 auto; 
  background: #fff; 
  padding: 36px 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2);
}

.form-group { 
  margin-bottom: 22px; 
}

.form-group label { 
  display: block; 
  font-weight: 600; 
  margin-bottom: 8px;
  font-size: 0.92rem; 
  color: var(--ink);
  letter-spacing: -0.01em;
}

.form-group input, 
.form-group textarea, 
.form-group select {
  width: 100%; 
  padding: 14px 16px;
  border: 2px solid var(--line);
  border-radius: 12px;
  font-family: inherit; 
  font-size: 0.95rem; 
  background: #fff; 
  color: var(--ink);
  transition: all var(--transition-fast);
}

.form-group input:hover,
.form-group textarea:hover,
.form-group select:hover {
  border-color: var(--line-dark);
}

.form-group input:focus, 
.form-group textarea:focus, 
.form-group select:focus {
  outline: none; 
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-light);
  background: var(--brand-light);
}

.form-group textarea { 
  min-height: 160px; 
  resize: vertical; 
  line-height: 1.6;
}

.form-row { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 18px; 
}

/* ============================================================
   FOOTER - Diseño elegante y moderno
   ============================================================ */
.site-footer { 
  background: linear-gradient(135deg, #0d0202 0%, var(--brand-800) 50%, var(--brand-700) 100%);
  color: rgba(255, 255, 255, 0.85);
  padding: 64px 32px 40px;
  text-align: center;
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.2), transparent);
}

.site-footer .footer-brand { 
  display: inline-flex; 
  align-items: center; 
  gap: 12px;
  font-weight: 700; 
  color: #fff; 
  font-size: 1.1rem;
  margin-bottom: 18px;
  font-family: inherit; 
  text-decoration: none;
  transition: transform var(--transition-fast);
}

.site-footer .footer-brand:hover {
  transform: translateY(-2px);
}

.site-footer .footer-brand img { 
  height: 44px; 
  width: auto;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

.site-footer p {
  margin-bottom: 20px;
  font-size: 0.95rem;
  opacity: 0.9;
}

.site-footer .social {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 24px;
}

.site-footer .social a { 
  color: rgba(255, 255, 255, 0.75) !important;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all var(--transition-fast);
}

.site-footer .social a:hover { 
  color: #fff !important;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.site-footer .copy { 
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.82rem; 
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.02em;
}

/* ============================================================
   FLASH MESSAGES - Notificaciones mejoradas
   ============================================================ */
.flash { 
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 24px;
  font-weight: 600; 
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: fadeInScale 0.3s var(--transition-base);
  border: 2px solid;
}

.flash::before {
  font-size: 1.2rem;
}

.flash.success { 
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  color: #166534;
  border-color: #bbf7d0;
}

.flash.success::before {
  content: '✓';
}

.flash.error { 
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  color: #991b1b;
  border-color: #fecaca;
}

.flash.error::before {
  content: '✕';
}

/* ============================================================
   POST DETALLE - Vista de artículo mejorada
   ============================================================ */
.post-single { 
  max-width: 820px; 
  margin: 0 auto; 
}

.post-single img.cover { 
  width: 100%; 
  max-height: 460px; 
  object-fit: cover; 
  border-radius: var(--radius-lg);
  margin-bottom: 28px;
  box-shadow: var(--shadow-2);
}

.post-single h1 { 
  font-size: clamp(1.9rem, 4.5vw, 2.8rem); 
  letter-spacing: -0.03em;
  margin-bottom: 14px;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.2;
}

.post-single .byline { 
  color: var(--ink-3); 
  margin-bottom: 28px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.badge { 
  display: inline-block; 
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 0.75rem; 
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.badge.published { 
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  color: #166534;
  border: 1px solid #86efac;
}

.badge.draft { 
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  border: 1px solid #fcd34d;
}

/* ============================================================
   PROMO BANNER - Banner promocional destacado
   ============================================================ */
.promo {
  background: linear-gradient(135deg, #0d0202 0%, var(--brand-800) 25%, var(--brand) 60%, var(--gold-dark) 100%);
  color: #fff; 
  padding: 56px 32px;
  position: relative;
  overflow: hidden;
}

.promo::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(212, 165, 116, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.promo .container { 
  max-width: 960px;
  position: relative;
  z-index: 1;
}

.promo .pill { 
  display: inline-block; 
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.74rem; 
  font-weight: 800;
  text-transform: uppercase; 
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,0.3);
}

.promo h2 { 
  font-size: clamp(1.6rem, 4vw, 2.4rem); 
  margin-bottom: 12px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.promo p { 
  opacity: 0.92;
  max-width: 680px; 
  margin-bottom: 24px;
  font-size: 1.08rem;
  line-height: 1.7;
}

.promo .meta { 
  font-size: 0.92rem; 
  opacity: 0.88;
  margin-bottom: 24px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-weight: 500;
}

/* ============================================================
   FEATURE LIST - Lista de características
   ============================================================ */
.feature-list { 
  list-style: none; 
  display: grid; 
  gap: 14px; 
}

.feature-list li { 
  display: flex; 
  gap: 12px; 
  align-items: flex-start;
  padding: 12px;
  border-radius: 10px;
  transition: all var(--transition-fast);
}

.feature-list li:hover {
  background: var(--brand-light);
  transform: translateX(4px);
}

.feature-list .ico { 
  flex: 0 0 32px;
  text-align: center;
  font-size: 1.2rem;
}

/* ============================================================
   PLANES DE PAGO - Cards mejoradas
   ============================================================ */
.plans { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); 
  gap: 20px; 
}

.plan {
  background: linear-gradient(135deg, #fff, var(--bg-soft));
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition: all var(--transition-base);
  cursor: pointer; 
  display: block;
  position: relative;
  overflow: hidden;
}

.plan::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}

.plan:hover, .plan.selected { 
  border-color: var(--brand);
  box-shadow: var(--shadow-2);
  transform: translateY(-4px);
}

.plan:hover::before,
.plan.selected::before {
  transform: scaleX(1);
}

.plan input[type=radio] { 
  margin-right: 10px;
  accent-color: var(--brand);
  width: 18px;
  height: 18px;
}

.plan .plan-price { 
  font-size: 1.6rem; 
  font-weight: 800; 
  color: var(--brand); 
  margin: 12px 0;
  letter-spacing: -0.02em;
}

.plan .plan-label { 
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
}

/* ============================================================
   LIBRERÍA - Carrito y productos
   ============================================================ */
.cart-line { 
  display: flex; 
  align-items: center; 
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  transition: background var(--transition-fast);
}

.cart-line:hover {
  background: var(--bg-soft);
  padding-left: 12px;
  padding-right: 12px;
  margin-left: -12px;
  margin-right: -12px;
  border-radius: 12px;
}

.cart-line .thumb { 
  width: 80px; 
  height: 80px; 
  object-fit: cover; 
  border-radius: 12px;
  background: var(--bg-grey);
  box-shadow: var(--shadow-1);
}

.cart-line .grow { 
  flex: 1; 
}

.shop-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); 
  gap: 24px; 
}

.shop-card { 
  background: #fff; 
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden; 
  display: flex; 
  flex-direction: column; 
  transition: all var(--transition-base);
}

.shop-card:hover { 
  box-shadow: var(--shadow-3);
  transform: translateY(-4px);
  border-color: var(--brand-tint);
}

.shop-card .img { 
  height: 240px; 
  object-fit: cover; 
  width: 100%; 
  background: linear-gradient(135deg, var(--bg-grey), var(--bg-soft));
  transition: transform var(--transition-slow);
}

.shop-card:hover .img {
  transform: scale(1.05);
}

.shop-card .body { 
  padding: 20px; 
  flex: 1; 
  display: flex; 
  flex-direction: column; 
}

.shop-card .cat { 
  font-size: 0.7rem; 
  text-transform: uppercase; 
  letter-spacing: 0.08em;
  color: var(--brand); 
  font-weight: 800;
  margin-bottom: 8px;
  display: inline-block;
}

.shop-card h3 { 
  font-size: 1.05rem; 
  font-weight: 700; 
  margin-bottom: 8px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.shop-card .price { 
  font-weight: 800; 
  color: var(--brand); 
  font-size: 1.3rem;
  margin-top: auto;
  letter-spacing: -0.02em;
}

.category-bar { 
  display: flex; 
  gap: 10px; 
  flex-wrap: wrap; 
  margin-bottom: 32px; 
}

.category-bar a { 
  background: #fff; 
  border: 2px solid var(--line);
  color: var(--ink-2); 
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700; 
  font-size: 0.88rem;
  transition: all var(--transition-fast);
}

.category-bar a:hover { 
  border-color: var(--brand);
  color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow-1);
}

.category-bar a.active { 
  background: linear-gradient(135deg, var(--brand), var(--brand-600));
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 4px 12px rgba(157, 27, 31, 0.3);
}

.qty-input { 
  width: 80px; 
  padding: 10px; 
  border: 2px solid var(--line);
  border-radius: 10px;
  font-weight: 600;
  text-align: center;
  transition: all var(--transition-fast);
}

.qty-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-light);
}

/* ============================================================
   RESULTADO DE PAGO
   ============================================================ */
.result-box { 
  max-width: 520px; 
  margin: 80px auto;
  text-align: center; 
  background: #fff; 
  border: 1px solid var(--line);
  padding: 50px 40px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2);
  animation: fadeInScale 0.5s var(--transition-base);
}

.result-box .big { 
  font-size: 4rem; 
  margin-bottom: 16px;
  animation: fadeInScale 0.6s var(--transition-base) 0.2s backwards;
}

/* ============================================================
   PÁGINA INTERIOR GENÉRICA
   ============================================================ */
.page-head { 
  padding: 56px 32px 12px;
  text-align: center; 
}

.page-head h1 { 
  font-size: clamp(1.8rem, 4vw, 2.6rem); 
  letter-spacing: -0.03em;
  font-weight: 800;
  color: var(--ink);
}

/* ============================================================
   RESPONSIVE - Optimización móvil mejorada
   ============================================================ */
.menu-toggle { 
  display: none; 
  background: none; 
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.menu-toggle:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-light);
}

@media (max-width: 860px) {
  .menu-toggle { 
    display: block; 
    order: 3; 
  }
  
  .nav-links {
    order: 4; 
    width: 100%; 
    display: none; 
    flex-direction: column; 
    align-items: stretch;
    gap: 6px; 
    padding: 16px 0;
    border-top: 1px solid var(--line);
    animation: fadeIn 0.3s var(--transition-base);
  }
  
  .nav-links.open { 
    display: flex; 
  }
  
  .nav-links > a, 
  .nav-links a.btn-admin { 
    padding: 14px 18px;
    border-radius: 10px;
    text-align: left;
  }
  
  .nav-links > a::after {
    display: none;
  }
  
  .nav-links a.btn-admin { 
    justify-content: center; 
    text-align: center;
    margin-top: 8px;
  }

  .nav-separator {
    width: 100%;
    height: 1px;
    margin: 8px 0;
  }

  .nav-login-link {
    padding: 14px 18px;
    border-radius: 10px;
  }

  /* User menu mobile */
  .user-menu {
    width: 100%;
  }
  .user-menu-btn {
    width: 100%;
    justify-content: flex-start;
    padding: 14px 18px;
    border-radius: 10px;
    border: none;
  }
  .user-dropdown {
    position: static;
    width: 100%;
    box-shadow: none;
    border: none;
    border-radius: 10px;
    background: var(--bg-soft);
    margin-top: 4px;
  }
  
  .dropdown { 
    width: 100%; 
  }
  
  .dropdown-menu { 
    position: static; 
    transform: none;
    display: none; 
    box-shadow: none;
    border: none; 
    padding: 0 0 0 16px;
    background: transparent;
    margin-top: 6px;
  }
  
  .dropdown.open .dropdown-menu,
  .dropdown.is-open .dropdown-menu { 
    display: block;
    opacity: 1;
  }
  
  .dropdown .drop-btn { 
    width: 100%; 
  }
}

@media (max-width: 640px) {
  .container { 
    padding: 0 20px; 
  }
  
  .section { 
    padding: 64px 20px; 
  }
  
  .hero { 
    padding: 80px 20px 96px; 
  }
  
  .hero h1 {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }
  
  .hero p {
    font-size: 1.05rem;
  }
  
  .form-row { 
    grid-template-columns: 1fr; 
  }
  
  .form-card {
    padding: 28px 24px;
  }
  
  .grid-3, 
  .grid-4 { 
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 20px; 
  }
  
  .card-img { 
    height: 200px; 
  }
  
  .cart-line { 
    flex-wrap: wrap; 
  }
  
  .brand img { 
    height: 42px; 
  }
  
  .nav {
    padding: 10px 20px;
  }
  
  .shop-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }
  
  .shop-card .img {
    height: 200px;
  }
  
  .site-footer {
    padding: 48px 20px 32px;
  }
  
  .site-footer .social {
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .plans {
    grid-template-columns: 1fr;
  }
  
  .category-bar {
    gap: 8px;
  }
  
  .category-bar a {
    font-size: 0.82rem;
    padding: 8px 14px;
  }
}

/* ============================================================
   UTILIDADES Y ESTADOS ADICIONALES
   ============================================================ */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-3);
}

.empty .big {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* Loading state */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Hover lift effect para elementos interactivos */
.lift {
  transition: transform var(--transition-fast);
}

.lift:hover {
  transform: translateY(-4px);
}

/* Glassmorphism effect */
.glass {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Scroll to top indicator */
.scroll-indicator {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  background: var(--brand);
  color: white;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-3);
  transition: all var(--transition-fast);
  z-index: 50;
}

.scroll-indicator:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-4);
}

/* ============================================================
   ASISTENTE IA - Chat Widget flotante
   ============================================================ */
.chat-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 20px rgba(157, 27, 31, 0.35);
  z-index: 9999;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.chat-fab-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  transition: transform 0.3s;
}
.chat-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(157, 27, 31, 0.45);
}
.chat-fab:hover .chat-fab-logo {
  transform: scale(1.1);
}
.chat-fab.open {
  background: var(--brand-700);
}
.chat-fab.open .chat-fab-logo {
  opacity: 0;
  transform: scale(0.5) rotate(90deg);
}
.chat-fab.open::after {
  content: '✕';
  position: absolute;
  font-size: 1.4rem;
  color: #fff;
  font-weight: 300;
}

.chat-window {
  position: fixed;
  bottom: 100px;
  right: 28px;
  width: 400px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: calc(100vh - 140px);
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.08);
  display: none;
  flex-direction: column;
  z-index: 9998;
  overflow: hidden;
  border: 1px solid var(--line);
}
.chat-window.open {
  display: flex;
  animation: chatSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes chatSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-header {
  background: var(--brand);
  color: #fff;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.chat-header-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.chat-header-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
}
.chat-header-info {
  flex: 1;
  min-width: 0;
}
.chat-header-info strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
}
.chat-header-info small {
  opacity: 0.8;
  font-size: 0.8rem;
}
.chat-close {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: grid;
  place-items: center;
  transition: background 0.2s;
  flex-shrink: 0;
}
.chat-close:hover {
  background: rgba(255,255,255,0.3);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.chat-msg {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.5;
  word-wrap: break-word;
  animation: msgFade 0.25s ease;
}
@keyframes msgFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.chat-msg.user {
  align-self: flex-end;
  background: var(--brand);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-msg.bot {
  align-self: flex-start;
  background: var(--bg-grey);
  color: var(--ink);
  border-bottom-left-radius: 4px;
}
.chat-msg.bot a {
  color: var(--brand);
  font-weight: 600;
  text-decoration: underline;
}
.chat-msg.error {
  align-self: flex-start;
  background: #fef2f2;
  color: #991b1b;
  font-size: 0.85rem;
}

.chat-typing {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background: var(--bg-grey);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
}
.chat-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-light);
  animation: typingDot 1.2s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}

.chat-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 20px 12px;
}
.chat-quick-btn {
  background: var(--brand-light);
  color: var(--brand);
  border: 1px solid var(--brand-tint);
  border-radius: 20px;
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.chat-quick-btn:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.chat-input-area {
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  background: #fff;
  flex-shrink: 0;
}
.chat-input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 16px;
  font-size: 0.9rem;
  font-family: inherit;
  resize: none;
  outline: none;
  transition: border-color 0.2s;
  max-height: 80px;
}
.chat-input:focus {
  border-color: var(--brand);
}
.chat-send {
  background: var(--brand);
  color: #fff;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: background 0.2s;
}
.chat-send:hover {
  background: var(--brand-700);
}
.chat-send:disabled {
  background: var(--ink-light);
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .chat-window {
    bottom: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    max-width: 100vw;
  }
  .chat-fab {
    bottom: 20px;
    right: 20px;
    width: 54px;
    height: 54px;
  }
}