/* ============================================
   PATITAS Y TINTA — CSS GLOBAL v2.0
   Header desktop + mobile drawer
   Carga en todas las páginas
   ============================================ */

/* ── Reset outline azul/violeta ── */
*, *:focus, *:focus-visible, *:focus-within { outline: none !important; }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none !important;
  border-color: #C4622D !important;
  box-shadow: 0 0 0 3px rgba(196,98,45,0.15) !important;
}
a { color: inherit; text-decoration: none; }
a:visited { color: inherit; }
a:hover { color: inherit; }

/* ═══════════════════════════════════════════════
   DESKTOP HEADER (.pyt-header)
   Visible solo en >1100px
═══════════════════════════════════════════════ */
.pyt-header {
  display: none; /* oculto por defecto, se muestra en desktop */
  background: rgba(251,247,240,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226,212,190,0.4);
  position: sticky;
  top: 0;
  z-index: 10000;
  width: 100%;
}

@media (min-width: 1101px) {
  .pyt-header { display: block !important; }
  .pyt-mobile { display: none !important; }
  body { padding-top: 0 !important; }
}

.pyt-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Logo ── */
.pyt-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}
.pyt-logo img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(196,98,45,0.15);
}
.pyt-logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: #1A1008;
  line-height: 1;
}
.pyt-logo-text em {
  color: #C4622D;
  font-style: italic;
}

/* ── Acciones desktop ── */
.pyt-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}

/* ── Botón CTA naranja ── */
.pyt-btn--cta,
.pyt-btn.pyt-btn--cta {
  background: linear-gradient(135deg, #C4622D, #D4784A);
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  padding: 12px 24px;
  border-radius: 100px;
  text-decoration: none;
  font-family: 'Jost', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 4px 16px rgba(196,98,45,0.3);
  transition: all 0.2s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  cursor: pointer;
}
.pyt-btn--cta:hover {
  background: linear-gradient(135deg, #a8511f, #C4622D);
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(196,98,45,0.45);
}
.pyt-btn--cta:active { transform: translateY(0); }

/* ── Botón outline (Ingresar) ── */
.pyt-btn--outline,
.pyt-btn.pyt-btn--outline {
  display: inline-flex;
  align-items: center;
  padding: 11px 22px;
  background: transparent;
  border: 1.5px solid #E2D4BE;
  border-radius: 100px;
  color: #1A1008 !important;
  -webkit-text-fill-color: #1A1008 !important;
  font-family: 'Jost', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.2s;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}
.pyt-btn--outline:hover {
  background: #1A1008;
  border-color: #1A1008;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  transform: translateY(-2px);
}

/* ── Botón ghost (Registrarse) ── */
.pyt-btn--ghost,
.pyt-btn.pyt-btn--ghost {
  display: inline-flex;
  align-items: center;
  padding: 11px 22px;
  background: transparent;
  border: 1.5px solid rgba(196,98,45,0.35);
  border-radius: 100px;
  color: #C4622D !important;
  -webkit-text-fill-color: #C4622D !important;
  font-family: 'Jost', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.2s;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}
.pyt-btn--ghost:hover {
  background: rgba(196,98,45,0.08);
  color: #C4622D !important;
  -webkit-text-fill-color: #C4622D !important;
  transform: translateY(-2px);
}

/* ── Botón cuenta (usuario logueado) ── */
.pyt-btn--account,
.pyt-btn.pyt-btn--account {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: white;
  border: 1.5px solid #E2D4BE;
  border-radius: 100px;
  font-family: 'Jost', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: #1A1008 !important;
  -webkit-text-fill-color: #1A1008 !important;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.pyt-btn--account:hover {
  border-color: #C4622D;
  box-shadow: 0 4px 12px rgba(196,98,45,0.15);
  transform: translateY(-1px);
  color: #1A1008 !important;
  -webkit-text-fill-color: #1A1008 !important;
}

/* ── Avatar inicial ── */
.pyt-account-avatar {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #C4622D, #D4784A);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white !important;
  -webkit-text-fill-color: white !important;
  font-weight: 800;
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* ── Dropdown cuenta ── */
.pyt-account { position: relative; }
.pyt-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: white;
  border: 1.5px solid #E2D4BE;
  border-radius: 14px;
  padding: 8px;
  min-width: 210px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
  z-index: 99999;
}
.pyt-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.pyt-dropdown-header {
  padding: 10px 14px 8px;
  border-bottom: 1px solid #E2D4BE;
  margin-bottom: 4px;
}
.pyt-dropdown-name {
  display: block;
  font-family: 'Jost', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: #1A1008;
}
.pyt-dropdown-sub {
  display: block;
  font-size: 0.78rem;
  color: #8A7060;
}
.pyt-dropdown-divider {
  height: 1px;
  background: #E2D4BE;
  margin: 4px 0;
}
.pyt-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  color: #1A1008 !important;
  -webkit-text-fill-color: #1A1008 !important;
  font-family: 'Jost', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  transition: background 0.15s;
}
.pyt-dropdown-item:hover {
  background: rgba(196,98,45,0.07);
  color: #1A1008 !important;
  -webkit-text-fill-color: #1A1008 !important;
}
.pyt-dropdown-item--danger,
.pyt-dropdown-item--danger:hover {
  color: #c0392b !important;
  -webkit-text-fill-color: #c0392b !important;
}
.pyt-dropdown-item--danger:hover { background: #fff0f0; }
.pyt-chevron { transition: transform 0.2s; }

/* ═══════════════════════════════════════════════
   MOBILE — topbar + drawer
   Visible solo en ≤1100px
═══════════════════════════════════════════════ */
.pyt-mobile {
  display: none;
}

@media (max-width: 1100px) {
  .pyt-header { display: none !important; }
  .pyt-mobile { display: block !important; }

  /* Espacio para el bottom nav del plugin */
  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* ── Drawer lateral ── */
.pyt-drawer {
  display: none;
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  pointer-events: none;
}
.pyt-drawer.open {
  display: block !important;
  pointer-events: auto;
}
.pyt-drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26,16,8,0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.pyt-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 85vw);
  background: white;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  box-shadow: -8px 0 40px rgba(0,0,0,0.15);
}
.pyt-drawer.open .pyt-drawer-panel {
  transform: translateX(0);
}
.pyt-drawer-header {
  position: sticky;
  top: 0;
  background: white;
  border-bottom: 1px solid #E2D4BE;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Playfair Display', serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: #1A1008;
  z-index: 10;
  flex-shrink: 0;
}
.pyt-drawer-close {
  width: 36px;
  height: 36px;
  background: rgba(226,212,190,0.3);
  border: none;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #1A1008;
  transition: all 0.2s;
}
.pyt-drawer-close:active { transform: scale(0.9); }
.pyt-drawer-body {
  padding: 20px;
  padding-bottom: calc(80px + env(safe-area-inset-bottom));
  flex: 1;
}
.pyt-drawer-user {
  display: flex;
  gap: 14px;
  align-items: center;
  background: linear-gradient(135deg, rgba(196,98,45,0.08), rgba(212,120,74,0.06));
  border: 1.5px solid rgba(196,98,45,0.2);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 24px;
}
.pyt-drawer-avatar {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #C4622D, #D4784A);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.pyt-drawer-username {
  font-family: 'Jost', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: #1A1008;
}
.pyt-drawer-usersub {
  font-size: 0.78rem;
  color: #8A7060;
}
.pyt-drawer-section { margin-bottom: 24px; }
.pyt-drawer-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: #8A7060;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
  padding-left: 4px;
}
.pyt-drawer-link {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  text-decoration: none;
  color: #1A1008 !important;
  -webkit-text-fill-color: #1A1008 !important;
  font-family: 'Jost', sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 2px;
  transition: background 0.15s;
}
.pyt-drawer-link:hover, .pyt-drawer-link:active {
  background: rgba(196,98,45,0.07);
  color: #1A1008 !important;
  -webkit-text-fill-color: #1A1008 !important;
}
.pyt-drawer-link--danger,
.pyt-drawer-link--danger:hover {
  color: #c0392b !important;
  -webkit-text-fill-color: #c0392b !important;
}
.pyt-drawer-link--danger:hover { background: #fff0f0; }
.pyt-drawer-cta {
  display: block;
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #C4622D, #D4784A);
  color: white !important;
  -webkit-text-fill-color: white !important;
  text-align: center;
  text-decoration: none;
  font-family: 'Jost', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 100px;
  box-shadow: 0 6px 20px rgba(196,98,45,0.35);
  margin-top: 24px;
  transition: all 0.2s;
  box-sizing: border-box;
}
.pyt-drawer-cta:hover {
  background: linear-gradient(135deg, #a8511f, #C4622D);
  color: white !important;
  -webkit-text-fill-color: white !important;
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════
   OCULTAR HEADER DE ELEMENTOR
═══════════════════════════════════════════════ */
.elementor-location-header { display: none !important; }

/* ========== MOBILE TOPBAR (logo centrado) ========== */
.pyt-topbar-mobile {
    display: none;
}
@media (max-width: 1100px) {
    body { padding-top: 60px !important; }
    .pyt-topbar-mobile {
        display: flex !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 99998;
        background: rgba(251,247,240,0.96);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-bottom: 1px solid rgba(226,212,190,0.4);
        padding: 10px 16px;
        align-items: center;
        justify-content: space-between;
        height: 60px;
        box-sizing: border-box;
        box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    }
    body {
        padding-top: 60px !important;
        padding-bottom: calc(72px + env(safe-area-inset-bottom)) !important;
    }
    /* Hamburger */
    .pyt-hamburger-btn {
        width: 40px;
        height: 40px;
        background: white;
        border: 1.5px solid #E2D4BE;
        border-radius: 10px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        cursor: pointer;
        flex-shrink: 0;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        transition: all 0.2s;
    }
    .pyt-hamburger-btn span {
        display: block;
        width: 18px;
        height: 2px;
        background: #1A1008;
        border-radius: 2px;
    }
    .pyt-hamburger-btn:active {
        background: rgba(196,98,45,0.08);
        transform: scale(0.95);
    }
    /* Logo en topbar mobile */
    .pyt-topbar-mobile .pyt-logo {
        display: flex;
        align-items: center;
        gap: 8px;
        text-decoration: none;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
    .pyt-topbar-mobile .pyt-logo img {
        width: 32px;
        height: 32px;
        border-radius: 8px;
        box-shadow: 0 2px 6px rgba(196,98,45,0.15);
    }
    .pyt-topbar-mobile .pyt-logo .pyt-logo-text {
        font-family: 'Playfair Display', serif;
        font-size: 1.1rem;
        font-weight: 800;
        color: #1A1008;
        white-space: nowrap;
    }
    .pyt-topbar-mobile .pyt-logo .pyt-logo-text em {
        color: #C4622D;
        font-style: italic;
    }
    /* Ocultar desktop header en mobile */
    .pyt-header {
        display: none !important;
    }
}
