/* ==========================================================================
   DIGITIENDA LAYOUT & NAVIGATION STYLES
   ========================================================================== */

/* Header Dinámico con color de realce y soporte para iPhone / Dynamic Island */
.app-header {
  background: var(--header-gradient, linear-gradient(135deg, #064e3b 0%, #065f46 100%));
  color: var(--text-white);
  padding: calc(env(safe-area-inset-top, 0px) + 14px) 16px 18px 16px;
  border-radius: 0 0 20px 20px;
  box-shadow: var(--shadow-md);
  transition: background 0.3s ease;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.store-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.2px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.store-title {
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-right-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.connection-status {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--border-radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.connection-status.online {
  background-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.connection-status.offline {
  background-color: rgba(239, 68, 68, 0.3);
  color: #fee2e2;
  border: 1px solid rgba(254, 202, 202, 0.4);
}

.user-pill {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.18);
  padding: 3px 8px;
  border-radius: var(--border-radius-full);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.greeting-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 2px;
  line-height: 1.2;
}

.user-highlight {
  color: #ffffff;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.4);
}

.header-sub {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
}

/* Bottom Navigation Bar Fija */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-content-width);
  height: var(--nav-height);
  background-color: #ffffff;
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
  z-index: 900;
}

.nav-container {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: space-around;
  padding: 0 4px;
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 10px;
  flex: 1;
  transition: all 0.15s ease;
  position: relative;
}

.nav-icon {
  font-size: 1.3rem;
  margin-bottom: 2px;
}

.nav-label {
  font-size: 0.72rem;
  font-weight: 600;
}

.nav-btn.active {
  color: var(--color-primary-dark);
}

.nav-btn.active .nav-icon {
  transform: scale(1.1);
}

/* Botón central elevado (+ Nuevo Fiado) */
.nav-btn-primary {
  color: var(--text-white);
  position: relative;
  top: -12px;
}

.nav-btn-primary .nav-icon {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.5rem;
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
  border: 3px solid #ffffff;
  transition: transform 0.15s ease;
}

.nav-btn-primary .nav-label {
  color: var(--color-primary-dark);
  font-weight: 700;
  margin-top: 2px;
}

.nav-btn-primary:active .nav-icon {
  transform: scale(0.92);
}
